query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Adds column and read back if it is nullable or not.
@Test public void isNullable() { final AtomicLong columnKey0 = new AtomicLong(-1); final AtomicLong columnKey1 = new AtomicLong(-1); Table table = TestHelper.createTable(sharedRealm, "temp", new TestHelper.AdditionalTableSetup() { @Override public void execute(Table t...
[ "public native boolean\tgetColumnIsNullable(int col);", "void add(Column column) throws NullPointerException;", "Column setNullable(boolean nullable);", "@Override\n\tpublic int isNullable(int column) throws SQLException {\n\t\tcheckColumnIndex(column);\n\t\treturn ResultSetMetaData.columnNullable;\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public int getCount() { return c.length; }
[ "@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" ] ] } }
optional float width = 3;
public Builder clearWidth() { bitField0_ = (bitField0_ & ~0x00000004); width_ = 0F; onChanged(); return this; }
[ "public void setWidth(float width) { this.width = width; }", "public void set_width(int w){width = w;}", "public void setWidth(float width)\n {\n this.width = width;\n }", "private static int getSetWidth( int width )\n {\n width = ( width / 2 ) * 2 + 1;\n if ( width == 1 ) width = 3;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the login type.
public String getLoginType() { return this.loginType; }
[ "@Override\r\n\tpublic int getType() {\n\t\treturn PacketType._CS_Login_;\r\n\t}", "public String getUserType() {\n return userType.get();\n }", "public String getLogin() {\n return pref.getString(KEY_LOGIN, null);\n }", "public String getUserType() {\n\t\treturn _userType;\n\t}", "public S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Gets the class name and exception message.
public String toString() { String s = getClass().getName(); return s + ": " + exceptionMessage; }
[ "public String getFailureMessage()\n {\n // do NOT replace \"\\n\" with IOUtils.LINE_SEPARATOR, it won't work on Windows\n final String messageWithClassPrefix = StringUtils.substringBefore(stackTrace, \"\\n\");\n\n String plainMessage = StringUtils.substringAfter(messageWithClassPrefix, \": ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void widgetSelected(SelectionEvent arg0) { BDMemoryMapEditor MMEditor = new BDMemoryMapEditor(shell.getShell(), "System BUS(AXI)", new IBDMemoryMapEditorListener() { @Override public void onOk(ArrayList<BDMemoryMapItem> items) { // TODO Auto-generated method st...
[ "@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" ] ] } }
Take string as int, if can't go to NumberFormatException
public boolean setPrice(String s) { try { price = Integer.parseInt(s); return true; } catch(NumberFormatException e) { return false; } }
[ "protected int parseInt(String str) throws NumberFormatException {\n return parseInt(str, maxParseLimit);\n }", "private int ignoreInvalidNums(String text) {\n int num = -1;\n try {\n if(text != null) {\n if(!text.equals(\"\")) {\n num = Integer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return new Greeting(counter.incrementAndGet(), String.format(template, name));
@RequestMapping("/greeting") public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) { return _currentGreeting; }
[ "public String createGreeting(String name) {\n return phraseBuilder.buildPhrase(\"hello\", name);\n }", "@Override\r\n\t\tpublic String greeting() \r\n\t\t{\n\t\t\t\t\r\n\t\t\tRandom r = new Random();\r\n\t\t\treturn randomgreets[r.nextInt(randomgreets.length)];\r\n\t\t}", "public static String makeGr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test remote data notifications
@Test public void testRemoteDataMessage() { when(pushManager.isComponentEnabled()).thenReturn(true); when(pushManager.isPushEnabled()).thenReturn(true); when(pushManager.isOptIn()).thenReturn(true); when(pushManager.isUniqueCanonicalId("testPushID")).thenReturn(true); // Set...
[ "public void testNotification(){\n\t}", "public void testNotification() {\n\n\t\tJSONRPC2Notification notification = new JSONRPC2Notification(RPC_METHOD_GOOD);\n\n\t\tURL url = null;\n\n\t\ttry {\n\t\t\turl = new URL(URL_HTTP_GOOD);\n\n\t\t} catch (MalformedURLException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the given chunk to the end of the program
public ScriptBuilder addChunk(ScriptChunk chunk) { return addChunk(chunks.size(), chunk); }
[ "protected void addchunk(Chunk toAdd) {\n\t\tChunk[] chunks2 = new Chunk[chunks.length + 1];\n\t\tSystem.arraycopy(chunks, 0, chunks2, 0, chunks.length);\n\t\tchunks2[chunks.length] = toAdd;\n\t\tthis.chunks = chunks2;\n\t}", "@Override\n\tpublic void end(String chunk) {\n\t\t\n\t}", "@Override\n\tpublic void e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column report_match_finish.part_time
public void setPartTime(Date partTime) { this.partTime = partTime; }
[ "public void setCompletedTime(java.util.Calendar param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localCompletedTimeTracker = true;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Will remove the carrier from the database
private void removeCarrier(Message msg) { Message addr = msg.getMessage(InetAddressTag); String ip = addr.getValue(IPAddressTag); String port = addr.getValue(PortNumberTag); mai.logWriter.writeLog("Removing carrier: " + ip + ":" + port); System.out.println("removing carrier"); ...
[ "@Override\n\tpublic void deleteCarrier(long code) {\n\t\tCarriers carrier = this.em.find(Carriers.class, code);\n\t\tthis.em.remove(carrier);\n\t}", "public void unsetCarrierList()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CARRIERLI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds element at the end of the list
public void add(Object item) { if (head == null) { // We have empty list head = new Node(item); tail = head; } else { // We have non-empty list Node newNode = new Node(item, tail); tail = newNode; } count++; }
[ "public void addLast(E element){\r\n list.addLast(element);\r\n length += 1;\r\n }", "public void addLast(Item item)\r\n { l.addAtRear(item); }", "public void addToEnd(T element) {\r\n if (isEmpty()) \r\n addToFront(element);\r\n else {\r\n LLNode<T> nodeptr = getFront();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
methods to complete implementation of AbstractTreeable
@Transient public int getFullNameDirection() { return definition.getFullNameDirection(); }
[ "public interface Tree<E> extends Iterable<E>{\n Position<E> getRoot();\n Position<E> getParent(Position<E> p) throws IllegalArgumentException;\n Iterable<Position<E>> getChildren(Position<E> p) throws IllegalArgumentException;\n int getNumChildren(Position<E> p) throws IllegalArgumentException;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method that gets the name of the school
public String getName() { return name; }
[ "public Chihu.School getSchool() {\n return school_;\n }", "@java.lang.Override\n public com.xr.nettychat.protobuf.DataInfo.School getSchool() {\n if (dataBodyCase_ == 4) {\n return (com.xr.nettychat.protobuf.DataInfo.School) dataBody_;\n }\n return com.xr.nettychat.protobuf.Data...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the path and finding status when run
public void stopFinding() { pathfinder.clearPath(); entity.getPhys().setWalkDirection(Vector3f.ZERO); finding = false; target = null; }
[ "public synchronized void reset() {\r\n\t\tfinish();\r\n\t\tpaths.clear();\r\n\t\tlogger.debug(\"paths reset\");\r\n\t}", "public void resetUnfinishedPaths() {\r\n unfinPaths.clear();\r\n }", "public void clearGotoPath() {\n }", "public void cleanAll() {\n\t\tm_path.reset();\n\t}", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construtor generico utilizado pela GUI.
public Aluno() { // Generico }
[ "public CarroGUI() {\n initComponents();\n setLocationRelativeTo(null);\n ff = new CarroDAO();\n loadmodel();\n modelocombo();\n setTitle(\"Carros\");\n }", "public ProyectoConstruccionGui() throws SQLException {\n initComponents();\n actualizarTabla();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds a reference to the list of references
public void addReference(Reference myReference) { references.add(myReference); }
[ "@Override\n\tpublic void addReference(MAnnotationReference reference) {\n\t\treferences.add(reference);\n\t}", "public void addReference(XReference xReference)\n {\n m_xreferenceList.add(xReference);\n }", "public void addRefFromFile(String refString) {\r\n\t\tReferee newRef = new Referee(refStrin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of OrganicMaterialLevelConverter.
public OrganicMaterialLevelConverter(OrganicMaterialLevel entity, URI uri, int expandLevel, boolean isUriExtendable) { this.entity = entity; this.uri = (isUriExtendable) ? UriBuilder.fromUri(uri).path(entity.getOrganicMaterialLevelPK().getExpId() + "," + entity.getOrganicMaterialLevelPK().getOm() + "/").build() : u...
[ "public Level makeLevel() {\n MapParser parser = getMapParser();\n try (InputStream boardStream = Launcher.class\n .getResourceAsStream(\"/board.txt\")) {\n return parser.parseMap(boardStream);\n } catch (IOException e) {\n throw new PacmanConfigurationExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Imei device status fragment test
@Test public void imeiStatusFragment(){ mainResultActivity(); onView(withText("12345678912345")).check(matches(isDisplayed())); }
[ "@Test\n public void imeiStatusError() {\n\n mainTabActivity();\n\n String imei = \"12345678912345\";\n onView(withId(R.id.imei_et)).perform(clearText());\n onView(withId(R.id.imei_et)).perform(typeText(imei), closeSoftKeyboard());\n mMockServerRule.server().setDispatcher(statu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public User getUserById(int id) { return userdao.getUserById(id); }
[ "@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" ] ] } }
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v =inflater.inflate(R.layout.fragment_search, container, false); e1 = (EditText)v.findViewById(R.id.Search_id); nm = (TextView) v.findViewById(R.id...
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.movie_statistic_layout, parent, false);\n }", "@Override\n\tprotected View initView(LayoutInflater inflate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Metodos utilizados para obtermos um interface Cliente/Sistema mais user friendly
private void opcoesNotLoggedIn() { System.out.println("........................................................................................................."); System.out.println("........................................................................................................."); Sys...
[ "public interface ClienteIntOperations \n{\n void recibirMensaje (String usuario, String mensaje);\n void establecerSesionPrivada (String usuario);\n void recibirMensajePrivado (String usuario, String mensaje);\n void recibirContacto (String usuario);\n String obtenerNombre ();\n void borrarListaDeContactos (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Verify Visit is Present In Change To Visit DropDown
public void verifyVisitIsPresentInChangeToVisitDropDown(String visitTobePresent) { waitForElementPresent(By.xpath("//div[@data-display-value='selectedVisit.name']//parent::button//following-sibling::div//ul"), 10); boolean flag = false; for (WebElement visitChangeTo : changeToVisitList) { if (visitChangeTo.get...
[ "public void verifyChangeValue()\r\n\t{\r\n\t\tResultUtil.report(\"INFO\", \"OpenAssignment >>>verifyChangeValue\",driver);\r\n\t\tfocusAgbodyFrame();\r\n\t\tWebElement changeValue=driver.findElement(By.xpath(\"//a[.='Change Values']\"));\r\n\t\tLink.verify(\"Change Values\", changeValue, driver);\r\n\t}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GPLUS local file upload by dlFile
protected long localFileUploadDLfile(DataEntry dataEntry, Long dlFolderId, ServiceContext sc) throws PortalException, SystemException, SQLException, IOException{ UploadPortletRequest upload = PortalUtil.getUploadPortletRequest(sc.getLiferayPortletRequest()); long fileEntryId = 0; if(dlFolderId != 0 ){ Stri...
[ "void uploadFile();", "File uploadFile(String filename);", "File uploadFile(String pathToFile, String pathname);", "Path loadFile(UploadType type,String fileName);", "public void upload(final Context ctx, final String url, final String localPath, final PostCallbackIA postCBIA) {\n\t\tRequestParams params = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the mean longitude argument.
private double computeAlphaM(final double alphaM) { // Generalization of Kepler equation to equinoctial parameters // with alphaE = PA + E and // alphaM = PA + M = alphaE - ex.sin(alphaE) + ey.cos(alphaE) double alphaE = alphaM; double shift = 0.0; double alphaEMalph...
[ "public double avgLatitude()\r\n\t{\r\n\t\treturn (startLoc.getLatitude() + endLoc.getLatitude()) / 2;\r\n\t}", "public static double geoMean(double a, double b){\n\treturn Math.sqrt(a * b);\n }", "public static double geoMean(double a, double b) {\n return Math.sqrt(a * b);\n }", "public double getMea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Administrator on 20171121.
public interface DemoService { }
[ "@Override\n }", "@Override\n public void extornar() {\n \n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "public void mo5201a() {\n }", "@Override\n public int utilite() {\n return 0;\n }", "private static void EX5() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .UpdatedConf updated_conf = 28;
com.gzligo.ebizzcardstranslator.mqtt.protobuf.MQTTProtobufMsg.UpdatedConf getUpdatedConf();
[ "DscConfiguration.Update update();", "@Override\n\tpublic void updateConfig() {\n\n\t}", "default void updateConfig() {\n\n }", "@Override\n\tpublic void updateConfig(Date lastUpdateTime) {\n\n\t}", "public static Configuration updateConf(Configuration conf)\r\n\t{\n\t\treturn conf;\r\n\t}", "config.Con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
basic enum for book situation for purchaser
situaçãodevenda checkSellingStatus(String livro);
[ "public Integer getBookType() {\n return bookType;\n }", "public String getType() {\n\t\treturn \"itemBook\";\n\t}", "public String getBookingType() \r\n {\r\n return bookingType;\r\n }", "public boolean book(Book book)\n\t{\n\t\tif (book.getStatus().equals(\"accepted\"))\n\t\t{\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the color of bars on the chart.
public void setBarColor(Color color) { barColor = color; repaint(); }
[ "public void setBarColor(Color aBarColor) {\n\t\tbarColor = aBarColor;\n\t}", "private void setChartColors() {\n chartSeriesPaint.add(Color.RED);\n chartSeriesPaint.add(Color.BLUE);\n chartSeriesPaint.add(Color.GREEN);\n chartSeriesPaint.add(Color.YELLOW);\n chartSeriesPaint.add...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Has to be called before a move is played. Checks whether the 2 dimensional value is known. If not, makes sure that it it is calculated and set. Possible situations: pos known without x and y known, pos known with x and y known.
public void makePlayable(int height) { if (x != null & y != null & pos != null) { return; } set2DParameters(height); }
[ "public int validateCoordinate(int pos) {\r\n int temp;\r\n if(pos > 0) {\r\n temp = pos;\r\n } else {\r\n System.out.println(\"Invalid xPos, defaulting to xPos = \" + DEFAULT_COORD);\r\n temp = DEFAULT_COORD;\r\n }\r\n return temp;\r\n }", "v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel4 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); setClos...
[ "public StForm() {\n initComponents();\n }", "public CineForm() {\n initComponents();\n }", "public javaform() {\n initComponents();\n }", "public EditDemographicForm() {\n initComponents();\n }", "public FightForm() {\n initComponents();\n }", "public For...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add any request parameters.
protected HttpMethodAndByteCount performRestPut(String path, Map metadata, Map requestParameters, InputStream dataInputStream) throws S3ServiceException { path = addRequestParametersToUrlPath(path, requestParameters); HttpMethodBase httpMethod = setupConnection("PUT", path); ...
[ "void addRequestParameters(Map<String, String> paramsMap);", "private void addBoilerplateRequestParameters() {\n request.addParameter(REQUEST_PARAMETER_AUTHTOKEN, \"3bb0a4cc58933d2f18acdce2084cb387\");\n request.addParameter(REQUEST_PARAMETER_ALGOSERVER, \"http://pod1.staging.v1.api.algorithms.io\")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) { int numero; System.out.println("Numeros que divididos por 11 o resto é 5: "); for(numero = 1000;numero<2000; numero++); { if((numero%11)==5); { System.out.printf("\n%d", numero); } } }
[ "@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 was generated by MyBatis Generator. This method returns the value of the database column customer.cust_passwd
public String getCustPasswd() { return custPasswd; }
[ "public String getJdbcPassword();", "public String getPassword()\r\n {\r\n return(getString(\"password\"));\r\n }", "public String getUserPassword() {\r\n return csmProps.getProperty(CSM_PASSWORD);\r\n }", "public String getPassword() {\r\n return this.password==null?\"\":this.pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ compiled from: MemoryCache
public interface a { void a(D<?> d2); }
[ "void invalidateAllInPreCompileCache();", "public void preLoadCache();", "public void cacheResult(CsmapCache csmapCache);", "public static Map<String, byte[]> compile(String fileName, String source) throws IOException {\n try (MemoryJavaFileManager manager = new MemoryJavaFileManager(stdManager)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Query test account users identified by name (n) arg passed to the method; returns test user (JsonObject) to caller if success or null otherwise
public static JsonObject getTestUser( String n ) { Iterator<JsonElement> it = tusers.iterator(); while( it.hasNext() ) { JsonObject o = (JsonObject) it.next(); if( o.get( "user" ).getAsString().equals( n ) ) { return o; } } return null; }
[ "@Test\r\n public void testRetrieveUserAccountByLoginName() throws Exception {\r\n\r\n doTestRetrieveUserAccount(HANDLE, null, \"byLoginName\", PWCallback.DEFAULT_HANDLE, STATUS_ACTIVE, null);\r\n }", "TestUser getTestUser(String userName);", "@Test\r\n public void testRetrieveUserAccountById() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepare the query fetch participants based on SSN
public String getSSNQuery(Set<Long> protocolIdSet) { String protocolIdStr = ParticipantManagerUtility.getProtocolIdsString(protocolIdSet); String fetchBySSNQry = null; if (protocolIdSet == null || protocolIdSet.isEmpty()) { fetchBySSNQry = " from " + Participant.class.getName() + " partici...
[ "private void fuzzyMatchOnSSN2(DAO dao, Map<Long, Participant> mapOfParticipants, String ssn)\r\n\t\t\tthrows DAOException\r\n\t{\r\n\t\tList<Participant> listOfParticipants = null;\r\n\t\tStringBuffer tempssnStr = new StringBuffer();\r\n\t\tString participantQueryStr = null;\r\n\t\tchar[] charArray = null;\r\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the sign token as a String.
@Override public String toString() { return this.sign.toString(); }
[ "public String getTokenString();", "public String signString() {\n if (mAmount.isPositive()) {\n return \"+\";\n }\n return \"-\";\n }", "public com.google.protobuf.ByteString getSign() {\n return sign_;\n }", "public com.google.protobuf.ByteString getSign() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Destroy the current discovery session stops publishing or subscribing if currently active.
public void terminate() { mCallback = null; if (mIsPublishSession) { mWifiAwareNativeApi.stopPublish((short) 0, mPubSubId); } else { mWifiAwareNativeApi.stopSubscribe((short) 0, mPubSubId); } }
[ "private void teardown() {\n if (mApiClient != null) {\n if (mApplicationStarted) {\n try {\n Cast.CastApi.stopApplication(mApiClient);\n if (mHelloWorldChannel != null) {\n Cast.CastApi.removeMessageReceivedCallbacks(mApi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Time constructor with all options
public Time(int shiftNum, long seconds, int startHour, int startMinute, int startSecond) { this.shiftNum = shiftNum; this.seconds = seconds; this.startHour = startHour; this.startMinute = startMinute; this.startSecond = startSecond; }
[ "public Time (Time time)\n {\n this(time.hour, time.minute, time.second);\n }", "public Time() {\r\n\t\t\r\n\t}", "public Time() {\n this.hours = 0;\n this.minutes = 0;\n this.seconds = 0;\n }", "public Time (int hour, int minute){\n\n this.hour = hour;\n thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the bonus items dropped in a PVP kill. One of the specified item will be dropped.
public void setKillerBonus(int id) { setKillerBonus(id,1); }
[ "public static final void poisonItem(Player player, Item item, Item usedWith) {\n\t\tif (player.isDead())\n\t\t\treturn;\n\t\t\tplayer.getPackets().sendGameMessage(\"You poison the \"+getMessage(usedWith)+\".\");\n\t\t\tswitch (item.getId()) {\n\t\t\tcase REGULAR_WEAPON_POISON:\n\t\t\t\tplayer.getInventory().delete...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove link between objects
public void removeLink(NetworkMapLink link) { links.remove(link); }
[ "public void unlink() {\r\n\t\t\tlink1.subsets.remove(this);\r\n\t\t\tlink2.subsets.remove(this);\r\n\t\t\tlink1.supersets.remove(this);\r\n\t\t\tlink2.supersets.remove(this);\r\n\t\t}", "public void unsetLink()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated bytes pdatas = 3;
public Builder setPdatas( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensurePdatasIsMutable(); pdatas_.set(index, value); onChanged(); return this; }
[ "byte[] getP();", "public byte[] getData()\r\n/* 49: */ {\r\n/* 50: 94 */ return this.data;\r\n/* 51: */ }", "byte getData();", "public byte[] getP() {return p;}", "void setP(byte[] p);", "public byte[] getDataBytes();", "byte[] getData()\r\n/* 27: */ {\r\n/* 28:65 */ return set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Refreshes current folder's contents in the same thread and throws an IOException if current folder could not be refreshed.
public synchronized void refreshCurrentFolder() throws IOException { setCurrentFolder(currentFolder, currentFolder.ls(chainedFileFilter), null); }
[ "AmlFilesystem refresh(Context context);", "public void refresh() {\r\n\r\n\t\t/* Save expanded file tree paths */\r\n\t\tEnumeration<TreePath> expandedPaths = this.fileTree\r\n\t\t\t\t.getExpandedDescendants(new TreePath(this.rootNode));\r\n\r\n\t\t/* Refresh nodes */\r\n\t\tthis.refreshChildNodes((FileTriStateT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for the COM property "OverlappedList"
@DISPID(1610743836) //= 0x6002001c. The runtime will prefer the VTID if present @VTID(36) void overlappedList( visiotool.IVShape list);
[ "public void setMailingLists( List list )\n {\n // nop\n }", "@Override\n public void setRangeOfComponent(String[] componentList) {\n\n }", "protected final void setList(List list) {\n m_dceObjects = list;\n }", "public void setList(List list){\n\t\tthis.list = list;\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Class constructor. Creates a message handler, that handles all incoming client messages for the server.
public ServerMessageHandler(NetworkServer networkServer, ServerMessageSender serverMessageSender) { this.networkServer = networkServer; this.serverMessageSender = serverMessageSender; this.serverData = networkServer.getServerData(); }
[ "public EchoClientHandler() {\n firstMessage = Unpooled.buffer(EchoClient.SIZE);\n for (int i = 0; i < firstMessage.capacity(); i++) {\n firstMessage.writeByte((byte) i);\n }\n }", "public Client(){\n this.myNetworkHandler=new NetworkHandler(this);\n clientLogger.addHandler(handlerLog...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__QualifiedNameWithWildcard__Group__0" $ANTLR start "rule__QualifiedNameWithWildcard__Group__0__Impl" ../org.xtext.tortoiseshell.ui/srcgen/org/xtext/tortoiseshell/ui/contentassist/antlr/internal/InternalTortoiseShell.g:14879:1: rule__QualifiedNameWithWildcard__Group__0__Impl : ( ruleQualifiedName ) ;
public final void rule__QualifiedNameWithWildcard__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.tortoiseshell.ui/src-gen/org/xtext/tortoiseshell/ui/contentassist/antlr/internal/InternalTortoiseShell.g:14883:1: ( ( ruleQ...
[ "public final void rule__QualifiedNameWithWildcard__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.hellojvmtypes.ui/src-gen/org/xtext/example/hellojvmtypes/ui/contentassist/antlr/internal/InternalHelloJ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unit test for removeProperty().
@Test public void testRemoveProperty() { instance.removeProperty(PropertyKey.FRONTEND_FRAME_WIDTH); assertEquals("Property not removed", 150, (int) instance.getPropertyValueInt(PropertyKey.FRONTEND_FRAME_WIDTH, 150)); }
[ "private void removeProperty(String property, String orginalValue) {\n\t\t\n\t}", "abstract public boolean remove(String property);", "@Override\n public void removeProperty(Object description) {\n \n }", "@Test\n public void testRemoveProperty() {\n writeBanner(methodName());\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: protected
public final void onError(String str) { if (m4928X() != null && m4928X().getOnAdErrorCallback() != null) { m4928X().getOnAdErrorCallback().adError(str); } }
[ "@Override\n }", "protected void method_5557() {}", "@Override\n public void extornar() {\n \n }", "@Override\r\n public void publicando() {\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}", "pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
onPostExecute displays the results of the AsyncTask.
@Override protected void onPostExecute(String result) { //textView.setText(result); Log.d("BROOOOOO", result); JSONObject json = null; try { json = new JSONObject(result); ArrayList<String> locationData = new ArrayList<String>(); ...
[ "@Override\n protected void onPostExecute(String s) {\n // execution of result of Long time consuming operation\n progressDialog.dismiss();;\n tv_result.setText(response);\n super.onPostExecute(s);\n\n Log.e(\"Print\", \"Response in onPostExecute section...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Rest__Group__22__Impl" $ANTLR start "rule__Rest__Group__23" InternalSparrow.g:3133:1: rule__Rest__Group__23 : rule__Rest__Group__23__Impl rule__Rest__Group__24 ;
public final void rule__Rest__Group__23() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSparrow.g:3137:1: ( rule__Rest__Group__23__Impl rule__Rest__Group__24 ) // InternalSparrow.g:3138:2: rule__Rest__Group__23__Impl rule__Rest__Grou...
[ "public final void rule__DSLRuleRI__Group_0__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSasDsl.g:6492:1: ( rule__DSLRuleRI__Group_0__3__Impl )\n // InternalSasDsl.g:6493:2: rule__DSLRuleRI__Group_0__3__Impl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the getKeywordMapper method
private void writeGetKeywordMapperMethod(PrintStream out) { // write out the getKeywordMapper method GenerateUtilities.writeJavaDocComment( out, " ", new String[]{ "Returns a <code>KeywordMapper<code> for the given property", "@param...
[ "public KeywordChainingTransformation() {\n\n\t}", "protected abstract String getKeyword();", "ContextMapperType getContextMapper();", "RuleKeywordToIndex createRuleKeywordToIndex();", "Object getMAPPINGNAME();", "public interface Mapper\n{\n /**\n * Mapper initialization.\n */\n void init()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accept requests for enhancing ContentItems, and processes them either synchronously or asynchronously (as decided by the enhancement engines or by configuration). The progress of the enhancement process should be made accessible in the ContentItem's metadata.
public interface EnhancementJobManager { /** * Create relevant asynchronous requests or enhance content immediately. The * result is not persisted right now. The caller is responsible for calling the * {@link Store#put(ContentItem)} afterwards in case persistence is * required. * <p> ...
[ "public void processAllContents(\n IPSRequestContext request,\n boolean isPreview)\n {\n Object[] args = {m_itemdef.getName()};\n traceMessage(request, \"Processing content type: \\\"{0}\\\"\", args);\n \n List result = new ArrayList();\n if (! hasInlineF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
candidate_id setter method (parses to String)
public void setCandidate_id(String candidate_id) { try { this.candidate_id = Integer.parseInt(candidate_id); } catch (NumberFormatException | NullPointerException e) { //Do nothing - the value is not changed } }
[ "public void setCandidate(String what)\n {\n this.candidate = what;\n }", "public Builder setCandidate(\n String value) {\n copyOnWrite();\n instance.setCandidate(value);\n return this;\n }", "public org.observertc.webrtc.schemas.reports.ICECandidatePair.Builder setLocalC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter Parameter Value for Shipment/Receipt
protected void setInOutId(int inOutId) { this.inOutId = inOutId; }
[ "public void setReceipt(EasyEmailReport receipt){ \n reportReceipt = receipt; \n }", "public void setPostalCode(java.lang.String param){\n \n this.localPostalCode=param;\n \n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.display_breaking_news_image_fragment, container, false); animateHandler = new Handler(); //getting the texts from ...
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.movie_statistic_layout, parent, false);\n }", "@Override\n\tprotected View initView(LayoutInflater inflate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to move object after drop
public void onTaskDropAnswerB(DragDropEvent ddEvent) { SpecificCase taskDrop = ((SpecificCase) ddEvent.getData()); droppedAnswerB.add(taskDrop); tasksToDrop.remove(taskDrop); }
[ "public void moveObject(){\r\n\t\tint numberOfComponents = sequenceDiagramObjectList.size();\r\n\t\tint indexDrag = -1;\r\n\t\tint indexDrop = -1;\r\n\t\tboolean gotDrag = false;\r\n\t\tboolean gotDrop = false;\r\n\t\tSequenceDiagramObject draggedObject = null;\r\n\t\tfor(int i = 0; i < numberOfComponents; i++){\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get status of parking
Map<Slot, Vehicle> status();
[ "public String getAvailabilityStatus() {\n return this.AvailabilityStatus;\n }", "public String getAvailabilityStatus() {\n return availabilityStatus;\n }", "int get_status();", "int getAvailability();", "POGOProtos.Rpc.GetNewQuestsOutProto.Status getStatus();", "public int getActiveSt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
EFFECTS: parse to the method in Snake class and return the current score
public int returnCurrentScore() { return snake.getCurrentScore(); }
[ "public int getScore() { /* ... code ... */ }", "public Score getScore();", "public void calculateScore() {\n\t\t\r\n\t}", "public void act() \n {\n setScore();\n }", "public int get_score(){\n\t return this.score;\n \t }", "public int getScore() {\n return gameAction.score;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of ImageProcessor
public ImageProcessor() { }
[ "protected abstract IProcessor createInternalProcessor(ProcessorParams params);", "public ImageMaker() {\r\n super();\r\n\r\n }", "public ImageProcessor(Pic picture) {\n this.picture = picture;\n }", "Runnable createProcessor(String processorId);", "void addProcessor(ChainedImageProcesso...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
give parameters from application.properties/yml to javamelody
@Bean public ServletRegistrationBean collectorServletBean(JavaMelodyConfigurationProperties properties, ServletContext servletContext) { for (final Map.Entry<String, String> entry : properties.getInitParameters().entrySet()) { servletContext.setAttribute(Parameters.PARAMETER_SYSTEM_PREFIX + entry.getKey(), ent...
[ "public static void main(String[] args) {DatabaseConfig dbconfig = new DatabaseConfig();\n//\t\tdbconfig.setDbname(\"newdb\");\n//\t\tdbconfig.setDriver(\"newdriver\");\n//\t\tdbconfig.setPort(6601);\n//\t\tdbconfig.setUsername(\"appuser\");\n//\t\tdbconfig.setPassword(\"apppassword\");\n//\t\tApplicationConfig app...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FIlters the list by Timezeon Case Insensitive.
public void filterTimezone(String timezone){ String regexCode = "(?i).*"+timezone+".*"; int index = 0; while(index < filteredList.size()){ if (!String.valueOf(filteredList.get(index).getCity(). getTimezone()).matches(regexCode)){ filteredList.remove(index); ...
[ "public List<String> exercise1(List<String> list) {\n return list.stream().map(String::toLowerCase).collect(Collectors.toList());\n }", "public static List<String> convertToUpperCase(List<String> list) {\n\t\tStream<String> stream = list.stream();\n\t\t\n\t\t// Maps stream with key = value.toUpperCase\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows the main menu
private void showMenu() { int option = -1; while (true) { System.out.println(LINE_SEPARATOR); System.out.println("Atribuir Perfil de Gestor"); System.out.println(LINE_SEPARATOR); System.out.println("1 - Ver Lista de Utilizadores Registados"); ...
[ "public void displayMainMenu()\n {\n System.out.println(\"\\nMain Menu\");\n System.out.println(\"---------\");\n System.out.println(\"1) Create a new list\");\n System.out.println(\"2) Load an existing list\");\n System.out.println(\"3) Quit\\n\");\n System.out.print(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the incept date.
public Date getInceptDate() { return inceptDate; }
[ "java.lang.String getInsuranceEndDate();", "public String getDate() {\n if (this.musician.getWishRequest().isPresent()\n && this.musician.getWishRequest().get().getWishRequestEntity().getStartDate() != null\n ) {\n return DateTimeFormatter.ofPattern(\"dd.MM.yyyy\").format(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Count the occurrences of a String in another String ignoring case.
public static int countTokensIgnoreCase(String input, String token) { int start = 0; int ret = 0; while (start > -1) { start = input.toLowerCase().indexOf(token.toLowerCase(), start); if (start > -1) { start = start + token.length(); ret++; } } return ret; }
[ "public static int compareIgnoreCase(String s1, String s2) {\n //Check out String.compareTo(String) for a description of the basic\n //algorithm. The ignore case extension is trivial.\n //We need to compare both uppercase and lowercase characters because\n //some characters have two dis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Removes the top of the stack. Precondition: None. Post Condition: if the stack is not empty, the item that was added the most recently is removed and returned. Exception: Throws StackException if the stack is empty.
public String pop() { if (!isEmpty()){ Node temp = head; head = head.next; return temp.item; } else { throw new StackEmptyException ("StackEmptyException on pop: stack Empty"); } }
[ "public Entry pop() throws StackEmpty {\n if (stackList.size() == 0) { // If stack is empty, throw exception.\n throw new StackEmpty(\"Empty stack present, cannot carry out pop method.\");\n }\n // Remove top entry from stack\n Entry temp = stackList.remove(this.size() - 1);\n stackSize = stackS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
private void parsedata() { try { final ArrayList<HashMap<String,String>> eventslist = new ArrayList<HashMap<String,String>>(); URL url = new URL( "http://130.74.17.62/RebelRewardsWebService/Service.asmx/GetMTop25Rankers?RoleId=0&RoleName=Rank&Orderby=asc"); DocumentBuilderFactory dbf = DocumentB...
[ "@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" ] ] } }
Indicates whether the upper bound returned by this reader is ever nonblank.
public boolean hasUpper() { return hasUpper_; }
[ "@java.lang.Override\n public boolean hasUpperBound() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "public boolean upperLimitSafe() {\n\t\t//greater or equal to total height\n\t\tif (!upperLimit.get() && getInches() < UPPER_LIMIT_POINT) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Send a private message returns error if touser does not exist
@WebMethod(operationName = "privateMessage") public void privateMessage(@WebParam(name = "fromName") final String fromNameIN, @WebParam(name = "toName") final String toNameIN, @WebParam(name = "mesg") final String mesg) { // removes user, returns true if...
[ "static private void sendPrivateMessage(SelectionKey sk, String sendTo, String message) throws IOException{\n\t\tUser curUser = (User)sk.attachment();\n\t\tSelectionKey receiver = userMap.get(sendTo);\n\n\t\t// Check if both sender and receiver have a nickname assigned\n\t\tif(receiver != null && curUser.getState()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: b
public static /* synthetic */ void m4036b(C2024a aVar, IMMessage iMMessage) { int a = aVar.m4026a(iMMessage.getUuid()); if (a >= 0 && a < aVar.f4001f.size()) { IMMessage iMMessage2 = aVar.f4001f.get(a); iMMessage2.setStatus(iMMessage.getStatus()); iMMessage2.setAttach...
[ "public abstract T zzs(B b2);", "public void b(ByteOrder bo) {\n/* 72 */ if (this.i != bo) {\n/* 73 */ this.i = bo;\n/* 74 */ this.h = a(bo);\n/* */ } \n/* */ }", "public void doSth(B b){\n\n }", "public abstract void mo14156a(B b, int i, int i2);", "@Override\n\tpublic v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add an event to the queue
public synchronized static void addEvent(Event e) { eventQueue.add( e ); }
[ "private void queueEvt(IAEvent e) {\r\n\t\tevtqueue.add(e);\r\n\t}", "private static synchronized void queueEvent(InputManagerEvent e)\n\t{\n\t\tqueue.add(e);\n\t}", "public void queueEvent(Runnable event) {\n\tLOCK.lock();\n\ttry {\n\t if (eventQueue != null) {\n\t\teventQueue.add(event);\n\t }\n\t LO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert the given object to string with each line indented by 4 spaces (except the first line).
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" ] ] } }
Show us all the branches where we received the ME on central but the import on batch is still outstanding
public void wireMonthendOnCentralOutstandingOnBatch() { brMeDetsTable = createBranchMeDetailsTable(dao.getOnCentralAndOutstandingOnBatchList()); brMeDetsTable.setVisibleColumns(new Object[] {"brCde","central","brBatch","replLocked", "xoutQueued","replProcess","meCopyQueued","meDumpCopiedToBatch","meDumpWaiti...
[ "private void status() {\n System.out.println(\"=== Branches ===\");\n System.out.println(\"*\" + currentBranchHead.name);\n for (Branch b : branchHeadsArr) {\n if (b != currentBranchHead) {\n System.out.println(b.name);\n }\n }\n System.out.pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Get List of all hospitals
public List<HospitalMaster> getHospital() { Session session = DatabaseUtil.getSession(); List<HospitalMaster> hospitalList = session.createCriteria(HospitalMaster.class).list(); DatabaseUtil.closeSession(session); return hospitalList; }
[ "public ArrayList<HospitalEnterprise> getAllHospitals() {\n ArrayList<HospitalEnterprise> hospitalList = new ArrayList<HospitalEnterprise>();\n for (Network network : networkList) {\n\n for (Enterprise enterprise : network.getEnterpriseDir().getEnterpriseList()) {\n if (enter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method containing implementation of lessThan operator
Boolean conditionIsLessthan(int a, int b) { if (a < b) { return true; } else { return false; } }
[ "public static Token compareLessThan(int startLine,\n int startColumn)\n {\n return newToken( COMPARE_LESS_THAN,\n \"<\",\n startLine,\n startColumn );\n }", "public final Compare les...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assumption: We traverse the tree from left to right on every level
private void assertSiblings( PageCursor cursor, long currentNodeGeneration, long leftSiblingPointer, long leftSiblingPointerGeneration, long rightSiblingPointer, long rightSiblingPointerGeneration, int level ) { // If this is the first time on this level, we will add a new entry for ( in...
[ "void levelTraverseVariant() {\n\t\t\n\t\tLinkedList<BTNode> q = new LinkedList<BTNode>();\n\t\tLinkedList<BTNode> stk = new LinkedList<BTNode>();\n\t\tq.addLast(this);\n\t\tint dir = 0;\n\t\twhile (!q.isEmpty()) {\n\t\t\tBTNode cur = q.removeFirst();\n\t\t\tstk.push(cur);\n\t\t\tSystem.out.println(cur.data);\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
patient's disability field value
public String getDisability() {return "//*[@id='disability']/..//*[@data-value='" + mathRandom.getMathRandom(4, 1) + "']";}
[ "java.lang.String getDisabilityCode();", "public String getDificultad()\r\n {\r\n return dificultad;\r\n }", "public int getDurability(){\r\n return durability;\r\n }", "public double getDownRegulationDiscount ()\n {\n return downRegulationDiscount;\n }", "public void getDischarg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Entries look like "example.com" or "foo.example.com" in lower case, without trailing dot. Empty if there is no known host name with reverse dns. For example DuckDuckGo currently doesn't provide this.
@NotNull Set<String> getHostnames();
[ "String lookupLocalHostName();", "java.util.List<String> sanDnsNames();", "private void getHost(List<String> requestHeaders) {\n\t\t\tfor (String header : requestHeaders) {\n\t\t\t\tif (header.startsWith(\"Host:\")) {\n\t\t\t\t\thost = header.split(\":\")[1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (hos...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required .se.liu.ed.I2CSensorData i2CSensorData1 = 1;
public se.liu.ed.Command.I2CSensorData.Builder getI2CSensorData1Builder() { bitField0_ |= 0x00000001; onChanged(); return getI2CSensorData1FieldBuilder().getBuilder(); }
[ "void newSensorData(ISensorData data);", "MsgNode1V1M14.SensorDataOrBuilder getCh2OOrBuilder();", "public void mo2186c(int i, int i2) {\n this.f1437e = i;\n this.f1438f = i2;\n }", "@SCJAllowed(members=true)\npublic interface IRConf {\n\n\tpublic static final int DEFAULT_IR_CONTRA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void addUser(UserForm userForm) { try { PreparedStatement preparedStatement=connection.prepareStatement(ADD_USER); preparedStatement.setString(1, userForm.getUserName()); preparedStatement.setString(2, userForm.getPassword()); preparedStatement.setString(3, userForm.getFullName()); ...
[ "@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
public void mouseReleased(MouseEvent arg0) { }
[ "@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" ] ] } }
If an event is cancelable, the preventDefault method is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur. If, during any stage of event flow, the preventDefault method is called the event is canceled. Any default ac...
public void preventDefault();
[ "public void setCancelable(boolean value) {\n this.cancelable = value;\n }", "protected abstract void cancelEvent(FutureEvent event);", "@Override\r\n public void actionPerformed(ActionEvent e) {\n doCancel();\r\n }", "@Override\n\tpublic boolean dispatchTouchEvent(MotionEvent ev)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called after the function from which we have to measure time
public static void logAfter(final DurationRecord record) { if (record != null) { record.stop(); } }
[ "@Override\r\n\tprotected void computeTime() {\n\t\t\r\n\t}", "private void time() {\n\n\t}", "@Override\n\tpublic void timePassed() {\n\t\t\n\t}", "@Override\n\tpublic void timePassed() {\n\n\t}", "static void elapsedTime() {\n\t\tSystem.out.println(\"elapsed time is \" + (stop - start) / 1000);\n\t\tSyste...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an instance for the given classname
public static Object instantiateClassForName(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException { return loadClassForName(className).newInstance(); }
[ "public Object instanciateClass(String classname) {\n\t\ttry {\n\t\t\treturn ClassloadingHelper.getInstance(classname);\n\t\t} catch (Exception exe) {\n\t\t\tlog.error(\"Could not instantiate '\" + classname + \"' - \" + exe.getMessage(), exe);\n\t\t\treturn null;\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This autonomous (along with the chooser code above) shows how to select between different autonomous modes using the dashboard. The sendable chooser code works with the Java SmartDashboard. If you prefer the LabVIEW Dashboard, remove all of the chooser code and uncomment the getString code to get the auto name from the...
@Override public void autonomousInit() { //autonomousCommand = chooser.getSelected(); chooser = (int) SmartDashboard.getNumber("Auto choice", 0); switch(chooser) { case 1: autonomousCommand = new CG_Auto_1_Line(); break; case 5: autonomousCommand = new CG_Auto_5_LeftGear(); break; case 6: au...
[ "@Override\n\tpublic void autonomousInit()\n\t{\n\t\tautoSelected = chooser.getSelected();\n\t\tSystem.out.println(\"Auto selected: \" + autoSelected);\n<<<<<<< HEAD\n\t\televator.resetEncoder();\n\t\tRobotMap.time.start();\n\t\t\n\t\tString gameData = null;\n\t\twhile (gameData == null)\n=======\n\n<<<<<<< HEAD\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1. Get an initial context to the JMS provider. 2. Look up the connection factory.
public void run() throws Exception { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url); // 3. Create a JMS connection. connection = factory.createConnection(); // 4. Create a JMS session. session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); topic = session.createTopic(to...
[ "public interface JmsConnectionFactoryProvider {\n\n ConnectionFactory createConnectionFactory();\n}", "public static ConnectionFactory getConnectionFactory () {\n final var connectionFactory = new ActiveMQConnectionFactory(\"vm://localhost\");\n connectionFactory.setTrustedPackages(Collections.singleton...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ The following query returns a list of flights that belong to a given flight template
@Query(value = "SELECT * FROM flight WHERE " + "flight_template_id = :flight_template_id AND to_date IS NULL", nativeQuery = true) List<Flight> getAllFlightsOfTemplate(@Param("flight_template_id") long flight_template_id);
[ "Flight findByFlightNumber(String flightNumber) {\n return crud.findByFlightNumber(flightNumber);\n }", "@GetMapping(\"/viewFlights\")\n\tpublic ModelAndView viewFlights(ModelMap model) {\n\t\tlogger.info(\"Attempting to get a list of all the flight templates the administrator has created\");\n\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If this process registers itself as the root process, this function is invoked on a separate thread and keeps asking root user the updated value of the state, if any.
public void run() { Scanner scanner = new Scanner(System.in); System.out.println("Enter the data to broadcast as the root:"); data = scanner.nextLine(); while (!data.equalsIgnoreCase(QUIT)) { System.out.println(data + " has been placed in buffer to broadcast, you ...
[ "public void updateRoot(MachineState theState) {\n ;\n }", "private void updateState() {\n Mutex.EVENT.readAccess( new Runnable() {\n @Override\n public void run() {\n doUpdateState();\n }\n });\n }", "private final void unlockRoot() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public static final String BASE_URL_API = " Declare Interface BaseApiService
public static BaseApiService getAPIService(){ return RetrofitClient.getClient(BASE_URL_API).create(BaseApiService.class); }
[ "public interface ApiConstants {\n String baseurl = \"https://api.edamam.com\";\n\n}", "public interface ApiConstants {\n public static String BASE_URL = \"https://www.google.com\";\n}", "public interface ApiEndPoint {\n\n String LOGIN_API = BuildConfig.BASE_URL + \"Users/signIn\";\n String SIGN_UP_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the initial value to be edited. In HTML code
public void setValue(String value) { this.value = value; }
[ "@Override\n\tpublic void initValue() {\n\t\ttxtTitle.setText(\"PK\");\n\t\ttxtRight.setVisibility(View.GONE);\n\t}", "@Override\n\tpublic void setValue() {\n\t\t\n\t}", "private void setDefaultValue(Object o) {\n\t\tthis.defaultValue = o;\n\n\t\tif (o == null) {\n\t\t\tthis.defaultValueField.clear();\n\t\t} el...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the specific data in row and column when they come in table format.
public String getValue(String path, int column, int row, String start) { int numeroLineas = 0; try { List<String> valueList = getTable(path, start); String[] sep = valueList.get(valueList.size() - 1).split("\\s"); ArrayList<String> lineValues = new ArrayList<>(); ...
[ "public String getTableData(int row, int column) {\r\n\t\tinfo(\"Get the specific table data present in [\" + row + \"] row number and [\" + column\r\n\t\t\t\t+ \"] column number from the [\" + description + \"] table\");\r\n\t\tWebElement table = wait.until(elementToBeClickable(locator));\r\n\t\ttry {\r\n\t\t\tret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
NOTE: method used to reset connection for readonly access, so that a second attempt can be made.
protected synchronized void resetConnection() { Connection conn = getConn(); if (conn != null) { try { conn.close(); } catch (SQLException e) { // ignore } finally { setConn(null); } } }
[ "public void resetConnections();", "public static void reset() {\n sDatabaseClient = new NetworkDatabaseClient(SERVER_URL, new DefaultNetworkProvider());\n sLocalCache = new DefaultLocalCache();\n }", "public void reset() {\n mNewConnectionCount.setValue(0);\n }", "public void reset...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 22 /Coverage entropy=0.0
@Test(timeout = 4000) public void test022() throws Throwable { byte[] byteArray0 = new byte[8]; short short0 = MethodWriter.readShort(byteArray0, 0); assertEquals((short)0, short0); }
[ "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
each short string translates to byte array cost much, but won't be the bottleneck
private static void putString(OutputStream ostream, String s) throws IOException { ostream.write(s.getBytes("UTF-8")); }
[ "private short _bytesToShort( byte[] bytes )\r\n {\n return (short)( ( ( bytes[0] & 0xFF ) << 8 ) |\r\n ( bytes[1] & 0xFF ) );\r\n }", "private void convertToByteArray(short[] data)\n\t{\n\t\tif(data_byte == null || (data.length) != data_byte.length )\n\t\t\tdata_byte ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
memoization plus Space Optimization
private int binomialCoeff(int n, int k){ int C[] = new int[k + 1]; // nC0 is 1 C[0] = 1; for (int i = 1; i <= n; i++){ // Compute next row of pascal // triangle using the previous row for (int j = Math.min(i, k); j > 0; j--) C[j] = C[j] + C[j-1]; } return C[k]; }
[ "public int memoization(int n)\n\t\t{\n\t\t\tint[] dp = new int[n+1];\n\t\t\tfor(int i = 0 ; i <= n ; i++)\n\t\t\t{\n\t\t\t\tdp[i] = -1;\n\t\t\t}\n\n\t\t\tdp[0] = 1; \n\t\t\tdp[1] = 1; // {1}\n\t\t\tdp[2] = 1; // {1,1}\n\t\t\tdp[3] = 2; // {1,1,1} {3}\n\n\t\t\treturn memoization(n,dp);\n\t\t}", "public void lruC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Determine a reasonable epsilon value
private void calculateSetArmHeightReached() { double epsilon = .5;//revolutions if(getCurrentArmHeight() != 0.0) setArmHeightReached = Math.abs(getCurrentArmHeight() - getSetArmHeight()) <= epsilon; }
[ "public static double MachineEpsilonDouble(){\n double machEps = 1.0f;\n\n do {\n machEps /= 2.0f;\n }\n while ((double)(1.0 + (machEps/2.0)) != 1.0);\n return machEps;\n }", "public double getEpsilon(){\n\treturn EPSILON;\n }", "public Double getEpsilon() {\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Launch ViewImage.java using intent
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { if (position == 0) { Intent i = new Intent(view.getContext(), Physics1.class); startActivityForResult(i, 0); } if...
[ "private void launch(int which) {\n Intent intent;\n if (which == 0) {\n intent = new Intent(this, Game.class);\n }\n else {\n intent = new Intent(this, Photo.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n }\n startActivity(in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
pour afficher les contacts
@RequestMapping(value = "/contacts", method = RequestMethod.GET) public List<Contact> getContacts() { return contactRepository.findAll(); }
[ "private void initContacts() {\r\n\t\tbdd.open();\r\n\r\n\t\tArrayList<Contact> contact_temp = bdd.getAllContacts();\r\n\t\tcontacts = new ArrayList<String>();\r\n\t\tfor (Contact c : contact_temp) {\r\n\t\t\tcontacts.add(c.getName() + SEPARATEUR + c.getNumber());\r\n\t\t}\r\n\t\tselected_contacts = new ArrayList<S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
now i search for operation name (=task name)
public static List<String> getMessagesTypesFromMessageWSDL(byte[] documentWSDL, String messageName) throws SAXException, IOException, ParserConfigurationException { Document d = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(documentWSDL)); ArrayList<String> validMessagesT...
[ "Task getTaskByNume_Task(String nume_task);", "public ArrayList<Task> performCommand(){\n keyword = this.command.substring(5); // to get the keyword string\n int count = 1;\n /*iterate the task arrayList to find corresponding items*/\n for(int i=0;i< task.size();i++){\n if(t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }