query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
End of variables declaration//GENEND:variables
public void inlcluirProdutoContas(Object objeto) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. }
[ "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tprotected void initVariable() {\n\t\n\t}", "public void mo17751g() {\n }", "public void mo1857d() {\n }", "public static void Q22()\r\n\t{\r\n\t}", "public void mo28221a() {\n }", "public void mo3914b() {\n }", "protecte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function checked if passed email is valid. Email should be in format
public void validateEmail(String email) throws InvalidEmailException { Pattern emailPattern = Pattern .compile("^[\\w-\\.]+@(?:[\\w]+\\.)+[a-zA-Z]{2,4}$"); Matcher emailMatcher = emailPattern.matcher(email); if (!emailMatcher.find()) { throw new InvalidEmailException("Podany email jest nieprawidłowy"); } }
[ "private boolean isEmailValid(String email) {\n\t\treturn true;\n\t}", "private boolean isEmailValid(String email){\r\n\t\t String EMAIL_REGEX = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\t\t\t \r\n\t\t return email.matches(EMAIL_REGEX);\t\t\t \r\n\t}", "private boolean ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the portWorldWideName property.
public void setPortWorldWideName(long value) { this.portWorldWideName = value; }
[ "public void setName(String pstrName)\n\t{\n\t\tif(pstrName == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Setting null program name is not allowed for GIPSYProgram.\");\n\t\t}\n\n\t\tthis.strName = pstrName;\n\t}", "@Override\r\n\tpublic void setWKOUT_NAME(String value) {\n\t\tthis.m_WKOUT_NAME = value;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SAX parser processing for each EdifactSegment object
private void parseCurrentSegment(EdifactSegment currentSegment) throws SAXException { logger.entering("EdifactSaxParserToXML", "parseCurrentSegment"); List<EdifactField> eFields = currentSegment.segmentFields; for (int count = 0; count < eFields.size(); count++) { EdifactField fieldObject = (EdifactField) eFields.get(count); String value = fieldObject.fieldValue; if (fieldObject.isComposite) { contentHandler.startElement(namespaceURI, nameSpace, fieldObject.fieldTagName, null); List<EdifactSubField> subFieldList = fieldObject.subFields; for (int j = 0; j < subFieldList.size(); j++) { EdifactSubField subFieldObject = (EdifactSubField) subFieldList .get(j); if (subFieldObject.subFieldTagName != null) { contentHandler.startElement(namespaceURI, nameSpace, subFieldObject.subFieldTagName, attribs); contentHandler.characters(subFieldObject.subFieldValue.toCharArray(), 0, subFieldObject.subFieldValue.length()); contentHandler.endElement(namespaceURI, nameSpace, subFieldObject.subFieldTagName); } } } else { contentHandler.startElement(namespaceURI, nameSpace, fieldObject.fieldTagName, attribs); contentHandler.characters(value.toCharArray(), 0, value .length()); } contentHandler.endElement(namespaceURI, nameSpace, fieldObject.fieldTagName); } logger.exiting("EdifactSaxParserToXML", "parseCurrentSegment"); }
[ "public void parse() {\n try {\n SAXParser saxParser = saxParserFactory.newSAXParser();\n this.handler = new Handler();\n\n saxParser.parse(path, handler);\n\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (SAXException e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
change time format, the third value is the value matches "when", the forth value is which after "then". In this process, we just clean data, not unify the length of every kind of data.
public Boolean changeTimeFormat(String tableName, String columnName,String strategyID){ PhoenixUtil util =new PhoenixUtil(); Connection conn = null; try { // get connection conn = util.GetConnection(); // check connection if (conn == null) { System.out.println("conn is null..."); return false; } // for (int i = 0; (start+10000)<count; ){ // int num =10000; // int start = i*num; // select(start, num); // } SpecialPhoenixUtil specialPhoenixUtil = new SpecialPhoenixUtil(); int rowCount = specialPhoenixUtil.getRowCount(conn, tableName); Connection connPhoenix = null; //每次最多处理5000条数据,避免内存溢出 for (int i = 0; i < rowCount;i+=5000) { //1.首先在表中读出PK和对应的时间,存到map中,每一行是一个map(两个键值对,键是列名),然后放到一个list里 List<Map<String, Object>> oldValueList = SelectPKAndOneColumn(conn, tableName, columnName,i); List oldResult = new ArrayList(); //得到包含主键和时间的list for (int w = 0; w < oldValueList.size(); w++) { org.json.JSONObject jsonObject = new org.json.JSONObject(oldValueList.get(w)); Iterator iterator = jsonObject.keys(); while (iterator.hasNext()) { String key = (String) iterator.next(); // System.out.println(key); //result.add(key); oldResult.add(jsonObject.getString(key)); } } // 2然后对list中的所有时间值转化为时间格式并格式化为标准格式,并转化回字符串格式,然后将主键和日期结果对应起来存到map里 Map<String, String> transferResult = new HashMap<String, String>(); SimpleDateFormat sdf1 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.US); SimpleDateFormat sdf2 = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss 'GMT'", Locale.UK); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH:mm EEE"); SimpleDateFormat sdf4 = new SimpleDateFormat("(yyyy-MM-dd HH:mm:ss)"); SimpleDateFormat sdf5 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf6 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); SimpleDateFormat sdf7 = new SimpleDateFormat("yyyy/MM/dd"); SimpleDateFormat sdf8 = new SimpleDateFormat("yy-MM-dd HH:mm:ss"); SimpleDateFormat sdf9 = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf10 = new SimpleDateFormat("yy-MM-dd"); SimpleDateFormat sdf11 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); SimpleDateFormat toDateFormate27 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat toDateFormate28 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); String connect = ""; Date date = new Date(); String str = ""; //j是pk,k是日期 for (int j = 0; j < oldResult.size(); ) { int k = j + 1; String key = oldResult.get(j).toString(); String value = oldResult.get(k).toString(); //正则判断日期字符串类型来相应的匹配 if (Pattern.matches("\\w{3} \\w{3} \\d{2} [0-9]{2}:[0-9]{2}:[0-9]{2} \\w{3} \\d{4}", value)) { date = sdf1.parse(value); } else if (Pattern.matches("\\w{3}, \\d{1} \\w{3} \\d{4} [0-9]{2}:[0-9]{2}:[0-9]{2} \\w{3}", value)) { date = sdf2.parse(value); } else if (Pattern.matches("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2} [星][期][一二三四五六日].*?", value)) { date = sdf3.parse(value); //http://blog.csdn.net/z991876960/article/details/53117260 必须在5前面 } else if (Pattern.matches("\\([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\\)", value)) { date = sdf4.parse(value); //http://blog.csdn.net/lxcnn/article/details/4362500 必须在8前面 } else if (Pattern.matches("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}", value)) { date = sdf5.parse(value); //必须在7前面 } else if (Pattern.matches("\\d{4}/\\d{2}/\\d{2} [0-9]{2}:[0-9]{2}:[0-9]{2}", value)) { date = sdf6.parse(value); //http://blog.csdn.net/dl020840504/article/details/17055531 https://www.cnblogs.com/guyezhai/p/6729663.html } else if (Pattern.matches("\\d{4}/\\d{2}/\\d{2}", value)) { date = sdf7.parse(value); } else if (Pattern.matches("[0-9]{2}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}", value)) { date = sdf8.parse(value); //http://blog.csdn.net/cwlmxmz/article/details/45045961 https://zhidao.baidu.com/question/578661060.html?qbl=relate_question_4&word=%B8%F7%D6%D6%C8%D5%C6%DA%B8%F1%CA%BD%D5%FD%D4%F2 必须在10前面 } else if (Pattern.matches("\\d{4}-\\d{2}-\\d{2}", value)) { date = sdf9.parse(value); } else if (Pattern.matches("\\d{2}-\\d{2}-\\d{2}", value)) { date = sdf10.parse(value); //https://zhidao.baidu.com/question/410315343.html } else if (Pattern.matches("[0-9]{4}[年|\\-|/][0-9]{1,2}[月|\\-|/][0-9]{1,2}[日|\\-|/] [0-9]{2}:[0-9]{2}:[0-9]{2}", value)) { date = sdf11.parse(value); } else { str = value; } // //test // date=sdf7.parse(value); if (str != value) { if (strategyID == "27") { str = toDateFormate27.format(date); } else if (strategyID == "28") { str = toDateFormate28.format(date); } } System.out.println(str); //将当期的主键和处理后的地址名存入Map transferResult.put(key, str); j = j + 2; } //4.插入回原phoenix表 Iterator<Map.Entry<String, String>> entries = transferResult.entrySet().iterator(); util = new PhoenixUtil(); try { // get connection connPhoenix = util.GetConnection(); // check connection if (connPhoenix == null) { System.out.println("conn is null..."); return false; } while (entries.hasNext()) { Map.Entry<String, String> entry = entries.next(); // System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue()); upsertOneColumn(connPhoenix, tableName, columnName, entry.getKey(), entry.getValue()); } } catch (Exception e) { e.printStackTrace(); } } if (connPhoenix != null) { try { connPhoenix.close(); } catch (SQLException e) { e.printStackTrace(); } } /* String count="SELECT COUNT(*) FROM \""+tableName+"\""; PreparedStatement ps = conn.prepareStatement(count); ResultSet result=ps.executeQuery(); conn.commit(); int totleRow=0; while(result.next()){ totleRow=result.getInt(1); } //一次提交的限制是50万,这里一次提交40万,循环来完成所有的清洗 //When we use the judge sentence case, when it maches the first case, it won't execute else.so we match which has detail time first and then maches which doesn't have detail time. for (int i=0;i<totleRow;i+=400000){ String sql =""; //直接用sql的方法,部分日期无法解析 String sql ="UPSERT INTO \""+tableName+"\"(\"PK\",\"info\".\""+columnName+"\") SELECT \"PK\",CASE " + //if the format is like Sat Jul 26 09:59:57 CST 2014,currently this order are unable to use here, but useful in squirrel // "WHEN \"info\".\""+columnName+"\" LIKE '___, _ ___ ____ __:%:% ___' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'EEE, d MMM yyyy HH:mm:ss z', 'GMT')),'[^\\.]+') " + //2017-11-22 16:38星期三 bbs_tianya_post "WHEN \"info\".\""+columnName+"\" LIKE \'%-%-%星期%\' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy-MM-dd HH:mm EEE','CST+8:00')),'[^\\.]+') " + //(2017-11-22 16:52:12) blog_china_post "WHEN \"info\".\""+columnName+"\" LIKE \'(____-__-__ __:__:__)\' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", '(yyyy-MM-dd HH:mm:ss)','CST+8:00)')),'[^\\.]+') " + //deal with true format, to avoid it matches other format so as to be changed. "WHEN \"info\".\""+columnName+"\" LIKE '____-__-__ __:%:__' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy-MM-dd HH:mm:ss','CST+8:00')),'[^\\.]+') " + //deal with 2017/11/21 06:12:24, change / to - "WHEN \"info\".\""+columnName+"\" LIKE '%/%/% %:%:%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy/MM/dd HH:mm:ss','CST+8:00')),'[^\\.]+') " + //deal with 2017/11/21, change / to - "WHEN \"info\".\""+columnName+"\" LIKE '%/%/%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy/MM/dd','CST+8:00')),'[^\\.]+') " + //deal with 17-11-21 06:39:28, change 17 to 2017 ,if the yy represents 00-17, it will be filled to 2000-2017,or be filled to 19.. "WHEN \"info\".\""+columnName+"\" LIKE '__-%-% %:%:%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yy-MM-dd HH:mm:ss','CST+8:00')),'[^\\.]+') " + //deal with 2017-11-21 "WHEN \"info\".\""+columnName+"\" LIKE '____-%-%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy-MM-dd','CST+8:00')),'[^\\.]+') " + // //deal with 17-11-21, change 17 to 2017 ,if the yy represents 00-17, it will be filled to 2000-2017,or be filled to 19.. "WHEN \"info\".\""+columnName+"\" LIKE '__-%-%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yy-MM-dd','CST+8:00')),'[^\\.]+') " + // //2017年11月21日 23:54:12,将汉字替换为- "WHEN \"info\".\""+columnName+"\" LIKE \'%年%月%日 __:__:__\' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy年MM月dd日 HH:mm:ss','CST+8:00')),'[^\\.]+') " + "ELSE \"info\".\""+columnName+"\" END FROM \""+tableName+"\" LIMIT 400000 OFFSET "+i; PreparedStatement ps2 = conn.prepareStatement(sql); // execute upsert String msg = ps2.executeUpdate() > 0 ? "insert success..." : "insert fail..."; // you must commit conn.commit(); System.out.println(msg); if(msg =="insert fail..."){ return false; } } } catch (SQLException e) { //报错未必不执行,如socket超时,因此不在这里retrun false e.printStackTrace(); */ }catch(ParseException e){ e.printStackTrace(); } finally{ if (conn != null) { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } return true; }
[ "@Test\n\tpublic void testReformatTime() {\n\t\tassertEquals(\"wrong time format\", \"invalid time format\", DateAndTime.reformatTime(\"abcdef\"));\n\t\tassertEquals(\"wrong time format\", \"invalid time format\", DateAndTime.reformatTime(\"11om\"));\n\t\tassertEquals(\"wrong time format\", \"invalid time format\",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static String getPassword(String to) { String pass=null; String sql = "select password from users where emailid = ?"; Connection con = Provider.getConnection(); try { PreparedStatement pst = con.prepareStatement(sql); pst.setString(1, to); ResultSet rs = pst.executeQuery(); if(rs.next()) pass=rs.getString(1); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return pass; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getFrameworkNames Returns the list of Framework Names.
@Override public ArrayList<String> getFrameworkNames() { ArrayList<String> names = new ArrayList<>(); for(Framework framework : frameworks) { names.add(framework.getName()); } return names; }
[ "public java.util.List<org.apache.mesos.v1.master.Protos.Response.GetFrameworks.Framework> getFrameworksList() {\n return frameworks_;\n }", "public java.util.List<? extends org.apache.mesos.v1.master.Protos.Response.GetFrameworks.FrameworkOrBuilder> \n getFrameworksOrBuilderList() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } }
[ "@Override\n public void event() { }", "@Override\n public void event() {\n }", "@Override\n\tprotected void onGuiEvent(GuiEvent arg0) {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t public void handle(ActionEvent ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for Calculator class
public Calculator() { this.total = 0; // not needed - included for clarity this.history = "0"; // initialize history string starting from "0" }
[ "public Calculator () {\r\n\t\t\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t}", "public Calculator() {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t\thistory = \"\";\r\n\t}", "private Calc() {\r\n }", "public Calculator() {\n\n\t\t// A panel for the display that shows calcul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invoice transaction listener class
public interface OnInvoicesRequested { void OnRequestStarted(); void OnTransactionSuccessful(ArrayList<Invoice> invoices); void OnNoInvoicesFound(); }
[ "@Override\n public void publishInvoiceTransactionEvent(Transaction transaction) {\n invoiceTransactionPublisherConnector.doCall(\n transaction, simpleEventRequestTransformer, simpleEventResponseTransformer);\n }", "public void prepareInvoice();", "void onTransactionStarted();", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function initialize the Game. Initialize a new Game: create the Blocks and Ball (and Paddle) and add them to the Game.
public void initialize() { addSprite(this.levelInformation.getBackground()); this.createBlocks(); }
[ "public void initialize() {\n this.levelInfo.getBackground().addToGame(this);\n\n // blocks at the edges\n for (Block b : levelInfo.borders()) {\n b.addToGame(this);\n }\n\n // paddle\n Paddle paddle = new Paddle(levelInfo.paddle(), Color.orange, keyboard);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns the value sought after a calculation.
public String getValue(){ return temp; }
[ "public double get_value(){\n\t\treturn curr_value.get();\n\t}", "public double getResult()\r\n/* 35: */ {\r\n/* 36: 93 */ return this.value;\r\n/* 37: */ }", "double presentValue(){\n\t\treturn value;\n\t}", "@Override\n\tpublic double eval() {\n\t\treturn value;\n\t}", "public double retr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Define the angles that spin the object from the user's mouse click. The last values are saved in lastMouseX, lastMouseY, oldX, oldY; the calculated result is put in phiSpin and thetaSpin.
void setPhiThetaSpin(MouseEvent e){ int xClick=e.getX(); int yClick=e.getY(); double newX = xcoord(xClick); double newY = ycoord(yClick); double x = newX - oldX; double y = newY - oldY; lastMouseX = xClick; lastMouseY = yClick; oldX = newX; oldY = newY; if (itsBody!=null){ phiSpin = Math.atan2(-x,-y); thetaSpin = Math.sqrt(x*x+y*y)*getDragToThetaScale(); } }
[ "@Override\n public void mouseWheelMoved (MouseWheelEvent event)\n {\n if (_cursorVisible) {\n float increment = event.isShiftDown() ? FINE_ROTATION_INCREMENT : FloatMath.HALF_PI;\n setAngle((Math.round(_angle / increment) + event.getWheelRotation()) * increment);\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RestWebservice__Group_9__1__Impl" $ANTLR start "rule__RestWebservice__Group_14__0" InternalStubbrLang.g:27419:1: rule__RestWebservice__Group_14__0 : rule__RestWebservice__Group_14__0__Impl rule__RestWebservice__Group_14__1 ;
public final void rule__RestWebservice__Group_14__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalStubbrLang.g:27423:1: ( rule__RestWebservice__Group_14__0__Impl rule__RestWebservice__Group_14__1 ) // InternalStubbrLang.g:27424:2: rule__RestWebservice__Group_14__0__Impl rule__RestWebservice__Group_14__1 { pushFollow(FOLLOW_7); rule__RestWebservice__Group_14__0__Impl(); state._fsp--; if (state.failed) return ; pushFollow(FOLLOW_2); rule__RestWebservice__Group_14__1(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__Microservice__Group_11_4__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:9149:1: ( rule__Microservice__Group_11_4__0__Impl rule__Microservice__Group_11_4__1 )\n // InternalOperati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Counts and returns the number of elements in an Iterator.
public long count() { if (this.count != -1) return this.count; this.count = 0; while (this.iterator.hasNext()) { this.iterator.next(); this.count++; } return this.count; }
[ "@Override\n public int size() {\n return IteratorUtil.countElements(this);\n }", "public int size() {\n\n\t\t// No elements?\n\t\tif (isEmpty()) return 0;\n\n\t\t// If there are elements...\n\n\t\t// There's at least one element, the head\n\t\tint count = 1;\n\n\t\t// Now cou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Repository' reference. If the meaning of the 'Repository' reference isn't clear, there really should be more of a description here...
TaskRepository getRepository();
[ "public String getRepository()\n\t{\n\t\treturn (String)mConstraints.get(REPOSITORY);\n\t}", "public org.mojolang.mojo.core.Url getRepository() {\n if (repositoryBuilder_ == null) {\n return repository_ == null ? org.mojolang.mojo.core.Url.getDefaultInstance() : repository_;\n } else {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of name
public String getName() { return name; }
[ "int getNameValue();", "public String getValue(String name) {\n int i = indexOfName(name);\n if (i != -1) {\n String result = get(i);\n i = result.indexOf(':');\n result = result.substring(i + 1);\n return result.trim();\n }\n else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the xqdoc function.
private Item xqdoc(final QueryContext qc) throws QueryException { checkCreate(qc); return new XQDoc(qc, info).parse(checkPath(exprs[0], qc)); }
[ "public XInvoke(Document doc) {\r\n setup(doc.getDocumentElement());\r\n }", "protected abstract void buildDocument();", "private String makeXMLPerformDoc(String sqlString) {\n\n return\n\n serviceProperties.getProperty(\n \"PERFORM_HEAD\", DEFAULT_PERFORM_HEAD) +\n\n serviceProp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion tim nguoi dung
public String[] timdata(String a, String b) { String[] c = new String[2]; String selectQuery="SELECT * FROM "+TABLE_NAME; SQLiteDatabase db=this.getWritableDatabase(); Cursor cursor=db.rawQuery(selectQuery,null); if(cursor.moveToFirst()) { do { if(cursor.getString(2).equals(a)&&cursor.getString(3).equals(b)) { c[0]=cursor.getString(2); c[1]=cursor.getString(3); break; } }while (cursor.moveToNext()); } db.close(); Log.d(TAG, "load data Successfuly"); return c; }
[ "private void time() {\n\n\t}", "@Override\npublic void girarIzquierda(float time) {\n\t\n}", "private void odrzavanjeTemp()\r\n\t{\r\n\t\t\r\n\t}", "public void mo9609a() {\n }", "@Override\n\tvoid pleaca() {\n\t\tcal.getTime();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ JADX INFO: super call moved to the top of the method (can break code semantics)
public UnblockUserComposite(@NotNull BlacklistInteractorImpl blacklistInteractorImpl, String str, long j) { super("UnblockUserComposite", "userId = " + str + ", id = " + j, null, 4, null); Intrinsics.checkNotNullParameter(str, ChannelContext.Item.USER_ID); this.g = blacklistInteractorImpl; this.e = str; this.f = j; }
[ "public void method_5753() {\r\n super();\r\n }", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void parentMethod() throws Exception {\n\t\tsuper.parentMethod();\r\n\t}", "@Override\n }", "protected void method_5557() {}", "protected void d()\r\n/* 49...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a history from an IndicativeEvent
public void removeHistory(ArrayList<ActionObservation> history) { indEvent.remove(history); }
[ "public void clearEventHistory();", "public void removeFromHistory(entity.ContactHistory element);", "void removeFromHistoryEntries(HistoryEntry value);", "void forgetHistory();", "public void eraseHistory() {\r\n\t\thistory.clear();\r\n\t}", "public abstract void clearHistory();", "public void deleteGa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether th whole mask is filled out.
boolean filled();
[ "private boolean checkfull( byte boxtocheck )\n\t{\n\t\tfor( byte i = 0; i < 9; i++ )\n\t\t\tif( board[boxtocheck][i] == 0 )\n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean isZeroFill() {\n/* 927 */ return ((this.colFlag & 0x40) > 0);\n/* */ }", "public boolean isFilled() {\n\t\tfor ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.all_sales_menu, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a request header
String getRequestHeader(String name);
[ "public RequestHeader getRequestHeader() {\n return requestHeader;\n }", "RequestSpecification header(String headerName, String headerValue);", "public alluxio.grpc.CopycatRequestHeader getRequestHeader() {\n if (requestHeaderBuilder_ == null) {\n return requestHeader_ == null ? alluxio.gr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new Fragment to be placed in the activity layout
private void ShowHistory() { History_Fragment historyFragmnet = new History_Fragment(); // In case this activity was started with special instructions from an // Intent, pass the Intent's extras to the fragment as arguments historyFragmnet.setArguments(getIntent().getExtras()); // Add the fragment to the 'fragment_container' FrameLayout getSupportFragmentManager().beginTransaction() .add(R.id.fragment_container, historyFragmnet).commit(); }
[ "protected void setupFragment() {\n\n int courseCode = getIntent().getIntExtra(Constants.KEY_COURSE_ID, -1);\n int moduleCode = getIntent().getIntExtra(Constants.KEY_MODULE_ID, -1);\n int toolCode = getIntent().getIntExtra(Constants.KEY_TOOL_ID, -1);\n ContentsFragment fragment = Content...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
it updates the tuple of that participation, it has to be coherent with the old one. It should be utterly useless
@Deprecated public void update(Participation participation) { em.merge(participation); }
[ "private void editPair(String oldRelationName, Pair<Vertex, Vertex> oldPair,\r\n\t\t\t\t\t\t\tString newRelationName, Pair<Vertex, Vertex> newPair) throws TreeException, RelationException {\r\n\t\t// Suppression de ses composantes graphiques\r\n\t\tremovePair(oldRelationName, oldPair);\r\n\t\t\r\n\t\t// Ajout de se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Manipulate the given file descriptor.
public static int fcntl(int fd, int cmd, int args) { // TODO: implement return Error.errno(Error.EACCES); }
[ "private void protectFileDescriptor(FileDescriptor fd) {\n Exception exp;\n try {\n Method getInt = FileDescriptor.class.getDeclaredMethod(\"getInt$\");\n int fdint = (Integer) getInt.invoke(fd);\n\n // You can even get more evil by parsing toString() and extract the i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests iterating a bundle which has a single constituent.
@Test public void testIteratorWithSingleConstituent() { // given Product product = createProductWithSkuCode("A_PRODUCT_CODE", "A_SKU_CODE"); ProductBundle bundle = new ProductBundleImpl(); bundle.addConstituent(createBundleConstituent(product)); // test BundleIteratorImpl bundleIterator = new BundleIteratorImpl(bundle); BundleConstituent constituent = bundleIterator.iterator().next(); Assert.assertEquals(product.getCode(), constituent.getConstituent().getCode()); }
[ "@Test\n public void testGetSingleByExternalIdBundleVersion() {\n // single region is picked based on iterator.next()\n try {\n assertEquals(_narrowingSource.getSingle(FR_ID.toBundle(), LATEST), REGION_1);\n } catch (final AssertionError e) {\n assertEquals(_narrowingSource.getSingle(FR_ID.toBun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
All entry points must implement this
interface BaseKrunEntry { public abstract void run_iter(int param); }
[ "@Override\n public void extornar() {\n \n }", "@Override\r\n public void publicando() {\n }", "@Override\n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "public void entry() {\n\n\t}", "protected Hook() {\n startup();\n }", "@Override\n protected void in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .datayes.mdl.mdl_szl2_pbmsg.double_6 DifPrice1 = 15;
public datayes.mdl.mdl_szl2_pbmsg.MDLSZL2Msg.double_6 getDifPrice1() { return difPrice1_; }
[ "datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3 getOpenPrice();", "datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3OrBuilder getAskPrice1OrBuilder();", "com.felania.msldb.MsgPriceOuterClass.MsgPrice getSellPrice();", "public datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3OrBuilder getBidPrice2OrBuilder() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end rule__Block__Group__1__Impl $ANTLR start rule__Block__Group__2 ../org.xtext.example.swrtj.ui/srcgen/org/xtext/example/ui/contentassist/antlr/internal/InternalSwrtj.g:8868:1: rule__Block__Group__2 : rule__Block__Group__2__Impl ;
public final void rule__Block__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.swrtj.ui/src-gen/org/xtext/example/ui/contentassist/antlr/internal/InternalSwrtj.g:8872:1: ( rule__Block__Group__2__Impl ) // ../org.xtext.example.swrtj.ui/src-gen/org/xtext/example/ui/contentassist/antlr/internal/InternalSwrtj.g:8873:2: rule__Block__Group__2__Impl { pushFollow(FollowSets000.FOLLOW_rule__Block__Group__2__Impl_in_rule__Block__Group__218145); rule__Block__Group__2__Impl(); _fsp--; if (failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__Block__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:7628:1: ( rule__Block__Group__1__Impl rule__Block__Group__2 )\n // InternalMyDsl.g:7629:2: rule__Block__Group__1__Impl rule__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Numero de control de la factura
public String getNumeroControl() { return numeroControl; }
[ "public String getNumeroFactura()\r\n/* 286: */ {\r\n/* 287:328 */ return this.numeroFactura;\r\n/* 288: */ }", "public int calcularComision () {\n return (int) ((float) precio * 0.05);\n }", "public int getNumeroFila() {\n return numeroFila;\n }", "private static void excliu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
NotIn specifies that this field cannot be equal to one of the specified values repeated sint64 not_in = 7;
public Builder addAllNotIn( java.lang.Iterable<? extends java.lang.Long> values) { ensureNotInIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, notIn_); onChanged(); return this; }
[ "public static <T> SearchSpec<T> notIn(String field, String... values) {\n return valueOf(SearchCriterion.valueOf(field, \"not in\", values));\n }", "public <T extends Enum<T>>\n Combinator notIn(Variable<T> var, Iterable<T> values) {\n ImmutableSet<T> valueSet = ImmutableSet.copyOf(values);\n Im...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ metodo para obtener la lista de ids de los elementos de la tabla TABLE_FOTO que son las fotos insertadas por el usuario
public static ArrayList<Integer> getallIdsAlbums(Context ctx) { // Creamos una lista de enteros PersistenceSQLiteHelper usdbh = new PersistenceSQLiteHelper( ctx, DBNAME, null, CURRENT_BBDD_VERSION); SQLiteDatabase db = usdbh.getReadableDatabase(); ArrayList<Integer> IDsList = new ArrayList<Integer>(); // Selcccion de todas las Query Cursor cursor = db.rawQuery("select id_album from TABLE_ALBUM ", null); if (cursor.moveToFirst()) { do { Integer id = cursor.getInt(0); IDsList.add(id); } while (cursor.moveToNext()); } db.close(); return IDsList; }
[ "public ArrayList<ImgCapture> getImages(int pkUser, int pkScan) {\r\n \r\n ArrayList<ImgCapture> lesPhotos = new ArrayList<ImgCapture>();\r\n ResultSet rs = null;\r\n com.mysql.jdbc.PreparedStatement pstmt = null;\r\n String query = \"SELECT * FROM T_Photo WHERE FK_Capture = ?\";\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to Upload Image to Storage
private void uploadFile() { //todo: Image picker Uri file = Uri.fromFile(new File("path/to/images/rivers.jpg")); StorageReference riversRef = mStorageRef.child("images/" + file.getLastPathSegment()); // Register observers to listen for when the download is done or if it fails riversRef.putFile(file).addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception exception) { // Handle unsuccessful uploads } }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() { @Override public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { // taskSnapshot.getMetadata() contains file metadata such as size, content-type, and download URL. @SuppressWarnings("VisibleForTests") Uri downloadUrl = taskSnapshot.getDownloadUrl(); //todo: store this link on Campaign } }); }
[ "private void uploadImage(){\n if(imageUri != null){\n final StorageReference fileReference = storageReference.child(System.currentTimeMillis() + \".\" + getFileExtension(imageUri));\n\n uploadTask = fileReference.putFile(imageUri)\n .addOnSuccessListener(new OnSucces...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets new value of id_token
public void setId_token(String id_token) { this.id_token = id_token; }
[ "public void putToken(){\n String initialValue = generateMsgId();\n requestContext.put(MessageIDHandler.REQUEST_PROPERTY, initialValue);\n System.out.println(\"client set id: \" + initialValue +\" on request message\");\n\n }", "public void setIdpIdToken(String idpIdToken) {\n\t\tthis.idpI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the longitude property.
public void setLongitude(double value) { this.longitude = value; }
[ "public void setLongitude(double longitude) {\n\t\tmLng = longitude;\n\t}", "public void setLongitude(Double longitude) {\n\n this.longitude = longitude;\n }", "public void setLongitude(double longitude) {\n\t\tsetValue(Property.LONGITUDE, longitude);\n\t}", "public void set_longitude( double value ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To return the Hijiri date by giving day, month, year
public String createHijiriDate(BigDecimal compCode, long day, long month, long year, long adjustTo) throws BaseException;
[ "public static String getddHifenMMHifenyyyy() {\n\t\treturn \"dd-MM-yyyy\";\n\t}", "private String returnDate(int year, int month, int day){\n\t\treturn year + \"-\" + month + \"-\" + day;\r\n\t}", "public Date getThoiGianDuyet();", "private void decodeYearMonthDay () // 1-31\n {\n int nday = encodedYearM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make sure we always have a listener for the perspective. Cannot add to the perspective class as its not always called when Workbench is started.
@Override public void earlyStartup() { PlatformUI.getWorkbench().getWorkbenchWindows()[0].addPerspectiveListener(this); }
[ "public synchronized boolean isPerspectiveEnabled() {\r\n\t\treturn perspectiveEnabled;\r\n\t}", "public void perspectiveChanged( IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId ) {\n\t }", "private void initPreferencesListener()\n {\n Activator.getDefault().getPrefere...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onClick(View v) { if(v.getId() == R.id.pen_btn){ RevisionSettingDialog config = new RevisionSettingDialog(this, new OnSignChangedListener() { @Override public void changed(int color, int size, int type) { // TODO Auto-generated method stub full_sign_view.configSign(color, size, type); } }); config.setProgress(30); config.setKeyName(fieldName + "full_sign_color", fieldName + "full_sign_type", fieldName + "full_sign_size"); config.show(); } else if(v.getId() == R.id.clear_btn){ full_sign_view.clearSign(); } else if(v.getId() == R.id.undo_btn){ full_sign_view.undoSign(); } else if(v.getId() == R.id.redo_btn){ full_sign_view.redoSign(); } else if(v.getId() == R.id.save_btn){ Bitmap sign_bmp = full_sign_view.saveSign(); if(sign_bmp == null){ Toast.makeText(this, "签批内容为空", Toast.LENGTH_SHORT).show(); return; } byte[] sign_bmp_byte = Bitmap2Bytes(sign_bmp); Intent in = new Intent(getIntent().getAction()); in.putExtra("singbmp", sign_bmp_byte); setResult(RESULT_OK, in); full_sign_view.setDrawingCacheEnabled(false); closeFullSignView(); } else if(v.getId() == R.id.close_btn){ closeFullSignView(); } }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return mMonths[(int) value % mMonths.length]; return String.valueOf(value); return getDateToString((long) MyResult.get((int) value).getTime(),"HH:mm:ss");
@Override public String getFormattedValue(float value, AxisBase axis) { return null; }
[ "public String myTimeInTime(){\n\tString result =\"[\";\n\tCalendar stop = Calendar.getInstance();\n\tCalendar start = Calendar.getInstance();\n\tCalendar mid= Calendar.getInstance();\n\tint i = 7;\n\twhile(i>0){\n\t\tstart.roll(Calendar.DAY_OF_YEAR,false);\n\t\tmid.roll(Calendar.DAY_OF_YEAR,false);\n\t\ti--;\n\t}\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
[ "@Override\n\tpublic void handleGET(CoapExchange exchange) {\n\n\t\t\n\t}", "protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(\"--> get\");\r\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse respo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleXAdditiveExpression" $ANTLR start "entryRuleOpAdd" InternalJQVT.g:739:1: entryRuleOpAdd : ruleOpAdd EOF ;
public final void entryRuleOpAdd() throws RecognitionException { try { // InternalJQVT.g:740:1: ( ruleOpAdd EOF ) // InternalJQVT.g:741:1: ruleOpAdd EOF { if ( state.backtracking==0 ) { before(grammarAccess.getOpAddRule()); } pushFollow(FOLLOW_1); ruleOpAdd(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getOpAddRule()); } match(input,EOF,FOLLOW_2); if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
[ "public final void entryRuleOpAdd() throws RecognitionException {\n try {\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:1440:1: ( ruleOpAdd EOF )\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
write your code here
public List<List<Integer>> subsets2(int[] nums) { List<List<Integer>> result = new ArrayList<>(); List<Integer> list = new ArrayList<>(); if (nums==null) return result; Arrays.sort(nums); def2(nums, 0, list, result); result.add(new ArrayList<Integer>()); return result; }
[ "void stuffForYouToDo() {\n\t\t// Write your code here...\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\t\t\t\tvoid eval() {\r\n\r\n\t\t\t\t\t// YOUR CODE IN THIS SPACE\r\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomethiing3() {\n\n\t}", "@Override\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
METODO VALIDAR LISTAR TABELA
public List<Usuario> listar() { /* Cria o model*/ UsuarioDao dao = new UsuarioDao(); List<Usuario> lista = new ArrayList<>(); return dao.listar(); }
[ "public void llenadoDeTablas() {\n\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"Codigo\");\n modelo.addColumn(\"Tipo Transaccion\");\n modelo.addColumn(\"Efecto Transaccio\");\n\n\n \n TipoTransaccionDAO TipoTDAO = new TipoTransacci...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indexieren einer HTML Datei. That's where the magic happens. Hier wird eine HTMLDatei eingelesen und schlussendlich dem Index hinzugefuegt. Dabei werden ueberfluessige Tags entfernt und nur der textuelle Inhalt der Datei indexiert.
public boolean index(String filename, IndexWriter writer) { if (DesktopSearcherVariables.getSINGLETON().isHTML()) { try { String content = HTML.getFileContents(filename); // Jetzt verarbeiten wir das HTML. Wir entfernen Tags // ebenso wie den HTML-Kopf. content = scriptPattern.matcher(content).replaceAll(""); // JavaScript content = stylePattern.matcher(content).replaceAll(""); // CSS content = commentPattern.matcher(content).replaceAll(""); // Kommentare content = metaPattern.matcher(content).replaceAll(""); // Links // im // Dateikopf content = linkPattern.matcher(content).replaceAll(""); // Metaangaben String plainText = HTML.extractText(content).trim(); // Wir fuegen dem Dokument die von uns zur Verfuegung // gestellten Felder hinzu. Document doc = new Document(); doc.add(new Field("content", plainText + " ", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.YES)); doc.add(new Field("type", "html", Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.YES)); // Matcher matcher = titlePattern.matcher(content); // // if (matcher.find()) { // doc.add(new Field("title", matcher.group(1), Field.Store.YES, // Field.Index.ANALYZED)); // } // Titel ermitteln HTMLParser parser = new HTMLParser(new StringReader(content)); String title = ""; try { title = parser.getTitle(); doc.add(new Field("title", title + " ", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.YES)); } catch (InterruptedException e1) { doc.add(new Field("title", "Unbenanntes Dokument", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.YES)); // pass... (kann ja sein, dass kein Titel gesetzt ist) } // Standardfelder ContentHandler.addDefaultFields(doc, filename); // Dokument dem Index hinzufuegen writer.addDocument(doc); return true; } catch (Exception e) { System.err.println(e); return false; } } return false; }
[ "static private String buildIndexContentHTML() {\r\n // header\r\n DOMNode contentHeader = partialBuilder.buildContentHeader(\"Class Index\");\r\n StringBuilder sb = new StringBuilder(contentHeader.toString());\r\n\r\n // entries\r\n String entryName;\r\n Documentation jsdo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor to initialize LocTime object.
public LocTime(String pName, Location pLoc, int pTime){ this.name = pName; this.loc = pLoc; this.time = pTime; }
[ "public Time() {\r\n\t\t\r\n\t}", "public Schedule(LocalDateTime datetime, LatLong loc) {\n this.start = datetime;\n this.location = loc;\n }", "public Time (Time time)\n {\n this(time.hour, time.minute, time.second);\n }", "public Location() {\n\t\tsuper();\n\t}", "public Location() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends nodes of items to the current path.
void append(int index, int end, int[] itemset, int support) { if (children == null) { children = new HashMap<Integer, Node>(); } if (index >= maxItemSetSize) { maxItemSetSize = index + 1; } // Create new item subtree node int item = itemset[index]; Node child = new Node(item, support, id < 0 ? null : this); // Add link from header table child.addToHeaderTable(); // Add into FP tree children.put(item, child); // Proceed down branch with rest of item set if (++index < end) { child.append(index, end, itemset, support); } }
[ "public void append(Item item) {\n if(start == null) {\n start = new Node(item);\n end = start;\n }\n else {\n end.next = new Node(item);\n end = end.next;\n }\n length++;\n }", "public void addToEnd(t item){\n\t\tcurrent = start; \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field messageResult is set (has been assigned a value) and false otherwise
public boolean isSetMessageResult() { return this.messageResult != null; }
[ "public boolean hasErrorMessage() {\n return result.hasErrorMessage();\n }", "@java.lang.Override\n public boolean hasResult() {\n return result_ != null;\n }", "public boolean hasResult();", "public boolean getExpectedResult() {\r\n return expectedResult;\r\n }", "public boolean ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XReturnExpression__Group__1__Impl" $ANTLR start "rule__XReturnExpression__Group__2" InternalFormat.g:21058:1: rule__XReturnExpression__Group__2 : rule__XReturnExpression__Group__2__Impl ;
public final void rule__XReturnExpression__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalFormat.g:21062:1: ( rule__XReturnExpression__Group__2__Impl ) // InternalFormat.g:21063:2: rule__XReturnExpression__Group__2__Impl { pushFollow(FOLLOW_2); rule__XReturnExpression__Group__2__Impl(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__XReturnExpression__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:24091:1: ( rule__XReturnExpression__Group__2__Impl )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets focus to Burger menu
void focusMenu();
[ "public void focus() {\n dropDownMenuInitializer.apply();\n keyboardNavigation.focusAt(0);\n }", "public void setFocus() {\n\t\tfPagebook.setFocus();\n\t}", "public void setFocus()\n \t{\n \t}", "protected void focus() {\n\n\t}", "public void setFocus() {\n \t\tdoSetFocus();\n \t}", "public void se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log.d(TAG, "V = " + v);
@Override public void onDrawerSlide(@NonNull View view, float v) { content.setTranslationX(view.getWidth()*v); }
[ "public float getV()\n {\n return v;\n }", "public double GetV()\n { return tv.getDouble(0.0f); }", "static void m(Integer v) {\n\t\tSystem.out.println(\"m() received \" + v);\n\t}", "static void m(Integer v) {\n System.out.println(\"m() received \" + v);\n }", "public shor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Not Implemented' attribute.
boolean isNotImplemented();
[ "public String getNoTtf() {\r\n return (String) getAttributeInternal(NOTTF);\r\n }", "public String getNotLikeValue() {\n return this.notLike;\n }", "public String getAttributeWithNoAnnotations() {\r\n\t\treturn attributeWithNoAnnotations;\r\n\t}", "@Override\n\t\t\t\tpublic int getMissing...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a KMCCentroidsViewer for specified experiment and clusters.
public KMCCentroidsViewer(Experiment experiment, int[][] clusters) { super(experiment, clusters); }
[ "public ScriptCentroidViewer(Experiment experiment, int[][] clusters) {\r\n\tsuper(experiment, clusters);\r\n }", "public SOTAExperimentViewer(Experiment experiment, int[][] clusters, FloatMatrix codes, FloatMatrix clusterDiv, SOTATreeData sotaTreeData, Boolean clusterGenes) {\r\n \tthis(experiment, cluster...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/This is a better approach by using hashmap Traverse and store first linkedlist in hashmap and then traverse second linkedlist and if same element is repeated then return corresponding node
public ListNode getIntersectionNode2(ListNode headA, ListNode headB) { HashSet<ListNode> mapuh = new HashSet<>(); ListNode iterator = headA; while(iterator != null) { mapuh.add(iterator); } iterator = headB; while(iterator != null) { if(mapuh.contains(iterator)) return iterator; } return null; }
[ "public void _removeDuplicates() {\r\n Node ptr1 = this.head, ptr2 = null;\r\n while (ptr1 != null) {\r\n ptr2 = ptr1;\r\n while (ptr2.next != null) {\r\n if (ptr1.data == ptr2.next.data) {\r\n ptr2.next = ptr2.next.next;\r\n } els...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Martin on 19.12.2017.
public interface HeartRateMonitor { public abstract int getHeartRate (); }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n public int utilite() {\n return 0;\n }", "@Override\r\n\tpublic void hablar() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form Application
public Application() { initComponents(); }
[ "public void createApplication() {\n }", "public suiluppo_application create(long applicat_id);", "public App() {\r\n\t\tcreateGui();\r\n }", "GuiApplication createGuiApplication();", "CreateApplicationResult createApplication(CreateApplicationRequest createApplicationRequest);", "private void custo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
rotate left through carry flag
public void visit(Instr.ROR i);
[ "public void rotateLeft()\r\n\t{\r\n\r\n\t}", "public static long rotateLeft(long paramLong, int paramInt) {\n/* 1500 */ return paramLong << paramInt | paramLong >>> -paramInt;\n/* */ }", "public void turnLeft ()\n {\n rotate(-Math.PI / 16);\n }", "static long rot90Shift(long a) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Chaining Constraint'.
ChainingConstraint createChainingConstraint();
[ "Object createConstraint();", "public chain() {\n\t\tsuper();\n\t}", "public Constraint() {\r\n }", "ConstraintNat createConstraintNat();", "public Or(Constraint constraint1, Constraint constraint2){\n this.constraint1 = constraint1;\n this.constraint2 = constraint2;\n }", "SemanticCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provide a suitable constructor (depends on the kind of dataset)
public RecipesAdapter(Context con,RealmResults<recipe> myDataset) { this.con = con; this.mDataset = myDataset; this.dDataset= new RealmList<>(); realm = Realm.getDefaultInstance(); this.LoadMore(); }
[ "public DataSet() {\n }", "@SuppressWarnings(\"unused\")\n\tprivate DefaultCategoryDataset createDataset() \n\t{\n\t\tDefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\t\tdataset.addValue(1.0, \"Row 1\", \"Column 1\");\n\t\t// dataset.addValue(5.0, \"Row 1\", \"Column 2\");\n\t\t// dataset.addVa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If dots should be drawn or not
public void setShowPoint(boolean showPoint) { this.showPoint = showPoint; }
[ "private void paintDotsInQuestion() {\n graphicsContextQuestion = theView.getQuestionCanvas().getGraphicsContext2D();\n \tgraphicsContextQuestion.setFill(dotsColorOne);\n \tgraphicsContextQuestion.fillOval(300, 80.0, 50.0, 50.0);\n \tgraphicsContextQuestion.setFill(dotsColorTwo);\n \tgraphicsCont...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional bool benched = 12;
public Builder clearBenched() { bitField0_ = (bitField0_ & ~0x00000800); benched_ = false; onChanged(); return this; }
[ "void mo1949b(boolean z);", "void mo67481b(boolean z);", "void mo59100a(boolean z);", "void mo33158a(boolean z);", "public void mo92808b(boolean z) {\n }", "void mo61746b(boolean z);", "void mo66492a(boolean z);", "public void mo91709b(boolean z) {\n }", "boolean mo41308b();", "void mo20834a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
break keyword break/exist the loop
public static void main(String[] args) { for (int I=0; I<10; I++) { if(I==7) { break; } System.out.println(I); } System.out.println("I am outside of the loop"); // continue - it will skip current iteration for (int i=1; i<=5; i++) { if (i==2) { continue; } System.out.println(i); System.out.println("*******************"); ////// Let's work on this at home ......????? // I want to print nums from 1 to 20 except 5, 6,,7 for (int a =1; a <=20; a++) { if (a == 5 || a == 6 || a ==7 ) { continue; } System.out.println(a); } } }
[ "void breakOngoingForLoop();", "boolean getBreakOngoingForLoop();", "public static void main(String[] args) {\n\t\tint[] numbers = {3,4,5,6,213,42,35,63,3};\n\t\tint length = numbers.length;\n\t\tboolean found = false;\n\t\n\there: //will terminate from here (the while loop) after using \"break here\"\n\t\twhil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.tophap.mapbox_gl.Value literal = 4;
com.tophap.mapbox_gl.proto.Expressions.ValueOrBuilder getLiteralOrBuilder();
[ "@JsConstructor\n public PointLight() {\n\n }", "public MapSquare() {\n\tfeatures = EnumSet.noneOf(MapFeature.class);\n\tcolor = java.awt.Color.WHITE;\n solid = false;\n }", "@JSProperty(\"features\")\n void setFeatures(GeoJSONFeature... value);", "void hideInfobox(MapFeature feature);", "f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value related to the column: msg_content
public void setMsgContent (java.lang.String msgContent) { this.msgContent = msgContent; }
[ "public Builder setMsgContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n msgContent_ = value;\n \n return this;\n }", "@Override\n\tpublic void setValue(String msg) {\n\t\tif (StringUtil.isNullOrEmp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Habitacion)) { return false; } Habitacion other = (Habitacion) object; if ((this.numero == null && other.numero != null) || (this.numero != null && !this.numero.equals(other.numero))) { return false; } return true; }
[ "public int getId () { return id; }", "public int getId(){ return this.id;}", "public int id() {return this.id;}", "@Override\n public int getId() { return id; }", "public void setId(long id){ \r\n this.id = id; \r\n }", "public void setId( int id ) { this.id = id; }", "public void setId( l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Schedule getPlayingSubSchedule() { return currentSubSchedule; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if the fieldvalue in the supplied predicate is satisfied by this predicate's fieldvalue and operator.
public boolean equals(IndexPredicate ipd) { // some code goes here Todo return false; }
[ "public boolean effectiveBooleanValue(XPathContext c) throws XPathException {\n switch(operator) {\n case Token.AND:\n return operand0.effectiveBooleanValue(c) && operand1.effectiveBooleanValue(c);\n\n case Token.OR:\n return operand0.effectiveBooleanValue(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the paddingright property
public final CssPaddingRight getPaddingRight() { if (cssPadding.right == null) { cssPadding.right = (CssPaddingRight) style.CascadingOrder(new CssPaddingRight(), style, selector); } return cssPadding.right; }
[ "public int getPaddingRight() {\n return this.paddingRight;\n }", "public int getRightPadding() {\n return mHitbox.right - mX - mWidth;\n }", "public short getWCellPaddingRight()\n {\n return field_6_wCellPaddingRight;\n }", "public int getSpaceOnRight() {\r\n\t\treturn this.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new instance of this exception.
public ReplyErrorCodeException(int errorCode) { super("Error " + errorCode + ": " + JDWPConstants.Error.getName(errorCode)); this.errorCode = errorCode; }
[ "public ExceptionMetier() {\n }", "public SshToolsApplicationException() {\n this(null, null);\n }", "public StackException() {\n \tthis(\"\");\n }", "public CreateServicemanException() {\n }", "public AppException() { }", "public DuplicateException() {\n \tsuper();\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the edge is TOP or BOTTOM, and false otherwise.
public static boolean isTopOrBottom(RectangleEdge edge) { return (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM); }
[ "private boolean blockOnEdge(Block b, Movement m) {\n\t\tswitch (m) {\n\t\tcase DOWN_ONE:\n\t\t\treturn b.getIntY() + 1 == height; //+ 2 == height; // + 2 for statusbar offset...\n\t\tcase RIGHT_ONE:\n\t\t\treturn b.getIntX() + 1 == width;\n\t\tcase LEFT_ONE:\n\t\t\treturn b.getIntX() == 0;\n\t\tcase UP_ONE:\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the length of the longest string key in the subtrie rooted at x that is a prefix of the query string, assuming the first d character match and we have already found a prefix match of given length (1 if no such match)
private int longestPrefixOf(Node x, CharArray query, int d, int length) { if (x == null) return length; if (x.val != -1) length = d; if (d == query.length()) return length; char c = query.get(d); return longestPrefixOf(x.next[c], query, d+1, length); }
[ "public String longestPrefixOf(String s) {\n\t\t// TODO (BONUS)\n\t\tTrieNode current = root;\n\t\t\n\t\tint nextIndex;\n\t\twhile(!s.equals(\"\")){\n\t\t\tnextIndex = c2i(s.charAt(0));\n\t\t\tcurrent = current.children[nextIndex];\n\t\t\ts = s.substring(1);\n\t\t}\n\t\t\n\t\tint greatestSize = -1;\n\t\tint greates...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public int updateGravidainfo(GravidaInfo gravidainfo) { return dao.updateByPrimaryKeySelective(gravidainfo); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setAnswersForQuestion method, of class Student.
@Test public void testSetAnswersForQuestion_4args_1() { System.out.println("setAnswersForQuestion"); String answer = ""; Section section = null; Subsection subsection = null; Question question = null; studentInstance.setAnswersForQuestion(answer, section, subsection, question); }
[ "@Test\n\tpublic void testGetAnswers() {\n\t\tMultChoiceQuestion mcq = new MultChoiceQuestion(\"\", null, \"a\", \"b\", \"c\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"d\");\n\t\t\n\t\tString[] answers = mcq.getAnswers();\n\t\t\n\t\tthis.now.checkThat(\t\"Answers are returned correctly.\", answers,\n\t\t\t\t\t\t\tis(equalTo(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For starting Main login screen
@Override public void start(final Stage primaryStage) { primaryStage.setTitle("MAZE Storage Server Login"); primaryStage.setFullScreen(true); BorderPane bp = new BorderPane(); bp.setPadding(new Insets(10,50,50,50)); //Adding HBox HBox hb = new HBox(); hb.setPadding(new Insets(20,20,20,30)); //Adding GridPane GridPane gridPane = new GridPane(); gridPane.setPadding(new Insets(20,20,20,20)); gridPane.setHgap(5); gridPane.setVgap(5); //Implementing Nodes for GridPane Label lblUserName = new Label("Username"); final TextField txtUserName = new TextField(); Label lblPassword = new Label("Password"); final PasswordField pf = new PasswordField(); Label lblSessKey = new Label("Session Key"); final PasswordField sk = new PasswordField(); Button btnLogin = new Button("Login"); final Label lblMessage = new Label(); Button btnFrgtPwd = new Button("Forgot Password"); final Label lblMessage1 = new Label(); Button btnNewUser = new Button("Create Account"); final Label lblMessage2 = new Label(); //Adding Nodes to GridPane layout gridPane.add(lblUserName, 90, 50); gridPane.add(txtUserName, 91, 50); gridPane.add(lblPassword, 90, 51); gridPane.add(pf, 91, 51); gridPane.add(lblSessKey, 90, 52); gridPane.add(sk, 91, 52); gridPane.add(btnLogin, 92, 50); gridPane.add(lblMessage, 94, 52); gridPane.add(btnFrgtPwd, 92, 51); gridPane.add(lblMessage1, 95, 52); gridPane.add(btnNewUser, 92, 52); gridPane.add(lblMessage2, 96, 52); //gridPane.add(clock, 97, 53); //Reflection for gridPane Reflection r = new Reflection(); r.setFraction(0.7f); gridPane.setEffect(r); //DropShadow effect DropShadow dropShadow = new DropShadow(); dropShadow.setOffsetX(5); dropShadow.setOffsetY(5); //Adding text and DropShadow effect to it Text text = new Text("MAZE Storage Server Login"); text.setFont(Font.font("Courier New", FontWeight.BOLD, 28)); text.setEffect(dropShadow); //Adding text to HBox hb.getChildren().add(text); //Add ID's to Nodes bp.setId("bp"); gridPane.setId("root"); btnLogin.setId("btnLogin"); text.setId("text"); btnFrgtPwd.setId("btnFrgrPwd"); btnNewUser.setId("btnNewUser"); //Action for btnLogin btnLogin.setOnAction(new EventHandler<ActionEvent>() { @SuppressWarnings("deprecation") public void handle(ActionEvent event) { checkUser = txtUserName.getText().toString(); checkPw = pf.getText().toString(); checkSk = sk.getText().toString(); //CopyListener class to check for content copy from files CopyListener cp = new CopyListener(checkUser); //MAC Address of the User/Intruder Machine String mac = ClientInitiator.getMACaddress(); unsuccess: //Check if only username and password have been entered and login is pressed if(!checkUser.isEmpty() && !checkPw.isEmpty() && checkSk.isEmpty() && !UserAccountDB.LookupMAC(checkUser,mac)){ boolean proceedup = false; System.out.println("No Session key"); try { if(sa.searchbyUserPass(checkUser,checkPw)){ lblMessage1.setText("Read Only login"); lblMessage1.setTextFill(Color.BLUEVIOLET); primaryStage.close(); DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); if(ClientInitiator.getIpaddress() != null && ClientInitiator.getMACaddress() != null){ //Logging of Account Information for read only session UserAccountDB.InsertIP(ClientInitiator.getIpaddress()); FloggerDB.InsertLog(" READ ONLY LOGIN FROM IP:"+ClientInitiator.getIpaddress()+" MAC :"+ClientInitiator.getMACaddress(), checkUser,dateFormat.format(date) ); } else{ try { //Login from local host. FloggerDB.InsertLog(" READ ONLY LOGIN FROM Localhost:"+InetAddress.getLocalHost().getHostName(), checkUser,dateFormat.format(date) ); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } } proceedup = true; if(proceedup == true && unauth == false){ try { //To Set Windows Look and Feel for the FileGUI opener UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception e) { // handle exception } //Initiate Sandtrap Environment for assessing Intruder Activities. FileSystemView fsv = new DirectoryRestrictedFileSystemView(new File("C:\\DVFS")); JFileChooser chooser = new JFileChooser(fsv); chooser.setCurrentDirectory(new File("C:\\DVFS")); cp.start(); boolean sandtrap = true; FullScreenJFrame frame = null; frame = new FullScreenJFrame("MAZE Cloud Server File System",chooser,checkUser,sandtrap); frame.setVisible(true); chooser.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (KeyEvent.VK_PRINTSCREEN == e.getKeyCode()) Toolkit.getDefaultToolkit().getSystemClipboard(). setContents(new StringSelection(""), null); } }); again: for(;;){ disableNewFolderButton(chooser); int result = chooser.showOpenDialog(null); switch(result){ case JFileChooser.APPROVE_OPTION: // Approve (Open or Save) was clicked File chosenfile = chooser.getSelectedFile(); cp.setFilename(" SandTrap File : "+chosenfile.getName()); String filename = chosenfile.getAbsolutePath(); if (Desktop.isDesktopSupported()) { try { File myFile = new File(filename); Desktop.getDesktop().open(myFile); Catcher2sandtrap c = new Catcher2sandtrap(checkUser,chosenfile); } catch (IOException ex) { // no application registered for PDFs } } //break; continue again; case JFileChooser.CANCEL_OPTION: Date date2 = new Date(); FloggerDB.InsertLog("READ ONLY SESSION LOGOUT", checkUser,dateFormat.format(date2) ); break again; case JFileChooser. ERROR_OPTION: // The selection process did not complete successfully System.out.println("The selection process did not complete successfully, Try again"); continue again; }//end Switch }//End for }//end if proceedup } else{ lblMessage1.setText("Please Enter UserName and Password"); lblMessage1.setTextFill(Color.RED); txtUserName.setText(""); pf.setText(""); break unsuccess; } } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } txtUserName.setText(""); pf.setText(""); } try { String user = checkUser; //Three Attempts allowed for user to login, else the account is locked. if(tryagain == 2){ //Call for method to enforce account locking UserAccountDB.LockAccount(checkUser); System.exit(0); } if(tryagain != 2 && user.equals(checkUser)){ tryagain = tryagain + 1; } //Username, password and session key are entered if(sa.SearchByName(checkUser,checkPw,checkSk)){ primaryStage.close(); DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); if(ClientInitiator.getIpaddress() != null){ UserAccountDB.InsertMAC(checkUser, ClientInitiator.getMACaddress(), ClientInitiator.getIpaddress()); FloggerDB.InsertLog("Session Login : "+ClientInitiator.getIpaddress()+" MAC : "+ClientInitiator.getMACaddress(), checkUser,dateFormat.format(date) ); } else{ try { FloggerDB.InsertLog("Session Login : "+InetAddress.getLocalHost().getHostName(), checkUser,dateFormat.format(date) ); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } } boolean proceed = true; if(proceed == true && unauth == false){ try { //To Set Windows Look and Feel for the FileGUI opener UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception e) { // handle exception } FileSystemView fsv = new ChrootFileSystemView(new File("E:\\DVFS")); JFileChooser chooser = new JFileChooser(fsv); chooser.setCurrentDirectory(new File("E:\\DVFS")); boolean sandtrap = false; FullScreenJFrame frame = null; frame = new FullScreenJFrame("MAZE Cloud Server File System",chooser,checkUser,sandtrap); chooser.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (KeyEvent.VK_PRINTSCREEN == e.getKeyCode()) Toolkit.getDefaultToolkit().getSystemClipboard(). setContents(new StringSelection(""), null); } }); boolean recursive = true; // register directory and process its events Path dir = Paths.get("E:/DVFS"); try { DirectoryWatch dw = new DirectoryWatch(dir,recursive,checkUser); Thread myThread = new Thread(dw); //Thread myThread1 = new Thread(cp); //ImagefromCB i = new ImagefromCB(); //Thread t2 = new Thread(i); cp.start(); myThread.start(); //t2.start(); // myThread1.start(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } frame.setVisible(true); again: for(;;){ if(unauth == true){ break; } int result = chooser.showOpenDialog(null); switch(result){ case JFileChooser.APPROVE_OPTION: // Approve (Open or Save) was clicked File chosenfile = chooser.getSelectedFile(); System.out.println("Chosen file :"+chosenfile.getName()); String filename = chosenfile.getAbsolutePath(); cp.setFilename(" Normal File : "+chosenfile.getName()); Update(chosenfile); if (Desktop.isDesktopSupported() && unauth == false) { try { String name = GetFileAttr.GetFileAttrs(chosenfile.getName(), checkUser); boolean fcfilelookup = FCFileLookup(chosenfile.getName(),checkUser); if(name.equals(checkUser) && !fcfilelookup){ DateFormat dateFormat1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date1 = new Date(); String file_group = GetFileAttr.GetFileGroup(chosenfile.getName()); String user_group = GetFileAttr.GetUserGroup(checkUser); update_user_file_forensics(chosenfile.getAbsolutePath(), checkUser, "ACCESS", dateFormat1.format(date1).toString(),user_group,file_group,"YES" ); File myFile = new File(filename); Desktop.getDesktop().open(myFile); } if(!name.equals(checkUser) && !fcfilelookup){ DateFormat dateFormat1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date1 = new Date(); String file_group = GetFileAttr.GetFileGroup(chosenfile.getName()); String user_group = GetFileAttr.GetUserGroup(checkUser); update_user_file_forensics(chosenfile.getAbsolutePath(), checkUser, "ACCESS", dateFormat1.format(date1).toString(),user_group,file_group,"NO" ); filename = filename.replaceFirst("E", "C"); System.out .println("Unauthorized access, Opening File : "+filename); UserAccountDB.LockAccount(checkUser); File myFile = new File(filename); cp.setFilename(" Trap File : "+myFile.getName()); Desktop.getDesktop().open(myFile); unauth = true; Catcher1 c = new Catcher1(checkUser,chosenfile,name); } if(DecoyFileLookup(chosenfile.getName(),checkUser) || fcfilelookup){ //Catcher1 c = new Catcher1(checkUser,chosenfile); DateFormat dateFormat11 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date11 = new Date(); //String file_group = GetFileAttr.GetFileGroup(chosenfile.getName()); //String user_group = GetFileAttr.GetUserGroup(checkUser); //update_user_file_forensics(chosenfile.getAbsolutePath(), checkUser, "ACCESS", dateFormat11.format(date11).toString(),user_group,file_group ); if(ClientInitiator.getIpaddress() != null ){ UserAccountDB.InsertIP(ClientInitiator.getIpaddress()); UserAccountDB.InsertIntruderMAC(ClientInitiator.getMACaddress()); FloggerDB.InsertLog(" READ ONLY LOGIN FROM IP:"+ClientInitiator.getIpaddress()+" mac : "+ClientInitiator.getMACaddress(), checkUser,dateFormat11.format(date11) ); } else{ FloggerDB.InsertLog(" READ ONLY LOGIN FROM IP:"+InetAddress.getLocalHost().getHostName(), checkUser,dateFormat11.format(date11) ); } boolean proceedup = true; if(proceedup == true){ try { //To Set Windows Look and Feel for the FileGUI opener UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception e) { // handle exception } FileSystemView fsv1 = new DirectoryRestrictedFileSystemView(new File("C:\\DVFS")); JFileChooser chooser1 = new JFileChooser(fsv1); chooser1.setCurrentDirectory(new File("C:\\DVFS")); sandtrap = true; FullScreenJFrame frame1 = new FullScreenJFrame("MAZE Cloud Server File System",chooser1,checkUser,sandtrap); frame1.setVisible(true); chooser1.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (KeyEvent.VK_PRINTSCREEN == e.getKeyCode()) Toolkit.getDefaultToolkit().getSystemClipboard(). setContents(new StringSelection(""), null); } }); again1: for(;;){ disableNewFolderButton(chooser1); int result1 = chooser1.showOpenDialog(null); switch(result1){ case JFileChooser.APPROVE_OPTION: // Approve (Open or Save) was clicked File chosenfile1 = chooser1.getSelectedFile(); String filename1 = chosenfile1.getAbsolutePath(); //Update access log for next detection //Update(chosenfile1); if (Desktop.isDesktopSupported()) { try { File myFile1 = new File(filename1); Desktop.getDesktop().open(myFile1); cp.setFilename(" Decoy File : "+chosenfile1.getName()); Catcher2sandtrap c = new Catcher2sandtrap(checkUser,chosenfile1); } catch (IOException ex) { // no application registered for PDFs } } //break; continue again1; case JFileChooser.CANCEL_OPTION: Date date2 = new Date(); FloggerDB.InsertLog("READ ONLY SESSION LOGOUT - Suspicious Activity", checkUser,dateFormat11.format(date2) ); //System.exit(0); break again1; case JFileChooser.ERROR_OPTION: // The selection process did not complete successfully System.out.println("The selection process did not complete successfully, Try again"); continue again1; }//end Switch }//End for }//end if proceedup } } catch (IOException ex) { // no application registered for PDFs } } continue again; case JFileChooser.CANCEL_OPTION: Date date2 = new Date(); FloggerDB.InsertLog("Session Logout", checkUser,dateFormat.format(date2) ); CreateExcelFile.InsertLogtoExcel(); CreateExcelFile.BreachLogtoExcel(); CreateExcelFile.AllFileLastAccessLogtoExcel(); CreateExcelFile.SandTrapLastAccessLogtoExcel(); CreateExcelFile.IPLogtoExcel(); CreateExcelFile.ForensicstoExcel(); //Cancel or the close-dialog icon was clicked //String sec_pass = SecPasswdGen.PasswdGenerator(); //Code to update Session key in db //sa.updatebyUsername(checkUser, sec_pass); //Way2SMS smssendagent = new Way2SMS(); //boolean smssent = smssendagent.SendMessage("MAZE Server :: Your Session key for next login : "+sec_pass,checkUser); break again; case JFileChooser.ERROR_OPTION: // The selection process did not complete successfully System.out.println("The selection process did not complete successfully, Try again"); continue again; }//end Switch } } } else{ lblMessage.setText("Incorrect user or pw."); lblMessage.setTextFill(Color.RED); } txtUserName.setText(""); pf.setText(""); sk.setText(""); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NullPointerException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally{ } } //update_user_file_forensics(chosenfile.getAbsolutePath(), checkUser, "ACCESS", dateFormat1.format(date1).toString(),user_group,file_group ); private void update_user_file_forensics(String absolutePath, String checkUser, String action, String accesstime, String user_group, String file_group, String privileged) { final String DB_URL = "jdbc:mysql://localhost:3306/FLOGGERDB"; Connection conn = null; //STEP 2: Register JDBC driver try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } String sql = null; //STEP 3: Open a connection //System.out.println("Connecting to a selected database..."); try { conn = DriverManager.getConnection(DB_URL, USER, PASS); Statement stmt1=conn.createStatement(); int count = 0; sql = "Select count(Filename) from user_document_access_table where Filename = '"+absolutePath+"'"; ResultSet rs = stmt1.executeQuery(sql); if(!rs.next()){ count = 1; } else count = rs.getInt(1)+1; sql = "Insert into user_document_access_table values('"+absolutePath+"','"+checkUser+"','"+action+"','"+accesstime+"','"+count+"','"+user_group+"','"+file_group+"','"+privileged+"') "; stmt1.executeUpdate(sql); stmt1.close(); conn.close(); } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } private boolean FCFileLookup(String name,String User) { // TODO Auto-generated method stub boolean result = DecoyFileDB.FCFileLookup(name, User); if(result == true){ UserAccountDB.LockAccount(User); } return result; //return false; } }); //Action for btnFtgtPwd btnFrgtPwd.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent event) { checkUser = txtUserName.getText().toString(); checkPw = pf.getText().toString(); //checkSk = sk.getText().toString(); try { if(sa.searchbySecPassword(checkUser,checkPw)){ lblMessage1.setText("Sending Session Key"); lblMessage1.setTextFill(Color.BLUEVIOLET); } else{ lblMessage1.setText("Please Enter UserName and Password"); lblMessage1.setTextFill(Color.RED); } } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } txtUserName.setText(""); pf.setText(""); } }); //Action for btnNewUser btnNewUser.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent event) { primaryStage.close(); InsertAccount.Callmain(null); txtUserName.setText(""); pf.setText(""); } }); //Add HBox and GridPane layout to BorderPane Layout bp.setTop(hb); bp.setCenter(gridPane); //Adding BorderPane to the scene and loading CSS Scene scene = new Scene(bp); scene.getStylesheets().add(getClass().getClassLoader().getResource("login.css").toExternalForm()); primaryStage.setScene(scene); primaryStage.titleProperty().bind( scene.widthProperty().asString(). concat(" : "). concat(scene.heightProperty().asString())); //primaryStage.setResizable(false); primaryStage.show(); }
[ "public void checkLoginMain() {\n\t\t\n\t\t//Check if logged in\n\t\tif (!this.isLoggedIn()) {\n\t\t\t\n\t\t\t//Return to login view\n\t\t\tIntent intent = new Intent(_context, AccountLogin.class);\n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Connect to the server.
private void connect() { if (connectThread == null) { connectThread = new ConnectThread(); connectThread.start(); } }
[ "public void connect() {\n\t\tif (connected) {\n\t\t\treturn; // if we are already connected, no need to re-connect\n\t\t}\n\n\t\t// connect to the server ina different thread\n\t\tThread connectThread = new Thread(serverThread);\n\t\tconnectThread.start();\n\t}", "public void connect() {\n\t\taddressToServer = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the resource locator for this item provider's resources.
@Override public ResourceLocator getResourceLocator() { return LanguageEditPlugin.INSTANCE; }
[ "public String getResourceLocator() {\r\n\t\treturn resourceLocator;\r\n\t}", "public ResourceLocator getResourceLocator() {\n \t\treturn J2EEPlugin.getDefault();\n \t}", "@Override\r\n\tpublic ResourceLocator getResourceLocator()\r\n\t{\r\n\t\treturn ((IChildCreationExtender) adapterFactory).getResourceLocator...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new connection entry.
public Connection createConnection(Packet packet, int proto, int srcIP, int srcPort, int destIP, int destPort) { Connection newConn = null; if (proto == Protocols.TCP) { newConn = new TCPConnection(); } else if (proto == Protocols.UDP) { newConn = new Connection(proto); } newConn.initialise(packet, srcIP, srcPort, destIP, destPort); addConnection(newConn); return newConn; }
[ "public void createConnection(MachineConnection connection);", "void add(Connection connection);", "private C tryNewConnection( final CacheEntry<C> entry,\n final ContactInfo<C> cinfo ) throws IOException {\n\n if (debug())\n dprint( \"->tryNewConnection: \" + cinfo ) ;\n\n t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a Quester of a specific Player
static public Quester getQuester(LivingEntity player) { if (!(player instanceof HumanEntity)) return null; return getQuester(((HumanEntity)player).getName()); }
[ "public Cell findPlayer() {\n return getPlayer().getCell();\n }", "public Player getPlayer(int playerID);", "public Player getPlayer(String username) {\n\t for (Player player : this.connectedPlayers) {\n\t if (player.getUsername().equals(username)) {\n\t return player;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methode um ein Vote anhand der ID zu finden
public Vote getVoteById(int id) { return this.vMapper.findVoteByID(id); }
[ "void voteFor(long pollIdLong, long id);", "public static Vote getVoteByID(String id){\n\t\tfor(Vote vote: votes){\n\t\t\tif(vote.getID().equalsIgnoreCase(id)){\n\t\t\t\treturn vote;\n\t\t\t}\n\t\t}\n\t\t//if we get here there was no vote. Create vote and return that.\n\t\tVote newVote = createVote(id);\n\t\tvote...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of the NozzleTips currently attached to the Nozzle.
public List<NozzleTip> getNozzleTips();
[ "public com.google.protobuf.ByteString\n getTipsBytes() {\n java.lang.Object ref = tips_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n tips_ = b;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form VentaEntradasPanel
public VentaTicketPanel(ArrayList<ButacaSesion> butacas, SesionBean sesion) { initComponents(); this.butacas=butacas; this.sesion=sesion; this.sesion.cargaPrecios(); cargarComboDescuetos(); jLabelObra.setText(sesion.getDescripcion()); jLabelFecha.setText(sesion.getFecha()); jLabelHora.setText(sesion.getHora()); jLabelNEntrdas.setText(""+butacas.size()); jLabelPrecio.setText(""+PrecioUtils.getPrecioEuros(sesion.getPrecio())); int total=butacas.size()*sesion.getPrecio(); jLabelTotal.setText(PrecioUtils.getPrecioEuros(total)); if(butacas.get(0).getIdEstado()==3){ //Todas las butacas deben tener el mismo estado cargarMotivos(butacas, sesion); }else{ cargarButacas(butacas); } }
[ "private void crearProductosVista(JPanel panel) { \n panel.setLayout(new FlowLayout()); \n productosVista = \n new ProductosVista(this, ProductosVista.RECIBIR_EVENTOS_RATON);\n panel.add(productosVista); \n }", "public JFVentasCrear() {\n initComponents();\n }", "protecte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a wait dialog, not visible.
public void createWaitDialog() { waitDialog = waitPane.createDialog(frame, "Waiting"); waitDialog.addWindowListener(new WaitDialogCloseListener(controler)); }
[ "public void createLoadingDialog() {\n waiting_dialog = new ProgressDialog(this);\n waiting_dialog.setCancelable(true);\n waiting_dialog.setCanceledOnTouchOutside(false);\n waiting_dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if this button is clicked, just close the dialog box and do nothing
public void onClick(DialogInterface dialog, int id) { dialog.cancel(); }
[ "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tdialog.dismiss(); \n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog) {\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Entry point for an InstructionVisitor.
public abstract void visit(InstructionVisitor visitor);
[ "public void accept(MethodVisitor mv) {\n/* 80 */ mv.visitInsn(this.opcode);\n/* 81 */ acceptAnnotations(mv);\n/* */ }", "private void accept() {\n mv.visitVarInsn(ins, i);\n }", "public void enter(InstructionInfo instruction, XPathContext context) {\n // do nothing\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assumes that given state is of type nt:file and then reads
@Nullable public static Blob getBlob(NodeState state, String resourceName){ NodeState contentNode = state.getChildNode(JcrConstants.JCR_CONTENT); checkArgument(contentNode.exists(), "Was expecting to find jcr:content node to read resource %s", resourceName); PropertyState property = contentNode.getProperty(JcrConstants.JCR_DATA); return property != null ? property.getValue(Type.BINARY) : null; }
[ "private void read_state() throws FileNotFoundException\n {\n FileInputStream fis = new FileInputStream(\"save/server_state_\" + this.port + \".obj\");\n\n try\n {\n ObjectInputStream in = new ObjectInputStream(fis);\n\n this.Bank = (Bank) in.readObject();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
implementors should invoke emitElement(element, rawElement) on each element they emit
Integer getBulkSize() { return bulkSize; }
[ "public void output(Element element) throws IOException;", "public void emit() {\n if (this.once.compareAndSet(false, true)) {\n this.parent.emit(this.index, this.value);\n }\n }", "private interface ElementProcessor {\r\n\t\t\t/**\r\n\t\t\t * is calle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update by query condition selective.
@Override public int updateByQuerySelective( IpRecordDO record, IpRecordQuery query){ return ipRecordExtMapper.updateByQuerySelective(record, query); }
[ "int updateByQuerySelective(Ares2ConfDO record, Ares2ConfQuery query);", "@Override\n\tpublic int update(String hql) {\n\t\tthrow new UnsupportedOperationException(\"Not supported yet.\");\n\t}", "int updateByPrimaryKeySelective(ImsQuery record);", "public void updateQuery(String condition) {\n MakeExp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public int compareTo(Cliente other) { if (!this.getNombreCompleto().equalsIgnoreCase(other.getNombreCompleto())) return this.getNombreCompleto().compareTo(other.getNombreCompleto()); return 0; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log.e("keyEvent", "msg" + KeyValue);
private synchronized void keyEvent(int KeyValue) { if (!SerialPortService.pool.isShutdown()) { Log.e("keyEvent1", "msg" + KeyValue); mExecute = new Execute(KeyValue); SerialPortService.pool.execute(mExecute); } else { SerialPortService.pool = Executors.newFixedThreadPool(4); mExecute2 = new Execute(KeyValue); SerialPortService.pool.execute(mExecute); } // keyTask = new KeyTask(); // keyTask.execute(KeyValue); }
[ "public void logKey(Key inKey) {\r\n\t\t//timestamp info found at geeksforgeeks.com\r\n\t\tString transactionInfo = \"\";\r\n\t\tTimestamp timestamp = new Timestamp(System.currentTimeMillis());\r\n\t\ttransactionInfo += timestamp.toString() + \" \" + inKey.toString();\r\n\t\tkeyLog.push(transactionInfo);\r\n\r\n\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use this method to return this same object after validation. If you are using a derived class, override this method with body and signature with return type DerivedClass return (DerivedClass) super.getSelfAsValid(validator)
public RefObj<T> getSelfAsValid(final Validator... validator) { final Validator v = validator.length == 0 ? new Validator() : validator[0]; constraintViolations = v.validate(this); if (constraintViolations.size() != 0) { throw new ConstraintsViolatedException(constraintViolations); } return this; }
[ "public TypeValidator getValidator()\r\n {\r\n return this;\r\n }", "public Validateable getValidator() {\n\t\treturn validator;\n\t}", "public TypeValidator getValidator() {\r\n/* 525 */ return (TypeValidator)this;\r\n/* */ }", "@Override\n\tpublic Validation<Senha> getValidation() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Salva template de notifica\u00E7\u00E3o Esse recurso salvar template notifica\u00E7\u00F5e
public TemplateNotificacaoDetalheResponse salvarTemplate(String conteudo, Long idConfiguracaoEmail, String tipoLayout, String tipoNotificacao, String remetente, String assunto, Boolean templatePadrao) throws ApiException { Object postBody = conteudo; // verify the required parameter 'conteudo' is set if (conteudo == null) { throw new ApiException(400, "Missing the required parameter 'conteudo' when calling salvarTemplate"); } // create path and map variables String path = "/api/templates-notificacoes".replaceAll("\\{format\\}","json"); // query params List<Pair> queryParams = new ArrayList<Pair>(); Map<String, String> headerParams = new HashMap<String, String>(); Map<String, Object> formParams = new HashMap<String, Object>(); queryParams.addAll(apiClient.parameterToPairs("", "idConfiguracaoEmail", idConfiguracaoEmail)); queryParams.addAll(apiClient.parameterToPairs("", "tipoLayout", tipoLayout)); queryParams.addAll(apiClient.parameterToPairs("", "tipoNotificacao", tipoNotificacao)); queryParams.addAll(apiClient.parameterToPairs("", "remetente", remetente)); queryParams.addAll(apiClient.parameterToPairs("", "assunto", assunto)); queryParams.addAll(apiClient.parameterToPairs("", "templatePadrao", templatePadrao)); final String[] accepts = { "application/json" }; final String accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "text/plain" }; final String contentType = apiClient.selectHeaderContentType(contentTypes); //String[] authNames = new String[] {"client_id", }; String[] authNames = new String[] {"client_id", "access_token"}; GenericType<TemplateNotificacaoDetalheResponse> returnType = new GenericType<TemplateNotificacaoDetalheResponse>() {}; return apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); }
[ "@Override\r\n\tpublic String soltarEspecial() {\n\t\treturn \"Chuva de cristais!!!\";\r\n\t}", "private void escribirEnPantalla() {\n }", "public String reemplazar(){\n\t\treturn this.contenido.replace('o','u');\n\t}", "public void spracujKorpusFormatu3(String korpus) {\n\t\tString vstup = \"../materialy/...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This adapter has a data subset and never updates entire database Individual timers are updated in button handlers.
@Override public void onSaveInstanceState(Bundle outState) { }
[ "@Override\n protected void refreshData() {\n }", "private void startTableUpdateTimer() {\n\t\tupdateTimer = new java.util.Timer();\n\t\tupdateTimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tif(TBL_Telemetry.getModel() == null\n\t\t\t\t|| TBL_Settings.getModel() == null) {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Chainable setter for the command string
public Command setCommandString(String command) { this.command = command; return this; }
[ "public void setCommand(String s)\n\t{\n\t\tcommand = s;\n\t}", "@Override\n\tprotected void setCommand(String newCmd_, int pos_) {\n\t\t\n\t}", "@DISPID(1829)\r\n @PropPut\r\n void setCommandText(\r\n java.lang.Object rhs);", "public void setCommand(String value) {\n\t\tcommand_ = value;\n\t}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This is the Constructor
public MoveOrderEffectChecker(OrderRuleChecker<T> next) { super(next); }
[ "Cokolady()\t{\r\n\t\tsuper();\r\n\t}", "public Cachorro() {\r\n }", "public Tanh() {\n\t}", "public Innlegg() {\n\t\t\n\t}", "public Copome() {\r\n\t}", "public Chord()\n\t{\n\t}", "private O()\r\n {\r\n super();\r\n }", "@Override\r\n\tpublic void init() {\n\t \r\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Replace this with your own logic
private boolean isPasswordValid(String password) { return password.length() > 4; }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "protected void method_5557() {}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n public int utilite() {\n return 0;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
setter function for phoneNumber
public void setPhoneNumber(String s) { this.phoneNumber = s; }
[ "public void setPhoneNumber(String numToSet) {\n phoneNum = numToSet;\n }", "public void setPhoneNumber(String pN){\r\n phoneNumber = pN;\r\n }", "public abstract void setPhone(java.lang.String phone);", "public void setPhoneNumber(String a){\n\t\tphoneNumber = a;\n\t}", "protected void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The content type of the document.
public String getContentType() { return this.contentType; }
[ "public Integer getContenttype() {\n return contenttype;\n }", "public String getType() {\r\n try {\r\n return getHeaderField(\"content-type\");\r\n } catch (IOException x) {\r\n return null;\r\n }\r\n\r\n }", "public String getContentType()\n {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string REMOVE_string_index = 999; The string to display to the user.
com.google.protobuf.ByteString getREMOVEStringIndexBytes();
[ "@Override\n\tpublic void remove(String str) {\n\n\t}", "public void mo15551a(String str) {\n Editor edit = this.f11053b.edit();\n edit.remove(str);\n edit.apply();\n }", "public void removeString(int offset, String str, String section);", "public void remove(int index){\n\t\tfor(int i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }