query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
The receiver to handle incoming messages
@Bean Receiver receiver() { return new Receiver(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onReceive(Object msg) throws Exception {\n }", "@Override\n public void onReceive(Object message) throws Exception {\n }", "@Override\r\n public void handleMessage(Message msg) {\n }", "@Override\r\n\tpublic void onReceive(Object arg0) throws Exceptio...
[ "0.7461032", "0.7365458", "0.71273595", "0.71249115", "0.71081525", "0.7099159", "0.7063077", "0.7052697", "0.702009", "0.7017723", "0.7004586", "0.69606346", "0.6923113", "0.6920978", "0.69082713", "0.68994695", "0.6898329", "0.68806285", "0.6880467", "0.6842299", "0.6799586...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws InterruptedException { System.setProperty("webdriver.chrome.driver", "chromedriver.exe"); WebDriver driver = new ChromeDriver(); // driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); WebDriverWait w = new WebDriverWait(driver, 5); driver.manage().window().maximize(); String[] items = { "Brocolli", "Cucumber", "Tomato", "Onion" }; driver.get("https://rahulshettyacademy.com/seleniumPractise/"); // Thread.sleep(5000); addItems(driver, items); driver.findElement(By.cssSelector("img[alt='Cart']")).click(); driver.findElement(By.xpath("//button[contains(text(),'PROCEED TO CHECKOUT')]")).click(); w.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("input.promoCode"))); driver.findElement(By.cssSelector("input.promoCode")).sendKeys("rahulshettyacademy"); driver.findElement(By.cssSelector("button.promoBtn")).click(); w.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("span.promoInfo"))); System.out.println(driver.findElement(By.cssSelector("span.promoInfo")).getText()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public Book[] getBooksByName(String bkName) throws SQLException { ArrayList<Book> books = new ArrayList<Book>(); String sql = "select * from TB_Book where bkName like ?"; Object[] params = new Object[]{bkName}; ResultSet rs = SQLHelper.getResultSet(sql,params); if(rs != null){ while(rs.next()){ Book book = initBook(rs); books.add(book); } rs.close(); } if(books.size()>0){ Book[] array = new Book[books.size()]; books.toArray(array); return array; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
TODO Autogenerated method stub
@Override public String[] getPrettyColumnNames() { return this.dispColNames; //未实现 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public String[] getMethodNames() { return this.methodNames; //未实现 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
@Override public String[] getAllObjectsName() throws Exception { return null; //未实现 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
read the file correctMe.txt and copy it in an ArrayList
public static void loadFile(String inputFile, ArrayList<String> array) { String line = ""; String[] words; try { BufferedReader reader = new BufferedReader(new FileReader(inputFile)); System.out.println("\nFile found"); System.out.println("Loading file... \"CorrectMe\""); while ((line = reader.readLine()) != null) { line = line.replaceAll("[^a-zA-Z ]", "").toLowerCase(); words = line.split(" "); for (int i = 0; i < words.length; i++) array.add(words[i]); } reader.close(); } catch (IOException ex) { System.out.println("File not found"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void takeInFile() {\n System.out.println(\"Taking in file...\");\n //Reads the file\n String fileName = \"messages.txt\";\n String line = null;\n try {\n FileReader fileReader = new FileReader(fileName);\n \n BufferedReader bufferedReader ...
[ "0.70437926", "0.7013258", "0.6939507", "0.66710645", "0.6660377", "0.66316134", "0.6623537", "0.6605618", "0.6601082", "0.64871144", "0.6439022", "0.64322287", "0.64138615", "0.63989687", "0.6379588", "0.6355628", "0.63110524", "0.6303731", "0.6295785", "0.62865263", "0.6262...
0.0
-1
Read the file dictionary.txt and copy it in an ArrayList
public static void loadFile(ArrayList<String> array, String inputFile) { String line = ""; String[] words; try { BufferedReader reader = new BufferedReader(new FileReader(inputFile)); System.out.println("Loading file... \"Dictionary\""); while ((line = reader.readLine()) != null) { words = line.split("\n"); for (int i = 0; i < words.length; i++) array.add(words[i]); } reader.close(); } catch (Exception ex) { System.out.println("File not found"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void populateDictionary() throws IOException {\n\t\tScanner scan = new Scanner(new File(\"dictionary.txt\"));\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString curr = scan.nextLine().toLowerCase();\n\t\t\tthis.dictionary.add(curr);\n\t\t}\n\t}", "public static void readDictionary()\r\n\t{\r\n\t\t//It trys to...
[ "0.7310868", "0.71755815", "0.71333665", "0.7102177", "0.696881", "0.685843", "0.6781969", "0.6778036", "0.67718124", "0.6699699", "0.66815114", "0.6652267", "0.6643592", "0.6607187", "0.656068", "0.6523619", "0.64643675", "0.64343214", "0.6418905", "0.63800657", "0.6347947",...
0.67091376
9
There are two arrayLists, one that contains the dictionary and the other one contains the words that must be corrected. For every word of the string arrayCorrectMe i find the minimum distance with all the words of the arrayDictionary, using the EditDistanceDyn class
public static void editDistanceApplication(ArrayList<String> arrayCorrectMe, ArrayList<String> arrayDictionary) { long startTime = System.nanoTime(); EditDistanceDyn e; // EditDistance e2; int result = 0, min = Integer.MAX_VALUE; ArrayList<String> aux = new ArrayList<String>(); for (int j = 0; j < arrayCorrectMe.size(); j++) { for (int i = 0; i < arrayDictionary.size(); i++) { e = new EditDistanceDyn(); result = e.min_distance_dyn(arrayCorrectMe.get(j), arrayDictionary.get(i)); // e2 = new EditDistance(); // result = e2.edit_distance(arrayCorrectMe.get(j), arrayDictionary.get(i), // arrayCorrectMe.get(j).length(), arrayDictionary.get(i).length()); if (result < min) { min = result; aux.clear(); aux.add(arrayDictionary.get(i)); } else if (result == min) aux.add(arrayDictionary.get(i)); } System.out.println("\nThe word is : " + arrayCorrectMe.get(j) + " \nMinimum distance : " + min); printArray(aux); aux.clear(); min = Integer.MAX_VALUE; } long endTime = System.nanoTime(); long totalTime = endTime - startTime; System.out.println("\nTotal time is:" + totalTime / 1000000000 + " seconds"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void findTheShortestDistance(String[]\tarrayOfWords, String word1, String word2) {\n\t\tHashMap<String, ArrayList<Integer>> wordMap = new HashMap<String, ArrayList<Integer>>();\n\t\t\n\t\t// Add each word to the map\n\t\tfor(int i = 0; i < arrayOfWords.length; ++i) {\n\t\t\t\n\t\t\t// Does this word ...
[ "0.7459864", "0.62383074", "0.6099479", "0.6071125", "0.60492885", "0.6049104", "0.604283", "0.60357016", "0.6017925", "0.6006053", "0.5982794", "0.59486127", "0.59484744", "0.5923156", "0.58971477", "0.5860274", "0.5860137", "0.585713", "0.58212197", "0.57855254", "0.5780048...
0.8626115
0
Imports Common interface for the definition of a security context with a String will suffice.
public interface ISecurityContext { /** * Retrieves the Context String * @return String */ public String getContextString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface SecurityContext {\n\n}", "public abstract I_Authenticate getSecurityCtx();", "public interface SecurityService\r\n{\r\n\t/**\r\n\t * This method return true if the given 'securityToken' is a valid token for the given security service. The security service can be any service\r\n\t * such as OAu...
[ "0.75953585", "0.6758983", "0.6236305", "0.61458987", "0.6061218", "0.605522", "0.603687", "0.5956646", "0.59368336", "0.5891935", "0.5885328", "0.5861795", "0.5858316", "0.5839816", "0.58270335", "0.5817745", "0.5780139", "0.57528603", "0.57259", "0.5672337", "0.56580055", ...
0.7403555
1
Retrieves the Context String
public String getContextString();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getContext();", "public java.lang.String getContext() {\n java.lang.Object ref = context_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8...
[ "0.8250086", "0.82296646", "0.8082728", "0.78362983", "0.7810732", "0.77995056", "0.7734992", "0.7734992", "0.7734992", "0.75126386", "0.7331645", "0.7293789", "0.72775227", "0.7108147", "0.70953315", "0.7063765", "0.7042531", "0.7036486", "0.6997672", "0.692424", "0.68912673...
0.8664641
0
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static Profile createEntity(EntityManager em) { Profile profile = new Profile() .height(DEFAULT_HEIGHT) .weight(DEFAULT_WEIGHT) .location(DEFAULT_LOCATION) .dob(DEFAULT_DOB); return profile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Entity createEntity();", "T createEntity();", "protected abstract ENTITY createEntity();", "void create(E entity);", "void create(T entity);", "E create(E entity);", "E create(E entity);", "TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Te...
[ "0.7723305", "0.7505274", "0.7488161", "0.7361733", "0.7314842", "0.7155991", "0.7155991", "0.71510035", "0.71503216", "0.70774376", "0.7016772", "0.6803864", "0.6751574", "0.674037", "0.674037", "0.6711867", "0.6681123", "0.66649336", "0.6640917", "0.66236806", "0.6623581", ...
0.0
-1
test find account by id
public void testFindAccountById(){ int id = 10 ; Account acc = this.bean.findAccountById(id ) ; Assert.assertEquals(id, acc.getId()) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account getAccount(int id);", "@Test\n\tpublic void test_Fetch_All_Account_By_Id() throws DatabaseException, BadParameterException, NotFoundException {\n\t\ttry (MockedStatic<ConnectionUtil> mockedConnectionUtil = mockStatic(ConnectionUtil.class)) {\n\t\t\tmockedConnectionUtil.when(ConnectionUtil::connectToDB).t...
[ "0.7641576", "0.7430484", "0.73682934", "0.7316182", "0.7269857", "0.71494913", "0.7112942", "0.7027347", "0.6975473", "0.69545484", "0.6932888", "0.6814039", "0.67827564", "0.67551947", "0.67140955", "0.6709104", "0.6696827", "0.6686027", "0.6672067", "0.6665774", "0.6599152...
0.87204355
0
test update account by id
public void testUpdateAccount(){ int id = 10 ; Account acc = this.bean.findAccountById(id ) ; acc.setDatetime(CommUtil.getNowDate()) ; int r = this.bean.updateAccount(acc) ; Assert.assertEquals(r, 1) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean update(int id, Account account) {\n\t\treturn daoref.update(id, account);\r\n\t}", "@Test\n public void updateById() {\n User user = new User();\n user.setId(1259474874313797634L);\n user.setAge(30);\n boolean ifUpdate = user.updateById();\n Sys...
[ "0.729067", "0.7267875", "0.71791494", "0.71152", "0.7114287", "0.7111761", "0.70036924", "0.6955015", "0.6955015", "0.692031", "0.6903706", "0.6869812", "0.68528414", "0.6842599", "0.6837474", "0.6812", "0.6771184", "0.67588186", "0.6757361", "0.67451435", "0.67365533", "0...
0.82513714
0
test find account list by parames
public void testFindAccountList(){ String begin = "2013-01-01" ; String end = "2014-01-01" ; Account account = new Account() ; List<Account> list = this.bean.findAccountList(begin, end, account) ; Assert.assertTrue(list.size()>2) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Account> getAccounts(String login);", "@Test\n public void sTest(){\n List<Account> accounts = as.findAllAccount ();\n for (Account account : accounts) {\n System.out.println (account);\n }\n }", "String getAccountList(int accountId);", "@Test\n public void testG...
[ "0.7156621", "0.67698455", "0.66892624", "0.665632", "0.63419324", "0.6233896", "0.61991704", "0.6141652", "0.60504645", "0.59887385", "0.5986315", "0.5973507", "0.5969425", "0.5949987", "0.59388506", "0.5929813", "0.5903028", "0.59000003", "0.5890329", "0.58677214", "0.58673...
0.72411126
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox(); jButton1 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(FluidBasicView.class, "FluidBasicView.border.title"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(FluidBasicView.class, "FluidBasicView.jLabel1.text")); // NOI18N jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jComboBox1.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jComboBox1ItemStateChanged(evt); } }); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Views/OpenFullView.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(FluidBasicView.class, "FluidBasicView.jButton1.text")); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 133, Short.MAX_VALUE) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 147, Short.MAX_VALUE) .addComponent(jButton1))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7318655", "0.7289971", "0.7289971", "0.7289971", "0.72860885", "0.7247684", "0.7213551", "0.72080934", "0.7195069", "0.7189731", "0.7183451", "0.71579945", "0.7147311", "0.7092687", "0.70798934", "0.7055229", "0.69868284", "0.6976656", "0.6954658", "0.6952896", "0.69449455...
0.0
-1
End of variables declaration//GENEND:variables
private void initMyComponents() { this.jPanel1.setLayout(new BoxLayout(this.jPanel1, BoxLayout.Y_AXIS)); this.jPanel1.add(controller.getPressureController().getEMeasureBasicView()); this.jPanel1.add(controller.getTemperatureController().getEMeasureBasicView()); this.controller.getPressureController().getListeners().add(this); this.controller.getTemperatureController().getListeners().add(this); this.jComboBox1.setModel(new DefaultComboBoxModel(FluidKind.values())); this.changeResponce(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo217...
[ "0.63617", "0.6280625", "0.61909467", "0.6095729", "0.6092663", "0.607037", "0.60523474", "0.605212", "0.6002499", "0.59878224", "0.5970378", "0.59679425", "0.5967425", "0.5965642", "0.596177", "0.5942055", "0.5908757", "0.589693", "0.589137", "0.5882839", "0.58795726", "0....
0.0
-1
Default ctor with defaul BookService used.
public BookResource() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Book() {\n\t\t// Default constructor\n\t}", "public BookingBean() {\n }", "public BookManager()\n { }", "public BookService(BookRepository repo) {\n\t\tthis.bRepo = repo;\n\t}", "public Book() {}", "public Book() {\n }", "private BookContract() {}", "private BookService getBookServic...
[ "0.7586205", "0.7300427", "0.7165619", "0.7148921", "0.71281314", "0.71108645", "0.70973593", "0.7080727", "0.6969158", "0.6969158", "0.6927313", "0.69136286", "0.69061244", "0.6891125", "0.68646085", "0.68605167", "0.68520325", "0.6745712", "0.67413145", "0.67123884", "0.671...
0.6895655
13
Returns currently used bookService.
private BookService getBookService() { return bookService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getServiceBook () {\r\n\t\treturn serviceBook;\r\n\t}", "public Object getService() {\n return service;\n }", "public String getService() {\n\t\treturn service.get();\n\t}", "public BluetoothService getService() {\n return _service;\n }", "@Override\n\tpublic ArrayList...
[ "0.733516", "0.6209562", "0.61604327", "0.6144707", "0.6109761", "0.61023074", "0.6091382", "0.60766095", "0.6060945", "0.59764177", "0.59764177", "0.59764177", "0.5970774", "0.5970774", "0.5970774", "0.59557766", "0.5915895", "0.5902728", "0.58994126", "0.58790874", "0.58740...
0.7357729
0
Rest request creating a new Book on the service data.
@POST @Consumes(MediaType.APPLICATION_JSON) public Response createBook(Book book) { final BookServiceResult result = bookService.addBook(book); return Response .status(result.getStatus()) .entity(getJsonFromServiceResult(result)) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostMapping(\"/books\")\n\tpublic Book createBook(@RequestBody Book book)\n\t{\n\t\treturn bookRepository.save(book);\n\t}", "public com.huqiwen.demo.book.model.Books create(long bookId);", "@PostMapping\n\tpublic ResponseEntity<?> createBook(@Valid @RequestBody Book book, UriComponentsBuilder ucBuilder) {\n\...
[ "0.7267275", "0.7244061", "0.69509166", "0.694357", "0.6772077", "0.6684743", "0.6625989", "0.65122765", "0.64426327", "0.63884884", "0.63784313", "0.62515974", "0.61637515", "0.6163674", "0.6138262", "0.60124886", "0.59749997", "0.5969275", "0.5931774", "0.59197927", "0.5902...
0.77890515
0
Rest request to update a existing book.
@PUT @Path("{isbn}") @Consumes(MediaType.APPLICATION_JSON) public Response updateBook(@PathParam("isbn") String isbn, Book book) { //isbn in uri differs from isbn in book object. I do that because updateBook only gets a book object, //there's no possibility to check in service for the local var isbn because the json defined isbn is given to //the service if (!book.getIsbn().equals("") && !isbn.equals(book.getIsbn())) { return Response.status(Response.Status.BAD_REQUEST) .entity(new JSONObject().put("Message", "Isbn differs from isbn specified in payload.").toString()) .build(); } //no isbn in request json body else if (book.getIsbn().equals("")) { book = new Book(book.getTitle(), book.getAuthor(), isbn); } //find and replace book object final BookServiceResult result = bookService.updateBook(book); return Response.status(result.getStatus().getStatusCode()) .entity(getJsonFromServiceResult(result)) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PutMapping(\"/book\")\n public ResponseEntity<?> update(@RequestBody Book book) {\n bookService.update(book);\n\n return ResponseEntity.ok().body(\"Book has been updated successfully.\");\n }", "@PutMapping(\"/update/{id}\")\n public ResponseEntity<Void> updateBook(@RequestBody Book book,...
[ "0.76921725", "0.7468999", "0.72239935", "0.6882416", "0.6852522", "0.6528355", "0.641519", "0.6308572", "0.6287282", "0.62535423", "0.62022185", "0.61581105", "0.61060303", "0.608522", "0.6055129", "0.5879162", "0.5854981", "0.5825846", "0.5825846", "0.5781368", "0.57633686"...
0.7391581
2
Rest request to get all the books in an array.
@GET @Produces(MediaType.APPLICATION_JSON) public Response getBooks() { return Response .status(Response.Status.OK) .entity(getBookService().getBooks()) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"api/books\")\n public List<Book> getallBooks() {\n return bookService.all().getPayload();\n }", "List<Book> getAllBooks();", "@RequestMapping(value=\"/getbooks\", method=RequestMethod.GET, produces = \"application/json\")\n\tpublic List<Book> getAll() {\n\t\tList<Book> books = new Ar...
[ "0.78511685", "0.7491718", "0.7338897", "0.72515464", "0.7024936", "0.6802204", "0.6758367", "0.67450833", "0.6701458", "0.6675645", "0.66674817", "0.66519284", "0.6604192", "0.6585337", "0.6545055", "0.654194", "0.650756", "0.6476744", "0.6445163", "0.643056", "0.6423219", ...
0.7121085
4
Rest request to get a book by its isbn.
@GET @Path("{isbn}") @Produces(MediaType.APPLICATION_JSON) public Response getBook(@PathParam("isbn") String isbn) { final Book book = getBookService().getBook(isbn); return Response .status(book == null ? Response.Status.BAD_REQUEST : Response.Status.OK) .entity(book == null ? new JSONObject() .put("Status", Response.Status.BAD_REQUEST.getStatusCode()) .put("Message", "No book with given isbn found.").toString() : book ).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value=\"/book/{isbn}\",method=RequestMethod.GET)\n\tpublic @ResponseBody ResponseEntity<Books> getOneBookDetails(@PathVariable Long isbn)throws Exception{\n\t\tBooks book=null;\n\t\t\n\t\t\tbook=booksDAO.findOne(isbn);\n\t\t\tif(book!=null)\n\t\t\t\treturn new ResponseEntity<Books>(book, HttpStatus...
[ "0.7426404", "0.7015551", "0.692721", "0.6824965", "0.6666958", "0.6485304", "0.64638096", "0.6438463", "0.63374704", "0.63336486", "0.6332343", "0.63304704", "0.63054925", "0.6160252", "0.6128883", "0.6003881", "0.600304", "0.59823334", "0.59559566", "0.5950672", "0.59176797...
0.83810997
0
Transforms bookServiceResult to JsonObject
private String getJsonFromServiceResult(BookServiceResult bookServiceResult) { final JSONObject returnJsonObject = new JSONObject(); returnJsonObject.put("Status", bookServiceResult.getStatus().getStatusCode()); returnJsonObject.put("Message", bookServiceResult.getMessage()); return returnJsonObject.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject getBookJSONObject(String bookTitle) throws BadRequestException {\n\n String apiUrlString = \"https://www.googleapis.com/books/v1/volumes?q=intitle:\" + bookTitle + \"&filter:free-ebooks&printType:books\";\n try{\n HttpURLConnection connection = null;\n // Build...
[ "0.6187844", "0.6154019", "0.61165893", "0.5988071", "0.59732914", "0.59643555", "0.58669156", "0.5762749", "0.57010674", "0.56145954", "0.5507815", "0.53338504", "0.5317048", "0.5295569", "0.52847576", "0.527879", "0.5277752", "0.5274796", "0.52630144", "0.5261465", "0.52458...
0.80668736
0
Actually write the operation to the database
public void buttonClick(ClickEvent event) { if (!isProcessing) { isProcessing = saveOperacion(oItem, operacionConfirmForm); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeDatabase();", "public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t...
[ "0.727645", "0.69853014", "0.682288", "0.68119687", "0.68119687", "0.6651227", "0.6626136", "0.66161436", "0.6606788", "0.6594516", "0.6529939", "0.6527128", "0.64654034", "0.6457262", "0.6450723", "0.6391775", "0.63769174", "0.63738495", "0.63286525", "0.63003904", "0.628456...
0.0
-1
Actually write the operation to the database
private boolean saveOperacion(BeanItem<Operacion> oItem, Form operacionConfirmForm) { boolean isMulti = (cuentasSet!=null); EntityTransaction trans = null; EntityManager em = null; try { em = ConfigurationUtil.getNewEntityManager(); MutableLocalEntityProvider<Operacion> operacionEP = new BatchableLocalEntityProvider<Operacion>( Operacion.class, em); operacionEP.setTransactionsHandledByProvider(false); MutableLocalEntityProvider<Cuenta> cuentaEP = new BatchableLocalEntityProvider<Cuenta>( Cuenta.class, em); MutableLocalEntityProvider<Usuario> usuarioEP = new BatchableLocalEntityProvider<Usuario>( Usuario.class, em); cuentaEP.setTransactionsHandledByProvider(false); MutableLocalEntityProvider<Saldo> saldoEP = new BatchableLocalEntityProvider<Saldo>( Saldo.class, em); saldoEP.setTransactionsHandledByProvider(false); String logCaja = null; trans = em.getTransaction(); trans.begin(); if (!isMulti) { cuentasSet = new HashSet<Cuenta>(); cuentasSet.add(cuenta); } Operacion oper = null; for (Cuenta cn : cuentasSet) { oper = (isMulti ? ((Operacion)oItem.getBean()).clone() : (Operacion)oItem.getBean()); oper.setUsuario(em.find(Usuario.class, (SessionHandler.get().getId()))); if (oper.getFechaDeCobro()==null && (!oper.getTipo().equals(Tipo.CHEQUE.toString()))) oper.setFechaDeCobro(oper.getFecha()); cn = cuentaEP.getEntityManager().find(Cuenta.class, cn.getId(), LockModeType.PESSIMISTIC_WRITE); assert cn!=null; if (oper.getIsCargo()) { oper.setPen(oper.getPen().multiply(new BigDecimal(-1)).setScale(2)); oper.setUsd(oper.getUsd().multiply(new BigDecimal(-1)).setScale(2)); } Boolean isEfectivo = oper.getTipo().equals(Tipo.EFECTIVO.toString()); //logger.info("Got operacion to save: " + oper); oper.setIsPen((oper.getPen().compareTo(new BigDecimal(0)) > 0 || oper.getPen().compareTo(new BigDecimal(0))< 0) ? true : false); Boolean isCorEfectivo = oper.getIsCorrection() ? oper.getOperacionCorrected().getTipo().equals(Tipo.EFECTIVO.toString()) : isEfectivo; // In case of correction and same type (EFECTIVO/BANCO) or is of type Caja/Banco // Only add the difference if (oper.getIsCorrection() && (isEfectivo.equals(isCorEfectivo) || cn.getIsCaja())) { Operacion oldOperacion = oper.getOperacionCorrected(); BigDecimal diffPen = oper.getPen().subtract( oldOperacion.getPen()); oper.setPen(diffPen); BigDecimal diffUsd = oper.getUsd().subtract( oldOperacion.getUsd()); oper.setUsd(diffUsd); } else if (oper.getIsCorrection() && (!cn.getIsCaja()) && ((!isEfectivo.equals(isCorEfectivo)) || ((!isEfectivo) && (!isCorEfectivo) && (!oper.getBanco().equals(oper.getOperacionCorrected().getBanco()))))) { // If isCorrection and there are differences of types we have to move between Efectivo and Bancario // make a reverse operation Operacion op = oper.getOperacionCorrected().clone(); op.setIsCorrection(true); op.setDescripcion(oper.getDescripcion()); op.setOperacionCorrected(oper.getOperacionCorrected()); op.setBeneficiario(oper.getBeneficiario()); op.setCentroCosto(oper.getCentroCosto()); op.setCuentaContable(oper.getCuentaContable()); op.setRubroInstitucional(oper.getRubroInstitucional()); op.setRubroProyecto(oper.getRubroProyecto()); op.setLugarGasto(oper.getLugarGasto()); op.setBanco(oper.getBanco()); op.setChequeNumero(oper.getChequeNumero()); op.setDocNumero(oper.getDocNumero()); op.setDni(oper.getDni()); op.setTipoDocumento(oper.getTipoDocumento()); if (ConfigurationUtil.getUltimoMesCerrado().before(oper.getOperacionCorrected().getFecha())) op.setFecha(ConfigurationUtil.dateAddSeconds(oper.getOperacionCorrected().getFecha(), 1)); else op.setFecha(ConfigurationUtil.dateAddSeconds(ConfigurationUtil.getUltimoMesCerrado(), 1)); op.setPen(oper.getOperacionCorrected().getPen().multiply(new BigDecimal(-1))); op.setUsd(oper.getOperacionCorrected().getUsd().multiply(new BigDecimal(-1))); cn.setPen(cn.getPen().add(op.getPen())); cn.setUsd(cn.getUsd().add(op.getUsd())); cn = cuentaEP.updateEntity(cn); op.setSaldoPen(cn.getPen()); op.setSaldoUsd(cn.getUsd()); Object operAdded = operacionEP.addEntity(op); Object newOperacionId = ((Operacion)operAdded).getId(); op.setId((Long)newOperacionId); // NEW CODE REVERSE the Caja/Banco // NEW CODE - added operacion to caja Cuenta logger.info(processCajaBancoOperacion(cn, (Operacion)operAdded, em, cuentaEP, operacionEP)); if (newOperacionId!=null) recalculateSaldos((Operacion)operAdded, em); } String logCuenta = "Cuenta numero: " + cn.getNumero() + " , antes PEN: " + cn.getPen() + ", USD: " + cn.getUsd(); // Set the BancoCuenta beacause otherwise it gets lost if (oper.getBanco()!=null) { Cuenta bancoCuenta = em.find(Cuenta.class, oper.getBanco().getBancoCuenta().getId()); Banco banco = em.find(Banco.class, oper.getBanco().getId()); banco.setBancoCuenta(bancoCuenta); oper.setBanco(banco); } Object operAdded = operacionEP.addEntity(oper); Object newOperacionId = ((Operacion)operAdded).getId(); cn = recalculateSaldos((Operacion)operAdded, em); logger.info("new oper id: " + newOperacionId); oper.setId((Long) newOperacionId); if (operAdded!=null) logger.info("Added new operacion: " + operAdded.toString()); logger.info("Updated cn: " + cn.toString()); // PROCESS CAJA/BANCO if (!cn.getIsCaja()) { logger.info("OPERACION en CAJA/BANCO processing normally for non Caja"); logger.info(processCajaBancoOperacion(cn, (Operacion)operAdded, em, cuentaEP, operacionEP)); } logger.info("Nueva operacion " + (oper.getIsCorrection() ? " CORRECCION" : "") + ": " + oper); logCuenta += ", ahora PEN: " + cn.getPen() + ", USD: " + cn.getUsd(); logger.info(logCuenta); cuenta = cn; } if (trans!=null && trans.isActive()) { logger.info("trans active commiting..."); trans.commit(); logger.info("commit done"); em.close(); } logger.info("Cuenta for redrawing: " + cuenta); removeComponent(operacionConfirmForm); if (operacionTable instanceof AccountantCajaTable) ((AccountantCajaTable)operacionTable).redraw(cuenta, oper.getIsPen(), true, false); else if (operacionTable!=null) operacionTable.drawCuentaForm(cuenta, true); if (cuentaTable!=null) cuentaTable.redraw(); Window par = getWindow().getParent(); par.removeWindow(getWindow()); if (!isMulti && ConfigurationUtil.is("REPORTS_COMPROBANTE_OPEN")) ReportHelper.generateComprobante(oper, par); if (!isMulti && ConfigurationUtil.is("REPORTS_COMPROBANTE_PRINT")&&(!SessionHandler.isAdmin())&&(!SessionHandler.isContador())) { JasperPrint jrPrint = ReportHelper.printComprobante(oper, par); boolean isPrinted = false; if (((VasjaApp)par.getApplication()).getPrintHelper()!=null) isPrinted = ((VasjaApp)par.getApplication()).getPrintHelper().print(jrPrint, true); if (!isPrinted) throw new Exception("No se podia imprimir comprobante"); } } catch (Exception e) { if ((trans!=null) && (trans.isActive())) { logger.info("Trans is active rolling back..."); trans.rollback(); logger.info("Rolled back"); em.close(); } e.printStackTrace(); getWindow().showNotification("Problema con la operacion ", e.getMessage(), Notification.TYPE_ERROR_MESSAGE); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeDatabase();", "public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t...
[ "0.7275091", "0.6983871", "0.6822504", "0.68116444", "0.68116444", "0.6650768", "0.6624443", "0.6615913", "0.6606671", "0.65936923", "0.65294397", "0.6526621", "0.6465526", "0.6456538", "0.6450489", "0.6391971", "0.6376474", "0.6374464", "0.6326863", "0.63002753", "0.62827885...
0.0
-1
logger.info("OPERACION en CAJA/BANCO processing normally for non Caja");
public static String processCajaBancoOperacion(Cuenta cn, Operacion oper, EntityManager em, MutableLocalEntityProvider<Cuenta> cuentaEP, MutableLocalEntityProvider<Operacion> operacionEP) throws Exception { String logCaja = ""; Boolean isEfectivo = oper.getTipo().toString().equals(Tipo.EFECTIVO.toString()); Cuenta cajaCuenta; if (isEfectivo) { if (cn.getCategoriaCuenta().getCajaCuenta()==null) throw new Exception("La categoria de esta Cuenta no tiene una cuenta de CAJA!!!"); cajaCuenta = cuentaEP.getEntityManager().find(Cuenta.class, cn.getCategoriaCuenta().getCajaCuenta().getId(), LockModeType.PESSIMISTIC_WRITE); } else { if (oper.getBanco().getBancoCuenta()==null) throw new Exception("El banco seleccionado no tiene una cuenta!!!\nBanco seleccionado: " + oper.getBanco()); cajaCuenta = cuentaEP.getEntityManager().find(Cuenta.class, oper.getBanco().getBancoCuenta().getId(), LockModeType.PESSIMISTIC_WRITE); } logCaja = " Caja antes, PEN: " + cajaCuenta.getPen() + " USD: " + cajaCuenta.getUsd(); cajaCuenta.setPen(cajaCuenta.getPen().add(oper.getPen())); cajaCuenta.setUsd(cajaCuenta.getUsd().add(oper.getUsd())); cajaCuenta = cuentaEP.updateEntity(cajaCuenta); logCaja += ", CAJA ahora PEN: " + cajaCuenta.getPen() + ", USD: " + cajaCuenta.getUsd(); // NEW CODE - added operacion to caja Cuenta Operacion cajaOperacion = oper.giveCajaOperacion(cajaCuenta); Object cajaOperacionAdded = operacionEP.addEntity(cajaOperacion); Object newCajaOperacionId = ((Operacion)cajaOperacionAdded).getId(); recalculateSaldos((Operacion)cajaOperacionAdded, em); logCaja += "new caja oper id: " + newCajaOperacionId; logger.info(logCaja); return logCaja; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void logika_rozpocznij(){\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tlogger.trace(\"Mensaje de tipo TRACE\");\n\t\tlogger.debug(\"Mensaje de tipo DEBUG\");\n\t\tlogger.info(\"Mensaje de tipo INFO\");\n\t\tlogger.warn(\"Mensaje de tipo WARN\");\n\t\tlogger.error(\"Mensaje de tipo ERROR\")...
[ "0.6972952", "0.6015153", "0.59764385", "0.5973333", "0.58960956", "0.588816", "0.5868158", "0.5846135", "0.58236635", "0.5784596", "0.57443744", "0.56913257", "0.56423604", "0.5641666", "0.563092", "0.56274796", "0.5607455", "0.560446", "0.5597177", "0.558469", "0.55700153",...
0.5503477
26
filter averaging out pixel values
public static Integer[][] averager(Integer[][] matrixIn) { Integer[][] extendedMatrixInteger = expandMatrix(matrixIn); Integer[][] resultIntegers = new Integer[matrixIn.length][matrixIn[0].length]; for (int i = 0; i < resultIntegers.length; i++) { for (int j = 0; j < resultIntegers[0].length; j++) { resultIntegers[i][j] = pointAverage(i + 1, j + 1, extendedMatrixInteger); } } return resultIntegers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static BufferedImage average(BufferedImage image, int value) {\n //3-position array where we store R,G,B values of every pixel\n int[] colors;\n //3-position array where we will store the mean value of every pixel of every channel\n int[] meanColor = new int[3];\n //mean v...
[ "0.6343062", "0.6096489", "0.60949755", "0.6035945", "0.60337144", "0.59873503", "0.5963015", "0.5929465", "0.584168", "0.58130974", "0.57554793", "0.57162666", "0.57089835", "0.5671828", "0.5662621", "0.56499", "0.56494635", "0.56124467", "0.553768", "0.5537501", "0.5537174"...
0.0
-1
average at point i,j
public static Integer pointAverage(int i, int j, Integer[][] matrix) { assert(i > 0 && i < matrix.length && j > 0 && j < matrix[0].length); int sum = 0; for (int k = -1; k < 2; k++) { for (int l = -1; l < 2; l++) { sum += matrix[i + k][j + l]; } } return (Integer)(int)Math.round((double)sum / 9); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getAverage(int i, int j, int[][] image)\r\n\t{\n int[][] directions={{0,-1},{0,1},{1,0},{-1,0},{1,-1}, {1,1}, {-1,-1}, {-1,1}};\r\n\t\tint sum = image[i][j];\r\n\t\tint average = 0;\r\n\t\tint noOfElements = 1;\r\n\t\t\r\n\t\tfor(int[] dir : directions)\r\n\t\t{\r\n\t\t\tint x = i + di...
[ "0.71032757", "0.6919905", "0.68497723", "0.6660948", "0.6448659", "0.6415216", "0.6410296", "0.63966256", "0.62988025", "0.6268973", "0.624897", "0.6193147", "0.61556786", "0.6120896", "0.606779", "0.606085", "0.60541207", "0.60510933", "0.6007963", "0.5996444", "0.59548724"...
0.7273803
0
Log.e(TAG, "onStart()"); initialize the state if is necessary
@Override public void onStart() { if (state == null) { state = new CoverState(); } // call the model and update the state state.titulo = model.getTitulo(); state.comenzar=model.getComenzar(); // use passed state if is necessary }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\t// super.onRestoreInstanceState(outState);\n\n\t\tif (D)\n\t\t\tLog.e(TAG, \"++ ON START ++\");\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n Log.d(LOG_TAG,\"onStart\");\n }", "@Override\n protected voi...
[ "0.82618994", "0.8203911", "0.81873506", "0.8169785", "0.81659937", "0.81657606", "0.8150328", "0.8150328", "0.8096554", "0.80689555", "0.80495083", "0.80473834", "0.8009864", "0.8006305", "0.7984468", "0.7979311", "0.7950174", "0.7933293", "0.7926859", "0.79052013", "0.78753...
0.0
-1
Log.e(TAG, "onRestart()"); update the model if is necessary
@Override public void onRestart() { model.onRestartScreen(state.titulo,state.comenzar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onRestart() {\r\n super.onRestart();\r\n refreshData();\r\n }", "@Override\r\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\r\n\t}", "@Override\r\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\r\n\t}", "@Override\r\n\tprotected void onRestart() ...
[ "0.8190517", "0.80023426", "0.80023426", "0.80023426", "0.79861873", "0.7982207", "0.7980516", "0.7980516", "0.7961039", "0.7947923", "0.79317546", "0.79317546", "0.79317546", "0.7884466", "0.78769356", "0.78680193", "0.7817902", "0.78173447", "0.7802308", "0.77225125", "0.77...
0.759426
27
Log.e(TAG, "onResume()"); use passed state if is necessary call the model and update the state state.data = model.getStoredData(); update the view
@Override public void onResume() { view.get().onDataUpdated(state); view.get().activateButton(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onResume() {\n super.onResume();\n initViewData();\n initdata();\n }", "@Override\r\n public void onResume() {\r\n super.onResume();\r\n refreshData();\r\n }", "@Override\n protected void onResume() {\n super.onResume();\n ...
[ "0.7886354", "0.7828271", "0.76944995", "0.76944995", "0.75982666", "0.72660196", "0.72137535", "0.7208568", "0.7203889", "0.71921504", "0.71521044", "0.70726097", "0.7029319", "0.7020808", "0.6984223", "0.69752955", "0.6946484", "0.6931786", "0.69220155", "0.6911666", "0.691...
0.7504827
5
/ 1. Add two queues 2. Depth queue/ Node queue.
public static void connect(TreeLinkNode root) { if(root==null) return; LinkedList<TreeLinkNode> nodeQueue = new LinkedList<TreeLinkNode>(); LinkedList<Integer> depthQueue = new LinkedList<Integer>(); if(root!=null){ nodeQueue.offer(root); depthQueue.offer(1); } while(!nodeQueue.isEmpty()){ TreeLinkNode topNode = nodeQueue.poll(); int depth = depthQueue.poll(); if(depthQueue.isEmpty()){ topNode.next = null; } else if(depthQueue.peek() > depth){ topNode.next = null; } else { topNode.next = nodeQueue.peek(); } if(topNode.left!=null){ nodeQueue.offer(topNode.left); depthQueue.offer(depth+1); } if(topNode.right!=null){ nodeQueue.offer(topNode.right); depthQueue.offer(depth+1); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static LinkedQueue mergeSortedQueues(LinkedQueue q1, LinkedQueue q2) {\n // Replace the following line with your solution.\n LinkedQueue bigQueue = new LinkedQueue();\n while (!q1.isEmpty() && !q2.isEmpty())\n {\n try\n {\n Object qOneItem = q1.front();\n Obj...
[ "0.6545364", "0.6530064", "0.649245", "0.6437221", "0.6398429", "0.6380712", "0.62460005", "0.6231949", "0.6170284", "0.6153377", "0.6120313", "0.6113965", "0.61008406", "0.6089407", "0.59816456", "0.5972369", "0.59535843", "0.5939959", "0.5938277", "0.5919334", "0.5899982", ...
0.0
-1
private static final String LOWER = "abcdefghijklmnopqrstuvwxyz"; private static final String UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; private static final String DIGITS = "0123456789"; private static final String PUNCTUATION = "$_."; / this method generates password 8 symbols length with numeric and alphabetical characters
public String generate() { String result = RandomStringUtils.random(8,true,true); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();...
[ "0.77406114", "0.75439173", "0.7517851", "0.73572844", "0.7225396", "0.70924175", "0.69967484", "0.69691956", "0.6837955", "0.6822274", "0.67922825", "0.677996", "0.67750657", "0.67222697", "0.6703335", "0.6642647", "0.6625367", "0.65740186", "0.6551252", "0.65147203", "0.648...
0.0
-1
Created by Devon on 2017/12/14.
public interface AboutUsNavigator { void onUpdateApp(String msg, String downloadUrl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.6014521", "0.5753501", "0.5731396", "0.57297254", "0.564808", "0.5616808", "0.5616808", "0.5539621", "0.55205095", "0.54849666", "0.5479971", "0.547974", "0.5473567", "0.5469077", "0.54661167", "0.5465052", "0.5456866", "0.5451074", "0.54472274", "0.54395425", "0.5416094",...
0.0
-1
/ / / / / / / / / / / / / / / / / / / / / / / / / / / /
protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) { /* 126 */ String str1 = paramURL.getProtocol(); /* 127 */ String str2 = paramURL.getAuthority(); /* 128 */ String str3 = paramURL.getUserInfo(); /* 129 */ String str4 = paramURL.getHost(); /* 130 */ int i = paramURL.getPort(); /* 131 */ String str5 = paramURL.getPath(); /* 132 */ String str6 = paramURL.getQuery(); /* */ /* */ /* 135 */ String str7 = paramURL.getRef(); /* */ /* 137 */ boolean bool1 = false; /* 138 */ boolean bool2 = false; /* */ /* */ /* */ /* 142 */ if (paramInt1 < paramInt2) { /* 143 */ int k = paramString.indexOf('?'); /* 144 */ bool2 = (k == paramInt1) ? true : false; /* 145 */ if (k != -1 && k < paramInt2) { /* 146 */ str6 = paramString.substring(k + 1, paramInt2); /* 147 */ if (paramInt2 > k) /* 148 */ paramInt2 = k; /* 149 */ paramString = paramString.substring(0, k); /* */ } /* */ } /* */ /* 153 */ int j = 0; /* */ /* */ /* */ /* */ /* */ /* 159 */ boolean bool3 = (paramInt1 <= paramInt2 - 4 && paramString.charAt(paramInt1) == '/' && paramString.charAt(paramInt1 + 1) == '/' && paramString.charAt(paramInt1 + 2) == '/' && paramString.charAt(paramInt1 + 3) == '/') ? true : false; /* 160 */ if (!bool3 && paramInt1 <= paramInt2 - 2 && paramString.charAt(paramInt1) == '/' && paramString /* 161 */ .charAt(paramInt1 + 1) == '/') { /* 162 */ paramInt1 += 2; /* 163 */ j = paramString.indexOf('/', paramInt1); /* 164 */ if (j < 0 || j > paramInt2) { /* 165 */ j = paramString.indexOf('?', paramInt1); /* 166 */ if (j < 0 || j > paramInt2) { /* 167 */ j = paramInt2; /* */ } /* */ } /* 170 */ str4 = str2 = paramString.substring(paramInt1, j); /* */ /* 172 */ int k = str2.indexOf('@'); /* 173 */ if (k != -1) { /* 174 */ if (k != str2.lastIndexOf('@')) { /* */ /* 176 */ str3 = null; /* 177 */ str4 = null; /* */ } else { /* 179 */ str3 = str2.substring(0, k); /* 180 */ str4 = str2.substring(k + 1); /* */ } /* */ } else { /* 183 */ str3 = null; /* */ } /* 185 */ if (str4 != null) { /* */ /* */ /* 188 */ if (str4.length() > 0 && str4.charAt(0) == '[') { /* 189 */ if ((k = str4.indexOf(']')) > 2) { /* */ /* 191 */ String str = str4; /* 192 */ str4 = str.substring(0, k + 1); /* */ /* 194 */ if (!IPAddressUtil.isIPv6LiteralAddress(str4.substring(1, k))) { /* 195 */ throw new IllegalArgumentException("Invalid host: " + str4); /* */ } /* */ /* */ /* 199 */ i = -1; /* 200 */ if (str.length() > k + 1) { /* 201 */ if (str.charAt(k + 1) == ':') { /* 202 */ k++; /* */ /* 204 */ if (str.length() > k + 1) { /* 205 */ i = Integer.parseInt(str.substring(k + 1)); /* */ } /* */ } else { /* 208 */ throw new IllegalArgumentException("Invalid authority field: " + str2); /* */ } /* */ } /* */ } else { /* */ /* 213 */ throw new IllegalArgumentException("Invalid authority field: " + str2); /* */ } /* */ } else { /* */ /* 217 */ k = str4.indexOf(':'); /* 218 */ i = -1; /* 219 */ if (k >= 0) { /* */ /* 221 */ if (str4.length() > k + 1) { /* 222 */ i = Integer.parseInt(str4.substring(k + 1)); /* */ } /* 224 */ str4 = str4.substring(0, k); /* */ } /* */ } /* */ } else { /* 228 */ str4 = ""; /* */ } /* 230 */ if (i < -1) { /* 231 */ throw new IllegalArgumentException("Invalid port number :" + i); /* */ } /* 233 */ paramInt1 = j; /* */ /* */ /* 236 */ if (str2 != null && str2.length() > 0) { /* 237 */ str5 = ""; /* */ } /* */ } /* 240 */ if (str4 == null) { /* 241 */ str4 = ""; /* */ } /* */ /* */ /* 245 */ if (paramInt1 < paramInt2) { /* 246 */ if (paramString.charAt(paramInt1) == '/') { /* 247 */ str5 = paramString.substring(paramInt1, paramInt2); /* 248 */ } else if (str5 != null && str5.length() > 0) { /* 249 */ bool1 = true; /* 250 */ int k = str5.lastIndexOf('/'); /* 251 */ String str = ""; /* 252 */ if (k == -1 && str2 != null) { /* 253 */ str = "/"; /* */ } /* 255 */ str5 = str5.substring(0, k + 1) + str + paramString.substring(paramInt1, paramInt2); /* */ } else { /* */ /* 258 */ String str = (str2 != null) ? "/" : ""; /* 259 */ str5 = str + paramString.substring(paramInt1, paramInt2); /* */ } /* 261 */ } else if (bool2 && str5 != null) { /* 262 */ int k = str5.lastIndexOf('/'); /* 263 */ if (k < 0) /* 264 */ k = 0; /* 265 */ str5 = str5.substring(0, k) + "/"; /* */ } /* 267 */ if (str5 == null) { /* 268 */ str5 = ""; /* */ } /* 270 */ if (bool1) { /* */ /* 272 */ while ((j = str5.indexOf("/./")) >= 0) { /* 273 */ str5 = str5.substring(0, j) + str5.substring(j + 2); /* */ } /* */ /* 276 */ j = 0; /* 277 */ while ((j = str5.indexOf("/../", j)) >= 0) { /* */ /* */ /* */ /* */ /* */ /* */ /* 284 */ if (j > 0 && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0 && str5 /* 285 */ .indexOf("/../", paramInt2) != 0) { /* 286 */ str5 = str5.substring(0, paramInt2) + str5.substring(j + 3); /* 287 */ j = 0; continue; /* */ } /* 289 */ j += 3; /* */ } /* */ /* */ /* */ /* 294 */ j = str5.indexOf("/.."); /* 295 */ while (str5.endsWith("/..") && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0) { /* 296 */ str5 = str5.substring(0, paramInt2 + 1); /* */ } /* */ /* */ /* */ /* */ /* 302 */ if (str5.startsWith("./") && str5.length() > 2) { /* 303 */ str5 = str5.substring(2); /* */ } /* */ /* 306 */ if (str5.endsWith("/.")) { /* 307 */ str5 = str5.substring(0, str5.length() - 1); /* */ } /* */ } /* 310 */ setURL(paramURL, str1, str4, i, str2, str3, str5, str6, str7); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int getNumPatterns() { return 64; }", "double passer();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "void mo33732Px();", "public void method_4270() {}", "public Integer getWidth(){return this.width;}", "public void gored() {\n\t...
[ "0.5150234", "0.51409507", "0.5115881", "0.50840217", "0.500553", "0.50016564", "0.4993842", "0.4991954", "0.4972456", "0.49624422", "0.49493468", "0.4933417", "0.49317768", "0.49295402", "0.49191913", "0.49125338", "0.49100533", "0.49095747", "0.49088156", "0.48982656", "0.4...
0.0
-1
/ / / / / / / /
protected int getDefaultPort() { /* 320 */ return -1; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "private int rightChild(int i){return 2*i+2;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void b...
[ "0.5504823", "0.5413094", "0.5298108", "0.5237958", "0.52057725", "0.51480854", "0.51014477", "0.5076274", "0.50370175", "0.5031899", "0.5009797", "0.49817896", "0.49811566", "0.49784452", "0.49735388", "0.49627006", "0.49372548", "0.49290594", "0.4903707", "0.48934108", "0.4...
0.0
-1
/ / / / / / / / / / / / / /
protected boolean equals(URL paramURL1, URL paramURL2) { /* 336 */ String str1 = paramURL1.getRef(); /* 337 */ String str2 = paramURL2.getRef(); /* 338 */ return ((str1 == str2 || (str1 != null && str1.equals(str2))) && /* 339 */ sameFile(paramURL1, paramURL2)); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "int getWidth() {return width;}...
[ "0.5488944", "0.539108", "0.5100269", "0.50899094", "0.5069534", "0.50693107", "0.5066066", "0.5061679", "0.50442266", "0.5015036", "0.5014165", "0.5003645", "0.49693072", "0.49573815", "0.49514338", "0.49499622", "0.49293876", "0.4927479", "0.4927194", "0.4917197", "0.491014...
0.0
-1
/ / / / / / / / / /
protected int hashCode(URL paramURL) { /* 351 */ int i = 0; /* */ /* */ /* 354 */ String str1 = paramURL.getProtocol(); /* 355 */ if (str1 != null) { /* 356 */ i += str1.hashCode(); /* */ } /* */ /* 359 */ InetAddress inetAddress = getHostAddress(paramURL); /* 360 */ if (inetAddress != null) { /* 361 */ i += inetAddress.hashCode(); /* */ } else { /* 363 */ String str = paramURL.getHost(); /* 364 */ if (str != null) { /* 365 */ i += str.toLowerCase().hashCode(); /* */ } /* */ } /* */ /* 369 */ String str2 = paramURL.getFile(); /* 370 */ if (str2 != null) { /* 371 */ i += str2.hashCode(); /* */ } /* */ /* 374 */ if (paramURL.getPort() == -1) { /* 375 */ i += getDefaultPort(); /* */ } else { /* 377 */ i += paramURL.getPort(); /* */ } /* */ /* 380 */ String str3 = paramURL.getRef(); /* 381 */ if (str3 != null) { /* 382 */ i += str3.hashCode(); /* */ } /* 384 */ return i; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50...
[ "0.5541769", "0.5447091", "0.52284503", "0.52142066", "0.51102245", "0.50959545", "0.50605327", "0.50371885", "0.503437", "0.5012711", "0.5003366", "0.5003288", "0.4998852", "0.4996254", "0.4989499", "0.49863338", "0.49803245", "0.4978323", "0.4968147", "0.49572036", "0.49168...
0.0
-1
/ / / / / / / / / / / / / /
protected boolean sameFile(URL paramURL1, URL paramURL2) { /* 400 */ if (paramURL1.getProtocol() != paramURL2.getProtocol() && (paramURL1 /* 401 */ .getProtocol() == null || /* 402 */ !paramURL1.getProtocol().equalsIgnoreCase(paramURL2.getProtocol()))) { /* 403 */ return false; /* */ } /* */ /* 406 */ if (paramURL1.getFile() != paramURL2.getFile() && (paramURL1 /* 407 */ .getFile() == null || !paramURL1.getFile().equals(paramURL2.getFile()))) { /* 408 */ return false; /* */ } /* */ /* */ /* 412 */ int i = (paramURL1.getPort() != -1) ? paramURL1.getPort() : paramURL1.handler.getDefaultPort(); /* 413 */ int j = (paramURL2.getPort() != -1) ? paramURL2.getPort() : paramURL2.handler.getDefaultPort(); /* 414 */ if (i != j) { /* 415 */ return false; /* */ } /* */ /* 418 */ if (!hostsEqual(paramURL1, paramURL2)) { /* 419 */ return false; /* */ } /* 421 */ return true; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "int getWidth() {return width;}...
[ "0.54895246", "0.5391585", "0.510078", "0.50899523", "0.5070096", "0.50695544", "0.50661993", "0.50623107", "0.5044784", "0.5015931", "0.50145376", "0.5004029", "0.49699992", "0.49574012", "0.49504334", "0.49500474", "0.49294454", "0.49273536", "0.4926886", "0.49166405", "0.4...
0.0
-1
/ / / / / / / / / / /
protected synchronized InetAddress getHostAddress(URL paramURL) { /* 434 */ if (paramURL.hostAddress != null) { /* 435 */ return paramURL.hostAddress; /* */ } /* 437 */ String str = paramURL.getHost(); /* 438 */ if (str == null || str.equals("")) { /* 439 */ return null; /* */ } /* */ try { /* 442 */ paramURL.hostAddress = InetAddress.getByName(str); /* 443 */ } catch (UnknownHostException unknownHostException) { /* 444 */ return null; /* 445 */ } catch (SecurityException securityException) { /* 446 */ return null; /* */ } /* */ /* 449 */ return paramURL.hostAddress; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "public abstract void bepaalGrootte();", "double passer();", "int getWidth() {return width;}", "public void zeichneQuadra...
[ "0.55397105", "0.54437053", "0.5204512", "0.51804096", "0.50937134", "0.5059022", "0.5054623", "0.50449234", "0.50269794", "0.5012348", "0.501193", "0.50112987", "0.5003606", "0.4999849", "0.49978024", "0.49852726", "0.49802312", "0.49788785", "0.49669135", "0.4958197", "0.49...
0.0
-1
/ / / / / / / / / /
protected boolean hostsEqual(URL paramURL1, URL paramURL2) { /* 461 */ InetAddress inetAddress1 = getHostAddress(paramURL1); /* 462 */ InetAddress inetAddress2 = getHostAddress(paramURL2); /* */ /* 464 */ if (inetAddress1 != null && inetAddress2 != null) { /* 465 */ return inetAddress1.equals(inetAddress2); /* */ } /* 467 */ if (paramURL1.getHost() != null && paramURL2.getHost() != null) { /* 468 */ return paramURL1.getHost().equalsIgnoreCase(paramURL2.getHost()); /* */ } /* 470 */ return (paramURL1.getHost() == null && paramURL2.getHost() == null); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50...
[ "0.5540896", "0.5446543", "0.5227331", "0.52141076", "0.5111389", "0.50963986", "0.50654864", "0.5038032", "0.50336593", "0.501189", "0.50033337", "0.5002645", "0.4999724", "0.4997505", "0.49938273", "0.4988672", "0.4982446", "0.49785286", "0.4967535", "0.49578318", "0.491564...
0.0
-1
/ / / / / / / / / / /
protected String toExternalForm(URL paramURL) { /* 483 */ int i = paramURL.getProtocol().length() + 1; /* 484 */ if (paramURL.getAuthority() != null && paramURL.getAuthority().length() > 0) /* 485 */ i += 2 + paramURL.getAuthority().length(); /* 486 */ if (paramURL.getPath() != null) { /* 487 */ i += paramURL.getPath().length(); /* */ } /* 489 */ if (paramURL.getQuery() != null) { /* 490 */ i += 1 + paramURL.getQuery().length(); /* */ } /* 492 */ if (paramURL.getRef() != null) { /* 493 */ i += 1 + paramURL.getRef().length(); /* */ } /* 495 */ StringBuffer stringBuffer = new StringBuffer(i); /* 496 */ stringBuffer.append(paramURL.getProtocol()); /* 497 */ stringBuffer.append(":"); /* 498 */ if (paramURL.getAuthority() != null && paramURL.getAuthority().length() > 0) { /* 499 */ stringBuffer.append("//"); /* 500 */ stringBuffer.append(paramURL.getAuthority()); /* */ } /* 502 */ if (paramURL.getPath() != null) { /* 503 */ stringBuffer.append(paramURL.getPath()); /* */ } /* 505 */ if (paramURL.getQuery() != null) { /* 506 */ stringBuffer.append('?'); /* 507 */ stringBuffer.append(paramURL.getQuery()); /* */ } /* 509 */ if (paramURL.getRef() != null) { /* 510 */ stringBuffer.append("#"); /* 511 */ stringBuffer.append(paramURL.getRef()); /* */ } /* 513 */ return stringBuffer.toString(); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "public abstract void bepaalGrootte();", "double passer();", "int getWidth() {return width;}", "public void zeichneQuadra...
[ "0.55399466", "0.5443876", "0.52045697", "0.51806474", "0.5094128", "0.50592", "0.5054664", "0.50454694", "0.50268364", "0.50132203", "0.5012506", "0.50112844", "0.50044596", "0.49996305", "0.499802", "0.49844983", "0.498055", "0.49782547", "0.49679092", "0.49582762", "0.4911...
0.0
-1
/ / / / / / / / / / / / / / / / / / / / / / /
protected void setURL(URL paramURL, String paramString1, String paramString2, int paramInt, String paramString3, String paramString4, String paramString5, String paramString6, String paramString7) { /* 538 */ if (this != paramURL.handler) { /* 539 */ throw new SecurityException("handler for url different from this handler"); /* */ } /* 541 */ if (paramString2 != null && paramURL.isBuiltinStreamHandler(this)) { /* 542 */ String str = IPAddressUtil.checkHostString(paramString2); /* 543 */ if (str != null) throw new IllegalArgumentException(str); /* */ /* */ } /* 546 */ paramURL.set(paramURL.getProtocol(), paramString2, paramInt, paramString3, paramString4, paramString5, paramString6, paramString7); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "static int getNumPatterns() { return 64; }", "double passer();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "private int leftChild(int i){return 2*i+1;}", "public Integer getWidth(){return t...
[ "0.5172416", "0.51261884", "0.5123226", "0.51177007", "0.5086934", "0.50333786", "0.5010046", "0.4988667", "0.4968825", "0.49662834", "0.49486443", "0.49357387", "0.49139488", "0.49114957", "0.4903644", "0.49029875", "0.4886754", "0.48787475", "0.48749134", "0.4873312", "0.48...
0.0
-1
/ / / / / / / / / / / / / / / / / / / / / / /
@Deprecated /* */ protected void setURL(URL paramURL, String paramString1, String paramString2, int paramInt, String paramString3, String paramString4) { /* 572 */ String str1 = null; /* 573 */ String str2 = null; /* 574 */ if (paramString2 != null && paramString2.length() != 0) { /* 575 */ str1 = (paramInt == -1) ? paramString2 : (paramString2 + ":" + paramInt); /* 576 */ int i = paramString2.lastIndexOf('@'); /* 577 */ if (i != -1) { /* 578 */ str2 = paramString2.substring(0, i); /* 579 */ paramString2 = paramString2.substring(i + 1); /* */ } /* */ } /* */ /* */ /* */ /* */ /* 586 */ String str3 = null; /* 587 */ String str4 = null; /* 588 */ if (paramString3 != null) { /* 589 */ int i = paramString3.lastIndexOf('?'); /* 590 */ if (i != -1) { /* 591 */ str4 = paramString3.substring(i + 1); /* 592 */ str3 = paramString3.substring(0, i); /* */ } else { /* 594 */ str3 = paramString3; /* */ } /* 596 */ } setURL(paramURL, paramString1, paramString2, paramInt, str1, str2, str3, str4, paramString4); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "static int getNumPatterns() { return 64; }", "double passer();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "private int leftChild(int i){return 2*i+1;}", "public Integer getWidth(){return t...
[ "0.51732004", "0.5126114", "0.51228195", "0.5118551", "0.50880027", "0.5033694", "0.50106776", "0.4988625", "0.49687558", "0.49650666", "0.4948651", "0.49365512", "0.4913192", "0.49131", "0.490398", "0.4901615", "0.48856953", "0.48788276", "0.4874461", "0.4873909", "0.4873416...
0.0
-1
remove private access modifier to fix compile time error
ParentClassTwo() { int i = 100; System.out.println(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isPrivate() {\n return true;\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Test\n public void testNoPrivateAccessForProperties6a() {\n testError(\n srcs(\n \"/** @const */ var ns = {};\"\n +...
[ "0.70031226", "0.6811", "0.66314745", "0.65679514", "0.64991534", "0.64872533", "0.64868003", "0.6478248", "0.64577156", "0.64545006", "0.64545006", "0.6453651", "0.6392097", "0.63411325", "0.63394064", "0.6336644", "0.6301709", "0.62521803", "0.62270665", "0.62101644", "0.62...
0.0
-1
Best time to buy and sell stocks II
public int max(int[] prices){ int sum = 0; for(int i=1;i<prices.length;i++){ if((prices[i]-prices[i-1])>0){ sum += (prices[i]-prices[i-1]); } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buyStock(double askPrice, int shares, int tradeTime) {\n }", "@Override \n\tpublic TradeAction tick(double price) {\n\t\tma10before=average(priceQ10);\n\t\t\n\t\tif (priceQ10.size()<10)\n\t\t{\n\t\t\tpriceQ10.offer(price);\n\t\t}\n\t\tif(priceQ10.size()==10)\n\t\t{\n\t\t\tpriceQ10.poll();\n\t\t\tp...
[ "0.721406", "0.6931918", "0.6159907", "0.6100278", "0.6081196", "0.60721457", "0.6016599", "0.59862924", "0.59729093", "0.5942486", "0.5940168", "0.5938706", "0.5913399", "0.5896128", "0.5879833", "0.5876131", "0.5858387", "0.58461964", "0.5845592", "0.58421284", "0.5836359",...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_category, container, false); rvCats = view.findViewById(R.id.rvCats); dataViewCats = view.findViewById(R.id.dataViewCats); errorViewCats = view.findViewById(R.id.errorViewCats); btnUploadRequirement = view.findViewById(R.id.btnUploadRequirement); inputSearch = view.findViewById(R.id.inputSearch); slider = view.findViewById(R.id.banner_slider); // sliderImageList.addAll(response.body()); slider.setAdapter(new MainSliderAdapter()); slider.setSelectedSlide(0); // getSliderImages(); getAllCategories(); //recycler view rvCats.setHasFixedSize(true); GridLayoutManager llm = new GridLayoutManager(getActivity(),3); // LinearLayoutManager llm = new LinearLayoutManager(getActivity()); // llm.setOrientation(LinearLayoutManager.VERTICAL); rvCats.setLayoutManager(llm); categoryAdapter = new CategoryAdapter(getActivity(),catList); categoryAdapter.setCatClickListner(this); rvCats.setAdapter(categoryAdapter); //recycler ended productAutoCompleteAdapter = new ProductAutoCompleteAdapter(getActivity(),productsList); inputSearch.setAdapter(productAutoCompleteAdapter); productAutoCompleteAdapter.setSugClickListner(this); btnUploadRequirement.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { checkPermission(); } }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
Create a new share dialog.
public ShareDialogW(final AppW app, Widget anchor, Widget geogebraButton, String shareURL) { super(app.getPanel(), app); this.anchor = anchor; this.app = app; this.loc = app.getLocalization(); this.shareURL = shareURL; this.geogebraButton = geogebraButton; this.setGlassEnabled(true); this.getCaption().setText(app.getLocalization().getMenu("Share")); this.contentPanel = new VerticalPanel(); this.contentPanel.add(getTabPanel()); this.add(this.contentPanel); addStyleName("shareDialog"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void gppShare_openBasicShareDialog () {\n\t\tGPPShare.sharedInstance().shareDialog().open();\n\t}", "public void dialogShare()\n\t {\n\t \tAlertDialog.Builder builder = new AlertDialog.Builder(this); \n\t \tbuilder\n\t \t.setMessage(\"Congratulations! you just finished the \" + dayName + \" wo...
[ "0.7066393", "0.6952598", "0.6720757", "0.6511692", "0.645118", "0.6436104", "0.6383183", "0.6369246", "0.6203918", "0.61606795", "0.61382735", "0.6089796", "0.6076493", "0.6042249", "0.6029662", "0.60220414", "0.60005885", "0.5938497", "0.5932639", "0.5927596", "0.59259164",...
0.6274852
8
Copy sharing link to clipboard
protected void copyLinkToClipboard() { app.copyTextToSystemClipboard(getURL()); link.selectAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n private void copyUrl() {\n final Clipboard clipboard = Clipboard.getSystemClipboard();\n final ClipboardContent url = new ClipboardContent();\n url.putString(HELP_URL);\n clipboard.setContent(url);\n }", "@FXML\n private void copyGoto() {\n final Clipboard clip...
[ "0.7745089", "0.67493945", "0.66512465", "0.6580002", "0.6568256", "0.65657777", "0.6499258", "0.6386924", "0.63378716", "0.63128453", "0.62688386", "0.61786574", "0.6178483", "0.6171299", "0.61654025", "0.6158195", "0.6150541", "0.61153144", "0.6076092", "0.60744566", "0.607...
0.85535204
0
User: SametCokpinar Date: 17/12/14 Time: 23:11
public interface BabyInfoRepository extends JpaRepository<BabyInfo, Integer> { @Query("SELECT bi FROM BabyInfo bi WHERE bi.user.id = :user_id") BabyInfo findByUser(@Param("user_id") Integer id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Long getUserCreated();", "private void getUserInfo() {\n\t}", "public String getUsername()\r\n/* 11: */ {\r\n/* 12:30 */ return this.username;\r\n/* 13: */ }", "private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}", "long getLog...
[ "0.59850466", "0.5828177", "0.5813386", "0.57778716", "0.56043804", "0.5585059", "0.5527926", "0.5495024", "0.5485443", "0.5485443", "0.5485443", "0.5460306", "0.54291457", "0.54243875", "0.54107064", "0.5377989", "0.53711355", "0.53695405", "0.5365236", "0.5358144", "0.53525...
0.0
-1
Created by Ankit on 12/27/2017.
public interface MarkAsReadNotificationCallback { void onNotificationMarkedAsRead(int pos); void onNotificationMarkAsReadFailed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubl...
[ "0.600492", "0.58365196", "0.58291996", "0.57908744", "0.5717027", "0.5685721", "0.5685721", "0.56790334", "0.56535006", "0.5609167", "0.559915", "0.5597043", "0.5584709", "0.5581932", "0.5575914", "0.5561707", "0.5558119", "0.5535029", "0.55297774", "0.5518671", "0.5517876",...
0.0
-1
generates and returns a Map with randomized scenery and predetermined size and path
public static Map generateRandomMapWithPath(){ Map map = new Map(20,20,(int)System.currentTimeMillis(),0.25); // x size, y size try { Queue<int[]> corners = new LinkedList<int[]>(); // add corners to the queue // lines between corners must be strictly vertical or horizontal // it is assumed that such filtering will be done during gametime // by restricting player's input // otherwise, no path will be drawn on the map corners.add(new int[] {0,3}); corners.add(new int[] {15,3}); corners.add(new int[] {15,15}); corners.add(new int[] {6,15}); corners.add(new int[] {6,8}); corners.add(new int[] {2,8}); // build path map.buildNewPath(corners); } catch (PathException e) { e.printStackTrace(); } return map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed...
[ "0.6740716", "0.6607893", "0.65881026", "0.6515128", "0.6496061", "0.6288699", "0.6204378", "0.6184032", "0.61786467", "0.6134924", "0.6091407", "0.6022559", "0.6002087", "0.5992427", "0.5919591", "0.59158456", "0.59102166", "0.5898555", "0.58251506", "0.5812399", "0.5798577"...
0.7712257
0
Creates new form ticket
public ticket() { initComponents(); this.mostrar(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostMapping(value=\"/create\")\n\tpublic Ticket creatTicket(@RequestBody Ticket ticket){\n\t\treturn ticketBookingService.createTicket(ticket);\n\t}", "int createTicket(Ticket ticket, int userId);", "@Override\n\tpublic int createTicket(Booking_ticket bt) {\n\t\treturn btr.createTicket(bt);\n\t}", "public s...
[ "0.7035293", "0.68661964", "0.68439424", "0.6737605", "0.6506499", "0.6417886", "0.62837154", "0.627456", "0.6274538", "0.62290895", "0.6213337", "0.61334515", "0.6123787", "0.608298", "0.59805405", "0.59723866", "0.59683615", "0.5926423", "0.59124076", "0.5910399", "0.586655...
0.5903458
20
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); nomTicket = new javax.swing.JLabel(); folioTicket = new javax.swing.JLabel(); backBtn = new javax.swing.JButton(); detalle = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); detalleCompra = new javax.swing.JScrollPane(); compra = new javax.swing.JTextArea(); jLabel8 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setUndecorated(true); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setFont(new java.awt.Font("Maku", 0, 48)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Compra realizada"); getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 20, -1, -1)); nomTicket.setFont(new java.awt.Font("Maku", 0, 24)); // NOI18N nomTicket.setForeground(new java.awt.Color(255, 255, 255)); nomTicket.setText("Nombre: "); getContentPane().add(nomTicket, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 90, 220, 20)); folioTicket.setFont(new java.awt.Font("Maku", 0, 24)); // NOI18N folioTicket.setForeground(new java.awt.Color(255, 255, 255)); folioTicket.setText("Folio: "); getContentPane().add(folioTicket, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 130, -1, -1)); backBtn.setText("Regresar"); backBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backBtnActionPerformed(evt); } }); getContentPane().add(backBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 210, -1, -1)); detalle.setFont(new java.awt.Font("Maku", 0, 24)); // NOI18N detalle.setForeground(new java.awt.Color(255, 255, 255)); detalle.setText("Detalle de compra: "); getContentPane().add(detalle, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 170, 450, 40)); jButton1.setText("Salir"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 350, -1, -1)); compra.setEditable(false); compra.setColumns(20); compra.setRows(5); detalleCompra.setViewportView(compra); getContentPane().add(detalleCompra, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 210, 480, 170)); jLabel8.setFont(new java.awt.Font("Maku", 0, 24)); // NOI18N jLabel8.setForeground(new java.awt.Color(255, 255, 255)); jLabel8.setIcon(new javax.swing.ImageIcon("/Users/indra/Desktop/fondo3.jpeg")); // NOI18N jLabel8.setText("jLabel8"); getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 620, 400)); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7319573", "0.72908455", "0.72908455", "0.72908455", "0.7286827", "0.7248724", "0.7213511", "0.7208325", "0.7195998", "0.7190202", "0.7184771", "0.7158966", "0.7147921", "0.7093225", "0.7080275", "0.7057302", "0.69875276", "0.6977057", "0.6955658", "0.6953942", "0.69454855"...
0.0
-1
Helper methods Calculate the MD5 of a byte array.
private static String md5(byte[] b) { try { MessageDigest md = MessageDigest.getInstance("MD5"); md.reset(); md.update(b); byte[] digest = md.digest(); StringBuffer sb = new StringBuffer(); for (int i=0; i<digest.length; i++) { String a = Integer.toHexString(0xff & digest[i]); if (a.length() == 1) a = "0" + a; sb.append(a); } return sb.toString(); } catch (NoSuchAlgorithmException e) { writeLog(e); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] computeMD5Hash(byte[] data) throws NoSuchAlgorithmException, IOException {\n return computeMD5Hash(new ByteArrayInputStream(data));\n }", "public static byte[] encryptMD5(final byte[] data) {\n return hashTemplate(data, \"MD5\");\n }", "@Test\n public void md...
[ "0.76019365", "0.72932655", "0.6905904", "0.6886757", "0.687514", "0.6714659", "0.67101455", "0.66962993", "0.66317225", "0.65178984", "0.650664", "0.64962137", "0.6484929", "0.6458433", "0.64561903", "0.6449335", "0.6448639", "0.6443883", "0.6414999", "0.64062685", "0.639158...
0.7588894
1
Writes the given message to the log file.
private static void writeLog(String s) { if (logFile == null) createLogFile(); LogTools.println(s); LogTools.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeToLogFile(String message)\r\n {\n try\r\n {\r\n logWriter.write(message);\r\n logWriter.newLine();\r\n }\r\n catch (Exception ex)\r\n {\r\n System.out.println(\"Error writing message '\" + message +\r\n \"' to log file : \" + ex.getMessage());\r\n System...
[ "0.82407886", "0.7644205", "0.71965337", "0.7190746", "0.71340454", "0.7058267", "0.69504845", "0.6904716", "0.68471295", "0.6766018", "0.6740373", "0.6610022", "0.65713984", "0.6488232", "0.6470848", "0.646313", "0.6452214", "0.6387233", "0.63134646", "0.62971866", "0.623442...
0.5808431
38
Writes the given exception's stack trace to the log file.
private static void writeLog(Exception e) { if (logFile == null) createLogFile(); LogTools.trace(e); LogTools.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void logException(Exception e)\n throws Exception {\n\n FileWriter write = null;\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Date date = new Date();\n\n try {\n write = new FileWriter(\"c:\\\\temp\\\\CaseOperationException.log...
[ "0.7028894", "0.6875037", "0.6669865", "0.6306367", "0.6206776", "0.60590595", "0.5954751", "0.59085274", "0.5836363", "0.5685799", "0.5622718", "0.5585704", "0.5520188", "0.5509488", "0.54816264", "0.54591876", "0.54235023", "0.5402763", "0.53973335", "0.5378108", "0.5277015...
0.71013504
0
Creates a new log file.
private static void createLogFile() { try { String date = new Date().toString().replaceAll(":", "-"); logFile = new FileWriter("bio-formats-test-" + date + ".log"); TestLogger log = new TestLogger(logFile); LogTools.setLog(log); } catch (IOException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateLogFile() {\n\t\tFileOperations operator = new FileOperations(path);\n\t\toperator.writeFile(buildLogContent());\n\t}", "public File newLogFile() {\n File flog = null;\n try {\n this.logFileName = getTimestamp() + \".xml\";\n this.p...
[ "0.7405505", "0.73198014", "0.68619996", "0.68516904", "0.6744006", "0.6611598", "0.6581435", "0.647166", "0.6380269", "0.6224488", "0.6155248", "0.6141097", "0.6044822", "0.6018784", "0.5986607", "0.5980471", "0.59775645", "0.5937923", "0.59151304", "0.58682764", "0.5861391"...
0.7862514
0
Recursively generate a list of files to test.
private static void getFiles(String root, Vector files) { Location f = new Location(root); String[] subs = f.list(); if (subs == null) subs = new String[0]; Arrays.sort(subs); // make sure that if a config file exists, it is first on the list for (int i=0; i<subs.length; i++) { if (subs[i].endsWith(".bioformats") && i != 0) { String tmp = subs[0]; subs[0] = subs[i]; subs[i] = tmp; break; } } if (subs == null) { LogTools.println("Invalid directory: " + root); return; } ImageReader ir = new ImageReader(); Vector similarFiles = new Vector(); for (int i=0; i<subs.length; i++) { LogTools.println("Checking file " + subs[i]); subs[i] = new Location(root, subs[i]).getAbsolutePath(); if (isBadFile(subs[i]) || similarFiles.contains(subs[i])) { LogTools.println(subs[i] + " is a bad file"); String[] matching = new FilePattern(subs[i]).getFiles(); for (int j=0; j<matching.length; j++) { similarFiles.add(new Location(root, matching[j]).getAbsolutePath()); } continue; } Location file = new Location(subs[i]); if (file.isDirectory()) getFiles(subs[i], files); else if (file.getName().equals(".bioformats")) { // special config file for the test suite configFiles.add(file.getAbsolutePath()); } else { if (ir.isThisType(subs[i])) { LogTools.println("Adding " + subs[i]); files.add(file.getAbsolutePath()); } else LogTools.println(subs[i] + " has invalid type"); } file = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generateFileList() {\r\n \r\n for (FileSet fileSet : cmtFileSetList) {\r\n DirectoryScanner dirScanner = fileSet.getDirectoryScanner();\r\n dirScanner.scan();\r\n String[] filelist = dirScanner.getIncludedFiles();\r\n String lineSeparator = Sys...
[ "0.6359392", "0.6210571", "0.61321604", "0.6079699", "0.60323364", "0.601823", "0.59447086", "0.59254074", "0.5846408", "0.5806602", "0.57957554", "0.5781735", "0.5721054", "0.5612527", "0.5608012", "0.5606742", "0.55880076", "0.5582889", "0.55784136", "0.5571612", "0.5557624...
0.6020108
5
Determines if the given file is "bad" (bad files are not tested).
private static boolean isBadFile(String file) { for (int i=0; i<configFiles.size(); i++) { try { String s = (String) configFiles.get(i); if (!config.isParsed(s)) { config.addFile(s); } } catch (IOException exc) { LogTools.trace(exc); } } return !config.testFile(file) && !file.endsWith(".bioformats"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void invalidFileTest() {\n\t\t// Test error handling: invalid file\n\t\tfileName = \"invalid.txt\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\t// Test error handling: invalid file\n\t\tfileName = \"./misc/secondinvalid.txt\";\n\t\tactual = Helper.isValidFil...
[ "0.68585986", "0.68383515", "0.68334305", "0.67209303", "0.6669705", "0.6612015", "0.6558543", "0.6437392", "0.63469595", "0.6319177", "0.6295687", "0.6234895", "0.62336916", "0.61648047", "0.6139472", "0.61358494", "0.6110964", "0.60738873", "0.6063212", "0.60411644", "0.602...
0.7603215
0
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc = new Scanner(System.in); // int arr[]=new int[10]; // int odd[]=new int[10]; // int even[]=new int[10]; // int e=0,o=0; // System.out.println("enter total number"); // int n =sc.nextInt(); // System.out.println("enter array"); // for(int i=0;i<n;i++) // arr[i]=sc.nextInt(); // for(int var:arr) // { // if(var%2==0) // { // even[e]=var; // e++; // } // else // { // odd[o]=var; // o++; // } // } // System.out.println("even array"); // for(int var:even) // System.out.println(var); // System.out.println("odd array"); // for(int var:odd) // System.out.println(var); // // int arr[]=new int[5]; // int rev[]=new int [5]; // for(int i=0;i<5;i++) // arr[i]=sc.nextInt(); // int j=5; // for(int i=0;i<5;i++) // rev[i]=arr[--j]; // System.out.println("given array"); // for(int var:arr) // System.out.println(var); // System.out.println("reverse array"); // for(int var:rev) // System.out.println(var); // for(int i=1;i<6;i++) // { // for(int j=1;j<=i;j++) // System.out.print(i); // System.out.println(); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Return the list of property names.
public Map<String, Object> getTypeDefProperties() { if (typeDefProperties == null) { return null; } else if (typeDefProperties.isEmpty()) { return null; } else { return new HashMap<>(typeDefProperties); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getPropertyNames();", "@Override\n public String[] getPropertyNames() {\n final String[] names = new String[this.properties.size()];\n this.properties.keySet().toArray(names);\n return names;\n }", "public String[] getPropertyNames()\n\t{\n\t\treturn _propertyNames;\n...
[ "0.86516935", "0.8547107", "0.85068405", "0.8363414", "0.8285723", "0.82384443", "0.78645825", "0.78547317", "0.779694", "0.76242816", "0.7610533", "0.75976765", "0.74918544", "0.72689235", "0.72570145", "0.72068894", "0.719319", "0.7085782", "0.70228696", "0.7008102", "0.693...
0.0
-1
Set up the list of property names.
public void setTypeDefProperties(Map<String, Object> typeDefProperties) { this.typeDefProperties = typeDefProperties; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPropNames(ArrayList<String> props)\n {\n this.prop_names = props;\n fireTableDataChanged();\n }", "protected final void addPropNames(String ... theNames) { Collections.addAll(getPropertyNames(), theNames); }", "public void setProperties(String prefix, Properties setList);", ...
[ "0.70904684", "0.69476867", "0.64889926", "0.6407308", "0.62123317", "0.61921257", "0.61724377", "0.6170876", "0.61554015", "0.6063915", "0.60191315", "0.60107", "0.59390205", "0.593549", "0.5934611", "0.5767028", "0.5747334", "0.5739407", "0.57322574", "0.57226455", "0.56780...
0.0
-1
Validate that an object is equal depending on their stored values.
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } TypeDefProperties that = (TypeDefProperties) objectToCompare; return Objects.equals(typeDefProperties, that.typeDefProperties); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canEqual(Object obj);", "public void testEqualsObject() {\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.0\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.1\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure...
[ "0.727811", "0.7068401", "0.6955389", "0.68842167", "0.6832484", "0.6629597", "0.6586948", "0.65793437", "0.6575426", "0.6517404", "0.6397365", "0.6380287", "0.63767", "0.6365189", "0.63631916", "0.63558364", "0.63371146", "0.6330396", "0.63248724", "0.6323997", "0.63226235",...
0.0
-1
Return a hash code based on the values of this object.
@Override public int hashCode() { return Objects.hash(typeDefProperties); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int hashcode();", "@Override\n public int hashCode() {\n return Objects.hash(this.getValue());\n }", "public int hashCode() {\n\t\tlong code = 0;\n\t\tint elements = _rowCount * _columnCount;\n\n\t\tfor (int i = 0; i < elements; i++) {\n\t\t\tcode += _value[i];\n\t\t}\n\n\t\treturn (int) co...
[ "0.7575641", "0.7570167", "0.7515502", "0.7433859", "0.7403694", "0.7398079", "0.737048", "0.735049", "0.73484254", "0.73451877", "0.7301309", "0.7301309", "0.7301309", "0.7301309", "0.72865033", "0.7285119", "0.7263762", "0.72512", "0.7247921", "0.7240976", "0.72294265", "...
0.0
-1
whatever you do, don't pass a PuzzledController to these static methods; else JUnit testing will require a full UI! applyChanges: determines if the relationships found should be applied or invisible
public static void process(LogicProblem logicProblem, boolean applyChanges) { // System.out.println("process invoked "+automaticProcessingMenuItem.isSelected()); // IntegerProperty newlyDiscoveredRelationships = controller.pendingRelationshipsCounterProperty(); // boolean automaticProcessing = controller.getAutomaticProcessing(); // System.out.println("entering processing loop"); while (logicProblem.isLogicDirty()){ // System.out.println("executing processingFlag loop"); logicProblem.setDirtyLogic(false); //re-process SPECIAL clues (with streams and filters maybe?) try { // System.out.println("\t cross -> "+ logicProblem.isLogicDirty()); Processor.cross(logicProblem, applyChanges); // System.out.println("\t unique -> "+ logicProblem.isLogicDirty()); Processor.uniqueness(logicProblem, applyChanges); // System.out.println("\t transpose -> "+ logicProblem.isLogicDirty()); Processor.transpose(logicProblem, applyChanges); Processor.pseudoTrueTuples(logicProblem, applyChanges); if (logicProblem.getNumItems() >3) // System.out.println("\t commonality -> "+ logicProblem.isLogicDirty()); Processor.commonality(logicProblem, applyChanges); } catch (RelationshipConflictException e) { // controller.notify(PuzzledController.WarningType.WARNING, e.toString()); } // System.out.println("now what? -> "+ logicProblem.isLogicDirty()); } // System.out.println("exiting processing loop"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean testChanges(boolean testRepository) {\r\n\t\t\r\n\t\tif (testRepository) {\r\n\t\t\t\r\n\t\t\tString status = \"Status: [ACTION - Testing Repository Changes]...\";\r\n\t\t\t\r\n\t\t\t// test changes in repository for clashes etc.\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tboolean testSuccess = tr...
[ "0.5633028", "0.55756056", "0.54302055", "0.54094625", "0.5350545", "0.52887625", "0.52711684", "0.5230132", "0.5209745", "0.5187881", "0.51842034", "0.51841605", "0.51678604", "0.5137979", "0.51214063", "0.50986", "0.50940233", "0.507303", "0.5060271", "0.5051031", "0.503928...
0.5481238
2
public for JUnit this static method resolves the rest of a subrow and rest of subcolumn (within a subgrid) when a relationship between two items is set to VALUE_YES
public static void cross(LogicProblem logicProblem, boolean applyChanges) throws RelationshipConflictException { // System.out.println("cross invoked"); HashMap<ItemPair,Relationship> relationshipTable = logicProblem.getRelationshipTable(); HashSet<CategoryPair> categoryPairs = logicProblem.getCategoryPairs(); for (CategoryPair categoryPair : categoryPairs) { //for (Category cat1 : logicProblem.getCategories()){ // for (Category cat2 : logicProblem.getCategories()){ // if (cat1!=cat2) { Category cat1 = categoryPair.first(); Category cat2 = categoryPair.last(); //for (Category cat1 : logicProblem.getCategories()){ // for (Category cat2 : logicProblem.getCategories()){ // if (cat1!=cat2) { for (Item item1 : cat1.getItems()){ for (Item item2 : cat2.getItems()){ Relationship sourceRelationship = relationshipTable.get(new ItemPair(item1,item2)); if (sourceRelationship.getValue()==Relationship.ValueType.VALUE_YES) { // System.out.println("discovered VALUE_YES, setting up the cross"); for (Item itemA : cat1.getItems()){ if (itemA != item1) { Relationship rel = relationshipTable.get(new ItemPair(itemA,item2)); // could track superfluous and conflicts here if (rel.getValue() == Relationship.ValueType.VALUE_UNKNOWN) { Processor.setRelationship(logicProblem, applyChanges, rel, Relationship.ValueType.VALUE_NO, Relationship.LogicType.CROSS, sourceRelationship); // rel.setValue(Relationship.ValueType.VALUE_NO,Relationship.LogicType.CROSS,sourceRelationship); // System.out.println("created VALUE_NO relationship between "+itemA.getName()+" and "+item2.getName()+ " (CROSS)"); } } } for (Item itemB : cat2.getItems()){ if (itemB != item2) { Relationship rel = relationshipTable.get(new ItemPair(item1,itemB)); // could track superfluous and conflicts here if (rel.getValue() == Relationship.ValueType.VALUE_UNKNOWN) { Processor.setRelationship(logicProblem, applyChanges, rel, Relationship.ValueType.VALUE_NO, Relationship.LogicType.CROSS, sourceRelationship); // rel.setValue(Relationship.ValueType.VALUE_NO,Relationship.LogicType.CROSS,sourceRelationship); // System.out.println("created VALUE_NO relationship between "+item1.getName()+" and "+itemB.getName()+ " (CROSS)"); } } } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testEditBooleanCellWithOtherColumnOnSameFeatureName() throws Exception {\n final UITableRepresentation table = localSession.getLocalSessionBrowser().perCategory().selectViewpoint(\"read_only_column\").selectRepresentation(\"read_only_column\")\n .selectRepresentationInstance(\"new...
[ "0.59126115", "0.5646933", "0.56168556", "0.52477276", "0.520004", "0.5192894", "0.50469553", "0.5027326", "0.48881564", "0.48722255", "0.4831146", "0.4813216", "0.47680452", "0.47457436", "0.47308594", "0.47246438", "0.470276", "0.46942836", "0.46927664", "0.46856344", "0.46...
0.0
-1
inspired from Puzzle Baron's pseudotrue pairs, extended tontuples
public static void pseudoTrueTuples(LogicProblem logicProblem, boolean applyChanges) throws RelationshipConflictException { HashMap<ItemPair,Relationship> relationshipTable = logicProblem.getRelationshipTable(); HashSet<CategoryPair> categoryPairs = logicProblem.getCategoryPairs(); // System.out.println("searching..."); //within a subgrid for (CategoryPair categoryPair : categoryPairs) { // System.out.println("Category pair:" + categoryPair); //vertical and horizontal search for (final boolean verticalOrientation : new boolean[] { false, true } ) { Category subrowCategory = verticalOrientation?categoryPair.first():categoryPair.last(); Category subcolumnCategory = verticalOrientation?categoryPair.last():categoryPair.first(); //commenting "vertical search" //(subrows match first category's items // subcolumns match second category's items) //i (2 to floor(n/2)) is the number of elements in the combination tuple // i=2 in pseudoTrue pairs //(for subgrids of 5x5 items, looking for both pairs and triplets becomes redundant for (int i=2; i<=floor(logicProblem.getNumCategories()/2);i++) { //https://github.com/dpaukov/combinatoricslib3/wiki/v3.3.0#1-simple-combinations List<List<Item>> columnCombinations = Generator.combination(subcolumnCategory.getItems()) .simple(i) //for pseudo true pairs, i=2 .stream() .collect(Collectors.<List<Item>>toList()); //for i=2, this would contain //Bethany, Donovan //Bethany, Elizabeth //... //Frederick, Peyton // columnCombinations.stream().forEach(l -> System.out.println( // (verticalOrientation?"vertical":"horizontal")+ " combo: "+l.toString())); //create the sets //for each combination, start over //columnTuple contains i items with which we will compute set intersections for (List<Item> columnItemTuple : columnCombinations) { //Bethany, Donovan //similarly, valueNoSets contains i sets of VALUE_NO relationships List<Set<Item>> valueNoSets = new ArrayList<>(); //size=i //build a set for each i item of columnTuple for (Item columnItem : columnItemTuple) { //Bethany Set<Item> valueNoSet = new HashSet<>(); //size = n for (Item rowItem : subrowCategory.getItems()) { //Haley's Comet .... if (relationshipTable.get(new ItemPair(rowItem, columnItem)).getValue() == Relationship.ValueType.VALUE_NO) //stacking all VALUE_NO relationship into vertical set valueNoSet.add(rowItem); //store into single subcolumn set } //adding each vertical set into list of sets if (valueNoSet.size() >= logicProblem.getNumItems() - i //for pairs, we need three VALUE_NO in the set && valueNoSet.size() < logicProblem.getNumItems()-1) //uniqueness will take or n-1 cases valueNoSets.add(valueNoSet); //store single subcolumn into multi-set } //magic! Set<Item> intersectionSet = new HashSet<>(); //avoid NPE when the next call is made if (valueNoSets.size()>=2) //don't compute intersections otherwise intersectionSet = Processor.multiSetIntersection(valueNoSets); if (intersectionSet.size()==logicProblem.getNumItems()-i) { // System.out.println("----> found candidates for pseudo true pairs!"); // intersectionSet.stream().forEach(l -> System.out.println("\t" + l.toString())); // System.out.println("\t\tvs."); // columnItemTuple.stream().forEach(l -> System.out.println("\t" + l.toString())); //create predecessor list //we can only add the intersection output as predecessors ArrayList<Dependable> predecessors = new ArrayList<Dependable>(); for (Item intersectionColumn : intersectionSet) { for (Item rowItem : columnItemTuple) { predecessors.add(relationshipTable.get(new ItemPair(rowItem, intersectionColumn))); } } //we have a bunch of work to do for (Item everyRowItem : subrowCategory.getItems()) { //for every row item not in the intersectionSet if (!intersectionSet.contains(everyRowItem)) { for (Item everyColumnItem : subcolumnCategory.getItems()) { //for every column item not in any of the columnTuple list if (!columnItemTuple.contains(everyColumnItem)) { Relationship rel = relationshipTable.get(new ItemPair(everyRowItem,everyColumnItem)); if (rel.getValue()!=Relationship.ValueType.VALUE_NO) Processor.setRelationship(logicProblem, applyChanges, rel, Relationship.ValueType.VALUE_NO, Relationship.LogicType.PSEUDOTRUE, predecessors.toArray(new Relationship[predecessors.size()])); } } } } } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasXYPairs();", "private void generatePointPairs() {\n\t\tfinal int mod = SIZE_OF_ORIGINAL_LIST * 8; \n\t\t\n\t\tif(DEBUG) System.out.println(\"----- Generating Point Pairs...\");\n\n\t\tint counter = 0;\n\t\tint j = 0;\n\t\t\n\t\tfor(int i = 0; i < myPoints.length; i++) {\n\t\t\t//while(j++ < myPoints.l...
[ "0.59218436", "0.5711675", "0.5658044", "0.5462937", "0.529284", "0.52765054", "0.525269", "0.5244707", "0.5240174", "0.5184679", "0.51778686", "0.51622355", "0.51606816", "0.5098146", "0.5094686", "0.50823903", "0.50761324", "0.5051328", "0.5046543", "0.5044224", "0.50048196...
0.5706183
2
create a deep copy of one (in case you don't wish to modify it)
private static Set<Item> multiSetIntersection(List<Set<Item>> setList) { Set<Item> interQrels = new HashSet<>(setList.get(0)); for (int i = 1; i< setList.size();i++) { interQrels.retainAll(setList.get(i)); // intersection with two (and one) } return interQrels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Prototype makeCopy();", "Object clone();", "Object clone();", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n ...
[ "0.77129203", "0.74092895", "0.74092895", "0.7211412", "0.7064742", "0.7044601", "0.7032211", "0.6989071", "0.6989071", "0.6989071", "0.6989071", "0.69870275", "0.69786537", "0.6948633", "0.69268477", "0.69249874", "0.6910445", "0.6866878", "0.68370473", "0.6833446", "0.68284...
0.0
-1
get notification list of a user
public List<Notification> getNotifications(Long userId) { return notificationDao.findNotificationsOfUser(userId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Notification> getNotificationList(int idUser) {\n\t\treturn dao.getNotificationList(idUser);\n\t}", "@Override\n\tpublic List<Notifications> getNotifications(String username) {\n\t\treturn mobileDao.getNotifications(username);\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Not...
[ "0.83482605", "0.7645144", "0.7543326", "0.75283366", "0.7455713", "0.71166056", "0.6998543", "0.69447243", "0.69232994", "0.6833496", "0.6832332", "0.6795703", "0.6757781", "0.6708297", "0.6689057", "0.6683438", "0.66134626", "0.65982795", "0.6559574", "0.6545589", "0.653875...
0.7377069
5
return unread notification count of user
public Integer getNotificationCount(Long userId) { if (unreadNotifications.containsKey(userId)) { return unreadNotifications.get(userId); } else { Integer count = notificationDao.countUnreadNotifications(userId); unreadNotifications.put(userId, count); return count; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getUnreadChatMessageCount();", "public int getUnreadMessagesCount() {\n if (pendingIncomingMessages != null){\n\n /*\n * Return the size of the cache\n */\n return pendingIncomingMessages.size();\n\n }\n\n /*\n * Empty cache re...
[ "0.7596828", "0.7236466", "0.714362", "0.7103012", "0.70757914", "0.70456034", "0.6977748", "0.6904874", "0.68958765", "0.67202336", "0.6673946", "0.66682327", "0.66682327", "0.6620299", "0.6597305", "0.6597305", "0.6597305", "0.659239", "0.6573197", "0.65565944", "0.6546179"...
0.76739013
0
clear read notifications from unread notifications
public void markTaskNotificationsRead(final Long userId, final Long taskId) { taskExecutor.execute(new AsyncWebTask(notificationDao.getSessionFactory()) { public void runInBackground() { Integer updatedRows = notificationDao.markNotificationsAsReadByTask(getSession(), userId, taskId); updateNotificationMapIfUserExists(userId, -updatedRows); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void clearPersistentNotifications();", "void clearNotifications() throws NoUserSelectedException;", "public void clearUnreadMessageNumber() {\n this.mUnreadMessageNum = 0;\n }", "void clearAllNotifications(long timeout);", "public void reset() {\n Log.i(TAG, \"Clearing everything f...
[ "0.746443", "0.713069", "0.64353263", "0.6403689", "0.6378826", "0.6322359", "0.6282721", "0.6229009", "0.6213452", "0.6209006", "0.6184099", "0.6175767", "0.6156949", "0.6152816", "0.6139053", "0.61064285", "0.6059155", "0.5952757", "0.59354544", "0.5926811", "0.59122956", ...
0.0
-1
send a notification to members of a community if a task is created in a community
public void sendTaskCreatedInFollowedCommunityNotification(final Long communityId, final Long taskId) { taskExecutor.execute(new AsyncWebTask(notificationDao.getSessionFactory()) { public void runInBackground() { Community community = (Community) getSession().get(Community.class, communityId); Task task = (Task) getSession().get(Task.class, taskId); User source = task.getOwner(); for (User user : community.getMembers()) { if (!user.equals(source)) { Notification notification = new Notification(); notification.setTask(task); notification.setCommunity(community); notification.setReceiver(user); notification.setSource(source); notification.setType(NotificationType.TASK_CREATED_IN_FOLLOWED_COMMUNITY); notificationDao.saveNotification(getSession(), notification); updateNotificationMapIfUserExists(user.getId(), 1); } } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void notifyMessage(Task task);", "public void notifyResponsibleAssigned(SBuildType sBuildType, Set<SUser> sUsers) {\n\t}", "private void sendNotification() {\n ParsePush parsePush = new ParsePush();\n String id = ParseInstallation.getCurrentInstallation().getInstallationId();\n Log.d(\"Deb...
[ "0.55717665", "0.5557737", "0.5547974", "0.54825944", "0.5460827", "0.5405898", "0.539794", "0.53574187", "0.5347485", "0.5307052", "0.52397984", "0.5204557", "0.5186945", "0.5176824", "0.51744676", "0.51594126", "0.51312727", "0.5115834", "0.50968903", "0.50728333", "0.50591...
0.7281182
0
send a notification to user if his task is replied
public void sendTaskRepliedNotification(final Long taskId, final Long replier) { taskExecutor.execute(new AsyncWebTask(notificationDao.getSessionFactory()) { public void runInBackground() { Task task = (Task) getSession().get(Task.class, taskId); User source = (User) getSession().get(User.class, replier); List<User> followers = task.getFollowers(); for (User follower : followers) { if (!follower.equals(source)) { Notification notification = new Notification(); notification.setTask(task); notification.setReceiver(follower); notification.setSource(source); notification.setType(NotificationType.TASK_REPLY); notificationDao.saveNotification(getSession(), notification); updateNotificationMapIfUserExists(follower.getId(), 1); } } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void notifyMessage(Task task);", "private void sendNotification() {\n }", "public void notify(String userId);", "protected void notifyUser()\n {\n }", "private void notifyUser(List<String> result) {\r\n\t\t\tif(Util.getProperty(getApplicationContext(),\"notificationTimeChanged\",\"\").equals(\"tru...
[ "0.70025504", "0.68620926", "0.6626699", "0.65945905", "0.65828395", "0.65578276", "0.64492726", "0.63175297", "0.62803704", "0.62533283", "0.62347144", "0.622759", "0.6182792", "0.6179266", "0.6149856", "0.61452794", "0.6093539", "0.6068267", "0.60050964", "0.59983456", "0.5...
0.73271453
0
send a notification to user if his task is voted
public void sendTaskVoteNotification(final Long taskId, final Long voterUserId, final RateDirection direction) { taskExecutor.execute(new AsyncWebTask(notificationDao.getSessionFactory()) { public void runInBackground() { Task task = (Task) getSession().get(Task.class, taskId); User source = (User) getSession().get(User.class, voterUserId); User receiver = task.getOwner(); Notification notification = new Notification(); notification.setTask(task); notification.setReceiver(receiver); notification.setSource(source); if (direction == RateDirection.UP) { notification.setType(NotificationType.TASK_UPVOTE); } else { notification.setType(NotificationType.TASK_DOWNVOTE); } notificationDao.saveNotification(getSession(), notification); updateNotificationMapIfUserExists(receiver.getId(), 1); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void doVote() {\n }", "void votedOnPoll(String pollId);", "public void sendVoteNotification() {\n\t\t\t\t\tWorld.sendWorldMessage(\"<img=5>[Vote Feed]: colorhere\" + getDisplayName() + \" </col>voted for\" + \n\t\t\t\t\t\t\t\t\t\t\t\"colorhere \"+ voteDisplayAmount +\" Vote Tickets!</col> \"\n...
[ "0.7041805", "0.6754681", "0.6596303", "0.653524", "0.6512366", "0.6218454", "0.60205865", "0.5983914", "0.59691566", "0.5906979", "0.58918095", "0.5887731", "0.5840076", "0.5724188", "0.5714541", "0.56675136", "0.56092435", "0.5594648", "0.55820197", "0.55443686", "0.5532039...
0.7005389
1
update a notification of a vote to it is chnged.
public void updateTaskVoteNotification(final Long taskId, final Long voterUserId, final RateDirection direction) { taskExecutor.execute(new AsyncWebTask(notificationDao.getSessionFactory()) { public void runInBackground() { NotificationType previousNotificationType; NotificationType newNotificationType; Task task = (Task) getSession().get(Task.class, taskId); User source = (User) getSession().get(User.class, voterUserId); User receiver = task.getOwner(); if (direction == RateDirection.UP) { previousNotificationType = NotificationType.TASK_DOWNVOTE; newNotificationType = NotificationType.TASK_UPVOTE; } else { previousNotificationType = NotificationType.TASK_UPVOTE; newNotificationType = NotificationType.TASK_DOWNVOTE; } Notification notification = notificationDao.findNotification(getSession(), receiver.getId(), source.getId(), task.getId(), previousNotificationType); if (notification != null) { notification.setType(newNotificationType); notificationDao.updateNotification(getSession(), notification); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendVoteNotification() {\n\t\t\t\t\tWorld.sendWorldMessage(\"<img=5>[Vote Feed]: colorhere\" + getDisplayName() + \" </col>voted for\" + \n\t\t\t\t\t\t\t\t\t\t\t\"colorhere \"+ voteDisplayAmount +\" Vote Tickets!</col> \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"World votes are now at colorhere\"+ WorldVote.getV...
[ "0.6729446", "0.66118634", "0.64039373", "0.63440824", "0.629509", "0.6212298", "0.6066588", "0.5976763", "0.5958905", "0.59306324", "0.5918644", "0.5912875", "0.58426994", "0.5839498", "0.58105767", "0.57508373", "0.5723594", "0.5690087", "0.56623644", "0.56607914", "0.56583...
0.6349929
3
if a vote is deleted its notifications cleared.
public void deleteTaskVoteNotification(final Long taskId, final Long receiverId, final Long voterUserId) { taskExecutor.execute(new AsyncWebTask(notificationDao.getSessionFactory()) { public void runInBackground() { User source = (User) getSession().get(User.class, voterUserId); User receiver = (User) getSession().get(User.class, receiverId); Notification notification = notificationDao.findTaskVoteNotification(getSession(), receiver.getId(), source.getId(), taskId); if (notification != null) { if (notification.getIsRead() == Boolean.FALSE) { updateNotificationMapIfUserExists(receiver.getId(), -1); } notificationDao.deleteWithSession(getSession(), notification); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void clearPersistentNotifications();", "@Override\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }", "@Override\r\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }", "@Override\r\n public void ...
[ "0.6255471", "0.6157376", "0.61561626", "0.61561626", "0.6099003", "0.608396", "0.6079309", "0.60746676", "0.60720897", "0.60527277", "0.604733", "0.60445374", "0.59984183", "0.59528315", "0.59459025", "0.5943144", "0.5937373", "0.5928457", "0.59109855", "0.5897807", "0.58630...
0.59666777
13
remove notifications of a task
public void removeTaskNotifications(Task task) { notificationDao.deleteTaskNotifications(task); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeOldNotification();", "void removeSubTask(AuctionTask task);", "void remove(final Task task);", "public void removeTasks() {\n\t\t\r\n\t}", "void clearPersistentNotifications();", "public void removeTask(Task task) {\n tasks.remove(task);\n }", "public void removeTask(ToDoTask t) {\...
[ "0.73475397", "0.7016348", "0.7008957", "0.6918464", "0.665085", "0.65593445", "0.65231204", "0.65218776", "0.6518856", "0.6492169", "0.6477114", "0.64341307", "0.6380103", "0.6373439", "0.6355919", "0.6349494", "0.6317104", "0.6243659", "0.62237054", "0.6197098", "0.6186268"...
0.81045884
0
remove notifications of a community
public void removeCommunityNotifications(Community community) { notificationDao.deleteCommunityNotifications(community); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeOldNotification();", "public static void removeAll() {\n\t\t\n\t\tif(notificationsView != null) {\n\t\t\tComponent[] notifications = notificationsView.getComponents();\n\t\t\tfor(Component notification : notifications) {\n\t\t\t\tNotification n = (Notification) notification;\n\t\t\t\tif(n.expireOnDisc...
[ "0.6952501", "0.6483498", "0.6042083", "0.58931136", "0.58620614", "0.584037", "0.58393204", "0.5834166", "0.57918245", "0.5773622", "0.5762781", "0.5737865", "0.57319546", "0.5695354", "0.5682399", "0.5649944", "0.56093913", "0.56021154", "0.55903906", "0.5584351", "0.556870...
0.7504805
0
/ Getting all Items from tSable
public Map<Integer, Item> getAllItems() { return hashOperations.entries(KEY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Item> getAll()\r\n {\r\n\r\n CriteriaQuery<Item> criteria = this.entityManager\r\n .getCriteriaBuilder().createQuery(Item.class);\r\n return this.entityManager.createQuery(\r\n criteria.select(criteria.from(Item.class))).getResultList();\r\n }", "List<Item> getItem...
[ "0.7159937", "0.7131398", "0.7107469", "0.7092039", "0.6987231", "0.68986124", "0.6833956", "0.68199784", "0.68034476", "0.6797351", "0.67345583", "0.6713776", "0.66481274", "0.6639784", "0.660162", "0.65985477", "0.6571686", "0.656601", "0.6524771", "0.65108687", "0.64985883...
0.0
-1
/ Getting a specific item by item id from table
public Item getItem(int itemId) { return (Item) hashOperations.get(KEY, itemId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Item getItemById(Integer itemId);", "Item findById(String id);", "public Item getItem(long idItem) throws ItemNotFound;", "@Override\n public Item get(long idItem) throws EntityNotFound;", "public Items findByPrimaryKey(int id) throws ItemsDaoException;", "HpItemParamItem selectByPrimaryKey(Lon...
[ "0.80300176", "0.7970908", "0.7761367", "0.767489", "0.7530262", "0.7502552", "0.7500021", "0.73951024", "0.7340288", "0.7316612", "0.7274955", "0.7262137", "0.72433895", "0.72394854", "0.7152197", "0.71133465", "0.71025187", "0.71025187", "0.7091309", "0.7062962", "0.7058320...
0.67137665
42
/ Adding an item into redis database
public void addItem(Item item) { hashOperations.put(KEY, item.getId(), item); //valueOperations.set(KEY + item.getId(), item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long sadd(String key,String value){\n Jedis jedis = null;\n try{\n jedis = pool.getResource();\n return jedis.sadd(key,value);\n } catch (Exception e){\n logger.error(\"发生异常:\"+e.getMessage());\n } finally {\n jedis.close();\n }\...
[ "0.6590177", "0.64269257", "0.6357423", "0.6355911", "0.63151866", "0.62806743", "0.6252303", "0.6088382", "0.606303", "0.6053945", "0.60535", "0.6018624", "0.5999505", "0.59804046", "0.5960055", "0.59584546", "0.5877415", "0.58711827", "0.58711827", "0.5807746", "0.58007675"...
0.63956153
2
/ delete an item from database
public void deleteItem(int id) { hashOperations.delete(KEY, id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteItem()\n {\n Category categoryToDelete = dataCategories.get(dataCategories.size()-1);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n db.categoryDao().delete(catego...
[ "0.7779028", "0.77166045", "0.765294", "0.76124865", "0.7554523", "0.7523493", "0.7496967", "0.7415026", "0.7414885", "0.7331858", "0.7277538", "0.72748405", "0.72707194", "0.72497386", "0.7242219", "0.7198033", "0.7196517", "0.71912163", "0.7188885", "0.7174748", "0.7156807"...
0.0
-1
/ update an item from database
public void updateItem(Item item) { addItem(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Item update(Item item);", "protected void update(T item) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\t\t\tsession.update(item);\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error...
[ "0.78995985", "0.76026505", "0.7378573", "0.7370288", "0.7342458", "0.73356533", "0.7305846", "0.7265509", "0.7184373", "0.7184373", "0.71804607", "0.6993685", "0.6963715", "0.6962463", "0.6937777", "0.6932294", "0.6930837", "0.69272614", "0.6919388", "0.69093996", "0.6905854...
0.0
-1
creates an instance of a deck of playing cards
public void createDeck() { // for loop that repeats 4 times - one for each suit for (String suit : suits) { // for loop that repeats 13 times (2-14) - once for each value for (int i = 2; i < 15; i++) { //create instance of new card createCard(value, name); Card card = new Card(i, suit); //add card to deck array addCardToDeck(card); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create...
[ "0.77216816", "0.76789355", "0.76022303", "0.75614244", "0.7525682", "0.7522709", "0.75166184", "0.7495423", "0.746498", "0.74517924", "0.74451977", "0.7404817", "0.7404459", "0.7323289", "0.73183024", "0.7288642", "0.728217", "0.726041", "0.7231275", "0.7185529", "0.71800476...
0.747407
8
Adds a card to the deck
private void addCardToDeck(Card card) { deck.add(card); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCard(Card card) {\n this.deck.push(card);\n }", "public void add(Card card) {\n this.cards.add(card);\n }", "public void addToDeck(Card card) {\n\t\tcards.add(card);\n\t}", "public void addCard(Deck deck, Card card) {\n deck.cards.add(card);\n }", "public void addCard...
[ "0.8856406", "0.8560675", "0.8529624", "0.849869", "0.8476446", "0.84449834", "0.84014904", "0.82833856", "0.8255794", "0.82271767", "0.8173699", "0.8128462", "0.81197304", "0.81081", "0.80929065", "0.8085756", "0.7983887", "0.7977768", "0.7960895", "0.79295725", "0.79035956"...
0.86214083
1
return the first (top) card to whoever drew it
public Card draw() { Card topCard = deck.get(0); deck.remove(0); return topCard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public Card getTopCard() {\r\n\t\tthis.sort();\r\n\t\treturn this.getCard(2); //Center card will always be part of quad after sorting, so has to be highest card\r\n\t}", "public Card drawCardFromTop() {\n Card temp = this.cards [this.topCa...
[ "0.7674718", "0.75212044", "0.75083697", "0.734372", "0.7335476", "0.7319658", "0.7213147", "0.7207829", "0.71750003", "0.7168074", "0.7116564", "0.7066478", "0.70524395", "0.70011413", "0.6967423", "0.6952317", "0.6901841", "0.68441325", "0.6830491", "0.6812834", "0.67007244...
0.6123984
60
TODO Autogenerated method stub
public static void main(String[] args) { int row, col; Scanner s = new Scanner(System.in); System.out.println("Enter number of rows for matrix: "); row = s.nextInt(); System.out.println("Enter number of columns for matrix: "); col = s.nextInt(); int[][] mat1 = new int[row][col]; System.out.println("Enter the elements"); for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { System.out.println("Enter [" + i + "][" + j + "] : "); mat1[i][j] = s.nextInt(); } } int[][] mat2 = new int[row][col]; System.out.println("Enter the elements"); for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { System.out.println("Enter [" + i + "][" + j + "] : "); mat2[i][j] = s.nextInt(); } } int[][] res = new int[row][col]; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { res[i][j] = mat1[i][j] + mat2[i][j]; } } System.out.println("The result of matrix addition is"); for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { System.out.print(res[i][j]+ " "); } System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Creates and starts the dev mode handler if none has been started yet.
public ViteHandler(Lookup lookup, int runningPort, File npmFolder, CompletableFuture<Void> waitFor) { super(lookup, runningPort, npmFolder, waitFor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void start() {\n\t\t\n\t\t_mode.init();\n\t\t\n\t\t_mode.start();\n\t}", "public static void start() {\n final Context appContext = ContextUtils.getApplicationContext();\n tryObtainingDataDirLock(appContext);\n // We must post to the UI thread to cover the case that the u...
[ "0.6037319", "0.5872171", "0.56782085", "0.56493306", "0.5614712", "0.55579126", "0.5554702", "0.5496359", "0.549542", "0.54908496", "0.5453966", "0.5418768", "0.5390908", "0.53599286", "0.53469175", "0.5346197", "0.5321708", "0.5315595", "0.531398", "0.5297808", "0.52952766"...
0.0
-1
Vite fails if the config is invalid, then the process exists Otherwise, errors are reported later on.
@Override protected Pattern getServerFailurePattern() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConfigProcessNameAlreadyDefinedException()\n {\n }", "public InvalidProcessException() {}", "@Test\r\n @Deployment\r\n public void testUncaughtErrorSimpleProcess() {\n assertThatThrownBy(() -> runtimeService.startProcessInstanceByKey(\"process\"))\r\n .isInstanceOf(ProcessEngineException...
[ "0.535685", "0.5315737", "0.52405196", "0.519605", "0.51775694", "0.5162179", "0.49633944", "0.4918285", "0.49018458", "0.48983583", "0.4888911", "0.48709866", "0.48674166", "0.48552883", "0.47741416", "0.4752537", "0.4750992", "0.47505873", "0.47301477", "0.4721996", "0.4700...
0.0
-1
Test Somatic vs Germline: Check HGVS notation "c."
@Test public void test_04() { Gpr.debug("Test"); String file = "tests/integration/cancer/test_04.vcf"; snpEffectCancer(file, null, "testHg19Chr22", false, "p.Gln133Leu", "c.398A>T", "A-T", null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test_06_hgvs_upstream_negative_strand() {\n Log.debug(\"Test\");\n List<VcfEntry> list = snpEffect(\"testHg38Chr1\", path(\"hgvs_upstream_negative_strand_06.vcf\"), null);\n checkHgvscForTr(list, \"NM_016176.3\");\n }", "@Test\n public void testRedundant2version(...
[ "0.6241098", "0.59685695", "0.59477764", "0.5727086", "0.56121284", "0.561119", "0.5581908", "0.5581168", "0.55785465", "0.5541242", "0.5531691", "0.5506055", "0.5463151", "0.545307", "0.54402333", "0.541334", "0.540644", "0.54058665", "0.5397089", "0.5386392", "0.5371759", ...
0.0
-1
Created by hugui.hg on 12/27/15.
public interface SKey { String FAIL_STORE = "job.fail.store"; String LOADBALANCE = "loadbalance"; String EVENT_CENTER = "event.center"; String REMOTING = "lts.remoting"; String REMOTING_SERIALIZABLE_DFT = "lts.remoting.serializable.default"; String ZK_CLIENT_KEY = "zk.client"; String JOB_ID_GENERATOR = "id.generator"; String JOB_LOGGER = "job.logger"; String JOB_QUEUE = "job.queue"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public ...
[ "0.59490144", "0.5893819", "0.58854383", "0.58829224", "0.58181685", "0.579877", "0.5750512", "0.5740609", "0.5740609", "0.5720885", "0.5701596", "0.5685851", "0.5681141", "0.5677449", "0.56610286", "0.5658044", "0.56579137", "0.56542116", "0.56453836", "0.5605022", "0.559692...
0.0
-1
Only a file name not the URL. Files are to be located in the info folder.
public void showInfo(String fileName) { viewer.setUrl("info/"+fileName); center(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fileInfo(String info);", "String getFilename();", "String generalFileName(String url);", "String getFile();", "String getFile();", "String getFile();", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String getFilename();", "java.lang.String getFileName()...
[ "0.70880276", "0.6930734", "0.6878176", "0.6836302", "0.6836302", "0.6836302", "0.6796173", "0.6796173", "0.6775811", "0.6732459", "0.6732459", "0.6732459", "0.6732459", "0.6732459", "0.6732459", "0.6732459", "0.6732459", "0.6732459", "0.67318", "0.67318", "0.67318", "0.673...
0.0
-1
Creates new form ClientLoginView
public void ListenThread() { Thread t = new Thread(new IncomingReader(writer, reader)); t.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LoginFormView() {\n initComponents();\n }", "public LoginView() {\n initComponents();\n }", "private Widget createLoginPanel(final IViewContext<ICommonClientServiceAsync> viewContext)\n {\n DockPanel loginPanel = new DockPanel();\n // WORKAROUND The mechanism behind ...
[ "0.68321073", "0.67603785", "0.67497164", "0.6510605", "0.6401065", "0.63862985", "0.6350315", "0.6268261", "0.6198216", "0.6176934", "0.61596465", "0.6148478", "0.6079726", "0.60560167", "0.6055758", "0.6014805", "0.60110444", "0.6005343", "0.6004703", "0.59740216", "0.59549...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jPasswordField1 = new javax.swing.JPasswordField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setResizable(false); jButton1.setText("Sign In"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setText("Sign Up"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel1.setText("User Name"); jLabel2.setText("Pass word"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(55, 55, 55) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addGap(18, 18, 18) .addComponent(jTextField1)) .addGroup(layout.createSequentialGroup() .addComponent(jButton1) .addGap(91, 91, 91) .addComponent(jButton2)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel2) .addGap(21, 21, 21) .addComponent(jPasswordField1))) .addContainerGap(88, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(31, 31, 31) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(19, 19, 19) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2)) .addContainerGap(47, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7318655", "0.7289971", "0.7289971", "0.7289971", "0.72860885", "0.7247684", "0.7213551", "0.72080934", "0.7195069", "0.7189731", "0.7183451", "0.71579945", "0.7147311", "0.7092687", "0.70798934", "0.7055229", "0.69868284", "0.6976656", "0.6954658", "0.6952896", "0.69449455...
0.0
-1
user has been registered
public void UserHasBeenRegistered() { JOptionPane.showMessageDialog(new JFrame(), "User has been registered","", JOptionPane.INFORMATION_MESSAGE); NameTF.setText(""); SurnameTF.setText(""); UsernameTF.setText(""); PasswordTF.setText(""); EmailTF.setText(""); AddressTF.setText(""); CardNTF.setValue(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasRegisteredUser() {\n return registeredUser_ != null;\n }", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryServic...
[ "0.72347754", "0.70682025", "0.70304865", "0.6998683", "0.68097275", "0.67260796", "0.67260796", "0.67260796", "0.67260796", "0.67260796", "0.67260796", "0.67260796", "0.67145336", "0.6711625", "0.6673015", "0.665039", "0.66284853", "0.66202086", "0.66115624", "0.66101116", "...
0.667058
15
Method to get all process quality indicators or many process quality indicators filtered by processDocumentation
public GetProcessQualitiesQuery getProcessQualitiesQuery(final GetProcessQualitiesQuery query) { if (query.getProcessDocumentation() != null) { Translator .translateProcessQualities( processQualityRepository.findByProcessDocumentation( new ProcessDocumentationEntity(query.getProcessDocumentation())), query.getLanguage()) .ifPresent(query.getRead()::setData); return query; } Translator.translateProcessQualities(processQualityRepository.findAll(), query.getLanguage()) .ifPresent(query.getRead()::setData); return query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<ProcessReader> getProcesses();", "public Collection<IProcess> getProcess(String processName) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Object[]> getProcessDetail() {\n\t\ttry {\r\n\t\t\tlist = productionOrderProcessDao.getProcessDetail();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.e...
[ "0.545226", "0.5219416", "0.50527203", "0.49871767", "0.4986291", "0.49855196", "0.48375872", "0.48238724", "0.47938254", "0.47707912", "0.47327167", "0.47197288", "0.4708405", "0.4705847", "0.4701293", "0.46989882", "0.4678054", "0.46622238", "0.4638586", "0.4629722", "0.462...
0.5399973
1
Method to get a single process quality by id
public GetProcessQualityQuery getProcessQualityQuery(final GetProcessQualityQuery query) { processQualityRepository.findById(query.getId()).flatMap(ss -> Translator.translate(ss, query.getLanguage())) .ifPresent(query.getRead()::setData); return query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConProcess getById(int id) throws AppException;", "Optional<SrInwardTruckQualityCheck> get(Integer id);", "public Process getProcessById(\r\n final UUID processId) {\r\n\r\n final UUID locationId = UUID.fromString(\"93878975-88c5-4e6a-8abb-7ddd77a8a7d8\"); //$NON-NLS-1$\r\n final Ap...
[ "0.66140753", "0.6110878", "0.5943564", "0.5938577", "0.5772981", "0.5482574", "0.54232097", "0.5415164", "0.53867143", "0.5383599", "0.53738636", "0.5372281", "0.5366297", "0.53460294", "0.5339867", "0.5295785", "0.52559775", "0.5252849", "0.5252821", "0.5242126", "0.5230368...
0.5499888
5
Apply a method to the files under a given directory and perhaps its subdirectories.
public static void processPath(String pathStr, String suffix, boolean recursively, FileProcessor processor) { processPath(new File(pathStr), new ExtensionFileFilter(suffix, recursively), processor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void processDirectory(File directory) {\n FlatFileProcessor processor = new FlatFileProcessor(directory);\n processor.processDirectory();\n }", "public static void listOfFiles(File dirPath){\n\t\tFile filesList[] = dirPath.listFiles();\r\n \r\n\t\t// For loop on each item in a...
[ "0.6372764", "0.60083973", "0.59410805", "0.59352857", "0.5853527", "0.58209264", "0.57696533", "0.57290083", "0.5697922", "0.56820244", "0.56623733", "0.5615198", "0.5600486", "0.5548539", "0.5536135", "0.55175304", "0.5481906", "0.5446841", "0.54415184", "0.5433501", "0.541...
0.0
-1