query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Return RDF classe equivalent of a token type.
public static String toRDFClasse(final TokenType tt) { if (tt == TokenType.ORGANIZATION) { return "http://schema.org/Organization"; } else if (tt == TokenType.PERSON) { return "http://schema.org/Person"; } else if (tt == TokenType.LOCATION || tt == TokenType.LOCATION_PART...
[ "public Class<? extends Token> tokenType() {\n\t\t\treturn this.tokenType;\n\t\t}", "public Token(String type){\r\n this.type = type;\r\n }", "private Type type () {\n\t\tType t = null;\n\t\tif(token.type().equals(TokenType.Int)){\n\t\t\tmatch(TokenType.Int);\n\t\t\tt = Type.INT;\n\t\t}\n\t\telse if(t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Does the UML Element contain the named Keyword? Keywords can be separated by space, comma, pipe, semicolon, or >
public boolean hasKeyword(String keywordName) { return this.getSuperFrontEndExceptionHandler().hasKeyword(keywordName); }
[ "boolean hasKeywordPlanKeyword();", "public boolean containWord(String keyword)\n {\n int a = description.lastIndexOf(keyword);\n return ((a != -1) \n && (a == 0 || description.charAt(a-1) == ' ')\n && (a + keyword.length() == description.length() || description.charAt(a + keyword.l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When the service is ready, we tell them to show a TextView.
@Override public void onServiceConnected(final ComponentName name, final IBinder service) { final String id = name.getClassName().substring("com.example.gralloctest.TestService".length()); final int value = Integer.parseInt(id); try { ITestService.Stub.asInt...
[ "@Override\n protected void onPreExecute() {\n String contactingServerText = App.getApplicationResources().getString(R.string.contacting_server);\n this.accountExistsTextView.setText(contactingServerText);\n this.accountExistsTextView.setVisibility(View.VISIBLE);\n }", "@Override\n\t\tp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when an exception occurs. No further rows will be processed by this callback.
void onException(Statement s, Exception e) throws Exception;
[ "@Override\r\n public void onUnhandledError(Throwable caught) {\r\n this.dataSource.markRetrieveComplete(); // VERY important to make sure this is called\r\n super.onUnhandledError(caught);\r\n }", "@Override\r\n public void onException(Exception arg0) {\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set data to dynamic scanner model attribute and render UI of dynamic scanner types
@PostMapping(value = "dynamicScanner/scanners") public String getDynamicScanners(@ModelAttribute("dynamicScanner") DynamicScanner dynamicScanner, @ModelAttribute("user") User user, @RequestParam String testName, @RequestParam String productNa...
[ "private void autoType(HttpServletRequest request, HttpServletResponse response) {\n\t\tCarLogicImpl carCtrl = new CarLogicImpl();\n\t\t\n\t String content = request.getParameter(\"inputText\");\n\t List<String> resultList;\n\t if(content == null || content.trim().equals(\"\"))\n\t \tresultList = carCt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Nothing to process for resource modules
@SuppressWarnings({"UnusedDeclaration"}) private void deploy(ConnectorModule connectorModule) throws OpenEJBException { }
[ "private Resources()\r\n \t{\r\n \r\n \t}", "protected void initNonResourceFiles() {\n \t\tif (getComponent() == null){\n \t\t\treturn;\n \t\t} \n \t\tnonResourceFiles = new ArrayList(1);\n \t\tif(isWLPModel){\n \t\t\tIFile dotProject = getComponent().getProject().getFile(ProjectUtilities.DOT_PROJECT);\n \t\t\tif...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
modifica una categoria mediantre un DTO y un id que se envia por parametro
@Transactional public Categories updateCategory(CategoryRequest categoryRequest,Long id) { var category = this.getCategoryById(id); //devuelve la categoria que se busca por la id category.setName(categoryRequest.getName()); //modifica el name,image,description category.setImage(categoryReque...
[ "@Override\r\n public Object getIdObject(Categoria dto) {\r\n return (Integer) dto.getId();\r\n }", "private void copyDTOToEntity(ProdutoDTO dto, Produto entity) { //nao setamos id porque \n\t\tentity.setName(dto.getName());\n\t\tentity.setDescription(dto.getDescription());\n\t\tentity.setDate(dto.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table class_user
public void or(Criteria criteria) { oredCriteria.add(criteria); }
[ "@RequestMapping(\"classSelected\")\n public ModelAndView editClasses(@RequestParam(\"selectClass\") String classSelected) throws SQLException, ClassNotFoundException {\n currentClass = classSelected;\n String url = \"jdbc:mysql://finalprojectapp.cl4dqbesxxdh.us-east-2.rds.amazonaws.com/finalprojec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CREATES AND SETS UP ALL THE CONTROLS TO GO IN THE APP WORKSPACE
private void initWorkspace() throws IOException { // THE WORKSPACE HAS A FEW REGIONS, THIS // IS FOR BASIC COURSE EDITING CONTROLS // initBasicCourseInfoControls(); // THIS IS FOR SELECTING PAGE LINKS TO INCLUDE //initPageSelectionControls(); // THE TOP WORKSPAC...
[ "public void initControllers(){\n initTable();\n initMenu();\n initInventoryControllers();\n initReportControllers();\n\n adminView.getBackButton().setOnAction(e ->{\n //Saves all data\n StartupController startupController = new StartupController(shopData);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the largest key in this symbol table less than or equal to key.
public Key floor(final Key key) { if (key == null) { throw new IllegalArgumentException("called floor() with null key"); } Key k = st.floorKey(key); if (k == null) { throw new NoSuchElementException("all keys are greater than " + key); ...
[ "public String getMaxKey() {\r\n\t\tint num = 0;\r\n\t\tfor (String str : map.keySet()) {\r\n\t\t\tif (num < map.get(str)) {\r\n\t\t\t\tnum = map.get(str);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString res = \"\";\r\n\t\tfor (String str : map.keySet()) {\r\n\t\t\tif (num == map.get(str)) {\r\n\t\t\t\tres = str;\r\n\t\t\t\tbrea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a deep copy of this graph with the exception of a node's attributes.
public Graph copy() { return copy(null); }
[ "@Override\n\tpublic graph copy() {\n\t\tgraph g = new Graph_DS(myGraph);\n\t\treturn g;\n\t}", "@Override\n public Graph<V, E> clone() {\n\n Graph<V, E> newObject = new Graph<>(this.isDirected);\n\n newObject.numVert = this.numVert;\n\n newObject.listVert = new ArrayList<>();\n for...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
LowestFinal method comparing the given students final grades and returns the student with the lowest final grade.
public static void main(String[] args) { ExamGrade e1= new ExamGrade(60, 50); Student s1 = new Student("Ali", "Alkoçlar", "Male", 2.30, e1 , "CMPE"); ExamGrade e2 = new ExamGrade(40, 70); Student s2 = new Student("Baran", "Öner", "Male", 2.5, e2, "CMPE"); ExamGrade e3= new ExamGrade(60, 80); Student s3= new...
[ "public float minGrade(){\r\n\t\tfloat min=101;\r\n\t\tfor(int i=0;i<student.length;i++){\r\n\t\t\tif(min>student[i]){\r\n\t\t\t\tmin=student[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn min;\r\n\t}", "public void bestGrade() {\r\n float max = students.get(0).getGrade();\r\n for (int i = 1; i < students.si...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This adds a property descriptor for the Instance Type Name feature.
protected void addInstanceTypeNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EClassifier_instanceTypeName_feature"), getString("_UI_...
[ "protected void addTypeNamePropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResourceLocator(),\r\n\t\t\t\t getString(\"_UI_PhysicalColumn_typeName_feature\"),\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__QualifiedName__Group_1__0" $ANTLR start "rule__QualifiedName__Group_1__0__Impl" InternalXtree.g:438:1: rule__QualifiedName__Group_1__0__Impl : ( '.' ) ;
public final void rule__QualifiedName__Group_1__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalXtree.g:442:1: ( ( '.' ) ) // InternalXtree.g:443:1: ( '.' ) { // InternalXtree.g:443:1: ( '.' ) ...
[ "public final void rule__QualifiedName__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:22095:1: ( ( ( '.' ) ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Date getModifiedDate() { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .VoiceDataFormat_t format = 3 [default = VOICEDATA_FORMAT_ENGINE];
@java.lang.Override public Netmessages.VoiceDataFormat_t getFormat() { @SuppressWarnings("deprecation") Netmessages.VoiceDataFormat_t result = Netmessages.VoiceDataFormat_t.valueOf(format_); return result == null ? Netmessages.VoiceDataFormat_t.VOICEDATA_FORMAT_ENGINE : result; }
[ "public void _recVoice() {\n }", "public void setVoice(String voice) {\n this.voice = voice;\n }", "public byte[] getVoice() {\r\n\t\treturn voice;\r\n\t}", "@Override\r\n\tpublic void onVoiceMsg(Msg4Voice arg0) {\n\t\t\r\n\t}", "private void playAvailableVoice() {\n\t}", "public boolean isVo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Perform the lock request.
private void doLockRequest() { RESTRequest request = getLockRequest(); log("POST " + request.getUrl()); RESTRequestFactory.callREST(request, new RESTCallback() { @Override public void onSuccess(final JSONObject val) { log("Success: " + val); log("Session is locked."); log("All done s...
[ "private void lock(){\n\t\tlock.writeLock().lock();\n\t\tlock.readLock().lock();\n\t}", "@Override\n protected void lock() {\n if (_lock != null)\n _lock.lock();\n }", "String lock(String href, long timeout, Map<String, String> headers) throws WebDAVClientException;", "public void lock...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if gps is enabled or not and request user to enable it
private void checkGPSEnabled(){ LocationRequest locationRequest = LocationRequest.create(); locationRequest.setInterval(10000); locationRequest.setFastestInterval(5000); locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); LocationSettingsRequest.Builder builder =...
[ "private void checkGpsEnable() {\n String provider = Settings.Secure.getString(getContentResolver(),\n Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n boolean isGpsEnabled = MyLocation.defaultHandler().isLocationAvailable(this);\n if (!isGpsEnabled) {\n //startActivityF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Callback fired once channel error happened.
public void onChannelError(final String description);
[ "public void errorCallback(String channel, PubnubError error) {\n }", "@Override\n\tpublic void onError(Exception arg0) {\n\t\t\n\t\tmConnectListener.onError(arg0);\n\t\t\n\t}", "void writeError(Channel channel, Integer remoteId, Integer localId,\n AbstractLocalPacket error) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructeur de la DAO UtilisateurBase
public UtilisateurDaoImpl() throws SQLException { super(Utilisateur.class); }
[ "public UserinfoDAOImpl() {\r\n\t\tsuper();\r\n\t}", "public UserDAOImpl() {\n super();\n }", "public MunicipioDAO(){\r\n\t}", "public Utilisateur() {\n\t}", "public BsUserDAOImpl() {\r\n\t\tsuper();\r\n\t}", "public UsuarioDAO() throws Exception{\r\n\t\tcon = Conexao.getConnectar();\r\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last document record in the ordered set where OriginalFormat = &63;.
public static edu.jhu.cvrg.waveform.main.dbpersistence.model.DocumentRecord fetchByOriginalFormat_Last( java.lang.String OriginalFormat, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByOrigina...
[ "public T getLastRecord() {\n\t\tif (getSize() < 1) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn records.get(getSize() - 1);\n\t\t}\n\t}", "protected FindIterable<Document> findLastRecord(final FindIterable<Document> records)\n\t\t{\n\t\t\treturn records.sort(new BasicDBObject(\"ts\",-1)).limit(1);\n\t\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this initialize Client and Medecine TableView with data
private void initTableView(TableView<Persone> tableview) { tableview.getColumns().clear(); TableColumn<Persone, Integer> id = new TableColumn<>("id"); id.setCellValueFactory(new PropertyValueFactory<>("ID")); TableColumn<Persone, Integer> Version = new TableColumn<>("Version"); Version.setCellValueFactory(...
[ "public void initTable() {\n facturasData = FXCollections.observableArrayList(facturaManager.getFacturas());\n\n // TableCellFactory\n tcId.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n tcIdCliente.setCellValueFactory(new PropertyValueFactory<>(\"cliente\"));\n tcIdCl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the reference of the AssignmentContent of this Assignment.
public void setContentReference(String contentReference);
[ "public void reference(String ref) {\n m_reference = ref;\n }", "public void setReference(java.lang.String reference)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (or...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
action events for button to finish adding New country
public void addActionsToBtnComplete(ActionListener newAction) { btnComplete.addActionListener(newAction); }
[ "public void addCountry() {\n\t\tCommonFunctions commonFunctions = new CommonFunctions(driver);\n\n\t\tcommonFunctions.waitTillVisbilityOfElement(Country_OR.countryName);\n\n\t\tcommonFunctions.enterData(Country_OR.countryName, \"Australia\");\n\n\t\t// Add Data to \"Short Name\" field\n\t\tcommonFunctions.enterDat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the wizard page.
protected void setup() { mainPanel = new DriverDefMainPanel( mainPanelView ); driverDef = new DriverDef(); editorHelper = new DriverDefEditorHelper( translationService, new ClientValidationServiceMock( ) ); defPage = new DriverDefPage( view, mainPanel, editorHelper, statusChangeEvent ); ...
[ "private void initializeWizard() {\n\n this.page1 = new SelectFilesPage(this.cobigenWrapper, true);\n this.page1.setMessage(\"You are running a generation in batch mode!\\n\"\n + \"The shown target files are based on the first input of your selection. \"\n + \"All target files selected will be c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Customer mobile number, which should be valid and correct. A global mobile number within 132 digits is allowed, such as 18888888888.
public String getPhoneNum() { return this.PhoneNum; }
[ "public static String generateMobileNumber() {\n String mobile = \"\";\n Integer number;\n for (int i = 0; i < 10; i++) {\n if (i == 2) {\n number = new Integer((int) ((Math.random() * 9) + 1));\n while (number >= 1 && number <= 5) {\n number = new Integer((int) ((Math.random() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if true, underline all static items
boolean getStaticUlined();
[ "public boolean underline() {\n return element.getBoolean(\"u\", false);\n }", "@DISPID(64391) //= 0xfb87. The runtime will prefer the VTID if present\n @VTID(22)\n void underline(\n boolean underline);", "@DISPID(64391) //= 0xfb87. The runtime will prefer the VTID if present\n @VTID(21)\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 35 /Coverage entropy=0.3250829733914482
@Test(timeout = 4000) public void test035() throws Throwable { ClassWriter classWriter0 = new ClassWriter(0); String[] stringArray0 = new String[1]; stringArray0[0] = ""; MethodWriter methodWriter0 = new MethodWriter(classWriter0, 50, "f@1d+TE3+d8nzg\"@&", "<init>", "e rC*B", stringArray0, f...
[ "@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" ] ] } }
Returns the result of interpreting the object as an instance of 'Variable'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseVariable(Variable object) { return null; }
[ "public T caseVariableMember(VariableMember object) {\n\t\treturn null;\n\t}", "public Variable getVariable(Object object){\n\t\treturn VariableFactory.getInstance(param_name, object, context);\n\t}", "public Variable getVar() {\r\n return var;\r\n }", "public abstract Var getVar();", "public abstract E...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assert the actual value is not equal to the expected value.
public <T extends S> T isNotEqualTo(V expected) { assertEquals(this.errorPrefix, expected, getValue()); return self(); }
[ "public void assertNotSame(Object expected, Object actual);", "@Test\n\tpublic void AssertNotSame() {\n\t\tint[][] result1 = RandomMarketComponent.generateRandomMarketStockRandomValue();\n\t\tint[][] result2 = RandomMarketComponent.generateRandomMarketStockRandomValue();\n\t\tassertNotSame(result1, result2);\n\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private final IronList categoriesListing; private final ListDataProvider dataProvider; private final Button newCategoryButton;
public AdminView() { // categoriesListing = new IronList<>(); // // dataProvider = new ListDataProvider<Category>( // new ArrayList<>(DataService.get().getAllCategories())); // categoriesListing.setDataProvider(dataProvider); // categoriesListing.setRenderer( // ...
[ "private void populateCategoryList (){\n categories.add(new Category(\"Bilar\"));\n categories.add(new Category(\"Båtar\"));\n categories.add(new Category(\"Släpkärror\"));\n categories.add(new Category(\"Maskiner\"));\n categories.add(new Category(\"Elektronik\"));\n categ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public List<Map<String, Object>> queryStatisMapList(TopicDto topic) { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional float y = 2;
@java.lang.Override public float getY() { return y_; }
[ "public void setY(int y){\n this.y = (float)y;\n }", "public float getY() {\n/* 123 */ return this.y;\n/* */ }", "float getYValue();", "public void setY(float y) {\n \n this.y = y;\n }", "public void setY(float y) { this.y = y; changed = true;}", "void setY1(double pY1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RestPart__Group__4" $ANTLR start "rule__RestPart__Group__4__Impl" InternalSparrow.g:3738:1: rule__RestPart__Group__4__Impl : ( ( rule__RestPart__PartDataAssignment_4 ) ) ;
public final void rule__RestPart__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSparrow.g:3742:1: ( ( ( rule__RestPart__PartDataAssignment_4 ) ) ) // InternalSparrow.g:3743:1: ( ( rule__RestPart__PartDataAssignment_4...
[ "public final void rule__RequirementGroup__Group_4__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalRequirementsDsl.g:1130:1: ( rule__RequirementGroup__Group_4__1__Impl )\n // InternalRequirementsDsl.g:1131:2: rule__Requ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method for returning a string of borrowed books with the id, username and date borrowed this a borrow search that search for the current borrowing thing
public String borrowSearch(String searchString) throws SQLException { String result = "BorrowingID Username DateBorrowed\n"; if (searchString.equals("")) { result = "input ID please."; return result; } else { statement = "select borrowing.borrowDate, borrowing...
[ "public ArrayList<Book> getOwnerBorrowingBooks(String username) {\n final ArrayList<Book> borrowingBooks = new ArrayList<>();\n\n QuerySnapshot res;\n\n // Gets all books with the owner field equal to the uuid\n try {\n res = Tasks.await(\n booksRef.whereEqualTo(\"borrower\", username).whe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description copied from Object
public String toString() { return getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(this)); }
[ "@Override\n public String toString() {\n return description;\n }", "@Override\n public String toString() {\n return this.description;\n }", "@Override\n public String toString() {\n return this.description;\n }", "public StrColumn getObjectDescription() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Driver program to test above functions
public static void main(String args[]) { Grundy g = new Grundy(); System.out.println(g.calculateGrundy(10)); }
[ "private void testing() {\n\t}", "public void testSample(){\r\n\r\n\t}", "public static void main(String[] args) {\n\t\n\t\t// Each function here should test a different class.\n\n\t\t// CharLinkedList\n\t\ttestCharLinkedList();\n\n\t\t// SuffixTreeNode\n\t\ttestSuffixTreeNode(); \n/*\n\t\t// longestRepeatedSuf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new empty RectF. All coordinates are initialized to 0.
public RectD() { }
[ "public Rectangle() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t\tthis.w = 0;\n\t\tthis.h = 0;\n\t}", "Rectangle(){\n\t\tthis.height = 0;\n\t\tthis.width = 0;\n\t}", "public Rect() {\r\n\t}", "B_MyRectangle() {\r\n\t\twidth = 0.0;\r\n\t\theight = 0.0;\r\n\t}", "public static R2Rect empty() {\n return new R2Re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the passed teamspace Necessary Rights Delete on TeamSpaceTarget and additionally: the user has to own the teamspace
@SecurityChecked( genericTargetVerification = { @GenericTargetVerification( target=TeamSpaceSecurityTarget.class, verify=@RightsVerification(rights=Delete.class) ) } ) @Override @Transactional(rollbackOn={Exception.class}) public void removeTeamSpace(TeamSpaceDto teamSpaceDto) throws...
[ "public void delete(SecGroupright entity);", "void secondaryRemoveOrganization(com.hps.july.persistence.Organization anOrganization) throws java.rmi.RemoteException;", "public void delete(Team team);", "@Test\n void deleteRolePerm() {\n rpr.deleteByRoleId(\"role1\");\n // safe to delete role\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns if noun is a noun in some synset
public boolean isNoun(String noun) { return nouns.contains(noun); }
[ "public boolean isNoun(String noun) {\n\n for (String[] value : synsetmap.values()) {\n for (int i = 0; i < value.length; i++) {\n if (value[i].equals(noun)) {\n return true;\n } \n }\n }\n\n return false; \n\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
BST b = new BST(); b.insertAVL(8); b.insertAVL(5); b.insertAVL(10); b.insertAVL(11); b.insertAVL(9); b.insertAVL(12); b.insertAVL(1); b.insertAVL(5); b.insertAVL(4); b.insertAVL(13); b.insertAVL(17); b.insertAVL(3); b.insertAVL(7); b.insertAVL(6); b.inorder(); b.preorder();
public static void main(String args[]){ BinaryTree bt1 = new BinaryTree(); BinaryTree bt2 = new BinaryTree(); bt1.insert(8); bt1.insert(5); bt1.insert(10); bt1.insert(11); bt1.insert(9); bt1.insert(12); bt1.insert(1); bt1.insert(5); bt1.insert(4); bt1.insert(13); bt1.insert(17); bt1...
[ "public static void main(String[] args) {\n BSTInsertIterative bst=new BSTInsertIterative();\r\n bst.insert(10);\r\n bst.insert(5);\r\n bst.insert(20);\r\n bst.insert(0);\r\n bst.insert(8);\r\n bst.insert(60);\r\n System.out.println(\"InOrder\");\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__DaogenProperty__Group_5__1" $ANTLR start "rule__DaogenProperty__Group_5__1__Impl" ../org.sqlproc.meta.ui/srcgen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:22936:1: rule__DaogenProperty__Group_5__1__Impl : ( ( ( RULE_WS ) ) ( ( RULE_WS ) ) ) ;
public final void rule__DaogenProperty__Group_5__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.sqlproc.meta.ui/src-gen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:22940:1: ( ( ( ( RULE_WS ) ) ( ( RULE_WS ...
[ "public final void rule__PropertyDefinition__Group_4__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.osate.xtext.aadl2.propertyset.ui/src-gen/org/osate/xtext/aadl2/propertyset/ui/contentassist/antlr/internal/InternalPro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO nu should be max_moment_order ny should be moment_order
private double[][] nu__gamma__S_MSS(final int from, final int to) { final double[] nu = new double[Stats2.MAX_NU + 1]; final double[] gamma = new double[Stats2.MAX_NU + 1]; for (int ny = 0; ny <= Stats2.MAX_NU; ++ny) { nu[ny] = ny; gamma[ny] = this.log_delta_t__log_mu__gamma__D(ny, from, to, null, ...
[ "int getMaxOrdering();", "Zr get_order();", "int getOriginOrder();", "List<Moment> findTop10ByTimestampGreaterThanOrderByTimestampAsc(long timestamp);", "public IMessage[] orderMessagesesFromNewestFirst(IMessage[] messages);", "BigDecimal getMaxOrder();", "public void reorderByTime() {\r\n ArrayLis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the length of the matched text region.
public final int yylength() { return zzMarkedPos - zzStartRead; }
[ "public int get_match_length(){\n return matches.length;\n }", "public int getLength () {\n\t\treturn text.length();\n\t}", "private int getReplacementLenght(String text) {\n\t\t\n\t\tint len = 0;\n\t\tif (text!=null){\n\t\t\tlen = text.length();\n\t\t}\n\t\t\n\t\treturn len;\n\t}", "public int getM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
First we have to figure out which entity set the requested entity is in
@Override public void readPrimitiveValue(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType format) throws ODataApplicationException, SerializerException { final EdmEntitySet edmEntitySet = getEdmEntitySet(uriInfo.asUriInfoResource()); // Next we fetch the requested entity from the databa...
[ "public void addEntSet(){\n\t\t\t\t\t\t}", "boolean hasIndividualEntity();", "@Override\r\n\tpublic void readEntityCollection(ODataRequest request, ODataResponse response, UriInfo uriInfo,\r\n\t\t\tContentType responseFormat) throws ODataApplicationException, ODataLibraryException {\n\t\t List<UriResource> res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Waits until a now job arrived and returns the job ID.
private JobID pollNextJob() throws Exception { int retries = 5; while (true) { if(retries > 0){ try { if (jobManager.getRecentJobs().size() > 0) { //RecentJobEvent rje = jobManager.getRecentJobs().get(jobManager.getRecentJobs().size() - 1); RecentJobEvent rje = jobManager.getRecentJobs().get(0)...
[ "public static int getLastJobId() {\n int id = 0;\n try {\n ResultSet rs = DatabaseConnectionPostgre.connection()\n .createStatement()\n .executeQuery(\"SELECT MAX(id) FROM job\");\n\n if (rs.next()) id = rs.getInt(1);\n } catch (SQLEx...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
totalInterfaceAccessAmount item etl and 3sec stat
@Scheduled(cron = "0/3 * * * * ?") public void accountIFaceSched() { try { long now = System.currentTimeMillis(); String key = "anu_totalInterfaceAccessAmount"; String value = redisService.get(key); if (null == value) { long id = transService.f...
[ "public void total_Sitems() {\n\n }", "public int getTotalStat() {\r\n return this.getAanvallendTotaal() + this.getVerdedigingsTotaal() + this.getUithoudingsTotaal();\r\n }", "@Test\n\tpublic void numberAccesses() {\n\t\tassertEquals(LoginDataAnalysis.totalAccesses(userData), 96);\n\t}", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Exit our MainDenis loop and close the window
public void exit() { running = false; }
[ "public void exit() {\n\t\ttry {\n\t\t\tmainWindow.dispose();\n\t\t\tcleanUp();\n\t\t} \n\t\tcatch (Exception exc) {\n\t\t\texc.printStackTrace(); //TODO\n\t\t}\n\t\tSystem.exit(0);\n\t}", "private void closeWindow() {\n //Disable the functions of the user input and send button.\n userInput.setOnAct...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public JSONObject getBaseAccountUserIds(JSONObject params) { return selectOne("getBaseAccountUserIds", params); }
[ "@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" ] ] } }
User: krisjin Date: 2016/9/20
public interface GenericRepository<T, ID extends Serializable> { public void save(T entity); public void update(T entity); public T findById(ID id); public void delete(T entity); }
[ "private static void getCurrentDate() {\n\t}", "public String getDate(){ return this.date; }", "float getDateCreated();", "public Date getThoiGianDuyet();", "public String getSettle_date()\n/* */ {\n/* 228 */ return this.settle_date;\n/* */ }", "public Date getNgayHetHieuLuc();", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: protected
public abstract int colGetSize();
[ "@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" ] ] } }
Function Name: workFlowGroupGridAjax Function DescriptionRetrieve the workflow group list according to workflow id
public ModelAndView workFlowGroupGridAjax(HttpServletRequest request, HttpServletResponse response, WorkFlowSModel sc) throws Exception { ModelAndView mv = new ModelAndView("jsonView"); request.setAttribute(SC_ID_SESSION, "WorkFlow_workFlowGroupList"); String userId = SessionUtil.getUserId(request, getSyst...
[ "List<WorkFlow> getChildForGroup(String groupId, AdvanceSearch advanceSearch, String parengGroupId);", "public List<WorkFlow> groupSearchParent(final String groupId);", "List<WorkFlow> getWorklistGroupData(List departmentNumbers, int startIndex, int maxResult, String sortColumn, String sortOrder);", "public L...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This is a component function which store error message and original query to tempWrite variable Parameter:original message, error message Return: none Logic :1.Store 2.Call showText() function
private static void recordError(String aLine, String error) { tempWrite.add("\n"+aLine); tempWrite.add(error); Application.showText(); }
[ "public void showErrorTextAPI(String result){\n message=result;\n notifySubMe();\n }", "private String error() {//UNA EXCEPCION\n\t\treturn \"\";\n\t}", "void showErrorMsg(String error);", "private void writeError() {\n\n engine\n .exec(\"[str2,n2,line2,func2]=lasterror(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onCancel(DialogInterface dialog) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR); }
[ "@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" ] ] } }
Arrange tc to less than from.
private void arrangeTCToLessThanFrom(TestBlockModel testBlockModel, List<TestConditionMatrix> testConditionList) { for (TestConditionMatrix tcm : testConditionList) { TestBlockDependentCondition tbdc = ((List<TestBlockDependentCondition>)tcm.getTestBlockDependentConditionCollection()).get(0); if (tbdc.ge...
[ "private int findLower(T x, int from, int to) {\n int len = to - from + 1, half;\n while (len > 0) {\n half = len / 2;\n int m = from + half;\n if (comp.compare(data[m], x) < 0) {\n from = m + 1;\n len = len - half - 1;\n } else...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
main method for testing
public static void main( String[] args ) { //PROTIP: try creating a few nodes: traversible, connected... //note anything notable as you develop and test... LLNode node0, node1, node2; node0 = new LLNode( "nunu", null ); node1 = new LLNode( "challenger", node0 ); node2 = new LLNode( "consume", null ); ...
[ "public static void main( String...args )\n\t\t{\n\t\tTestData();\n\t\t}", "public static void main(String[] args) {\n // no tests\n }", "@Test\n\tvoid coverMain() {\n\t\tRockPaperScissorsApplication.main(new String[] {});\n\t}", "static public void main(String[] argv) {\n // Create and run t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draws the entire chart on the specified Graphics class
public void drawGraph(Graphics g) { if (g == null) return; super.drawGraph(); background.draw(g); pie.draw(g); if (legendVisible) legend.draw(g); }
[ "public abstract void draw(UnifiedGraphics graphics) throws GUIException;", "public void draw(Graphics g) {\n\n\t}", "public void draw(java.awt.Graphics g){\n\t}", "public void draw(Graphics g) {\n }", "protected abstract void drawComponents(Graphics g);", "public void draw(Graphics g)\r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is required for the comparable to work correctly
public boolean equals(Object object) { if (!(object instanceof Car)) { return false; } Car car = (Car) object; boolean isEqual = false; isEqual = ((this.brand.equalsIgnoreCase(car.brand)) && (this.age == car.age)) ? true : false; return isEqu...
[ "@Override\n\tpublic void compare(Object t) {\n\t\t\n\t}", "@Test\n\tpublic void comparable() {\n\t\tTestComparable a = new TestComparable( 0 );\n\t\tTestComparable b = new TestComparable( 1 );\n\t\tassertEquals( 0, cmp.compare( a, a ).result() );\n\t\tassertEquals( -1, cmp.compare( a, b ).result() );\n\t\tassert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ The alert button is an object written in the library progressViewLib library was offered for free on: Source for the library can be found on: Some modifications to the library were made for better and smoother animations. By Harsh Patel, 7/7/2016 Inflating the view for the fragment.
@Override public View onCreateView(final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.alert_fragment,container,false); alert_inst =(TextView)view.findViewById(R.id.alert_inst); alert_in...
[ "public void onCreate(Bundle bundle) {\n int i;\n int i2;\n int i3;\n super.onCreate(bundle);\n AnonymousClass1 r1 = new LinearLayout(getContext()) {\n private boolean inLayout;\n\n public boolean hasOverlappingRendering() {\n return false;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Index Values: 0 x from left side, 1 height value & 2 x from right side
public int[][] skyLineMockData2() { int[][] arr = { { 1, 11, 5 }, { 2, 6, 7 }, { 3, 13, 9 }, { 12, 7, 16 }, { 14, 3, 25 }, { 19, 18, 22 }, { 23, 13, 29 }, { 24, 4, 28 } }; return arr; }
[ "int getHeightOffset(int index);", "private int getIndex(int i, int j, int width) {\n return i * width + (j<i?j:j-1)+1;\n }", "int getVertIdx();", "private int index(int x, int y) {\n\t\treturn (dim * x) + y;\n\t}", "int getVertical();", "int getPixel(BigInteger index);", "int getHeights(int i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .CMsgDOTAFantasyPlayerStandingsResponse.CMsgPlayerScore player_scores = 4;
public DotaGcmessagesClientFantasy.CMsgDOTAFantasyPlayerStandingsResponse.CMsgPlayerScore getPlayerScores(int index) { return playerScores_.get(index); }
[ "public static int getPlayerScore(){\n return playerScore;\n }", "public int getPlayerScore(){\r\n return playerScore;\r\n }", "int getPlayerMsgCount();", "public void calculateScores(){\n\t\tfor(int i = 0; i<playerScoreArray.length; i++){\n\t\t\tplayerScoreArray[i]= playerArray[i].money+p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Caches the category articles in the entity cache if it is enabled.
@Override public void cacheResult(List<CategoryArticle> categoryArticles) { for (CategoryArticle categoryArticle : categoryArticles) { if (entityCache.getResult( entityCacheEnabled, CategoryArticleImpl.class, categoryArticle.getPrimaryKey()) == null) { cacheResult(categoryArticle); } else { ...
[ "public void cacheResult(List<FAQCategory> faqCategories) {\n\t\tfor (FAQCategory faqCategory : faqCategories) {\n\t\t\tif (EntityCacheUtil.getResult(\n\t\t\t\t\t\tFAQCategoryModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\t\tFAQCategoryImpl.class, faqCategory.getPrimaryKey()) == null) {\n\t\t\t\tcacheResult(faqCategory)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Gives the value for a specific feature
public String getFeatureValue(String featureName) { if(featureFile.containsKey(featureName)) return featureFile.getProperty(featureName); return null; }
[ "public Integer get(int value) {\n return features.get(value);\n }", "public FeatureStructure getFSValue(FeatureStructure fs);", "public abstract Feature getFeature(String featureName);", "public int getValue();", "public int get(int index) {\n return featureVotes[index];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
makes DLL with the leaves and prints reverse and correct order. GFG link:
public void leavesToDLL(Node root) { List<Node> list = new ArrayList<>(); createDLLFromLeaves(root, list); printDLL(list.get(0)); }
[ "private static void displayDLL() {\n\t\tNode temp;\n\t\tfor (temp = head; temp != null; temp = temp.right) {\n\t\t\tSystem.out.print(temp.data + \" -> \");\n\t\t}\n\t\tSystem.out.println(\".\");\n\n\t\tfor (temp = tail; temp != null; temp = temp.left) {\n\t\t\tSystem.out.print(temp.data + \" -> \");\n\t\t}\n\t\tSy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Asynchronously launch task to generate simulated data.
public void simulateStatusChanges() { if (!mStatusSimulatorLaunched) { new Thread(new Runnable() { @Override public void run() { while (true) { try { mAppState.statusManager().setCurrentStatus("Testing..."); Thread.sleep(5000); mA...
[ "void generate() {\n if (mGenerateTunerHalTask == null && mTunerHal == null) {\n mGenerateTunerHalTask = new GenerateTunerHalTask();\n mGenerateTunerHalTask.executeOnExecutor(mExecutor);\n }\n }", "@Experimental\n void scheduleStepIntoAsync();", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleStatement" $ANTLR start "entryRuleMediatorStatement" InternalEsbDsl.g:272:1: entryRuleMediatorStatement returns [EObject current=null] : iv_ruleMediatorStatement= ruleMediatorStatement EOF ;
public final EObject entryRuleMediatorStatement() throws RecognitionException { EObject current = null; EObject iv_ruleMediatorStatement = null; try { // InternalEsbDsl.g:272:58: (iv_ruleMediatorStatement= ruleMediatorStatement EOF ) // InternalEsbDsl.g:273:2: iv_ruleM...
[ "public final EObject entryRuleStatement() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleStatement = null;\n\n\n try {\n // InternalGraph.g:241:50: (iv_ruleStatement= ruleStatement EOF )\n // InternalGraph.g:242:2: iv_ruleStatement= ruleStateme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an instance of a custom hit condition that uses the specified name.
public CustomHitCondition instantiateCustomHitCondition(String name) { if (!customHitConditions.containsKey(name)) { return null; } try { CustomHitCondition customHitCondition = customHitConditions.get(name).newInstance(); return customHitCondition; } catch (InstantiationException e) {...
[ "public Criterium(String name) {\n super(name);\n }", "public Bound named(String name) {\n\t\t\t\treturn new Bound(name);\n\t\t\t}", "public Action(Name name) {\r\n\t\t_name = name;\r\n\t\t_preConditions = new ArrayList(3);\r\n\t}", "public Clickable(String name) {\r\n\t\tif (name == null)\r\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
contains transit specific information. This field is only returned with travel_mode is set to "transit". See Transit Details below.
public gStep(JSONObject s){ try{ this.setHTMLInstructions(s.getString("html_instructions")); }catch(JSONException e){ e.printStackTrace(); } try{ this.setDistance(((JSONObject) s.get("distance")).getDouble("value"), ((JSONObject) s.get("distance")).getString("text") ); }catch(JSONException...
[ "public String getTransitType(){\n\t\t\treturn transitType;\n\t\t}", "public com.pickme.events.trip.trip_ended.TravelDetails getTravelDetails() {\n return travel_details;\n }", "public String getTrafficTravel() {\n return trafficTravel;\n }", "public static Map<String, String> getTransportDetail...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Toast message to display in case of no Internet
public void noInternetToast() { Toast.makeText(getApplicationContext(), "Please connect to the internet to play the game",Toast.LENGTH_LONG).show(); }
[ "private void displayNetworkWarning() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(this);\n\n dialog.setTitle(getString(R.string.error_no_network));\n dialog.setMessage(getString(R.string.error_no_network_details));\n dialog.setCancelable(false);\n\n dialog.setPositive...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Forwards a new project to the database.
public void createProject(PSData PSdata, String EndDate, String PName, String Pdescription, String ListOfRewards, String FundingLimit) { // Parse inputs to correct datatypes try { DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); Date date = dateFormat.parse(EndDate); long time = date.getTime...
[ "private void createProject() {\r\n\t\tProjectServiceImpl impl = new ProjectServiceImpl();\r\n\r\n\t\tprojet = impl.createEntity(new TransitLPProject(\"\", \"Projet de Paul\", \"Description pour le projet de Paul\", \"\", true, 0, \"\"));\r\n\t\t\r\n\t\t//We put the two sports activities in a ActivityUnit to choose...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get all ownership of every element in targets.
@SuppressWarnings("unchecked") protected boolean getMultiOwnerShip(AdjacentList<E>[] targets) { Arrays.sort(targets); for (int i = 0, len = targets.length; i < len; ++i) { if (!targets[i].getOwnership()) { AdjacentList<E>[] free = new AdjacentList[i]; Sys...
[ "List<?> getAllTargets();", "public ArrayList<Member> getTargets() {\n Role targetRole = getTargetRole();\n ArrayList<Member> targets = new ArrayList<>();\n for(Member target : getGuild().getMembersWithRoles(targetRole)) {\n if(!getSelfMember().canInteract(target)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executes: mpirun np `np` mpitish < `information` Before the execution, current directory will be the same as the `information` Note that 'mpitish' must be in PATH (checked by which).
public static Callable<Integer> tish(int np, Path information) { if (!shExists) throw new RuntimeException("mpi-sh does not exist in PATH"); if (np <= 0) throw new IllegalArgumentException("np must be positive..."); if (!Files.exists(information)) throw new RuntimeException(information + " does ...
[ "public static void executeMpirun(String[] command) {\n StringBuilder stderr = new StringBuilder();\n boolean isVerbose = true;\n\n int tryCount = 0;\n while (tryCount++ < FaultToleranceContext.maxMpiJobRestarts(config)) {\n LOG.info(\"mpirun will execute with the command: \\n\" + commandAsAString(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all the reinstatements where uuid = &63; from the database.
@Override public void removeByUuid(String uuid) { for (Reinstatement reinstatement : findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(reinstatement); } }
[ "@Override\n\tpublic void removeByUuid(String uuid) {\n\t\tfor (Escritor escritor :\n\t\t\t\tfindByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\n\t\t\tremove(escritor);\n\t\t}\n\t}", "private void removeAnyDeletedExercisesFromLogDatabase() {\n Set<String> newUuids = new HashSet<>();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes all nodes that are currently selected.
void deleteSelection();
[ "public void removeAllNodes() {\n finishEditing();\n unselectAll();\n root = null;\n modelView = null;\n view.removeAllNodes();\n }", "public void deleteNode() {\r\n if (!selectedNodes.isEmpty()) {\r\n for (Node n : selectedNodes) {\r\n joinEd...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set: V1 Title: Guided by One Purpose Side: Free Peoples Culture: moria Twilight Cost: 0 Type: condition Subtype: Support Area Game Text: Each time a tentacle wins a skirmish you may stack it here. Assignment: Spot 4 tentacles here and discard this condition to assign a [moria] creature to the Ringbearer. The Free Peopl...
@Test public void PurposeStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl purpose = scn.GetFreepsCard("purpose"); assertFalse(purpose.getBlueprint().isUnique()); assertTrue(scn.HasKeyword(purpose, Keyword.S...
[ "public String formatShowDownMovesets(String s) {\n String masterString = \"\";\n String[] chunks;\n chunks = s.split(\"ENDLINE\");\n String[] lines;\n String[] currentChunksLines = new String[21];\n String currentLine = \"\";\n for (int i = 0; i < chunks.length; i++...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Descendants: 'descendants' group=ID ',' dimension=Reference;
public DescendantsElements getDescendantsAccess() { return pDescendants; }
[ "public static ArrayList<Integer> getDescendants(String catName){\n\t\tArrayList<Integer> descendants = new ArrayList<Integer>();\n\n\t\ttry{\n\t\t\tint catId=-1;\n\t\t\tDBConnectionFactory connFactory = DBConnectionFactory.getInstance(DB_NAME,DB_PASSWORD,DB_IP);\n\t\t\tConnection con = connFactory.getConnectionOfD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called if the MIDlet is terminated by the system. I.e. if startApp throws any exception other than MIDletStateChangeException, if the isolate running the MIDlet is killed with Isolate.exit(), or if VM.stopVM() is called. It is not called if MIDlet.notifyDestroyed() was called.
protected void destroyApp(boolean unconditional) throws MIDletStateChangeException { for (int i = 0; i < 8; i++) { leds[i].setOff(); } }
[ "protected void destroyApp(boolean arg0) throws MIDletStateChangeException \r\n {\n }", "@Override\n\t// 建议在您app的退出之前调用mapadpi的destroy()函数,避免重复初始化带来的时间消耗\n\tpublic void onTerminate() {\n\t\tif (mBMapMan != null) {\n\t\t\tmBMapMan.destroy();\n\t\t\tmBMapMan = null;\n\t\t}\n\t\tsuper.onTerminate();\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If more than one Cloudant DB is bound to the app this will throw an error. This is intentional to prevent more than one Cloudant database.
@Bean public CouchDbInstance couchDbInstance() { return cloud.getSingletonServiceConnector(CouchDbInstance.class, null); }
[ "public void checkDbConnection() {\n }", "@Override\n public void databaseUnavailable() {\n super.databaseUnavailable();\n }", "private void checkDatabase() {\r\n\tQuery query = QueryBuilder.Query().ShowDataBases().getQuery();\r\n\tQueryResource resource = influxDbFactory.getQueryResource(query);\r\n\tQ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the stating date of the job
public String getBeginDate() { return beginDate; }
[ "long getReqDate();", "java.util.Calendar getDateSubmitted();", "public Date getWorkDate() {\r\n\t\treturn workDate;\r\n\t}", "public long getStartTime() {\n return jobInfo.getStartTime();\n }", "public String getDateOfSubmission() {\r\n\t\treturn dateOfSubmission.get();\r\n\t}", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'orderId'
@Test public void orderIdTest() { // TODO: test orderId }
[ "public void setOrderId(int value) {\n this.orderId = value;\n }", "@Test\n public void ordersOrderIdGetTest() throws ApiException {\n Integer orderId = null;\n api.ordersOrderIdGet(orderId);\n\n // TODO: test validations\n }", "@Test\r\n public void testGetOrderInf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { Log.i("hpx.android.HelloHpx", "onCreate"); wifiLock = ((WifiManager)getSystemService(Context.WIFI_SERVICE)).createWifiLock("hpx.android"); wifiLock.acquire(); super.onCreate(savedInstanceState); runtime.register...
[ "protected void onCreate() {}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tinitData();\n\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tULog.i(this, \"onCreate() \");\n\t\tinitData();\n\t}", "@Override\n public void onCreate () {\n super.onC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AbsoluteRESTURL__Group_4__1__Impl" $ANTLR start "rule__RelativeRESTURL__Group__0" ../org.applause.lang.ui/srcgen/org/applause/lang/ui/contentassist/antlr/internal/InternalApplauseDsl.g:3588:1: rule__RelativeRESTURL__Group__0 : rule__RelativeRESTURL__Group__0__Impl rule__RelativeRESTURL__Group__1 ;
public final void rule__RelativeRESTURL__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.applause.lang.ui/src-gen/org/applause/lang/ui/contentassist/antlr/internal/InternalApplauseDsl.g:3592:1: ( rule__RelativeRESTURL__Group__0__Impl ...
[ "public final void rule__URIFirstPathElementCS__Group_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational.ui/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/ui/contentassi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ID of the placement group to update. To get the placement group ID, use an [PlacementGroupService.List] request. string placement_group_id = 1;
public Builder clearPlacementGroupId() { placementGroupId_ = getDefaultInstance().getPlacementGroupId(); onChanged(); return this; }
[ "@Nullable\n Object getPlacementGroupRef();", "public void setGroup_Id(Integer group__id)\r\n\t{\r\n\t\tthis.group__id = group__id;\r\n\t}", "public void setGroup_ID(java.lang.String group_ID) {\n this.group_ID = group_ID;\n }", "public void setGroupID(String groupID)\n {\n this.groupID...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
take a picture and store it on external storage
public void doTakePicture() { // verify that app has permission to use camera if (!hasPerrmissions(this, allPermissions)) { requestPermissions(); } // manage launching intent to take a picture else { Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTU...
[ "private void takePicture() {\n Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n File out = new File(mCurrentPhotoPath);\n Uri uri = Uri.fromFile(out);\n cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri);\n Log.d(getClass().getSimpleName(), \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WebDriver driver = new WebDriver();//we cant create object in interface
public static void main(String[] args) { }
[ "public interface MicroserviceMobileDriver extends org.openqa.selenium.WebDriver, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.HasCapabilities {\n}", "public interface IBrowser {\n public abstract WebDriver start();\n}", "public HomePage(WebDriver ldriver ) {\r\n\t\t\r\nthis.driver= ldriver;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PRECONDITION loadTerms must be run first in order to set nrOfFiles
public void loadPointers(String inDir,String fileNam) throws Exception { cmrPointer = new long[nrOfFiles*4+1]; InputStream fis = new FileInputStream (inDir+"pre_point/"+fileNam+".txt"); //Reader isr = new InputStreamReader (fis, "UTF-8"); //Scanner s = new Scanner(isr); Scanner s = new Scanner(fis); ...
[ "public void beforeLoad() {\n \t\tloadCounter++;\n \t}", "private void initialLoad() {\n\t\tlong start = 0;\n\t\ttry {\n\t\t\tstart = System.currentTimeMillis();\n\t\t\tsystems = JEMDao.jobService.getAllIncompleteJobs();\n\t\t\t// configurationList=configuration.get();\n\t\t\t// BUILD THE INDEX\n\t\t\tsem.acquire...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column _trade_works._chConProPrice
public void setChconproprice(Long chconproprice) { this.chconproprice = chconproprice; }
[ "public void setPRICE(BigDecimal PRICE) {\n this.PRICE = PRICE;\n }", "public void setPricePOAmt (BigDecimal PricePOAmt);", "public void setProductMoney(BigDecimal productMoney) {\n this.productMoney = productMoney;\n if (productMoney == null) {\n this.productMoney = BigDecimal.ZERO;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "CanBeChanged" element
public boolean getCanBeChanged() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CANBECHANGED$0, 0); if (target == null) ...
[ "public String getChanged() {\r\n return this.changed;\r\n }", "public boolean getChangedStatus() {\n return changed;\n }", "public boolean isChanged() {\n return changed.get();\n }", "public boolean isChanged(){\r\n\t\treturn isChanged;\r\n\t}", "boolean isChanged(){\n return cha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate flat plane mesh with the given amount of vertices on each side of the quad
public static Model generatePlane(int vertices, Predicate<Triangle> test) { vertices = Math.max(vertices, 2); float[] positions = new float[vertices * vertices * 2]; int[] indices = new int[6 * (vertices - 1) * (vertices - 1)]; int pointer; // Determine the positions and the tex...
[ "private void generateTriangles() {\n Vector3f[] vertices = generateVertices();\n\n // subdivide each triangular face (20 total) recursively\n subdivide(vertices[0], vertices[2], vertices[10], depth);\n subdivide(vertices[0], vertices[10], vertices[5], depth);\n subdivide(vert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the screen position of the cursor.
public DocPos getCursorPositionScreen() throws JSException { return new DocPos((JSObject) mEditor.call("getCursorPositionScreen")); }
[ "Point getScreenPos();", "public int getCursorPosition() {\n return cursorPosition.y;\n }", "public int getCursorPosition() {\r\n\t\treturn curPos;\r\n\t}", "public Point getScreenPosition() {\n return widget.getPreferredLocation();\n }", "org.bwapi.proxy.messages.BasicTypes.Position get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows the finish screen when game is ended
private void whenFinished() { g = new Group(); Text largeText = new Text(WIDTH/2 - 220, HEIGHT/2 - 60, "Game Over"); largeText.setFont(Font.font("verdana", FontWeight.EXTRA_BOLD, FontPosture.REGULAR, 70)); largeText.setFill(Color.RED); Text largeText2 = new Text(WIDTH/2 - 170, HEIGHT/2 + 20, "FINAL SCORE: ...
[ "public void endGame() {\n game.levelScreen.setVisible(false);\n game.levelScreen.timer.stop();\n game.gameOverScreen = new GameOverScreen();\n }", "private void endGame(){\n game.gameLayout.removeAll();\n game.gameControl.gameFinished(game.points,game);\n game.gameLayou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { if(source.equals("")){ // for backspace return source; } if(source.toString().matche...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public View makeView() { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this view only respect first child param and set param according to that
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); int height = 0; if (getAdapter() != null) { View calenderItemView = getChildAt(0); if (calenderItemView != null) ...
[ "@Override\r\n\tpublic void subInitParam() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void beforeSaveUpdate(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object obj, Object originalObject) {\n\t\tString parentId = request.getParameter(\"parentId\");\r\n\t\tDictCatalog dc = (DictCatalog) obj;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end getFinishedCharacter() private methods
private boolean moreSkillsTrainable(SkillButton[] buttonList){ // purpose of this method is to check if there are any more skills // available to be trained in the given list of buttons. // go through the list and see if any of the buttons can be trained by the character. for (int i = 0; i < buttonL...
[ "protected char read() {\n if (this.positionPointer < 0\n || this.positionPointer >= this.content.size()) {\n return TuringMachine.BLANK_CHAR;\n }\n return this.content.get(this.positionPointer);\n }", "public String getCharacter() {\n return this.character;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Marks the given rule node as dirty for later reevaluating. This method also registers the RoundHook if there was no dirty rule present.
protected void markDirty(RuleTreeNode rule) { // Mark only the uppermost (nearest to the root) in each sub tree. List<RuleTreeNode> toDelete = new LinkedList<RuleTreeNode>(); for (Iterator<RuleTreeNode> i=dirtyNodes.iterator(); i.hasNext();) { RuleTreeNode dirtyRule = i.next(); ...
[ "@Override\n public void setNodeDirty(boolean dirty){\n //System.out.println(\"setNodeDirty(\"+dirty+\")\");\n if (dirty) {\n synchronized (this) {\n nodeDirty=true;\n restartGen();\n }\n }\n }", "public void setRule(ObjectLockRule rul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stops the Timer task
void onStop();
[ "public void stop() {\n timer.stop();\n }", "private void stopTimer() {\n\t\tmHandler.removeCallbacks(mUpdateTimeTask);\n\t}", "public void stopTime() {\n\t\t\ttimer.cancel();\n\t\t}", "public void stop() {\n stop(curTimer);\n }", "private void stop_counter () {\n if (timerTask != null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate the Cyclomatic complexity of a given method
public static int cycloMethodValue(Method method) { int res = 1; String[] str = method.getCode().split("\r\n"); for(String s : str) res+=lineCycloCounter(sourceCodeExtrator(s)); return res; }
[ "@Override\n public int getComplexity() {\n return complexity;\n }", "public Complexity getComplexity() {\n return complexity;\n }", "private int shortcircuitedAbstraction(AbstractEntityInterface anEntity) { return anEntity.contains(\"method group\").applyFilter(\"Shortcircuiting Method\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this serializer does not support instantiation
@Override public void testInstantiate() { }
[ "private Serializer() {\n }", "private ObjectSerializerFactory() {\n serializer = new JavaSerializer();\n }", "public Serializer() {\n this(Witness.class);\n }", "@Override\n public boolean objectSerialiserOnly() {\n return true;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .com.opensource.svga.ShapeEntity.ShapeArgs shape = 2;
public Builder setShape( com.opensource.svgaplayer.proto.Svga.ShapeEntity.ShapeArgs.Builder builderForValue) { if (shapeBuilder_ == null) { args_ = builderForValue.build(); onChanged(); } else { shapeBuilder_.setMessage(builderForValue.build()); } ...
[ "com.nent.mam.proto.vidispineproto.Shape getShape();", "public void setShape(Shape shape) {\n\t\t\n\t}", "Shape2f<?> getShape();", "public String getShape()\n {\n return shape;\n }", "public Shape getShape(){\n\t\treturn shape;\t\t\n\t}", "public final Shape getShape(){return mShape;}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }