query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
When starts has to set the title.
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_level_menu); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); setTitle(getResources().getString(R.stri...
[ "private void setTitle() {\n title.setText(titleText);\n }", "@Override\n\tpublic void initTitle() {\n\t\t\n\t}", "public void title() {\n displayDialogue(Dialogue.titleScreenDialogue());\n }", "public void setAppTitle() {\n\t\tprimaryStage.setTitle(TITLE); \n\t}", "public void setTitle(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds labor day of the current year.
private LocalDate findLaborDay() { LocalDate firstSept = LocalDate.of(currentYear, 9, 1); while(!firstSept.getDayOfWeek().equals(DayOfWeek.MONDAY)) { firstSept = firstSept.plus(1, ChronoUnit.DAYS); } return firstSept; }
[ "public Date discoverColumbusDay(int year)\n {\n // bogus return value so program skeleton will compile and run - \n // replace it with the correct Date and delete this comment\n return null ;\n }", "public int dayInYear() {\n \n int days = 0;\n\n int m =1;\n while(m<this.month...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to listener to every spinner in the emotions panel
@Override public void addListener(EventListener eventListener, String componentName) { if(componentName.equals("SPINNER_HEALTH")) { for(HealthPanel healthPanel: HealthPanel.values()) { jspinner[healthPanel.id].addChangeListener((ChangeListener)eventListener); } ...
[ "private void setUpSpinnerListeners() {\n mThemesSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(\n AdapterView<?> adapterView, View view, int position, long id) {\n @Constants.ThemeN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test buy property with 1 less money needed to buy two properties
@Test public void buyPropertyTest3(){ currentRound.nextTurn(); currentRound.nextTurn(); LandSelectionTurn t = (LandSelectionTurn) currentRound.getCurrentTurn(); t.addProperty(new River(true)); assertEquals("They are equal", t.getPlayer().getProperty().size(), 1); assertEquals("They are equal", t.getPlayer(...
[ "@Test\n\tpublic void testBuying(){\n\t\ttestField.setOwner(testPlayer1.getPlayerNumber());\n\t\ttestPlayer1.getAccount().addBalance(-testField.getPrice());\n\t\t\n\t\tint expectedOwner = testField.getOwner();\n\t\tint actualOwner = testPlayer1.getPlayerNumber();\n\t\tAssert.assertEquals(expectedOwner, actualOwner)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all rows from the SNMP_EVENTS_PROCESS table that match the criteria 'SUMMARY = :summary'.
public List<SnmpEventsProcess> findWhereSummaryEquals(String summary) throws SnmpEventsProcessDaoException;
[ "public ItRequest[] findWhereSummaryEquals(String summary) throws ItRequestDaoException;", "List<TodoListSummary> findSummaries();", "public static boolean hasSummary (Node node)\n {\n final String METHOD_NAME = \"hasSummary\";\n Element element = toElement(node, METHOD_NAME);\n return toBoolean(eleme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 107 / 132 covered goals: Goal 1. org.apache.commons.lang3.StringUtils.stripAccents(Ljava/lang/String;)Ljava/lang/String;: Line 640 Goal 2. org.apache.commons.lang3.StringUtils.stripAccents(Ljava/lang/String;)Ljava/lang/String;: Line 643 Goal 3. org.apache.commons.lang3.StringUtils.substringsBetween(Lj...
@Test public void test107() throws Throwable { String string0 = StringUtils.leftPad(" ", (-1025), 'z'); String string1 = StringUtils.strip(" ", ""); String string2 = StringUtils.strip(", '"); boolean boolean0 = StringUtils.equalsIgnoreCase(" ", " "); String string3 = StringUtils.substr...
[ "@Test\n public void test011() throws Throwable {\n String string0 = StringUtils.substringBetween((String) null, (String) null, \"'?-iR#k\");\n String string1 = StringUtils.mid(\"jPQD3J8v[(/`j p \", 5, (-2209));\n boolean boolean0 = StringUtils.isAlphanumericSpace(\"\");\n String[] stringAr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_award, container, false); }
[ "@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" ] ] } }
/ JADX INFO: super call moved to the top of the method (can break code semantics)
public JvmStaticInObject(@NotNull Field field, boolean z) { super(field, z, true, null); Intrinsics.checkNotNullParameter(field, AnalyticFieldsName.field); }
[ "public void method_5753() {\r\n super();\r\n }", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void parentMethod() throws Exception {\n\t\tsuper.parentMethod();\r\n\t}", "@Override\n }", "protected void method_5557() {}", "protected void d()\r\n/* 49...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Responsible for handling the parse and execution of CREATE SQL statements.
private Result processCreate(Tokenizer c, Session session) throws SQLException { session.checkReadWrite(); session.checkAdmin(); String sToken = c.getString(); // fredt@users 20020221 - patch 513005 by sqlbob@users (RMP) boolean isTemp = false; ...
[ "public SQLParser(){\n\n\t\tthis.showSchemaExp = \"SHOW\\\\s+?SCHEMAS\";\n\t\tthis.useExp = \"USE\\\\s+?[^\\\\s]+\";\n\t\tthis.showTablesExp = \"SHOW\\\\s+TABLES\";\n\t\tthis.createSchemaExp = \"CREATE\\\\s+SCHEMA\\\\s+[^\\\\s]+\";\n\t\tthis.createTableExp = \"CREATE\\\\s+?TABLE\\\\s+?(\\\\w)+\\\\s*\\\\(\\\\s*?([\\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
outgoing NodeConnectors belonging to certain Application Model
private List<NodeConnector> getSuccessorConnectors(StarsNode node, Map<String, NodeConnector> connectors) { List<NodeConnector> outgoings = node.getOutgoing(); List<NodeConnector> successorConnectors = new ArrayList<NodeConnector>(); for(NodeConnector connector: outgoings) { if(connectors.containsKey(connector...
[ "private MapNode createNodeConnectors() {\n Set<QName> qnames = new HashSet<>();\n qnames.add(QName.create(\"(urn:opendaylight:flow:inventory?revision=2013-08-19)queue\"));\n qnames.add(QName.create(\"(urn:opendaylight:flow:inventory?revision=2013-08-19)port-number\"));\n qnames.add(QNam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SiteData sitedata = new SiteData(); sitedata.deleteDBValue( dbEntryQuery);
public void deleteDBValue(String dbEntryQuery) throws Exception { MozuClient client = com.mozu.api.clients.platform.SiteDataClient.deleteDBValueClient( dbEntryQuery); client.setContext(_apiContext); client.executeRequest(); client.cleanupHttpConnection(); }
[ "public int deleteGSMSiteInfo(int siteGlbId) throws DataAccessException;", "@Override\r\n\tpublic void delete(Site entity) {\n\t\t\r\n\t}", "public static void cleanupDatastore() {\r\n\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\r\n\tlong timestampdelta = (System.currentTimeMill...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Listens for started bundles and checks if they have translations that needs to be processed.
@Override public void handleEvent(Event event) { Bundle bundle = (Bundle) event.getProperty("bundle"); String bundleSymbolicName = (String) event.getProperty("bundle.symbolicName"); processBundle(bundle); }
[ "@Ignore\n @Test\n public void testStartedOsgiBundleDetected() throws Exception {\n new PluginJarBuilder(\"osgi\")\n .addFormattedResource(\"META-INF/MANIFEST.MF\",\n \"Manifest-Version: 1.0\",\n \"Bundle-SymbolicName: my\",\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Only works if it is a Joker
public boolean setColor(String c) { if(isJoker) { String[] validColors = {"R", "B", "G", "O"}; c = c.toUpperCase(); for(String color : validColors) { if(color.equals(c)) { this.color = c; return true; } } } return false; }
[ "public void testJokerInDeck() {\n\t\tDeck deck = new Deck();\n\t\t\n\t\tint jokerCount = 0;\n\t\twhile(deck.getTileCount() != 0) {\n\t\t\tif(deck.dealTile().isJoker()) {\n\t\t\t\tjokerCount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tassertEquals(2, jokerCount);\n\t}", "CardDeck getHand();", "public static Joker getJoker(Jo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a WebFileChooser pointing to the user's default directory.
public WebFileChooser () { super ( WebFileChooserStyle.defaultDirectory ); }
[ "public static FileChooser getSystemFileChooser(){\n\t\tif (System.getProperty(\"javawebstart.version\") != null) { //$NON-NLS-1$\n\t\t\treturn new JNLPFileChooser();\n\t\t}\n\t\treturn new DesktopFileChooser();\n\t}", "public void setDefaultDirectory(File defaultDirectory) {\r\n\t\tif (defaultDirectory == null) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set value of Name
public final void setName(java.lang.String name) { setName(getContext(), name); }
[ "public void setName(String value){\n this.name = value;\n }", "public void setName(String value) {\r\n\t\t_name = value;\r\n\t}", "public void setName(String name){\n this.name = name; // takes in the input and applies the passed value to the name property\n\n }", "public void setName(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update by primary key selective.
int updateByPrimaryKeySelective(Product record);
[ "int updateByPrimaryKeySelective(Parametro record);", "int updateByPrimaryKeySelective(BaseData record);", "int updateByPrimaryKeySelective(Intervencion record) throws SQLException;", "int updateByPrimaryKeySelective(Opertion record);", "int updateByPrimaryKeySelective(DataTable record);", "int updateByPr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display the relevant panel for a librarian according to his selection from his main panel
public void LibrarianMenuButtonClick(String ButtonName) { HideAllPanels(); if (ButtonName.equals("Readers")) { if (panelLibrarianReaders==null) { panelLibrarianReaders=new PanelLibrarianReaders(this); add(panelLibrarianReaders); } panelLibrarianReaders.InitPanel(); panelLibrarian...
[ "public void showPanelRenuncias() {\n\t}", "public void showFindPanel(String[] areaList) {\n\t\tadd(findPanel);\n\t\tGridBagLayout gbl = new GridBagLayout();\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tJPanel search = new JPanel();\n\t\tJButton searchButton = new JButton(\"Search\");\n\t\tareas = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates whether we support partitioning tables on columns of this type.
public boolean supportsTablePartitioning() { if (!isSupported() || type_ == PrimitiveType.TIMESTAMP || type_ == PrimitiveType.CHAR) { return false; } return true; }
[ "boolean hasQueryPartition();", "boolean hasColumnQualifierBytes();", "boolean usesPartitions();", "public boolean isColumnStretchable(int columnIndex) {\n/* 186 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean isColumnSortSupported() {\n return(m_ColumnSortSupported);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the parsed violations.
public CodingStandardViolation[] getViolations() { return violations.toArray(new CodingStandardViolation[violations.size()]); }
[ "public ViolationsList getViolations() {\n return this.violations;\n }", "@Override\r\n\tpublic int violations() {\n\t\treturn _violations;\r\n\t}", "public int violations() {\n\t\treturn violations;\n\t}", "List<Message> getWarnings();", "public int getViolations (Severity severity)\r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
alternate constructor setting both callbackData and notifyURL
public CallbackReference(String callbackData, String notifyURL) { this.callbackData = callbackData; this.notifyURL = notifyURL; }
[ "public RealTimeCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public ServicesCallbackHandler(Object clientData){\r\n this.clientData = clientData;\r\n }", "public VrvWebServerCallbackHandler(Object clientData){\r\n this.clientData = clientData;\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
one dir and the other not
public int compare(File filea, File fileb) { if (filea.isDirectory() && (!fileb.isDirectory())) { return -1; } if ((!filea.isDirectory()) && fileb.isDirectory()) { return 1; } //both dirs if (filea.isDirectory() && fileb.isDirectory()) { ...
[ "boolean getSkipDirPathCheck();", "int getDir();", "@Test\n public void testMissingDirectoryDir2() throws IOException {\n testMissingDirectory(Number.TWO);\n }", "boolean hasDirec();", "public static void main(String args[] )\n\n{ \n\nPath p1,p2,p=null;\n\n p1=Paths.get(\"/home/kiquetal\");\n p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initilize all grid cells in gridCellMap to default values.
public void initializeMap(){ for(int i = 0; i < gridCellMap.length; i++){ for (int j = 0; j < gridCellMap[i].length;j++){ gridCellMap[i][j] = new GridCell(new Point(i, j)); gridCellMap[i][j].resetCell(); }//end inner for loop }//end oute...
[ "private void initializeCells()\n\t{\n\n\t\tfor(int i = 0; i < numberOfRows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < numberOfColumns; j++)\n\t\t\t{\n\t\t\t\tConwayRule defaultRuleExecutor = registry.getService(\"defaultRuleExecutor\", ConwayRule.class);\n\t\t\t\tCell newCell = new Cell(new Coordinates(i, j), this, de...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { dateCol.setCellValueFactory(new PropertyValueFactory<>("day")); timeCol.setCellValueFactory(new PropertyValueFactory<>("time")); placeCol.setCellValueFactory(new PropertyValueFactory<>("location")); reasonCol.setCellValue...
[ "public Controller(){\t\n\t}", "public GameEriController() {\r\n\t\tinit();\r\n\t\t\r\n\t}", "public MainController(){\n \n }", "public Controller ()\n\t{\n\t\tview = new View();\n\t\tmodelo = new Modelo(10000);\n\t}", "public MainController() {\n try {\n log.debug(\"Starting Mai...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if(isChecked){ typeMonth.setClickable(false); typeYear.setClickable(false); type...
[ "@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 void windowActivated(WindowEvent 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" ] ] } }
Function that returns reverse (or transpose) of this graph
Graph getTranspose() { Graph g = new Graph(V); for (int v = 1; v <= V; v++) { // Recur for all the vertices adjacent to this vertex Iterator<Integer> i =adj[v].iterator(); while(i.hasNext()) g.adj[i.next()].addFirst(v); } re...
[ "Node reverse()\n {\n\n //help : just draw the diagrams of all required nodes, connect each node and mention next , prev , head\n //now reverse all the arrows position\n //assign each value corresponding to each node point\n\n Node prev = null;\n Node current = head;\n N...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Toast.makeText(this,slider.getBundle().get("extra") + "", Toast.LENGTH_SHORT).show();
@Override public void onSliderClick(BaseSliderView slider) { String symbol=(String)slider.getBundle().get("extra"); switch(symbol) { case "d": Intent it=new Intent(this,game2.class); startActivity(it); break; // case "a":...
[ "void mo66542a(Bundle bundle);", "static public String getExtra(){\n return EXTRA;\n }", "void printExtraInfo();", "public Bundle getMessageResource(Bundle bundle);", "public Bundle getbundle(){\n return mybundle;\n }", "@Override\n protected void onProgressUpdate(Integer... val...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_difficulty__selection, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Style the tab panel using methods in the UIObject class.
private void styleTabPanelUsingUIObject(){ // Set up the heights of the pages. homePanel.setHeight("400px"); productsPanel.setHeight("400px"); contactPanel.setHeight("400px"); content.setHeight("420px"); }
[ "private void styleTabPanelUsingUIObject() {\n\t\t// Set up the heights of the pages.\n\t\thomePanel.setHeight(\"400px\");\n\t\tproductsPanel.setHeight(\"400px\");\n\t\tcontactPanel.setHeight(\"400px\");\n\t\tcontent.setHeight(\"420px\");\n\t}", "public TiUITabbedBar(TiViewProxy proxy)\n\t{\n\t\tsuper(proxy);\n\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the password used for the Snowflake connection
public String getPassword() { return password; }
[ "public String getJdbcPassword();", "public String getDatabasePassword() {\n return configuration.getPassword();\n }", "String getConfigDatabasePassword();", "public String getWorkDataDBPwd();", "public static String getPassword() {\n\t\tMyLogger.info(\"Retrieving PASSWORD from Account\");\n\t\tre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo para reflejar toda la informacion de la DCEL en el archivo "DCEL.txt"
public void aDisco() { aDisco("DCEL.txt", false); }
[ "@Override\r\n\tpublic void readFile() {\n\t\tReadFile temp = new ReadFile(mfileName);\r\n\t\tmworkBook = temp.readFile(mworkBook);\r\n\t\tmsheetCount = mworkBook.getNumberOfSheets();\r\n\t\tgetDataFromSheet();\r\n\t}", "private void openFile( ) {\n \tint i,reply;\n \tString line, filename, doc;\n \t\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create the precedence relationship between nodes
public void createPrecedenceShip() { LOGGER.info("Creating plugins version's evolution "); for (int r = 0; r < RETRIES; r++) { try (Transaction tx = graphDB.beginTx()) { graphDB.getAllLabelsInUse().stream() .filter(label -> ! label.name().equals(Properties.EXCEPTION_LABEL) || ! label.name()...
[ "public void test4127_precedenceDeclaration4() {\n \n runConformTest(\n new String[] {\n\t\t\"Team4127pd4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team4127pd4 {\\n\" +\n\t\t\t \" public class R playedBy T4127pd4 {\\n\" +\n\t\t\t \" void rm1() { \\n\" +\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete the institution by id.
public void delete(UUID id) { log.debug("Request to delete Institution : {}", id); User principal = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); //Only delete if User has access Optional<Institution> trans = institutionRepository.findById(id); if...
[ "public void delete (Integer id){\n regionRepositories.delete(new Region(id));\n }", "public boolean deleteBudgetsByInstitution(int projectID, int institutionID);", "public void deleteById(Integer id) {\n doctorRepository.deleteById(id);\n }", "public void delete(Long id) {\n log.de...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the name of the attribute represented by this tag
public String getName() { return name; }
[ "public String getAttributeName() {\n return name;\n }", "public java.lang.String getAttribName() {\n java.lang.Object ref = attribName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Subhan Nadeem on 20171010. Access interface to backend
public interface APIService { @FormUrlEncoded @POST("/v1/user/register") Call<JsonObject> registerUser(@Field("username") String username, @Field("password") String password); @FormUrlEncoded @POST("/v1/user/authenticate") Call<AuthenticateResponse> authenticat...
[ "void backend();", "public backend(){\n\n }", "Backend createBackend();", "private void sendRegistrationIdToBackend() {\n\t\t// Your implementation here.\n\t}", "private void sendRegistrationIdToBackend() {\n\t}", "public interface BackEndControl {\n /**\n * Load the user admin with contents for...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method initializes pnlCentro
private JPanel getPnlCentro() { if (pnlCentro == null) { try { GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); gridBagConstraints7.fill = GridBagConstraints.BOTH; // Generated gridBagConstraints7.gridy = 3; // Generated gridBagConstraints7.weightx = 1.0; // Gen...
[ "public CentroFormulario() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(693, 421);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"][ Cadastro da instituiรงรฃo de ensino responsรกvel ][\");\r\n\t\tvalidaPermissao(getPermissao());\r\n\t\tdesabilitarCampo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.proto.Game game = 2;
public Builder clearGame() { if (gameBuilder_ == null) { game_ = null; onChanged(); } else { game_ = null; gameBuilder_ = null; } return this; }
[ "proto.Game getVersionParent();", "proto.Car getCar();", "proto.GameStatusEnum getStatus();", "proto.GameMessageProto.GameMessage getGameMessage();", "public Game getGame(){return _game;}", "public IGame getGame()\n ;", "proto.GameOrBuilder getParentGameOrBuilder();", "protobuf.clazz.coin.CoinProto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column discover.discover_content
public void setDiscoverContent(String discoverContent) { this.discoverContent = discoverContent == null ? null : discoverContent.trim(); }
[ "public final void setExpandableContent(Node content) {\n this.expandableContentProperty.set(content);\n }", "public void set(String content) {\n this.content = content;\n }", "public void setContent(ConsumerContent Content) {\n this.Content = Content;\n }", "@ContentNode\n publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the depth of the resource path.
public int getDepth() { return resource.length; }
[ "public int getPathDepthLimit() {\n\t\treturn pathDepthLimit;\n\t}", "public int depth() {\r\n\t\treturn(m_depth);\r\n\t}", "public static int getDepth(String path) {\n assert isValid(path) : \"Invalid path [\"+path+\"]\";\n\n if (path.isEmpty()) {\n return 0;\n }\n int co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Auto generated getter method
public long getKeywordLength(){ return localKeywordLength; }
[ "public MethodDoc getGetter()\r\n {\r\n return m_jvdGetter;\r\n }", "public long getGetter() {\n return getter_;\n }", "public T get() {\n return value;\n }", "public abstract M get();", "@Override\n \tpublic String get() {\n \t\treturn null;\n \t}", "public Object get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepare a new web conversation for each test (grouping the requests/responses exchanged with the server).
@Before public void setupTest() { // Open web conversation wc = new WebConversation(); }
[ "private void setupResultsAsResources() {\n CommunicationRequest req = new CommunicationRequest();\n\n ResourceReferenceDt rep = new ResourceReferenceDt();\n rep.setDisplay(\"Who We are talking to\");\n rep.setReference(\"Id1\");\n ResourceReferenceDt rep2 = new ResourceReferenceD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Version version() { 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" ] ] } }
If nickname in field doesn't match current name, change current name.
public static boolean updateNickname() { if (!getBotName().equals(Server.getApi().getClientInfo(Server.getMyClientId()).getNickname())) { botName.setText(Config.getProperty("bot_name")); Server.getApi().setNickname(getBotName()); return true; } else { return false; } }
[ "public void changeName(String name) {\n _nick = name;\n }", "public void updateName(String new_name){\r\n\t\tthis.lastName = new_name;\r\n\t}", "public void renameContact(String newName)\n {\n personNameLabel.setText(newName);\n }", "public void updateName();", "public void setNic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loading only Restaurants of 'All Restaurants' Category
@Override public void onBindViewHolder(@NonNull final MyViewHolder holder, int position) { if(restaurantsList.get(position).getOperationStatus().equals("Closed")) { ColorMatrix matrix = new ColorMatrix(); matrix.setSaturation(0); ColorMatrixColorFilter fil...
[ "private void getRestaurants() {\n List<Place.Field> placeFields = Arrays.asList(Place.Field.TYPES, Place.Field.ID);\n\n final FindCurrentPlaceRequest request = FindCurrentPlaceRequest.builder(placeFields).build();\n\n if (ContextCompat.checkSelfPermission(getContext(), ACCESS_FINE_LOCATION) ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method performs the save file action by opening up a window for the user to choose a save location and name
public void save() { File fileToWrite = null; JFileChooser fileChooser = new JFileChooser(); int returnVal = fileChooser.showSaveDialog(null); if (returnVal == JFileChooser.APPROVE_OPTION) fileToWrite = fileChooser.getSelectedFile(); String path = fileToWrit...
[ "public void saveAs() {\r\n\t\tint retval = OpenAction.fc.showSaveDialog(this);\r\n\t\tif (retval == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = OpenAction.fc.getSelectedFile();\r\n\t\t\tcorrectFileName();\r\n\t\t\tsave();\r\n\t\t\tsetTitle(file.getName().substring(0, file.getName().length() - 4));\r\n\t\t}\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interfaz que define los metodos crud que accesan a la base de datos.
public interface ProductRepository { List<Product> getAll(); Optional<List<Product>> getByCategory(long categoryId); Optional<List<Product>> getScarseProducts(long quantity); Optional<Product> getProduct(long productId); Product save(Product product); void delete(long productId); }
[ "public CrudUtil(){\r\n }", "public CrudFines() {\n initComponents();\n loadTable();\n btnAdd.setEnabled(true);\n btnDelete.setEnabled(false);\n btnModify.setEnabled(false);\n \n }", "public CrudFormulariosBean() {\r\n }", "public CrudPersonal() {\n in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for implementing a listener to listen to get list of cleaningResult from Firestore.
private interface OnResultCallBack { void onCallBack(List<CleaningResult> cleaningResult); }
[ "@Override\n public void onSuccess(QuerySnapshot queryDocumentSnapshots) {\n if(!queryDocumentSnapshots.isEmpty())\n {\n Log.d(TAG, \"onSuccess: Deleting ingredient list with ID: \" + list_ID);\n S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Redirects the request as configured. .yandex.cloud.apploadbalancer.v1.RedirectAction redirect = 3;
@java.lang.Override public yandex.cloud.api.apploadbalancer.v1.VirtualHostOuterClass.RedirectAction getRedirect() { if (redirectBuilder_ == null) { if (actionCase_ == 3) { return (yandex.cloud.api.apploadbalancer.v1.VirtualHostOuterClass.RedirectAction) action_; } ...
[ "@Test\n public void defaultFollowRedirects() throws Exception {\n RestClientBuilder builder = RestClientBuilder.newBuilder();\n FollowRedirectsServiceIntf result = builder\n .baseUri(TestEnvironment.generateUri(url, \"test-app\"))\n .build(FollowRedirectsServiceIntf.c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This tests the result of writing an invalid escape sequence to the decoder.
@Test(expected = NumberFormatException.class) public void testInvalidEscapes() throws IOException { GenericDecoderSubclass decoder; decoder = new GenericDecoderSubclass(new StringWriter(), '%'); // the escape sequences are the escape character followed by // two hexadecimal characters. therefore a...
[ "public void testRecoverInvalidSurrogate1() throws Exception\n {\n // Unmatched first surrogate character\n _writeAndVerifyLenientString(\"x\\ud83d\", \"x\\ufffd\");\n\n // Unmatched second surrogate character\n _writeAndVerifyLenientString(\"x\\ude01\", \"x\\ufffd\");\n\n // U...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts the soap model instance into a normal model instance.
public static VideoUserTransactionEntry toModel( VideoUserTransactionEntrySoap soapModel) { VideoUserTransactionEntry model = new VideoUserTransactionEntryImpl(); model.setTransactionId(soapModel.getTransactionId()); model.setTransactionCode(soapModel.getTransactionCode()); model.setDate_(soapModel.getDate_(...
[ "public static Richieste toModel(RichiesteSoap soapModel) {\n\t\tif (soapModel == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tRichieste model = new RichiesteImpl();\n\n\t\tmodel.setIdStatoAttuale(soapModel.getIdStatoAttuale());\n\t\tmodel.setId(soapModel.getId());\n\t\tmodel.setDataRichiesta(soapModel.getDataRichiest...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Purge any pending requests This is meant to be called upon a JMS exception on a resource produced by this factory.
public synchronized void purge() { if ( !isClosed ) { connectionRequestQueue.clear(); connectionResponseQueue.clear(); logger.info("Pending connection requests have been purged"); } }
[ "public void purge() {\n throw new RuntimeException( \"not yet implemented.\" );\n }", "public void purge() {\n this.server.purge();\n }", "@SuppressWarnings(\"deprecation\")\n //@Test\n public void unackedPurge() throws IOException {\n Binding binding = setupExchangeBindings(fa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
///////////////////////////////////////////////////////////////////////// Processes the result of the import process and prints out the proper notification.
protected static ModelExchangeState processResult(Shell shell, ModelExchangeState state, boolean usePopUp) { switch(state) { case Import_OK : { if( usePopUp ) MessageDialog.openInformation(shell, "Import finished", "The model has been imported properly"); ...
[ "@Override\n\t protected void done()\n\t {\n\t \t\tsignUpSummaryReceived(importedSignUps);\t//notify the event dispatching thread import is complete\n\t }", "public int importOneProcess(ImportV7 importV7, ProcessStatus processStatus, MonitorImport monitorImport, APISession apiSession) {\r\n\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We can safely assume an element has only one type associated with it
public void serialize(final javax.xml.namespace.QName parentQName, javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType) throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException { java.lang.String namespace = "http://tempuri.o...
[ "public default boolean isTypeElement() {\n return asTypeElement() != null;\n }", "public abstract HTMLElementType getType();", "@Override\n public InputTypeElement asTypeElement() {\n return (element instanceof TypeElement) ? environment.element(((TypeElement) element)) : null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the datastore datatype of a column
public int getDSDataType(String columnName) { if (isLoaded(columnName)) { ColumnDefinition cd = (ColumnDefinition) _elements.get(columnName); return cd.getDSDataType(); } else return -1; }
[ "public native String\tgetColumnType(String col);", "com.google.cloud.channel.v1.Column.DataType getDataType();", "public ColumnType getType();", "private DataType.DataTypes getDataType( TemplateDataColumn column ) {\n String dataType = column.getDataType();\n if ( dataType.equals( DataType.TYPE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ordered list of variables in this object's functions
private static boolean checkFunc(String f) { int height = 0; // current stack height for (int c = 0; c < f.length(); c++) { char ch = f.charAt(c); // see how given instruction affects stack height if ('a' <= ch && ch <= 'z') { height++; ...
[ "public String getFuncOrder() {\n return funcOrder;\n }", "@Override\r\n public List<String> getVariables() {\r\n List<String> list = new ArrayList<String>();\r\n list = super.getVariables();\r\n return list;\r\n }", "@Override\n public String[] listVariables() {\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by oliverbudiardjo on 6/16/15.
public interface ProgressTracker { public void receiveProgress(double progress); }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n public int utilite() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for Password utils
public interface I_PasswordUtils { /** * Checks potential password against parameter regExp * * @param password * @return */ // public Boolean formatCheck(String password); /** * Check password of a user. * * @param password * @param userVo * @param currentCost * @return ...
[ "public String getUserPassword();", "public interface PasswordEncoder {\n /**\n * Encode Password and return hashed password\n *\n * @param password Password\n * @return Encoded Password\n */\n String encode(char[] password);\n\n /**\n * Match Password against encoded password\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public String getRplWord() { return this.rplWord; }
[ "@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" ] ] } }
connect to sqs using default client
private AmazonSQS connectToSQS() { // AmazonSQSClientBuilder.standard().withCredentials(DefaultAWSCredentialsProviderChain.getInstance()).build(); AmazonSQSClientBuilder clientBuilder = AmazonSQSClientBuilder.standard(); clientBuilder.setRegion(region); ProfileCredentialsProvider credent...
[ "public void setClient(IMSQClient client);", "private AmazonSQS getAmazonSQS() {\n\n BasicAWSCredentials credentials = new BasicAWSCredentials(\"AKIAO63B4MDOKYR9SAYA\",\n \"HNhtWHNcrCUD3HXQqbCxy/RQ+t4yVJ2MX+pB5Y9z\");\n AwsClientBuilder.EndpointConfiguration endpointConfiguration = ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Rdate' attribute.
String getRdate();
[ "public Date getdRisetime() {\n return dRisetime;\n }", "public Date getPoRecDate() {\n return (Date)getAttributeInternal(PORECDATE);\n }", "public Date getAgcRagisDate() {\n\t\treturn agcRagisDate;\n\t}", "public Date getLrrDate() {\n return lrrDate;\n }", "@gw.internal.gosu.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get all the petRatings.
@Transactional(readOnly = true) public Page<PetRating> findAll(Pageable pageable) { log.debug("Request to get all PetRatings"); Page<PetRating> result = petRatingRepository.findAll(pageable); return result; }
[ "@Override\n public List<Rating> getAllRating() {\n final String sql = \"select * from rating\";\n return template.query(sql,new RatingRowMapper());\n }", "public List<Pet> getAllPets() {\n return pets;\n }", "public List<Ratings> getRatingsList() {\n\n for (int i = 0; i < s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given an unsorted array, sort it in the following order: a[0] a[2] a[4]... Example: 1 3 4 5 2 2 2 3 => 1 5 2 4 2 3 1 2
public static int[] getSorted(@NotNull int[] data) { double median = getMedian(data); int lessElt = 0; int moreElt = 1; for (int i = 0; i < data.length; i++) { int elt = data[i]; if (elt > median && !isOdd(i) && moreElt < data.length) { int tmp =...
[ "public void sort (int[] a) {\n if(a!=null){\n int pass = 1;\n boolean exchanges;\n do {\n exchanges = false;\n for (int i = 0; i < a.length-pass; i++)\n if (a[i]>a[i+1]) {\n int tmp = a[i];\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We'll try and parse the pin provided
public void actionPerformed(ActionEvent e){ int parsedPin = 0; try{ parsedPin = Integer.parseInt(txtPassword.getText()); } catch (NumberFormatException nfeLoginUI) { ErrorLogger.log("Could not parse the password. Incorrect input"); ErrorLogger.log(nfeLoginUI.getMessage()); } // I...
[ "public void onPINSubmit(String pin) {\n //REPLACE \"012345\" with current PIN input by user\n String[] data = {pin};\n Log.d(\"_PIN\", Arrays.toString(data) + \"\");\n BLEClient.WriteDataToCard(EthBLEClient.H2C_RPLY_PIN_ENTRY, data);\n }", "public String getPin()\n {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Close the container and null it out
protected void cleanUp() throws Exception { if (container != null) { container.close(); container = null; } }
[ "@Override\n\tpublic void close()\n\tthrows IOException {\n\t\tcontainerHelper.close();\n\t}", "public static void close() {\n \n \tcloseConnections();\n \tMetaContainer.clear();\n }", "@Override\r\n\tpublic void destroy()\r\n\t{\n\t\tthis.close();\r\n\t\t\r\n\t}", "public void close() {\n // no-op...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to fill ArrayList with the character of second string
public void stringBreakDownArray2(){ for(int i = 0; i < secondWord.length(); i++){ array2.add(secondWord.charAt(i)); } }
[ "private void PopulateList()\n {\n for (int i=0 ; i < charMessage.length ; i++)\n {\n if(!(charList.contains((charMessage[i]))))\n charList.add(charMessage[i]);\n }\n }", "public List<Character> removeCharToMakeAnagram(String str1, String str2) {\n\t\tList<Char...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles updating a Tournament BO
protected Tournament update() throws ProcessingException { // store provided data Tournament tmp = tournament; // load actual data from storage loadHelper( tournament.getTournamentPrimaryKey() ); // copy provided data into actual data tournament.copyShall...
[ "private void tournamentChanged() {\r\n try {\r\n tournament.setLastTournamentModificationTime(tournament.getCurrentTournamentTime());\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(JFrGamesResults.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n upd...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
[ "@Override\n\tpublic void handleGET(CoapExchange exchange) {\n\n\t\t\n\t}", "protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(\"--> get\");\r\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse respo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Should be overridden to be agent specific
public State pointOnConcessionLine(State x){ System.out.println("Doing the agent projection, not the anion/mixbed/neut/cation"); return x; }
[ "protected abstract EcoAgents make_agents();", "@Override\n\tpublic void initPerception(Agent agent, Environment environment) {\n\t\t\n\t}", "public MyAgent() {\n super();\n }", "@Override\n public void setAgent(Configuration config) {\n }", "@Override\n }", "@Override\n\tpublic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Get a random Offer URI
private String getRandomOfferURI() { Integer offerNr = valueGen.randomInt(1, offerCount); Integer vendorNr = getVendorOfOffer(offerNr); return Offer.getURIref(offerNr, vendorNr); }
[ "private String getRandomURI() {\n\t\treturn getRandomName();\n\t}", "private String extractRandomUrl(JSONObject response) {\r\n JSONObject responseData = (JSONObject) response.get(\"responseData\");\r\n JSONArray results = (JSONArray) responseData.get(\"results\");\r\n int index = (int) Math...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the current datetime for Rest Operation
public static String getRestApiCurrentDateTime() { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm':00Z'"); return sdf.format(new Date()); }
[ "String getRequestDate();", "public Date getRequestTime() {\n\t\treturn _request_time;\n\t}", "protected Date getNow()\n {\n return now;\n }", "public Date getRequestedServiceDate();", "@ApiModelProperty(value = \"The current DateTime (with offset) for the log service, used to set or read time....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ the player chooses to stand and the dealer get cards
public void stand(){ round.stand(); }
[ "static void giveOrTake(int dealersHand) {\n\t\tfor (int i=1;i<numberOfPlayers+1;i++){\n\t\t\tplayer[i].setLastBet(player[i].getCurrentBet());\n\t\t}\n\t\t\n\n\t\tif (dealersHand == 0) {\n\t\t\tfor (int i=1;i<numberOfPlayers+1;i++){\n\t\t\t\t\n\t\t\t\tplayer[i].setCurrentBet( player[i].getCurrentBet() * (int) playe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test fetch alert communication config by request.
@Test public void testFetchAlertCommunicationConfigByRequest() { AlertCommunicationConfigRequest request = new AlertCommunicationConfigRequest(); request.setTenantId(TestBaseUtil.createTenant().getId()); request.setUserContext(TestBaseUtil.createUserContext()); InternalResultsResponse<AlertCommunication...
[ "private void catchOptionalAlertResponse(WorkflowTrace trace, Config config) {\n config.setReceiveFinalTcpSocketStateWithTimeout(false);\n trace.addTlsAction(new GenericReceiveAction());\n }", "@Test\n\tpublic void testRetrieveAlertWithResult() throws IOException, InterruptedException {\n\t\tThre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) { Program4 obj = new Program4(); obj.numbers(20, 8200); }
[ "@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 sets the value of the database column PMSCONTROL.ADD_SWIFT_DET
public void setADD_SWIFT_DET(String ADD_SWIFT_DET) { this.ADD_SWIFT_DET = ADD_SWIFT_DET == null ? null : ADD_SWIFT_DET.trim(); }
[ "private void setCd() {\n\n\t}", "com.guidewire.datamodel.TypecodeDocument.Typecode addNewTypecode();", "dataImport.StandardPoangType addNewStandardPoang();", "private void setupFieldCodeChange() {\n SkynetTransaction onChildTx = TransactionManager.createTransaction(updateBranch, \"WORKING UPDATE\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void handleEvent(AWTEvent e) { }
[ "@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" ] ] } }
Insert the method's description here. Creation date: (22.02.2002 17:29:04)
public void validateValues(ActionErrors errors) throws Exception { /*if (getDocumentNumber() == null || getDocumentNumber().equals("")) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.empty.mutualreglmnts.docnumber")); }*/ if(getActType() == null ||(getActType() != null && getActType().length() == 0...
[ "@Override\n }", "public void mo5201a() {\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "protected void method_5557() {}", "public void mo9609a() {\n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "public void mo15109c(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1.5 [Modified for int arrays instead] There are three types of edits that can be performed on strings: insert a character, remove a character, or replace a character. Given two strings, write a function to check if they are one edit (or zero edits) away. Time: O(n) Space: O(n)
public static boolean oneAway(int[] a, int[] b) { HashMap<Integer, Integer> lookup = new HashMap<Integer, Integer>(); for(int x : a) { if(lookup.containsKey(x)) { lookup.put(x, lookup.get(x) + 1); } else { lookup.put(x, 1); } }...
[ "boolean oneEdit(String s1, String s2) // Time: O(n) / n = len of shorter str\n{\n int len1 = s1.length(), len2 = s2.length();\n \n if (len1 == len2) return oneReplace(s1, s2);\n if (len1 + 1 == len2) return oneInsert(s1, s2);\n if (len1 - 1 == len2) return oneInsert(s2, s1);\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Xcoordinate of the furthestright set cell.
int getMaxX();
[ "public int getCellX() {\n return cellX_;\n }", "public int getXcoord() {\r\n\t\treturn xcoord;\r\n\t}", "public int getXEntry() {\n\t\treturn xEntry + WALL_WIDTH / 2;\n\t}", "public int getX() {\n\t\treturn this.cellX;\n\t}", "public int get_x_coord(){\n\t\treturn this.x_coord;\n\t}", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test creation of a subscription fails if start date is after end date.
@Test(expected = ConstraintViolationException.class) public void testCreateSubscriptionFailsIfStartDateAfterEndDate() throws Exception { authenticate("user1"); PlatformSubscription platformSubscription = new PlatformSubscription(); platformSubscription.setUser((User) getPrincipal()); ...
[ "public void testGetDeliveriesForSubscriptionDate003() {\n try {\n initializeDatabase();\n ArrayList<DB_Subscription> subscriptions = dao.getSubscriptionsForDate(Date.valueOf(\"2021-04-14\"), true, true);\n dao.createDeliveriesForSubscriptionDate(subscriptions, null);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected void onPrepareDialog(int id, Dialog dialog) { switch (id) { case RADIOBUTTON_ALERTDIALOG: AlertDialog prepare_radio_dialog1 = (AlertDialog) dialog; ListView list_radio1 = prepare_radio_dialog1.getListView(); for (int i = 0; i ...
[ "@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" ] ] } }
Log error here since request failed
@Override public void onFailure(@NonNull Call<Response> call, @NonNull Throwable t) { Toast.makeText(context,t.getMessage(),Toast.LENGTH_LONG); }
[ "@Override\n public void onFailure(Throwable t) {\n // Log error here since request failed\n }", "@Override\n\t\t\tpublic void onError(Request request, Throwable exception) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void onError(Request request, Throwable exception...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Skip ahead in the archive stream to a specific object
public HCXArchive.Stat skipTo(String path) { try { return doSkip(path); } catch (IOException e) { logger.log(Level.WARNING, "Couldn't skip in archive", e); } return null; }
[ "private void skipRemainderOfArchive() throws IOException {\n // skip over central directory. One LFH has been read too much\n // already. The calculation discounts file names and extra\n // data, so it will be too short.\n if (entriesRead > 0) {\n realSkip((long) entriesRead...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface OnFragmentInteractionListener { // Update argument type and name void onFragmentInteraction(Uri uri); }
[ "public interface MainActivityFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface ActivitytoFragment {\n void communicate(boolean comm);\n\n}", "public interface TalkToIndividualFragment {\n /**\n * report how many has added in remote data...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new highscores object
public Highscores() { file = new FileOperator(filename); if (!file.isAvailable()) { System.err.println("Highscores unavailable"); return; } readHighscores(); readNumOfScores(); limitHighScores(5); }
[ "public Highscore() {\r\n\t\teasyList = new ArrayList<Double>();\r\n\t\texpertList = new ArrayList<Double>();\r\n\t\tmediumList = new ArrayList<Double>();\r\n\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\teasyList.add(99999.0);\r\n\t\t\texpertList.add(99999.0);\r\n\t\t\tmediumList.add(99999.0);\r\n\t\t}\r\n\t\ttry ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the distance between the GameObject and the given Camera.
public double getDistance(Camera cam) { Vector3 camPos = cam.getPosition(); return distanceBetweenPoints(center, camPos); }
[ "public double getDistance(){\n\t\tEntityPlayerSP thePlayer = Minecraft.getMinecraft().thePlayer;\n\t\treturn Math.sqrt(Math.pow((thePlayer.posX - this.x), 2) + Math.pow((thePlayer.posZ - this.z), 2));\n\t}", "private float getDistanceFromCenterOfScreen() {\n Vector3 position = getTransformedPosition();\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
[ "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home\n Intent intent = new Intent(this, MainMenuCard.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is mainly to bypass security control for local API testing.
public void corsHandle(RoutingContext routingContext) { routingContext.response() .putHeader("Access-Control-Allow-Origin", "*") .putHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE") .putHeader("Access-Control-Allow-Headers", "X-Requested-With, ...
[ "protect buildAPIClient();", "@Test\n public void testUnloginedUserGetApiAccess() {\n assertTrue(\"TODO\", false);\n }", "@Override\n\tpublic void testAuthAny() {\n\n\t}", "@Override\n\tprotected void doSecurity(final HttpServletRequest request, final HttpServletResponse response) throws Exceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pass arrayToPutAnswer to have the method fill it with the answer ([0] is the x, [1] is the y of the intersection) The closest point to line 1 point 1 is chosen if there is no collision, the array is not edited
public static boolean lineRectIntersect(double linex1, double liney1, double linex2, double liney2, double rectLeft, double rectBottom, double rectWidth, double rectHeight, double[] arrayToPutAnswer) { RectRegion linePoint1Region = getRectRegionOfPoint(linex1, liney1, rectLeft, rectBottom, rectWidth, rectHeight...
[ "private static void algorithmA(PSTPoint[] array, PSTPoint s) {\n\talgorithmA(array,0,array.length-1,s);\n }", "public int hitTest(float[] fArr) {\n if (this.mContent == null) {\n return super.hitTest(fArr);\n }\n if (this.mPath != null && this.mInvertible && this.mTransformInve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the valid categories.
public void setValidCategories(List<String> validCategories);
[ "public void setCategories(String [] Categories) {\n this.Categories = Categories;\n }", "public void setCategories(Set<String> categories) {\n\t\tthis.categories = categories;\n\t}", "@Override\n public void setBudgetCategories() {\n categoriesManager.createCategory(\"Groceries\");\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AOPMember__Group_2_7_5__2" $ANTLR start "rule__AOPMember__Group_2_7_5__2__Impl" InternalSARL.g:16452:1: rule__AOPMember__Group_2_7_5__2__Impl : ( ( rule__AOPMember__Group_2_7_5_2__0 ) ) ;
public final void rule__AOPMember__Group_2_7_5__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSARL.g:16456:1: ( ( ( rule__AOPMember__Group_2_7_5_2__0 )* ) ) // InternalSARL.g:16457:1: ( ( rule__AOPMember__Group_2_7_5_2__0 )...
[ "public final void rule__XMemberFeatureCall__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalScripting.g:6235:1: ( rule__XMemberFeatureCall__Group_1_1_0__0__Impl )\n // InternalScripting.g:6236:2: rule__XMem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as attribute value for PAYMENT_TYPE_CODE using the alias name PaymentTypeCode.
public void setPaymentTypeCode(String value) { setAttributeInternal(PAYMENTTYPECODE, value); }
[ "void setPaymentType(au.gov.asic.types.PaymentMethodType.Enum paymentType);", "public void setTypeCode(String typeCode){\n\t\tthis.typeCode = typeCode;\n\t}", "public void setPayoutType(String code)\n\t{\n\t\tm_payoutType.setCode(code);\n\t}", "public void setPayType(int value) {\n this.payType...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
variables to calculate exponential inflation .evmos.inflation.v1.ExponentialCalculation exponential_calculation = 2 [(.gogoproto.nullable) = false];
public evmos.inflation.v1.Inflation.ExponentialCalculation.Builder getExponentialCalculationBuilder() { onChanged(); return getExponentialCalculationFieldBuilder().getBuilder(); }
[ "@Override\n public float getExp() {\n return 0;\n }", "public void setExp(int value) {\n this.exp = value;\n }", "public void exponent(){\n /* IMPLEMENTATION */\n }", "public String exponential() {\n // uses in built-functions to calculate the norm and argument\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a default user.
private static void createUser(String p_userName, List<Activity> p_activities, Company p_company, String p_creatorId, String p_permGroupName) throws Exception { UserManager userMgr = ServerProxy.getUserManager(); User creatorUser = userMgr.getUser(p_creatorId); CreateUserWrapper...
[ "public void createUser() {\n if (userService.getByEmail(\"test\") == null) {\n userService.create(\"test\", \"test\", \"Testing\", \"User\", Boolean.FALSE);\n }\n }", "private void createNewUser() {\n String nickName = loginField.getText();\n String pass = passwordField....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates udb Understand database.
public void createUdbDatabase(String udbSource, String projectSource) throws InterruptedException, TimeoutException, IOException { LOGGER.info("Creating udb db with udbSource:{}, projectSource: {}", udbSource, projectSource); executeProcess(udbSource, projectSource); }
[ "public void createDB() {\n try {\n this.connection = DriverManager.getConnection(\n \"jdbc:postgresql://localhost:5432/\",\n config.get(\"jdbc.username\"),\n config.get(\"jdbc.password\")\n );\n try (Statement st = con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
prints 10 values for the current thread(s).
public void run() { for(int i=0; i<10; i++) { System.out.println("Thread: " + Thread.currentThread().getId() + " value " + i); /* This will allow the code to print the multiple threads for each new object from the JavaThreads method below. */ try { Thread.sleep(1000); } catch (...
[ "@Override\n public void run() {\n for (int i = 0; i < 10; i++) {\n System.out.println(Thread.currentThread().getName()\n + \"(\" + Thread.currentThread().getPriority() + \"):\" + i);\n }\n }", "@Override\n\tpublic void run() {\n\t\tfor(int i=0;i<10;i++){\n\t\t\tS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Publish the RHIoTTag temp, keys state and light sensor reading as well as game state changes. The game state is not included for event of type NOOP.
private void doPublish(RHIoTTag tag, GameStateMachine.GameState state, GameStateMachine.GameState newState, GameStateMachine.GameEvent event, GameStateMachine gsm) { // fetch the publishing configuration from the publishing properties String topicRoot = (String) properties.get(PUBL...
[ "private void createEvent() {\n\t\tif (ttsReady == false || roomService == null)\n\t\t\treturn;\n\n\t\t// get shure that we will not be called twice in a short time\n\t\tlong now = System.currentTimeMillis();\n\t\tif (now - lastCall < 2000) {\n\t\t\tToast.makeText(this, \"Doppelter Aufruf nach \" + (now - lastCall)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the default value for the parameter if no value is provided.
public ParameterDefinitionsValue withDefaultValue(Object defaultValue) { this.defaultValue = defaultValue; return this; }
[ "void setDefaultValue(Object defaultValue);", "protected abstract void setDefaultValue();", "public void setDefaultValue(V defaultValue)\n\t{\n\t\tthis.defaultValue = defaultValue;\n\t}", "public void setDefaultValue(Object defaultValue)\r\n/* 12: */ {\r\n/* 13:44 */ this.defaultValue = defaultValue;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transfer money amount a from player p1 to player p2.
public void playerPayPlayer(int a, Player p1, Player p2) { // TODO: Before each call of this, make sure the player won't go bankrupt. // TODO: Move that step of checking for bankruptcy status to the method rather than // spreading it out everywhere across the file. Less duplication. // First, get a distribution...
[ "public void transferMoneyToOtherAccounts(Account a1, Account a2, double m);", "public void transferIn(double amount, Account other){\r\n userAccount.add(amount);\r\n other.deduct(amount);\r\n }", "public void transferTo(Player player, int amount) {\n \tboolean succes = account.addToAcco...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor takes a WordNet object
public Outcast(WordNet wordnet) { if (wordnet == null) { throw new IllegalArgumentException("WordNet argument is null"); } wordnetCopy = wordnet; }
[ "public Outcast(WordNet wordnet){\n this.wordnet = wordnet;\n }", "public WordNet(String synsetsFilename, String hypernymsFilename) {\n\n if (synsetsFilename == null || hypernymsFilename == null) {\n throw new IllegalArgumentException();\n }\n\n parseSynsetsFile(synsetsFilename);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a range of all the cscl tenders where uuid = &63;. Useful when paginating results. Returns a maximum of end start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtilALL_POS will return the full ...
public java.util.List<CsclTender> findByUuid( String uuid, int start, int end);
[ "@Override\n\tpublic List<Escritor> findByUuid(\n\t\tString uuid, int start, int end,\n\t\tOrderByComparator<Escritor> orderByComparator) {\n\n\t\tuuid = Objects.toString(uuid, \"\");\n\n\t\tboolean pagination = true;\n\t\tFinderPath finderPath = null;\n\t\tObject[] finderArgs = null;\n\n\t\tif ((start == QueryUtil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }