query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Convert an APIlevel sort parameter to servicelevel property name that JPA Data can sort by
String convertToSortProperty(String sortParameter) throws ValidationFailureException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Sort asc(QueryParameter parameter);", "java.lang.String getOrderBy();", "static String getSorting(String sortingKey, boolean modifier)\r\n {\r\n String s;\r\n if (sortingMap.containsKey(sortingKey))\r\n {\r\n s = sortingMap.get(sortingKey);\r\n }\r\n else\r\n ...
[ "0.6483751", "0.6058261", "0.5994711", "0.59568876", "0.5900837", "0.5896297", "0.58052504", "0.58005005", "0.5800459", "0.5766978", "0.5732453", "0.5698863", "0.5642676", "0.5642221", "0.55882066", "0.557718", "0.5570203", "0.55409545", "0.5479585", "0.5460962", "0.5457323",...
0.77754277
0
This method is called by the PCI framework whenever there is a message received from AMQ
public void processMessage(ICommit commitHandle) throws ContrailException { LOGGER.info("ProfileMessageListener-processMessage: Rreceived message "); long start = Instant.now().toEpochMilli(); ContrailMessage contrailMessage = commitHandle.getContrailMessage(); LOGGER.info("MSG Received - Payload: " + Strings.nullToEmpty(contrailMessage.getPayloadType()) + " msgname:" + contrailMessage.getMessageName()); try { String payload = parsePayloadToJSON(contrailMessage); // covert the XML payload to JSON PutRecordResult putRecordResult = kinesisRecordWriter.putRecord(payload.getBytes()); LOGGER.info("Message successfully written to kinesis stream with seqnuence no:" + putRecordResult.getSequenceNumber()); LOGGER.info("Committing results for " + payloadMap.get("fileName")); commitHandle.commit(); long end = Instant.now().toEpochMilli() - start; LOGGER.info("Time taken(ms)----" + end); } catch (XMLStreamException xmlse) { handleError("Error parsing payload: " + contrailMessage.getPayloadData(), xmlse, commitHandle); } catch (JsonProcessingException jsonExp) { handleError("Error converting the payload to JSON:", jsonExp, commitHandle); } catch (ProvisionedThroughputExceededException ptee) { handleError("Provisioned Throughput Exceeded for kinesisstream:", ptee, commitHandle); // TODO: DO we need back-off algorithm? I am assuming PCI framework should // already be doing this? } catch (Throwable exp) { handleError("Exception occured when trying to stream the AMQ payload to the KinesisDataStream:", exp, commitHandle); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void received() throws ImsException;", "protected abstract boolean systemReadyToHandleReceivedMessage();", "@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}", "@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tprocessBluetoothDeviceMessage(msg);\n\t\t\t}", "void systemMessageRece...
[ "0.6852186", "0.66346806", "0.66066", "0.6529934", "0.63645107", "0.6354325", "0.63422817", "0.6316104", "0.6312928", "0.63098985", "0.6255649", "0.62350756", "0.6227804", "0.6219878", "0.6211307", "0.6171314", "0.6132913", "0.6125403", "0.61249703", "0.6107402", "0.609987", ...
0.0
-1
This method parses the xML payload and converts relevant fields into JSON.
public String parsePayloadToJSON(ContrailMessage message) throws XMLStreamException, JsonProcessingException { LOGGER.info("Parsing payload"); if (CANDE_PAYLOAD_TYPE.equals(message.getPayloadType())) { // name of the file XMLString fileName = new XMLString(); // Object URL in contentdelivery bucket XMLString s3Uri = new XMLString(); // productId=LIVE to identify live feed or migration XMLString productId = new XMLString(); new XMLParser().getInnerTextFor("/ContentDeliveryData/fileTickets/fileTicket/fileName", fileName::set) .getInnerTextFor("/ContentDeliveryData/fileTickets/fileTicket/s3Uri", s3Uri::set) .getInnerTextFor("/ContentDeliveryData/fileTickets/fileTicket/directory", productId::set) .parse((String) message.getPayloadData()); this.payloadMap.put("fileName", fileName.get()); this.payloadMap.put("s3Uri", s3Uri.get()); this.payloadMap.put("productId", productId.get()); String transformedPayload = new ObjectMapper().writeValueAsString(this.payloadMap); LOGGER.info("Parsed payload: " + transformedPayload); // converts the map to json string return transformedPayload; } else { throw new IllegalStateException( "Unidentified Message Payload: " + Strings.nullToEmpty(message.getPayloadType())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static HelloAuthenticatedWithEntitlementPrecheck parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedWithEntitlementPrecheck object =\n new HelloAuthenticatedWithEntitlementPrecheck();\n\n int event;\n java.lang.Strin...
[ "0.55531096", "0.53775156", "0.53725773", "0.5353434", "0.5309598", "0.5274891", "0.525614", "0.5207809", "0.51876915", "0.5170936", "0.5168771", "0.5151974", "0.51339555", "0.5066499", "0.5051152", "0.5040254", "0.50370026", "0.50201297", "0.50164926", "0.49867857", "0.49851...
0.56773394
0
simple method to handle errors
protected void handleError(String message, Throwable t, ICommit commitHandle) { LOGGER.error(message, t); LOGGER.info("rollingback commit"); commitHandle.rollback(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void error();", "void handleError(Exception ex);", "public void handleError(int code);", "public void error(Exception e);", "protected abstract void error(String err);", "abstract void error(String error);", "protected void handleError(String error, boolean fromSysErr) {}", "@Override\n\t\t\t\...
[ "0.7596678", "0.75721174", "0.7385396", "0.73311234", "0.7250313", "0.71411175", "0.71398336", "0.7053671", "0.69759524", "0.68384564", "0.6729918", "0.67291015", "0.6719135", "0.6693208", "0.6679287", "0.66707003", "0.66297615", "0.66041183", "0.66041183", "0.66041183", "0.6...
0.0
-1
Getter for property file.
public File getFile() { return file; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File getPropertyFile() { return propertyFile; }", "public abstract String getPropertyFile();", "public String getPropertyFile() {\n return propertyFile;\n }", "File getPropertiesFile();", "public String getPropertyFile()\n\t{\n\t\treturn propertyFile;\n\t}", "public File getPropertiesFile() {\...
[ "0.85057217", "0.82707214", "0.8084881", "0.8014134", "0.8013847", "0.75876784", "0.74895006", "0.73606664", "0.71187806", "0.7118756", "0.71160567", "0.70706546", "0.70376414", "0.6991855", "0.69909436", "0.69909436", "0.693635", "0.68907636", "0.6882851", "0.6877971", "0.68...
0.0
-1
Setter for property file.
public void setFile(File file) { this.file = file; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void setPropFile(Properties prop) {\n\t\t\r\n\t}", "void setPropertiesFile(File file);", "public void setPropertyFile(String value) {\n File f = (new File(value)).getAbsoluteFile();\n if (f.isDirectory()) {\n throw new IllegalArgumentException(\n String.format(\"The fi...
[ "0.7984386", "0.7958936", "0.73674375", "0.7105392", "0.70681125", "0.6820171", "0.6817149", "0.67532665", "0.6673756", "0.6651986", "0.6618589", "0.6559776", "0.6528979", "0.6463804", "0.64525265", "0.64263266", "0.6416529", "0.6362349", "0.63407123", "0.6331622", "0.6326095...
0.0
-1
Getter for property repositoryFileName.
public String getRepositoryFileName() { return repositoryFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPropertyFileName()\r\n\t{\r\n\t\treturn propertyFileName;\r\n\t}", "public final String getPropertyFileName() {\n return propertyFileName;\n }", "public final String getFilename() {\n return properties.get(FILENAME_PROPERTY);\n }", "public static String getPropertyFilename() {\...
[ "0.7136101", "0.7052867", "0.70008874", "0.69808924", "0.68989646", "0.68650144", "0.68204266", "0.6790598", "0.67203915", "0.6688356", "0.6650322", "0.6638274", "0.6634737", "0.66234195", "0.6607622", "0.6584396", "0.65209997", "0.65166616", "0.6514624", "0.64940584", "0.649...
0.8443802
0
Setter for property repositoryFileName.
public void setRepositoryFileName(String repositoryFileName) { this.repositoryFileName = repositoryFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRepositoryFileName() {\n return repositoryFileName;\n }", "private void setFileNamePath(String value) {\n\t\tthis.fileNamePath = value;\n\t}", "@JsonSetter(\"fileName\")\r\n public void setFileName (String value) { \r\n this.fileName = value;\r\n }", "public void setPr...
[ "0.75686544", "0.64590764", "0.64023995", "0.63811606", "0.623422", "0.61567503", "0.61567503", "0.61567503", "0.61567503", "0.61567503", "0.61567503", "0.6077195", "0.6077195", "0.6075328", "0.6069526", "0.60652006", "0.60472435", "0.6017944", "0.6015151", "0.5990566", "0.59...
0.7976371
0
Return a string representation of this object. Useful for debugging.
public String toString() { StringBuffer buf = new StringBuffer(30); buf.append("\nFile: " + ((file != null)?file.getAbsolutePath():"null")); //NOI18N buf.append("\nRCS file: " + repositoryFileName); //NOI18N buf.append("\nRevision: " + leftRevision); //NOI18N if (rightRevision != null) { buf.append("\nRevision: " + rightRevision); //NOI18N } buf.append("\nParameters: " + parameters); //NOI18N // buf.append(differences.toString()); return buf.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() { return stringify(this, true); }", "public String toString()\n\t{\n\t\treturn Printer.stringify(this, false);\n\t}", "@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }", "public String toStrin...
[ "0.8568097", "0.8396631", "0.8314561", "0.82916665", "0.8258661", "0.8258661", "0.8206085", "0.8150062", "0.81305546", "0.8094898", "0.80837756", "0.808163", "0.80789715", "0.8039963", "0.80102456", "0.7984668", "0.7964688", "0.79480475", "0.79241526", "0.79241526", "0.792195...
0.0
-1
Getter for property rightRevision.
public String getRightRevision() { return rightRevision; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRightRevision(String rightRevision) {\n this.rightRevision = rightRevision;\n }", "public RevisionID getRevision() {\r\n\t\treturn revision;\r\n\t}", "public long getRevision() {\n\n return revision;\n }", "public Integer getRevision()\r\n {\r\n return (m_revision);\...
[ "0.7624234", "0.7419632", "0.7368235", "0.7343532", "0.7236669", "0.722588", "0.7166705", "0.7065404", "0.69673747", "0.6923988", "0.69093335", "0.6900807", "0.68258715", "0.68230927", "0.682248", "0.682248", "0.67653096", "0.67307156", "0.6703954", "0.6692177", "0.6568543", ...
0.8750878
0
Setter for property rightRevision.
public void setRightRevision(String rightRevision) { this.rightRevision = rightRevision; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRightRevision() {\n return rightRevision;\n }", "public void setRevision(Integer revision)\r\n {\r\n m_revision = revision;\r\n }", "public void setRight(BinNode<E> r)\n {\n right = r;\n }", "public long getRevision() {\n\n return revision;\n }", "...
[ "0.78186345", "0.6493536", "0.62897277", "0.6224561", "0.6203574", "0.61508864", "0.6135182", "0.6124604", "0.6111057", "0.6108289", "0.61064714", "0.6086725", "0.6086725", "0.6086725", "0.6086725", "0.6086725", "0.6086725", "0.6086725", "0.6086725", "0.6086725", "0.6086725",...
0.84706324
0
Getter for property leftRevision.
public String getLeftRevision() { return leftRevision; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLeftRevision(String leftRevision) {\n this.leftRevision = leftRevision;\n }", "public String getRightRevision() {\n return rightRevision;\n }", "public int getLeftNumber() {\n return leftNumber;\n }", "public BigInteger getNumLeft () {\n\t return numLeft;\n\t ...
[ "0.789492", "0.71947664", "0.6678077", "0.6670189", "0.66643244", "0.6604495", "0.6538384", "0.6523162", "0.65014577", "0.65014577", "0.65014577", "0.65014577", "0.6488971", "0.6484621", "0.64804125", "0.64774156", "0.64695257", "0.6464453", "0.64312506", "0.6398565", "0.6397...
0.8913546
0
Setter for property leftRevision.
public void setLeftRevision(String leftRevision) { this.leftRevision = leftRevision; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLeftRevision() {\n return leftRevision;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public b...
[ "0.8005732", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "0.6368976", "...
0.85464853
0
System.out.println("setLeftRange() min=" + min + " max=" +max);
public void setLeftRange(int min, int max) { leftBeginning = min; leftEnd = max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getRange();", "Range controlLimits();", "public void setRightRange(int min, int max) {\n rightBeginning = min;\n rightEnd = max;\n }", "public void setRange(Range range) { setRange(range, true, true); }", "@Override\r\n public String toString() {\r\n return \"Rang...
[ "0.73005146", "0.7211285", "0.6921234", "0.6893657", "0.68718225", "0.68541706", "0.6749524", "0.6712867", "0.6712351", "0.6700068", "0.66843015", "0.6665366", "0.6647491", "0.6636856", "0.6636844", "0.66206694", "0.66114557", "0.66007483", "0.65693027", "0.65581167", "0.6555...
0.79295444
0
System.out.println("setRightRange() min=" + min + " max=" +max);
public void setRightRange(int min, int max) { rightBeginning = min; rightEnd = max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Range controlLimits();", "int getRange();", "public double getRange(){\n\t\treturn range;\n\t}", "void calculateRange() {\n //TODO: See Rules\n }", "public void setLeftRange(int min, int max) {\n leftBeginning = min;\n leftEnd = max;\n }", "@Override\r\n public S...
[ "0.7342053", "0.7285278", "0.68816316", "0.68435246", "0.6840836", "0.6776722", "0.6765449", "0.67648536", "0.67373705", "0.67293686", "0.67232496", "0.66663975", "0.6657596", "0.6591292", "0.65889543", "0.6559222", "0.6514703", "0.6502888", "0.64902055", "0.6478884", "0.6471...
0.80927014
0
We can override a method from a superclass and at the same time call it like this
public void roam() { super.roam(); System.out.println(", and now that it is a wolf it is very dangerous for its prey"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void myMethod(){\n\t\t\tsuper.myMethod();\n\t\t\tSystem.out.println(\"Overriding method\");\n\t\t }", "@Override\r\n\tpublic void method() {\n\t\tsuper.method();\r\n\t\tSystem.out.println(\"Iam in a subclass\");\r\n\t}", "@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\...
[ "0.79531425", "0.763518", "0.73819405", "0.7259315", "0.71855515", "0.70915866", "0.70915866", "0.70915866", "0.6987226", "0.698583", "0.6979913", "0.69517344", "0.69322294", "0.69205856", "0.68807876", "0.6767273", "0.671222", "0.67005366", "0.66708344", "0.66597366", "0.664...
0.0
-1
TODO Autogenerated method stub
@Override public int describeContents() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeList(lista); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Co...
[ "0.8125658", "0.78537387", "0.78320265", "0.776199", "0.776199", "0.76010174", "0.74497247", "0.7437837", "0.7430714", "0.742303", "0.74057597", "0.7341963", "0.7327749", "0.72634363", "0.72230434", "0.7102504", "0.70575505", "0.69873077", "0.69721675", "0.6944077", "0.691256...
0.0
-1
return b1 + a1 + a2; // won't compile because of private a1
int calculate() { return getSum() + b1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int sumar(){\n return this.a+this.b;\n }", "public int suma(){\r\n return x+y;\r\n }", "int method01(int a, int b) {\n\n\t\ta = a + b;\n\t\treturn a;\n\t}", "public double add(int a, int b){\r\n return a + b;\r\n }", "public int addition(int a, int b){\n return a + b;\n ...
[ "0.66680175", "0.64666426", "0.63814825", "0.6367715", "0.63276386", "0.6301787", "0.6284335", "0.6273028", "0.6239382", "0.62137735", "0.61941344", "0.61900574", "0.6123209", "0.6122413", "0.6115963", "0.61130565", "0.6109924", "0.61009496", "0.6083885", "0.6065284", "0.6013...
0.5762606
36
TODO Autogenerated method stub
@Override public boolean isAccountNonExpired() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public boolean isAccountNonLocked() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public boolean isCredentialsNonExpired() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
This interface and its implementation represents the java model for binding extension element.
public interface BindingExt extends ExtComponent { //TODO: define get/set methods for properties for BindingExt if the extension element has attributes. /** * This class is an implementation of BindingExt interface that provides java model * for binding extensibility element. */ public static class BindingExtImpl extends ExtModelImpl implements BindingExt { public BindingExtImpl(WSDLModel model, Element e) { super(model, e); } public BindingExtImpl(WSDLModel model) { this(model, createPrefixedElement(QN_BINDING_EXT, model)); } public void accept(ExtVisitor visitor) { visitor.visit(this); } @Override public boolean canBeAddedTo(Component target) { if (target instanceof Binding) { return true; } return false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface WrsBindingItem {\n\n int getColumnNumber();\n Boolean isEscapeXML();\n void toXML(XMLStreamWriter writer, boolean withColumnExpression) throws XMLStreamException;\n boolean hasWrsAAttributes();\n Collection...
[ "0.6003375", "0.5970077", "0.5959276", "0.59102225", "0.59012854", "0.5869112", "0.586747", "0.5810735", "0.5788031", "0.57304597", "0.56891745", "0.5679318", "0.5631191", "0.5606828", "0.5591288", "0.5583088", "0.5567784", "0.55150187", "0.55011904", "0.5482969", "0.54818505...
0.8253859
0
TODO: Move defaults to config
public void setState(Bundle savedInstanceState) { init(savedInstanceState.getLong("remainingTime", 30000)); if (savedInstanceState.getBoolean("timerRunning", true)) { timer.start(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void config() {\n\t}", "public void initDefaultValues() {\n }", "private Config() {\n }", "protected void performDefaults() {\r\n\t}", "private OptimoveConfig() {\n }", "public void loadDefaultValues() {\r\n\t}", "@Override\n\t\t\tprotected void configure() {\n\t\t\t}", "public v...
[ "0.6899998", "0.654779", "0.6451653", "0.63784766", "0.63547945", "0.62748533", "0.6256228", "0.6185437", "0.6176448", "0.6138955", "0.6111801", "0.6109299", "0.60745364", "0.604905", "0.60311896", "0.6020048", "0.6006709", "0.5996248", "0.59852767", "0.5980698", "0.59496826"...
0.0
-1
Let's grab all data concerning this cat that has this label
public void analyze( Cat subject, String actual_trigger_label, DetectionAgentProfile profile, ServerInterface<Cat> datastore) throws Throwable { RawData<Cat>[] data = datastore.findRawData( actual_trigger_label, subject); for (RawData<Cat> entry : data) { if (! entry.data.contains("HELP")) { continue; } Evidence<Cat> report = new Evidence<Cat>(); report.subject = subject; report.score = 10; report.report = "<h2>HELP detector</h2>" + "<p>I found a cry for help!</p>"; // Use the time reference of the last submitted data report.time = data[data.length - 1].time; // As for the data agent, we use the label that was defined in // the configuration file report.label = profile.label; // And save the report datastore.addEvidence(report); // No need to go further return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Label> findAllByKey(String key);", "Collection<? extends Object> getLabel();", "Collection<? extends Object> getLabel();", "Optional<CoreLabelSequence> getGroupedByFirstLabel(CoreLabel label);", "DatasetLabel getLabel();", "com.google.ads.googleads.v6.resources.Label getLabel();", "public List<Lab...
[ "0.5879227", "0.5767225", "0.5767225", "0.567417", "0.564368", "0.5463792", "0.53789055", "0.5354688", "0.5351415", "0.53471756", "0.5336734", "0.5315389", "0.52918446", "0.5270218", "0.5262904", "0.5249518", "0.5249518", "0.5249518", "0.5246158", "0.52414894", "0.52414894", ...
0.0
-1
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 Cda)) { return false; } Cda other = (Cda) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
get the list of building food product.
@GetMapping("/buildingFoodProduct") @ResponseBody public List<BuildingFoodProduct> getBuildingFoodProduct() { return repository.findAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/buildingFoodProduct/moreDetails\")\n @ResponseBody\n public List<BuildingFoodProduct> getBuildingFoodProductBasedOnBuilding(@RequestParam(value = \"building\", defaultValue = \"0\") int building) {\n try {\n return repository.findAllByBuilding(new Building(building));\n ...
[ "0.7342206", "0.6763735", "0.66785127", "0.66785127", "0.65452886", "0.6479331", "0.64645696", "0.6449674", "0.6364797", "0.63644874", "0.6361483", "0.63491064", "0.6324386", "0.6292562", "0.62897074", "0.62897074", "0.62897074", "0.625937", "0.6221832", "0.62017274", "0.6200...
0.7736075
0
create the new building food product.
@PostMapping("/buildingFoodProduct") @ResponseBody public ResponseEntity createNewBuildingFoodProduct(@RequestBody BuildingFoodProduct newBuildingFoodProduct, @RequestParam(value = "token", defaultValue = "invalid") String token) { if (token.equals("invalid")) { ErrorResponse errorResponse = new ErrorResponse("Building food product creation error", "Check if you sent the token", HttpStatus.FORBIDDEN.value()); return new ResponseEntity<>(errorResponse, HttpStatus.FORBIDDEN); } if (userRepository.findUserByToken(token) == null || !userRepository.findUserByToken(token).getRole().equals("admin")) { ErrorResponse errorResponse = new ErrorResponse("Building food product creation error", "Only the administrator can create new buildings.", HttpStatus.FORBIDDEN.value()); return new ResponseEntity<>(errorResponse, HttpStatus.FORBIDDEN); } repository.save(newBuildingFoodProduct); ErrorResponse okResponse = new ErrorResponse("Building food product creation", "NEW BUILDING FOOD PRODUCT FOR BUILDING: " + newBuildingFoodProduct.getBuilding() + " PRICE: " + newBuildingFoodProduct.getPrice() + " FOOD PRODUCT: " + newBuildingFoodProduct.getFoodProduct(), HttpStatus.OK.value()); return new ResponseEntity<>(okResponse, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName....
[ "0.67360324", "0.65447134", "0.63982695", "0.61663234", "0.6108148", "0.6021177", "0.60008556", "0.5986741", "0.59684396", "0.5890791", "0.5890616", "0.58898383", "0.58742285", "0.5872256", "0.58562714", "0.58486754", "0.58480036", "0.5838696", "0.5792711", "0.5769466", "0.57...
0.65425444
2
Returns the products in a certain building.
@GetMapping("/buildingFoodProduct/moreDetails") @ResponseBody public List<BuildingFoodProduct> getBuildingFoodProductBasedOnBuilding(@RequestParam(value = "building", defaultValue = "0") int building) { try { return repository.findAllByBuilding(new Building(building)); } catch (Exception e) { return new ArrayList<>(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Product getPProducts();", "public List<Product> returnProducts() throws FlooringMasteryDaoException {\n\n List<Product> products = dao.loadProductInfo();\n return products;\n\n }", "@CrossOrigin \n\t@GetMapping(\"/all/{building}\")\n\tpublic List<Room> getRooms(@PathVariable String building) {...
[ "0.62952375", "0.6173153", "0.6005703", "0.5978516", "0.58985466", "0.58985466", "0.5886627", "0.5837729", "0.5829073", "0.5828941", "0.5821266", "0.58189833", "0.57403576", "0.57403576", "0.57403576", "0.5705531", "0.5684501", "0.56792223", "0.5676125", "0.56690174", "0.5667...
0.7135414
0
Deletes a certain foodProduct.
@DeleteMapping("/buildingFoodProduct/{foodId}/{buildingNumber}") @ResponseBody public ResponseEntity removeBuilding(@PathVariable int foodId, @PathVariable int buildingNumber, @RequestParam(value = "token", defaultValue = "invalid") String token) { if (token.equals("invalid")) { ErrorResponse errorResponse = new ErrorResponse("Building food product delete error", "Check if you sent the token", HttpStatus.FORBIDDEN.value()); return new ResponseEntity<>(errorResponse, HttpStatus.FORBIDDEN); } if (userRepository.findUserByToken(token) == null || !userRepository.findUserByToken(token).getRole().equals("admin")) { ErrorResponse errorResponse = new ErrorResponse("Building food product delete error", "Only the administrator can delete buildings.", HttpStatus.FORBIDDEN.value()); return new ResponseEntity<>(errorResponse, HttpStatus.FORBIDDEN); } repository.deleteById(new BuildingFoodProductId(foodId, buildingNumber)); ErrorResponse okResponse = new ErrorResponse("Building deleted", "DELETED FOOD: " + foodId, HttpStatus.OK.value()); return new ResponseEntity<>(okResponse, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteProduct(Product product) throws ServiceException;", "void deleteProduct(int productId) throws ProductException;", "@Override\n\tpublic void deleteProduct(int product_id) {\n\n\t}", "private void deleteProduct() {\n // Only perform the delete if this is an existing Product.\n if (mCur...
[ "0.78314894", "0.7806493", "0.7760005", "0.7711978", "0.769672", "0.7688532", "0.75499916", "0.75015545", "0.7449695", "0.7447903", "0.7443665", "0.73717135", "0.7370295", "0.7321265", "0.7316263", "0.73155755", "0.727983", "0.72771657", "0.7276708", "0.72594243", "0.72445565...
0.0
-1
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); tagButton = (TagButton)findViewById(R.id.mTagButton); tagButton.setChecked(true); tagButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Toast.makeText(Test.this, Boolean.toString(tagButton.getStatus()), Toast.LENGTH_SHORT).show(); } }); tagButton.setOnChangListener(new OnSwitchChangListener() { @Override public void onSwitchChange(TagButton tagButton, boolean isChecked) { // TODO Auto-generated method stub if (isChecked) { Toast.makeText(Test.this, "开", Toast.LENGTH_SHORT).show(); } else { { Toast.makeText(Test.this, "关", Toast.LENGTH_SHORT).show(); } } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { Toast.makeText(Test.this, Boolean.toString(tagButton.getStatus()), Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onSwitchChange(TagButton tagButton, boolean isChecked) { if (isChecked) { Toast.makeText(Test.this, "开", Toast.LENGTH_SHORT).show(); } else { { Toast.makeText(Test.this, "关", Toast.LENGTH_SHORT).show(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Date date = new Date(); System.out.println(date.toString()); //If date is required in specific format SimpleDateFormat sdf = new SimpleDateFormat("M/d/yyyy hh::mm::ss"); sdf.format(date); System.out.println("In required date format "+sdf.format(date)); //Using calendar objects Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf1 = new SimpleDateFormat("M/d/yyyy hh::mm::ss"); System.out.println("Using the Calendar objects "+sdf1.format(cal.getTime())); System.out.println("Methods in Calendar "+Calendar.DAY_OF_WEEK_IN_MONTH); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Sets editor visibility. If the editor is associated with a dialog, sets the dialog visibility.
@Override public void setVisible(boolean value) { if(this.getTabCount() <= 0) { return; // no editor actually exists } if (dialog != null) { dialog.setVisible(value); super.setVisible(value); } else { super.setVisible(value); } if (value) { UIBuilder.playSound("sounds/fordps3_boop.wav"); String selectedTitle = JEntityEditor.this.getTitleAt(JEntityEditor.this.getSelectedIndex()); entity.getWorld().getSandbox().fireEvent("ENTITY_EDITOR_OPENED", LuaValue.valueOf(selectedTitle), entity.getLuaValue()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setVisible(boolean visible) {\n\t\tsuper.setVisible(visible);\n\t\tif (visible && invalidFieldEditor != null) {\n\t\t\tinvalidFieldEditor.setFocus();\n\t\t}\n\t}", "public void setEditor(Editor editor) {\n this.currentEditor = editor;\n refreshView();\n }", "public voi...
[ "0.6076935", "0.59794873", "0.5855419", "0.5829935", "0.5807084", "0.57924896", "0.5743598", "0.5696641", "0.5627486", "0.5575526", "0.5573624", "0.5507904", "0.55004686", "0.5492524", "0.5487697", "0.5480964", "0.5458261", "0.5458261", "0.5405077", "0.538373", "0.5378556", ...
0.7155651
0
Writes the given state to the entity. Returns true if the write is successful, otherwise returns false.
public boolean writeToEntity(Entity entity) { entity.setName(name); if (this.scripts != null) entity.getScripts().setTo(scripts); entity.setHelp((this.help == null) ? "" : this.help); if (this.permissions != null) entity.setPermissions(this.permissions); if(entity instanceof Sign) { ((Sign)entity).setMessage(signText); } // TODO: write image to Entity? // TODO: write position to Entity? return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static boolean savePlayerState(PlayerState playerState) {\n if (playerState.getId() == null) {\n return insertPlayerState(playerState);\n } else {\n return updatePlayerState(playerState);\n }\n }", "public static boolean setState(LauncherState state, Context context)...
[ "0.54534984", "0.5453087", "0.54009026", "0.53150696", "0.53040564", "0.52790165", "0.52592856", "0.52449006", "0.5244775", "0.52269536", "0.5220229", "0.5202549", "0.51708925", "0.516629", "0.5089197", "0.50751245", "0.50282943", "0.50160444", "0.5001797", "0.4963032", "0.49...
0.51939446
12
Shows the help frame, if there is not one showing already.
private void showHelp() { if (_OpenHelpFrame != null) { _OpenHelpFrame.requestFocus(); return; } final JTextArea textPane = new JTextArea(); textPane.setEditable(JEntityEditor.this.security.level >= JEntityEditor.this.entity .getPermission(Entity.PERMISSION_EDIT_HELP).level); textPane.setLineWrap(true); textPane.setWrapStyleWord(true); textPane.setText(state.help == null ? "" : state.help); _OpenHelpFrame = new JFrame(); _OpenHelpFrame.setMinimumSize(new Dimension(300, 400)); _OpenHelpFrame.setModalExclusionType(Dialog.ModalExclusionType.NO_EXCLUDE); _OpenHelpFrame.setAlwaysOnTop(true); _OpenHelpFrame.setLocationRelativeTo(this); _OpenHelpFrame.setLocation(this.getWidth(), 0); _OpenHelpFrame.setTitle("Help"); _OpenHelpFrame.addWindowListener(new WindowListenerAdapter() { @Override protected void event(WindowEvent e) { if (e.getID() != WindowEvent.WINDOW_CLOSING && e.getID() != WindowEvent.WINDOW_CLOSED) return; if (security.level >= JEntityEditor.this.entity.getPermission(Entity.PERMISSION_EDIT_HELP).level) state.help = textPane.getText(); _OpenHelpFrame = null; } }); _OpenHelpFrame.add(new JScrollPane(textPane)); _OpenHelpFrame.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void ShowHelpScreen() {\n ToggleVisibility(HelpPage.window);\n }", "public void showHelp();", "private void showHelpDialog() {\n\n view.helpDialog();\n }", "void showHelp() {\n\t\tif (helpScreen == null) {\n\t\t helpScreen = new Form(\"Walking Help\");\n\t\t helpScreen...
[ "0.77939904", "0.77885234", "0.77192426", "0.76680857", "0.7597706", "0.7502829", "0.7471486", "0.7438869", "0.7364739", "0.73571795", "0.73077273", "0.73008335", "0.72972363", "0.7280953", "0.72701025", "0.7160489", "0.7134579", "0.71194977", "0.7084948", "0.70503265", "0.69...
0.7928256
0
================================================== ====== JEntityEditor dialog STUFF ================ ==================================================
public static JEntityEditor createEntityEditorPane(Entity entity, SecurityLevel securityLevel, Container addTo, WorldView view, boolean transparent) { // If there's already an open editor for this entity, don't allow // another dialog. JEntityEditor existing = openEditors.get(entity); if (existing != null) { if (existing.dialog != null) existing.dialog.requestFocus(); else existing.requestFocus(); return existing; } // Create the editor. JEntityEditor jee = new JEntityEditor(entity, securityLevel, transparent); if (jee.getTabCount() == 0) // Security allow any editing? return jee; // The dialog will handle commit/cancel. It packages up and pushes its // own Undoable. ActionListener dialogController = new DialogController(addTo, jee, entity, view); JPanel pnlButtons = new JPanel(new HorizontalLayout()); if (transparent) pnlButtons.setOpaque(false); pnlButtons.add(UIBuilder.buildButton().image("icons/ok.png").toolTip("Approve changes and close the dialog.") .action("COMMIT", dialogController).create()); pnlButtons.add(UIBuilder.buildButton().image("icons/close.png").toolTip("Cancel changes and close the dialog.") .action("CANCEL", dialogController).create()); pnlButtons.add(UIBuilder.buildButton().image("icons/zoom.png").toolTip("Set view to center.") .action("CENTER_VIEW", dialogController).border(new EmptyBorder(10, 10, 10, 10)).create()); pnlButtons.add(UIBuilder.buildButton().image("icons/question.png").toolTip("Open help regarding this entity.") .action("HELP", dialogController).create()); addTo.setLayout(new BorderLayout()); addTo.add(jee, BorderLayout.CENTER); addTo.add(pnlButtons, BorderLayout.SOUTH); return jee; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void showEditedEntity(Entity e);", "public static JEntityEditor createDialog(java.awt.Window owner, Entity entity, String title,\n\t\t\tSecurityLevel securityLevel, WorldView view) {\n\n\t\t// Check if there's already an open editor for this entity. If so, just\n\t\t// return that editor.\n\t\...
[ "0.6736398", "0.6576457", "0.62890553", "0.62645996", "0.6150915", "0.6052285", "0.6034192", "0.5858089", "0.58529234", "0.5850406", "0.58278596", "0.5817629", "0.5813145", "0.5786378", "0.5775456", "0.5722561", "0.5715133", "0.5710951", "0.5676684", "0.56586444", "0.5629687"...
0.58526325
9
Returns null if security will not allow any editing of this entity.
public static JEntityEditor createDialog(java.awt.Window owner, Entity entity, String title, SecurityLevel securityLevel, WorldView view) { // Check if there's already an open editor for this entity. If so, just // return that editor. if (openEditors.containsKey(entity)) { JEntityEditor existing = openEditors.get(entity); existing.requestFocus(); return existing; } // Build the dialog. JDialog dialog = new JDialog(owner, title, Dialog.ModalityType.MODELESS); JEntityEditor jee = createEntityEditorPane(entity, securityLevel, dialog, view, false); // Create the dialog that contains the editor. openEditors.put(entity, jee); if(jee.getTabCount() > 0) { jee.dialog = dialog; // If a dialog is disposed, it should remove the entity from the // already-open dialog list, and dispose of any help frames so they're // not orphans. dialog.addWindowListener(new WindowListenerAdapter() { @Override protected void event(WindowEvent e) { if (e.getID() != WindowEvent.WINDOW_CLOSING && e.getID() != WindowEvent.WINDOW_CLOSED) return; openEditors.remove(entity); if (jee._OpenHelpFrame != null) jee._OpenHelpFrame.dispose(); } }); dialog.setSize(600, 500); } else { dialog.dispose(); } return jee; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean getCanEdit() {\r\n return getAttributeAsBoolean(\"canEdit\");\r\n }", "@Override\n\tpublic EditLogic getEditLogic() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Usuario edit(Usuario obj) {\n\t\treturn null;\n\t}", "public boolean canEdit() throws GTClientException\n {\n retur...
[ "0.6541905", "0.64274514", "0.64139986", "0.6263642", "0.6221389", "0.6176162", "0.6097393", "0.5991437", "0.5944702", "0.59290844", "0.5891361", "0.5882741", "0.58737093", "0.5831706", "0.5819081", "0.5802647", "0.57774806", "0.5777224", "0.57481027", "0.5737838", "0.5719334...
0.0
-1
get Template by Company id and Template title
public Template getTemplateByCompanyIdAndTemplateTitle(Template template) { return templateMapper.getTemplateByCompanyIdAndTemplateTitle(template); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Template getTemplate(Website website, String context, boolean is_list) throws TemplateNotFoundException, StorageException{\n\t\t\n\t\tSet<Map<String, String>> results = new LinkedHashSet<>();\n\t\tString template_type;\n\t\t\n\t\tif(is_list) {\n\t\t\ttemplate_type = \"list_templates\";\n\t\t} else {\n\t\t\t...
[ "0.6239028", "0.6175217", "0.6173393", "0.6054595", "0.59172565", "0.58712786", "0.57827806", "0.5621491", "0.5590036", "0.5584196", "0.5556099", "0.55173665", "0.55149305", "0.5510134", "0.54885393", "0.54808915", "0.54801923", "0.5424897", "0.53484595", "0.53144103", "0.528...
0.7752857
0
String Tokenizer is used to break a string into tokens.
public static void main(String[] args) { StringTokenizer s = new StringTokenizer("java programming language"); while (s.hasMoreTokens()) { System.out.println(s.nextToken());// to print all tokens } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TokenString(String s) {\n\tthis(new Tokenizer(s));\n}", "private Token tokenize(String string) {\n\t\t\tswitch(string) {\n\t\t\tcase \"<\":\n\t\t\t\tif(text[currentIndex] == '=') {\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\treturn new Token(TokenType.OPERATOR, ComparisonOperators.LESS_OR_EQUALS);\n\t\t\t\t}\n\...
[ "0.71746844", "0.7150136", "0.7063507", "0.68237865", "0.67339575", "0.66882807", "0.6609051", "0.65202385", "0.647284", "0.62633103", "0.6235002", "0.6193904", "0.61791855", "0.615264", "0.6150313", "0.60963345", "0.60813427", "0.59745497", "0.59651315", "0.59588486", "0.591...
0.0
-1
Attributes ==================================================================================== Constructors ====================================================================================
public Person(){ super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Attr() {\n\t\t\tsuper();\n\t\t}", "public IRAttribute ( ) {\n\t\tsuper();\n\t}", "public AttributeContainer() {\n super();\n }", "Attribute createAttribute();", "Attribute createAttribute();", "protected abstract void createAttributes();", "public ModuleObjectAttributeItem() {}", "pu...
[ "0.76734316", "0.7311558", "0.72829086", "0.71320856", "0.71320856", "0.70094377", "0.69207996", "0.6919862", "0.6859674", "0.6845855", "0.6767488", "0.6760688", "0.675506", "0.6733026", "0.6711127", "0.66963595", "0.6672172", "0.6671454", "0.6655113", "0.66349936", "0.660839...
0.0
-1
Created by SUDHEESH on 10/7/2017.
public interface clickk { public void abv(View v,int pos,String key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic...
[ "0.60691327", "0.60379064", "0.5837735", "0.5801821", "0.5799079", "0.576078", "0.57600826", "0.57600826", "0.5735898", "0.57051903", "0.56845593", "0.5675209", "0.5644788", "0.5623429", "0.56094015", "0.56077486", "0.5593667", "0.55693084", "0.5560811", "0.5560273", "0.55579...
0.0
-1
By default, all files to delete are brought to the driver at once which may be an issue with very long file lists. Set this to true to use toLocalIterator if you are running into memory issues when collecting the list of files to be deleted.
public ExpireSnapshotsAction streamDeleteResults(boolean stream) { delegate.option("stream-results", Boolean.toString(stream)); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void prune(java.io.File localDir, List<File> driveFiles) {\n java.io.File[] localArray = localDir.listFiles();\n for (java.io.File f : localArray) {\n boolean found = false;\n String lname = f.getName();\n for (File gf : driveFiles) {\n String g...
[ "0.5923413", "0.57364154", "0.57116675", "0.57116675", "0.56127864", "0.5579554", "0.5537979", "0.55312663", "0.55239236", "0.5511094", "0.54603964", "0.5403466", "0.53503877", "0.5318032", "0.5306053", "0.52873147", "0.5285563", "0.5245352", "0.52452016", "0.52400494", "0.52...
0.0
-1
setters update highest score
public void updateHighestScoreDisplay(int score){ this.score.setText("Highest Score: "+score); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }", "void setBestScore(double bestScore);", "@Override\n public int higherScore() {\n if (!scoresUpToDate) {\n updateScores();\n }\n return higherScore;\n }", "...
[ "0.7858184", "0.78226715", "0.7658034", "0.7631782", "0.7472064", "0.7435709", "0.7398126", "0.7151496", "0.714442", "0.71044874", "0.7006574", "0.69809794", "0.6965136", "0.6939094", "0.69388485", "0.6931668", "0.6928719", "0.6928719", "0.6928204", "0.6927866", "0.6926903", ...
0.7564899
4
Creates partitioning for a Prolog document. Partitions are: comment, list, default
public PrologPartitionScanner() { super(); IToken prologComment = new Token(PROLOG_COMMENT); IToken prologList = new Token(PROLOG_LIST); PrologListRule list = new PrologListRule(prologList); MultiLineRule comment = new MultiLineRule("/*", "*/", prologComment, (char) 0, true); EndOfLineRule comment2 = new EndOfLineRule("%", prologComment); IPredicateRule[] rules = new IPredicateRule[] { list, comment, comment2 }; setPredicateRules(rules); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createPartition(int nPid);", "@Override\n public void createPartition(Partition partition) {\n \n }", "public void partition() \n\t{\n\t\tXPath xPath = getXPathHandler();\n\t\tNodeList parentNodes;\n\t\ttry {\n\t\t\tparentNodes = (NodeList)xPath.compile(this.getParentContainerXPath())....
[ "0.6293984", "0.6242235", "0.6234188", "0.5999312", "0.5888909", "0.5504259", "0.54934895", "0.5484738", "0.54348356", "0.54326135", "0.5376382", "0.5332887", "0.53287345", "0.532309", "0.5262306", "0.5204691", "0.5187415", "0.5112112", "0.5109162", "0.5094705", "0.5090862", ...
0.5954699
4
Creates a random matrix source of specified dimensions.
public static MatrixSource asRandomSource(int rows, int columns) { return new RandomMatrixSource(rows, columns); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static DenseMatrix generateRandomMatrix (int rows, int cols, int m_seed){\n\n Random random_value = new Random(m_seed);\n DenseMatrix randomMX = new DenseMatrix(rows, cols);\n for (int i=0; i<rows; i++){\n for (int j=0; j<cols;j++){\n randomMX.set(i,j, random_...
[ "0.64221776", "0.6013959", "0.56631005", "0.54993623", "0.5496838", "0.5356281", "0.5291787", "0.5242152", "0.5234286", "0.5234286", "0.51444674", "0.5116179", "0.5101629", "0.5003733", "0.49376363", "0.49366584", "0.49325055", "0.48654616", "0.48634282", "0.48499805", "0.480...
0.6977806
0
Makes a minimum matrix accumulator that accumulates the minimum of matrix elements.
public static MatrixAccumulator mkMinAccumulator() { return new MinMatrixAccumulator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Matrix min(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols(), den = rows_c;\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c, m);\n for (int col = 1; col <= cols_c; col++) {\n ...
[ "0.6428809", "0.6005879", "0.58638424", "0.57794935", "0.57076937", "0.5701049", "0.5693215", "0.5617237", "0.5590669", "0.5575352", "0.55727416", "0.5483707", "0.54729825", "0.5465179", "0.54512244", "0.5443256", "0.5417812", "0.5366313", "0.53569406", "0.53413415", "0.53250...
0.7771168
0
Makes a maximum matrix accumulator that accumulates the maximum of matrix elements.
public static MatrixAccumulator mkMaxAccumulator() { return new MaxMatrixAccumulator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Matrix max(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c, m);\n for (int col = 1; col <= cols_c; col++) {\n double max ...
[ "0.6543487", "0.6188157", "0.61553305", "0.60290974", "0.59942997", "0.5981861", "0.5954259", "0.593517", "0.5921752", "0.590699", "0.588342", "0.5873083", "0.5840575", "0.58296245", "0.5760577", "0.57418716", "0.57373905", "0.56727827", "0.56462455", "0.560881", "0.5593263",...
0.7606477
0
Creates a sum matrix accumulator that calculates the sum of all elements in the matrix.
public static MatrixAccumulator asSumAccumulator(double neutral) { return new SumMatrixAccumulator(neutral); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public static Matrix sum(Matrix m)...
[ "0.6844543", "0.67913526", "0.65600044", "0.6512779", "0.64479476", "0.61936355", "0.6086235", "0.5958725", "0.5955369", "0.5923757", "0.58728135", "0.5845658", "0.57843", "0.5727294", "0.57151896", "0.56941634", "0.5679135", "0.566026", "0.566026", "0.5588278", "0.5548166", ...
0.6910126
0
Creates a product matrix accumulator that calculates the product of all elements in the matrix.
public static MatrixAccumulator asProductAccumulator(double neutral) { return new ProductMatrixAccumulator(neutral); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Matrix product(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c, m);\n for (int col = 1; col <= cols_c; col++) {\n double ...
[ "0.6415478", "0.63426286", "0.60576797", "0.5804978", "0.57090926", "0.56887764", "0.5588226", "0.55422384", "0.5511838", "0.5450361", "0.5447782", "0.5429743", "0.54170024", "0.54065263", "0.5400707", "0.53766525", "0.5373229", "0.5372433", "0.53570724", "0.5342009", "0.5340...
0.6709377
0
Cria lista de projetos
private void iniciarComponentesInterface() { Panelchildren panelchildren = new Panelchildren(); panelchildren.setParent(this); listBox = new Listbox(); listBox.setHeight("300px"); listBox.setCheckmark(true); listBox.setMultiple(false); listBox.setParent(panelchildren); Listhead listHead = new Listhead(); listHead.setParent(listBox); Listheader listHeader = new Listheader("Projeto"); listHeader.setParent(listHead); // Botões OK e Cancelar Div div = new Div(); div.setParent(panelchildren); div.setStyle("float: right;"); Separator separator = new Separator(); separator.setParent(div); Button botaoOK = new Button("OK"); botaoOK.addEventListener("onClick", new EventListenerOK()); botaoOK.setWidth("100px"); botaoOK.setStyle("margin-right: 5px"); botaoOK.setParent(div); Button botaoCancelar = new Button("Cancelar"); botaoCancelar.addEventListener("onClick", new EventListenerCancelar()); botaoCancelar.setWidth("100px"); botaoCancelar.setParent(div); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getProject(){\n\t\n\t String getList[] = clientFacade.GetProjects().split(\"\\n\");\n\t DefaultComboBoxModel addPro = new DefaultComboBoxModel();\n\t\tfor(int i=1; i<getList.length; i+=2) \n\t\t\t addPro.addElement(getList[i]);\n\t\t\t \n\t\tcPro.setModel(addPro);\t\n\t}", "public List<Proje...
[ "0.6728755", "0.6694001", "0.6561011", "0.6495306", "0.6403436", "0.63727504", "0.63727504", "0.63727504", "0.63717556", "0.6352167", "0.63298523", "0.6220454", "0.615813", "0.61577034", "0.6157069", "0.6087015", "0.6075414", "0.60341644", "0.60161465", "0.599913", "0.594572"...
0.0
-1
print what happened last iteration
public void printDetails(Edge street) { System.out.printf("Driver %d heading from %s to %s via %s\n", this.driverNum, street.from.getLocationName(), street.to.getLocationName(), street.streetName); // print where we are leaving to, and how many cups of coffee consumed if (street.to.getLocationName().equals("Outside City")) { if (street.streetName.equals("Fourth Ave.")) { // Philadelphia System.out.printf("Driver %d has gone to Philadelphia!\n", this.driverNum); } if (street.streetName.equals("Fifth Ave.")) { // Cleveland System.out.printf("Driver %d has gone to Cleveland!\n", this.driverNum); } // print how many cups of coffee System.out.printf("Driver %d got %d cup(s) of coffee.\n", this.driverNum, this.cupsCoffee); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void doLast() {\n\t\t\r\n\t}", "@Override\n\tpublic String problemOutput() {\n\t\treturn reverseFirstLast();\n\t}", "public long stop() {\n long t = System.currentTimeMillis() - lastStart;\n if(count == 0)\n firstTime = t;\n totalTime += t;\n count++;\n updateHist(t...
[ "0.63422155", "0.6154465", "0.61422676", "0.60963726", "0.6073227", "0.6044339", "0.60111916", "0.6002007", "0.59727854", "0.59409547", "0.59191734", "0.5870838", "0.58617204", "0.57893836", "0.5774662", "0.5755231", "0.57540625", "0.5716867", "0.57079774", "0.5704961", "0.56...
0.0
-1
Log.debug("inside cutover response method", buffer.toString());
@ModifyTransaction(value = Transactions.CUT_OVER) public void modifyCutOver(IsoBuffer buffer, Data data) { if (buffer.get(Constants.ISO_MSG_TYPE).equals( Constants.MSG_TYPE_NETWORK_MANAGEMENT)) { buffer.put(Constants.ISO_MSG_TYPE, "0810"); } else if (buffer.get(Constants.ISO_MSG_TYPE).equals( Constants.MSG_TYPE_NETWORK_MANAGEMENT_ADVICE) || buffer.get(Constants.ISO_MSG_TYPE).equals( Constants.MSG_TYPE_NETWORK_MANAGEMENT_REPEAT)) { buffer.put(Constants.ISO_MSG_TYPE, "0830"); } buffer.put(Constants.DE1, ""); buffer.put(Constants.DE39, "00"); buffer.disableField(Constants.DE55); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void dumpResponse(ByteArrayOutputStream out) {\n try {\n OutputStream file = new BufferedOutputStream(new FileOutputStream(new File(dumpDir, dataRspFile)));\n file.write(out.toByteArray());\n file.flush();\n file.close();\n } catch (Exception e) {\n...
[ "0.59690475", "0.59481484", "0.58946717", "0.5860463", "0.5742368", "0.56641775", "0.5617814", "0.5584965", "0.5539751", "0.55383146", "0.5538024", "0.5518658", "0.5518128", "0.55023634", "0.54961073", "0.5493723", "0.5493723", "0.5493723", "0.5480806", "0.54759127", "0.54747...
0.5039015
88
Log.debug("inside recon response method", buffer.toString());
@ModifyTransaction(value = Transactions.RECON) public void modifyReconciliation(IsoBuffer buffer, Data data) { buffer.put(Constants.DE1, ""); if (buffer.get(Constants.ISO_MSG_TYPE).equals( Constants.MSG_TYPE_SETTLEMENT)) { buffer.put(Constants.ISO_MSG_TYPE, "0510"); } else if (buffer.get(Constants.ISO_MSG_TYPE).equals( Constants.MSG_TYPE_ACQ_RECON_ADVICE)) { buffer.put(Constants.ISO_MSG_TYPE, "0530"); } else if (buffer.get(Constants.ISO_MSG_TYPE).equals( Constants.MSG_TYPE_ACQ_RECON_REPEAT)) { buffer.put(Constants.ISO_MSG_TYPE, "0530"); } else if (buffer.get(Constants.ISO_MSG_TYPE).equals( Constants.MSG_TYPE_CARD_ISSUER_RECON)) { buffer.put(Constants.ISO_MSG_TYPE, "0512"); } else if (buffer.get(Constants.ISO_MSG_TYPE).equals( Constants.MSG_TYPE_ISSUER_RECON_ADVICE)) { buffer.put(Constants.ISO_MSG_TYPE, "0532"); } else if (buffer.get(Constants.ISO_MSG_TYPE).equals( Constants.MSG_TYPE_ISSUER_RECON_REPEAT)) { buffer.put(Constants.ISO_MSG_TYPE, "0532"); } buffer.put(Constants.DE66, "9"); // Message received but will not be // checked against totals at the // present time. This response code // will always be expected by // BENEFIT, since reconciliation // totals are not validated on-line. buffer.disableField(Constants.DE55); buffer.disableField(Constants.DE74); buffer.disableField(Constants.DE75); buffer.disableField(Constants.DE76); buffer.disableField(Constants.DE77); buffer.disableField(Constants.DE78); buffer.disableField(Constants.DE79); buffer.disableField(Constants.DE80); buffer.disableField(Constants.DE81); buffer.disableField(Constants.DE86); buffer.disableField(Constants.DE87); buffer.disableField(Constants.DE88); buffer.disableField(Constants.DE89); buffer.disableField(Constants.DE97); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n byte[] response = Util.sendPost(readUrl, null);\n StringBuffer stringBuffer = new StringBuffer();\n Log.d(\"TEST\", response.length + \"\");\n for (int i = response.lengt...
[ "0.6593223", "0.6480451", "0.63153327", "0.6152412", "0.6142188", "0.6053892", "0.60198927", "0.6019169", "0.6008403", "0.59818816", "0.5974456", "0.591993", "0.58804566", "0.5844599", "0.57886344", "0.57886344", "0.57886344", "0.5788288", "0.5788173", "0.5788173", "0.5773089...
0.0
-1
Class for Author Service operations
public interface AuthorService { /** * Creates Author object * @param author Author instance * @return Author identifier * @throws LogicException if DAOException obtained */ Long createAuthor(Author author) throws LogicException; /** * Deletes field from database * @param authorId Long value * @throws LogicException if DAOException obtained */ void deleteAuthor(Long authorId) throws LogicException; void updateAuthor(Author author) throws LogicException; Author getAuthorByNewsId(Long newsId) throws LogicException; List<Author> getListOfAuthors() throws LogicException; void unwireNewsAuthors(Long newsId) throws LogicException; List<Author> getListAvailableAuthors() throws LogicException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Authorizor createAuthorizor();", "public interface AuthorInfoService {\n\t\n\t/**\n\t * Retrieves an author's profile for the given authorId\n\t * @param authorId Id of an author\n\t * @return author's profile information \n\t */\n\tpublic Author getAuthorProfile(int authorId);\n\t\n\t/**\n\t * Retrieves a list ...
[ "0.75051785", "0.6917777", "0.672608", "0.6573876", "0.6515188", "0.64448375", "0.6382384", "0.63500774", "0.6272651", "0.61644554", "0.61168116", "0.60883945", "0.604524", "0.60408914", "0.5993499", "0.5989861", "0.59677976", "0.5947689", "0.5928097", "0.590621", "0.5867145"...
0.70202345
1
Deletes field from database
void deleteAuthor(Long authorId) throws LogicException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteField(Field field) {\n Span span = this.tracer.buildSpan(\"Client.DeleteField\").start();\n try {\n String path = String.format(\"/index/%s/field/%s\", field.getIndex().getName(), field.getName());\n clientExecute(\"DELETE\", path, null, null, \"Error while del...
[ "0.7368218", "0.72245604", "0.7024908", "0.6887272", "0.68847847", "0.67510897", "0.6739352", "0.6492495", "0.62924767", "0.6239298", "0.6234734", "0.6140756", "0.61108464", "0.61108464", "0.608068", "0.60703135", "0.6068794", "0.60649616", "0.60577726", "0.6049226", "0.60489...
0.0
-1
Created by scrat on 2018/3/25.
public interface SearchContract { interface SearchView { void setPresenter(SearchPresenter presenter); void showSearching(); void showSearchError(int msgId); void showSearchRes(List<BusLine> lines); } interface SearchPresenter { void search(String key); void saveHistory(BusLine line); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public fina...
[ "0.6035819", "0.58873534", "0.57830536", "0.56898683", "0.56741273", "0.56741273", "0.5658964", "0.5627531", "0.5585618", "0.5577639", "0.5540278", "0.552818", "0.5520936", "0.55209035", "0.5518285", "0.5518285", "0.5518285", "0.5518285", "0.5518285", "0.5518285", "0.5512621"...
0.0
-1
Get the value of the data column for this Uri. This is useful for MediaStore Uris, and other filebased ContentProviders.
public static String getDataColumn(Context context, Uri uri, String selection, String[] selectionArgs) { Cursor cursor = null; final String column = "_data"; final String[] projection = {column}; try { cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null); if (cursor != null && cursor.moveToFirst()) { final int column_index = cursor.getColumnIndexOrThrow(column); return cursor.getString(column_index); } } finally { if (cursor != null) cursor.close(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getDataColumn(\n Context context, Uri uri, String selection, String[] selectionArgs) {\n\n Cursor cursor = null;\n final String column = \"_data\";\n final String[] projection = {column};\n\n try {\n cursor = context.getContentResolver().query...
[ "0.642982", "0.64219683", "0.64087206", "0.6406317", "0.6400319", "0.639996", "0.63258433", "0.62594664", "0.623836", "0.622068", "0.61848885", "0.6182606", "0.61820203", "0.6181745", "0.6165675", "0.61653835", "0.61653835", "0.6162618", "0.61597234", "0.61597234", "0.6159723...
0.62440467
8
/ Best Case : O(1) Average Case : O(log2 n) Worst Case : O(log2 n)
public int binarySearch(int x) { int l = 0, h = length - 1, mid; while (l <= h) { mid = l + (h-l)/2; if (arr[mid] == x) return mid; else if (x < arr[mid]) h = mid - 1; else if (x > arr[mid]) l = mid + 1; } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++...
[ "0.7032493", "0.6823506", "0.65900683", "0.6442637", "0.63120717", "0.6244229", "0.6130563", "0.6017943", "0.5990901", "0.5971011", "0.59631944", "0.5920944", "0.5896075", "0.586178", "0.5854691", "0.5845235", "0.5814082", "0.57787335", "0.5746561", "0.57273793", "0.56944895"...
0.0
-1
/ Implementing Bubble Sort Best Case: O(n) Average Case : O(n^2) Worst Case : O(n^2)
public static void bubbleSort(Array a) { int temp; for (int i = 0; i < a.length - 1; i++) { // for passes int flag = 0; for (int j = 0; j < a.length - 1 - i; j++) { // for iteration if (a.get(j) > a.get(j + 1)) { temp = a.get(j); a.set(j, a.get(j + 1)); a.set(j + 1, temp); flag = 1; } } if (flag == 0) break; // if the list is already sorted } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void BubbleSort(int[] a) {\n\t int n = a.length;\n\t int temp = 0;\n\n\t for(int i = 0; i < n; i++) {\n\t for(int j=1; j < (n-i); j++) {\n\t if(a[j-1] > a[j]) {\n\t temp = a[j-1];\n\t a[j-1] = a[j];\n\t a[j] = temp;\n\t ...
[ "0.79121244", "0.7863681", "0.7692444", "0.7676435", "0.75594974", "0.754379", "0.7532787", "0.75233173", "0.7516739", "0.74396586", "0.7293126", "0.7257126", "0.7243963", "0.72363436", "0.72291964", "0.7219268", "0.7194321", "0.71055174", "0.70982146", "0.70937425", "0.70084...
0.72520643
12
push() O(1) pop() O(n)
public static void main(String args[]) { Queue instance = new Queue(); instance.push(10); instance.push(20); instance.push(30); System.out.println(instance.pop()); instance.push(40); System.out.println(instance.pop()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testPushAndPopPerformance() {\n\n System.out.println(\"Test Push And Pop Using Large Numbers\");\n\n int sizeTest = 50;\n\n List<String> elementList = new ArrayList();\n String tempString = \"\";\n\n for (int i = 0; i < sizeTest; i++) {\n\n tempS...
[ "0.6856561", "0.6756891", "0.67311996", "0.66752875", "0.6669742", "0.66189075", "0.65890884", "0.6531029", "0.6508378", "0.64484924", "0.64484924", "0.6420467", "0.6420467", "0.6337937", "0.6277244", "0.62590307", "0.6258781", "0.6250629", "0.6250629", "0.6250629", "0.624432...
0.0
-1
this method is only to get cell data
public String getCellData(int rowIndex, int cellIndex){ HSSFRow row= sheet.getRow(rowIndex); return getData(row, cellIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object getCellData(Cell cell) {\n\n if (cell == null)\n return \"\";\n else\n switch (cell.getCellTypeEnum()) {\n case STRING:\n return cell.getStringCellValue();\n\n case BOOLEAN:\n return cell.getBoole...
[ "0.746302", "0.7036408", "0.69040674", "0.6886006", "0.67974", "0.67790246", "0.6774172", "0.67504406", "0.67115855", "0.6684236", "0.665", "0.65993625", "0.6592368", "0.65874875", "0.656172", "0.6561165", "0.6558188", "0.6544412", "0.64965934", "0.6476603", "0.64508325", "...
0.6194404
33
Method to call single row
public String[] getRowData(int rowIndex) { HSSFRow row=sheet.getRow(rowIndex); int cellCount=row.getPhysicalNumberOfCells(); String [] rowData=new String[cellCount]; for(int i=0;i<cellCount;i++) { rowData[i]=getData(row,i); } return rowData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "R getOneRowOrThrow();", "R getFirstRowOrThrow();", "io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row getRow(int index);", "RowFunction getRowFunction();", "public abstract String getCurrentRow();", "public int getRow(){ return (Integer)args[0]; }", "public int row();", "public int getRow...
[ "0.7429578", "0.68532854", "0.6629764", "0.6629112", "0.6511635", "0.64872915", "0.6470299", "0.6379622", "0.63725096", "0.63209856", "0.62738174", "0.62617964", "0.6239735", "0.6223422", "0.62143636", "0.61904955", "0.6179056", "0.6174388", "0.616204", "0.61579216", "0.61536...
0.0
-1
/ "head": null, "easemobname": "8120acb8094a9a8a46b9184df8936b32", "role": 0, "phone": "13587364334", "sex": null, "customerid": 30, "nickname": "1354334", "easemobuuid": null, "easemobpassword": "e10adc3949ba59abbe56e057f20f883e", "token": "7a335b216e9856160198419a53f459"
public Integer getIsindustry() { return isindustry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testAuthenticate() throws JSONException {\n\n String strData = \"{\\\"name\\\": \\\"fred\\\"}\";\n JSONObject jsonObject = new JSONObject(strData);\n\n String deviceUuid = jsonObject.getString(\"deviceUuid\");\n\n assertNull(deviceUuid);\n }", "@Override\r\n\...
[ "0.54417443", "0.52502656", "0.52328604", "0.5197847", "0.51215094", "0.5097781", "0.50968754", "0.50305325", "0.5026359", "0.50093", "0.49974", "0.49901792", "0.49901792", "0.49825537", "0.49332565", "0.49293277", "0.49178344", "0.49174452", "0.4892459", "0.4887326", "0.4880...
0.0
-1
Rep invariant: clauses != null clauses contains no null elements (ensured by spec of ImList) Note: although a formula is intended to be a set, the list may include duplicate clauses without any problems. The cost of ensuring that the list has no duplicates is not worth paying. Abstraction function: The list of clauses c1,c2,...,cn represents the boolean formula (c1 and c2 and ... and cn) For example, if the list contains the two clauses (a,b) and (!c,d), then the corresponding formula is (a or b) and (!c or d).
void checkRep() { assert this.clauses != null : "SATProblem, Rep invariant: clauses non-null"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getConditionListNull();", "boolean hasConditionList();", "private boolean isOnlyEmptyClauses(List<Clause> ListOfClauses) {\r\n try {\r\n for (Clause clause : ListOfClauses) {\r\n if (clause.isContainLiterals()) {\r\n return false;\r\n }...
[ "0.5918526", "0.5909722", "0.57919383", "0.5590169", "0.53995085", "0.5364457", "0.532426", "0.5062674", "0.5009445", "0.4917794", "0.49158362", "0.49094012", "0.4903944", "0.48911786", "0.48883283", "0.4887865", "0.48790672", "0.4859266", "0.48464614", "0.4763569", "0.476190...
0.48412025
19
Create a new problem for solving that contains no clauses (that is the vacuously true problem)
public Formula() { // TODO: implement this. // throw new RuntimeException("not yet implemented."); clauses=new EmptyImList<Clause>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public final void solve() {\n this.flag1 = this.neo.getPosition().equals(this.goal);\n \n }", "public void testNonPermanentVariableResolvedOkNoBinding() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f :- g(X), h(Y))], (?- f), [[]]]\");\n }", "@Te...
[ "0.6023115", "0.5782091", "0.57577986", "0.57276666", "0.5703046", "0.5663181", "0.56199175", "0.55426097", "0.55415434", "0.55361885", "0.5516932", "0.550634", "0.55056703", "0.5496346", "0.545672", "0.5452257", "0.538158", "0.5377124", "0.5351963", "0.5318038", "0.5312445",...
0.52601933
26
Create a new problem for solving that contains a single clause with a single literal
public Formula(Variable var) { // TODO: implement this. //throw new RuntimeException("not yet implemented."); Clause c; c=new Clause(PosLiteral.make(var)); clauses=new NonEmptyImList<Clause>(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GeneralClause createGeneralClause();", "private Clause make(Literal... e) {\n Clause c = new Clause();\n for (int i = 0; i < e.length; ++i) {\n c = c.add(e[i]);\n }\n return c;\n }", "@Test\n public void t1()\n {\n \tFormula f1;\n \tEnvironment retenv;\n ...
[ "0.6108495", "0.5808698", "0.536027", "0.5353151", "0.52913386", "0.52321976", "0.5225738", "0.5225738", "0.52037185", "0.5199355", "0.51958823", "0.51689893", "0.5168416", "0.51410425", "0.51409847", "0.5127375", "0.51243454", "0.5114695", "0.51105297", "0.50666535", "0.5050...
0.47381902
55
Create a new problem for solving that contains a single clause
public Formula(Clause c) { // TODO: implement this. //throw new RuntimeException("not yet implemented."); clauses=new NonEmptyImList<Clause>(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GeneralClause createGeneralClause();", "@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}", "@Override\n public final void solve() {\n this.flag1 = this.neo.getPosition().equals(this.goal);\n \n }", "public S6Solution createNewSolution(S6Fragment n,S6Transform.Memo m)\n{\n double newsco...
[ "0.607742", "0.5749007", "0.56644046", "0.5497506", "0.5491749", "0.5467035", "0.545083", "0.5394508", "0.5276723", "0.5264146", "0.5220696", "0.52128446", "0.52053136", "0.5203117", "0.5187152", "0.5185127", "0.51840675", "0.5182281", "0.5168239", "0.51364976", "0.5092095", ...
0.0
-1
Add a clause to this problem
private Formula (Clause c, ImList<Clause> r) { //System.out.println("Test1"+r.toString()); //System.out.println("Test1"+c); clauses=r.add(c); //System.out.println("Test2"+clauses.toString()); checkRep(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Formula addClause(Clause c) {\n\n\t\tFormula f2;\n\t\tf2=new Formula(c,this.clauses);\n\t\treturn f2;\n\t}", "public void insertClause(int ix, EClause c)\n\t{ clauses.add(ix, c); }", "GeneralClause createGeneralClause();", "@Override\n\tpublic Void visit(ClauseModifier clause, Void ctx) {\n\t\treturn ...
[ "0.6267062", "0.5938832", "0.59379655", "0.57987165", "0.5746077", "0.560839", "0.551497", "0.55059004", "0.54894626", "0.54094493", "0.53963995", "0.5390023", "0.53398937", "0.531286", "0.5307623", "0.530506", "0.53006995", "0.52734345", "0.5263652", "0.52461207", "0.5225730...
0.51750916
25
TODO: implement this. throw new RuntimeException("not yet implemented.");
public Formula addClause(Clause c) { Formula f2; f2=new Formula(c,this.clauses); return f2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "zzafe mo29840Y() throws RemoteException;", "public void m9741j() throws cf {\r\n }", "public int describeContents() {\n/* 1781 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "zzang mo29839S() throws RemoteException;", "protected Problem() {/* intentionally empty block */}", "public St...
[ "0.6254342", "0.6127284", "0.59530056", "0.59046113", "0.58500016", "0.58423376", "0.58275765", "0.5816911", "0.5806865", "0.5797061", "0.5789919", "0.5785552", "0.57813835", "0.577385", "0.5773428", "0.57644737", "0.57621795", "0.5762095", "0.5752723", "0.5736157", "0.571986...
0.0
-1
Get the clauses of the formula.
public ImList<Clause> getClauses() { // TODO: implement this. //throw new RuntimeException("not yet implemented."); return clauses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Clause> getClauses() {\r\n return clauses;\r\n }", "public List<OperationEqField> getConditions()\n {\n if (conditions == null)\n {\n conditions = new ArrayList<>();\n }\n return conditions;\n }", "public List<IComplexFormula> getFormulas(){\r\...
[ "0.7523963", "0.57340187", "0.5680603", "0.5625778", "0.5597092", "0.558724", "0.5521531", "0.54326326", "0.5426985", "0.5419444", "0.5407418", "0.53986746", "0.53978693", "0.53518474", "0.52840185", "0.527877", "0.52519965", "0.52519965", "0.52137715", "0.520916", "0.5205102...
0.763893
0
TODO: place custom component creation code here
private void createUIComponents() { valueTextField = new JTextField(); FixedService f = new FixedService(); valueTextField.setText("£ " + f.getPrice("Fixed")); valueTextField.setBorder(new EmptyBorder(0, 0, 0, 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Component createComponent();", "Component createComponent();", "@Override\n public void initComponent() {\n }", "@Override\n public void initComponent() {\n }", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "@Override\r\n public void initComponent() {\n...
[ "0.7481371", "0.7481371", "0.71089935", "0.71089935", "0.7079944", "0.704432", "0.6977182", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", "0.6968295", ...
0.626126
57
Create a file Uri for saving an image or video
private static Uri getOutputMediaFileUri(){ return Uri.fromFile(getOutputMediaFile()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Uri createImageUri() {\n \t\tUri imageFileUri;\n \t\tString folder = Environment.getExternalStorageDirectory()\n \t\t\t\t.getAbsolutePath() + \"/tmp\";\n \t\tFile folderF = new File(folder);\n \t\tif (!folderF.exists()) {\n \t\t\tfolderF.mkdir();\n \t\t}\n \n \t\tString imageFilePath = folder + \"/\"...
[ "0.6863434", "0.6610163", "0.6576866", "0.65007365", "0.64809257", "0.6450858", "0.64354545", "0.642604", "0.642495", "0.642495", "0.641093", "0.641093", "0.63895655", "0.63811964", "0.6378601", "0.63679206", "0.63678765", "0.629617", "0.6234564", "0.61508834", "0.6141853", ...
0.6456981
5
Create a File for saving an image or video
private static File getOutputMediaFile(){ // To be safe, you should check that the SDCard is mounted // using Environment.getExternalStorageState() before doing this. File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES), "MyCameraApp"); // This location works best if you want the created images to be shared // between applications and persist after your app has been uninstalled. // Create the storage directory if it does not exist if (! mediaStorageDir.exists()){ if (! mediaStorageDir.mkdirs()){ return null; } } // Create a media file name String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); File mediaFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_"+ timeStamp + ".jpg"); return mediaFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private File createVideoFile() throws IOException {\n Date d = new Date();\n String nameDate = new SimpleDateFormat(\"ddMMyyyy_HHmmss\").format(d);\n this.date = new SimpleDateFormat(\"dd/MM/yyyy\").format(d);\n this.time = nameDate.substring(9,13);\n String videoFileName = \"MP4...
[ "0.72688144", "0.7099338", "0.6833537", "0.6789716", "0.66910845", "0.6636703", "0.66156137", "0.65902615", "0.6531161", "0.6524315", "0.6522629", "0.65213776", "0.65160125", "0.6509621", "0.65003824", "0.6499402", "0.64971995", "0.6491216", "0.6488233", "0.6488233", "0.64868...
0.0
-1
Connects to both the human (through Google Web Speech Recognition) and robot (through ROS) clients
public MyServer() { try { timer = new Timer(1000, timerListener()); regularSocket = new ServerSocket(7777); webServer = new Server(new InetSocketAddress("127.0.0.1", 80)); WebSocketHandler wsHandler = new WebSocketHandler() { @Override public void configure(WebSocketServletFactory factory) { factory.register(HumanClientHandler.class); } }; webServer.setHandler(wsHandler); webServer.start(); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void connectToAudio() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.CONNECT));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n i...
[ "0.60100853", "0.6004548", "0.5965855", "0.5865451", "0.5860113", "0.5840423", "0.5719664", "0.55528224", "0.5534315", "0.5446263", "0.5434109", "0.53892267", "0.53680164", "0.5366159", "0.53615063", "0.53440356", "0.53415823", "0.53415823", "0.53415823", "0.53415453", "0.531...
0.0
-1
Sends a message to the client specified by the 'client' parameter
public void sendMessage(String msg, int client) throws Exception{ lastMessageSent = new String(msg); if(client == Constants.ROBOT){ robotHandler.sendMessage(msg); } else { HumanClientHandler.sendMessage(msg); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendClientMsg(Client client, String message){\n\t\tsendMsg(message, client.getIPaddr(), client.getPort());\n\t}", "private void sendMessage(WeakReference<Messenger> client, int msgCode, int requestCode, String message){\n \tLog.v(TAG,\"sendMessage: The message was: \" + message + \" (\" + msgCode ...
[ "0.8289308", "0.75754356", "0.7443158", "0.7208424", "0.70594627", "0.70588607", "0.6992191", "0.6928464", "0.66655207", "0.6639463", "0.66259605", "0.6513521", "0.65133685", "0.6453725", "0.64470905", "0.6445874", "0.64274514", "0.63664484", "0.63357633", "0.6335413", "0.632...
0.752901
2
Parses human input received from Google Web Speech Recognition Looks for keywords to determine communication type and actions Prompts experimenter if these keywords are not found or are not sufficient to determine what the human wants to do
public CommResponse parseHumanInput(String str, Action suggestedHumanAction){ str = str.toLowerCase(); CommType type = null; Action humanAction = null; Action robotAction = null; if(LearningAlgorithm.currCommunicator == Constants.ROBOT){ if(str.contains("yes") || str.contains("yeah") || str.contains("accept")) type = CommType.ACCEPT; else if(str.contains("no") || str.contains("instead")) type = CommType.REJECT; } else if(LearningAlgorithm.currCommunicator == Constants.HUMAN){ if(str.contains("suggest")) type = CommType.SUGGEST; else if(str.contains("extinguish")) type = CommType.UPDATE; } if(type == CommType.ACCEPT){ humanAction = suggestedHumanAction; } else if(type == CommType.REJECT || type == CommType.UPDATE){ humanAction = MyWorld.getActionFromInput(str); } else if(type == CommType.SUGGEST){ int index = str.indexOf("suggest"); String humanStr = str.substring(0, index); String robotStr = str.substring(index); humanAction = MyWorld.getActionFromInput(humanStr); robotAction = MyWorld.getActionFromInput(robotStr); } System.out.println("type "+type+" humanAction "+humanAction); if(type == null || humanAction == null){ System.out.println("What was the type of communication (A = Accept, R = Reject, S = Suggest, U = Update)?"); type = getCommType(Constants.scan.next().toUpperCase().trim().charAt(0)); if(type == CommType.ACCEPT){ humanAction = suggestedHumanAction; } else{ System.out.println("What was the human's action? (A = Alpha, B = Bravo, C = Charlie, D = Delta, E = Echo)"); humanAction = getAction(Constants.scan.next().toUpperCase().charAt(0)); } } if(type == CommType.SUGGEST && robotAction == null){ System.out.println("What was the suggested robot action? (A = Alpha, B = Bravo, C = Charlie, D = Delta, E = Echo)"); robotAction = getAction(Constants.scan.next().toUpperCase().charAt(0)); } CommResponse response = new CommResponse(type, humanAction, robotAction); System.out.println(response); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void iterateInput(){\n boolean isReadingKnowledgeBase = false;\n boolean isReadingProveStatements = false;\n\n String[] kb = readInput().split(\"\\\\r?\\\\n\");\n for(String sentence : kb){\n if(sentence.contains(\"Knowledge Base:\")){\n isReadin...
[ "0.61224437", "0.59736294", "0.59702486", "0.5908896", "0.584977", "0.58196366", "0.58196366", "0.58196366", "0.58196366", "0.5803063", "0.5766621", "0.57554895", "0.5728644", "0.5582228", "0.5564731", "0.5531188", "0.5505145", "0.54500806", "0.5441884", "0.54265475", "0.5407...
0.6605527
0
Gets messages from the human and calls parseHumanInput to determine the communication type and actions Keeps track of the time left and forces a wait action if the time goes to 0 Resends a message to the client is a response hasn't been received in some amount of time
public CommResponse getHumanMessage(Action suggestedHumanAction) { try{ resendTimeLeft = NUM_SECS_RESEND; timer.start(); while(HumanClientHandler.message == null){ if(resendTimeLeft == 0){ timer.stop(); sendMessage(lastMessageSent, Constants.HUMAN); resendTimeLeft = NUM_SECS_RESEND; timer.start(); } if(LearningAlgorithm.timeLeft == 0){ System.out.println("time over"); return new CommResponse(CommType.NONE, Action.WAIT, Action.WAIT); } System.out.print(""); } System.out.println("before parse input message "+HumanClientHandler.message); String temp = HumanClientHandler.message; HumanClientHandler.message = null; return parseHumanInput(temp, suggestedHumanAction); } catch(Exception e){ e.printStackTrace(); } return new CommResponse(CommType.NONE, Action.WAIT, Action.WAIT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void receiveAndDispatchMessage() {\n String response = null;\n try {\n while((response = bufferedReader.readLine()) != null) {\n System.out.println(\"received message from server: \" + response);\n String messageKind = \"\";\n if(respons...
[ "0.6028742", "0.6025909", "0.5988557", "0.5943849", "0.58382934", "0.5756943", "0.56905544", "0.5644542", "0.55954385", "0.55463624", "0.55205923", "0.5510653", "0.5507931", "0.55038655", "0.54757315", "0.5474194", "0.54385203", "0.5320903", "0.5311935", "0.53019774", "0.5288...
0.7489029
0
get scope type info by scope type id
public final static ScopeType getScopeTypeById(int id) { for (ScopeType scopeType : ScopeType.values()) { if (scopeType.getId() == id) { return scopeType; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OntologyScope getScope(IRI scopeID);", "public ScopeInformation getScopeInformation(FormulaManager fm,\n\t\tScopeInstance scope)\n\t{\n\t\tScopeInformation scopeInfo = map.get(scope);\n\t\tif (scopeInfo == null)\n\t\t{\n\t\t\tscopeInfo = new ScopeInformation(fm, scope);\n\t\t\tmap.put(scope, scopeInfo);\n...
[ "0.67134243", "0.61808896", "0.61047465", "0.6090765", "0.6056448", "0.60091585", "0.60026294", "0.5898772", "0.5875513", "0.58373255", "0.5689388", "0.5685646", "0.56771344", "0.56771344", "0.56771344", "0.56771344", "0.56771344", "0.56771344", "0.56771344", "0.56771344", "0...
0.7316669
0
get scope type info by scope type name
public final static ScopeType getScopeTypeByName(String name) { if (name != null && !(name = name.replace(" ", "")).isEmpty()) { for (ScopeType scopeType : ScopeType.values()) { if (scopeType.getName().equalsIgnoreCase(name)) { return scopeType; } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String TypeOf(String name) {\n\t\tValues tmp = currScope.get(name);\n\t\t\n\t\tif(tmp != null)\n\t\t\treturn tmp.getType();\n\t\t\n\t\tif(currScope != classScope) {\n\t\t\ttmp = classScope.get(name);\n\t\t\tif(tmp != null)\n\t\t\t\treturn tmp.getType();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public String...
[ "0.70486885", "0.6676108", "0.6482477", "0.6293054", "0.6273909", "0.62504464", "0.6103892", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "0.60999453", "...
0.7144557
0
get scope type info by scope type identified
public final static ScopeType getScopeTypeByIdentified(String identified) { if (identified != null && !(identified = identified.replace(" ", "")).isEmpty()) { for (ScopeType scopeType : ScopeType.values()) { if (scopeType.getIdentified().equalsIgnoreCase(identified)) { return scopeType; } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ScopeInformation getScopeInformation(FormulaManager fm,\n\t\tScopeInstance scope)\n\t{\n\t\tScopeInformation scopeInfo = map.get(scope);\n\t\tif (scopeInfo == null)\n\t\t{\n\t\t\tscopeInfo = new ScopeInformation(fm, scope);\n\t\t\tmap.put(scope, scopeInfo);\n\t\t}\n\t\treturn scopeInfo;\n\t}", "String get...
[ "0.65478116", "0.65331054", "0.635668", "0.625853", "0.6252933", "0.62503195", "0.6238937", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", "0.6034124", ...
0.5765311
49
validation by scope type id
public final static boolean validationById(int id) { return getScopeTypeById(id) != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean validateType(int type)\n {\n return type >=0 && type < TYPE_ENUM.length;\n }", "@Override\n\tpublic void valid(String id, String valid) {\n\t\t\n\t}", "protected void validate(String operationType) throws Exception\r\n\t{\r\n\t\tsuper.validate(operationType);\r\n\r\n\t\tMPSString id_va...
[ "0.5999572", "0.58492035", "0.54640746", "0.54529333", "0.5386534", "0.53243077", "0.53110826", "0.5310554", "0.52910846", "0.5287739", "0.5282101", "0.52718365", "0.52662873", "0.52557355", "0.525249", "0.5251941", "0.5210222", "0.5168826", "0.5164568", "0.5159015", "0.51309...
0.6300657
0
validation by scope type name
public final static boolean validationByName(String name) { return getScopeTypeByName(name) != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final static ScopeType getScopeTypeByName(String name) {\n if (name != null && !(name = name.replace(\" \", \"\")).isEmpty()) {\n for (ScopeType scopeType : ScopeType.values()) {\n if (scopeType.getName().equalsIgnoreCase(name)) {\n return scopeType;\n ...
[ "0.5992804", "0.5731983", "0.56875163", "0.56496906", "0.5604428", "0.5565166", "0.55603844", "0.55564356", "0.55388254", "0.55369735", "0.54738337", "0.54665047", "0.54551154", "0.5451671", "0.5438998", "0.54343396", "0.5394742", "0.5382918", "0.53732765", "0.5363827", "0.53...
0.63984436
0
validation by scope type identified
public final static boolean validationByIdentified(String identified) { return getScopeTypeByIdentified(identified) != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void validate(N ndcRequest, ErrorsType errorsType);", "private Expression getConstraint(Type type, Expression exp, Type etype)\n {\n return Validation.getConstraint(type, transform(exp), etype);\n }", "public void checkBounds(Scope scope) {\n}", "public final static boolean validationByName(String name)...
[ "0.5766153", "0.5724599", "0.57238925", "0.5683471", "0.5621504", "0.5610428", "0.55786943", "0.5575357", "0.55740607", "0.55651504", "0.55569404", "0.55510813", "0.55421394", "0.553967", "0.5489723", "0.54831463", "0.5446555", "0.5415111", "0.5399477", "0.53972495", "0.53375...
0.52075815
33
TODO Autogenerated method stub
@Override public AttributeSet getAttributes() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int getEndOffset() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int getStartOffset() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public Tag getTag() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public boolean isValid() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void next() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Project Name: summer Create Time: 2020/11/17 15:56
public interface PostCreationProcessor { /** * 执行后处理工作 */ void invoke(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SimpleProperty(description = \"iSENSE Project Creation Date\", \n category = PropertyCategory.BEHAVIOR)\n public String ProjectDateCreated() {\n if(this.project == null || this.fields == null) {\n Log.e(\"iSENSE\", \"Couldn't get project information!\");\n return \"DNE\";\n }\n re...
[ "0.6719764", "0.65292436", "0.62622285", "0.625689", "0.62487984", "0.6215395", "0.616863", "0.6069155", "0.6069155", "0.6051861", "0.60400736", "0.5926892", "0.58647925", "0.58505535", "0.5841289", "0.5772128", "0.572858", "0.5699644", "0.5697836", "0.5660454", "0.56532013",...
0.0
-1
Return versions of Elasticsearch which are index compatible with the current version, and also work on the local machine.
public List<Version> getIndexCompatible() { return filterSupportedVersions(getAllIndexCompatible()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Version> getAllIndexCompatible() {\n return versions.stream()\n .filter(v -> v.lucene.getMajor() >= (currentVersion.lucene.getMajor() - 1))\n .map(v -> v.elasticsearch)\n .toList();\n }", "public String getVersionsSupported();", "public Collection<Document...
[ "0.7585384", "0.5500133", "0.54606354", "0.537276", "0.5372227", "0.5358518", "0.53505105", "0.5307945", "0.53074706", "0.52785045", "0.5263746", "0.51951605", "0.519069", "0.51884764", "0.516481", "0.51284105", "0.5126393", "0.5121198", "0.5095777", "0.50540066", "0.50442004...
0.72500896
1
Return all versions of Elasticsearch which are index compatible with the current version.
public List<Version> getAllIndexCompatible() { return versions.stream() .filter(v -> v.lucene.getMajor() >= (currentVersion.lucene.getMajor() - 1)) .map(v -> v.elasticsearch) .toList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Version> getIndexCompatible() {\n return filterSupportedVersions(getAllIndexCompatible());\n }", "public Collection<Document> getAllVersions() {\n throw new UnsupportedOperationException();\n }", "com.google.cloud.functions.v2.SecretVolume.SecretVersion getVersions(int index);",...
[ "0.78909296", "0.6314778", "0.58939695", "0.5816727", "0.5762241", "0.5684253", "0.56543595", "0.5601621", "0.5561005", "0.55598634", "0.5544721", "0.5481187", "0.54662234", "0.54655015", "0.54343796", "0.53835845", "0.5375377", "0.5362626", "0.53584427", "0.5320703", "0.5262...
0.84727824
0
For ordering purposes, sort by Elasticsearch version
@Override public int compareTo(VersionPair o) { return this.elasticsearch.compareTo(o.elasticsearch); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Version> getAllIndexCompatible() {\n return versions.stream()\n .filter(v -> v.lucene.getMajor() >= (currentVersion.lucene.getMajor() - 1))\n .map(v -> v.elasticsearch)\n .toList();\n }", "@Override\n public int compareTo(ApiVersion other) {\n if (!prere...
[ "0.61520845", "0.5920323", "0.5678288", "0.56327176", "0.5490961", "0.5421505", "0.53865993", "0.53862405", "0.5318247", "0.52368534", "0.5227625", "0.52261484", "0.5223828", "0.51923037", "0.5142519", "0.51248246", "0.5119246", "0.51106805", "0.50943696", "0.5091155", "0.509...
0.638998
0
Determine whether the given version of Elasticsearch is compatible with ML features on the host system.
public static boolean isMlCompatible(Version version) { Version glibcVersion = Optional.ofNullable(System.getenv(GLIBC_VERSION_ENV_VAR)) .map(v -> Version.fromString(v, Version.Mode.RELAXED)) .orElse(null); // glibc version 2.34 introduced incompatibilities in ML syscall filters that were fixed in 7.17.5+ and 8.2.2+ if (glibcVersion != null && glibcVersion.onOrAfter(Version.fromString("2.34", Version.Mode.RELAXED))) { if (version.before(Version.fromString("7.17.5"))) { return false; } else if (version.getMajor() > 7 && version.before(Version.fromString("8.2.2"))) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isSupportedVersion(IndexMetaData indexMetaData) {\n return indexMetaData.minimumCompatibleVersion() != null &&\n indexMetaData.minimumCompatibleVersion().luceneVersion.onOrAfter(Version.V_0_90_0_Beta1.luceneVersion);\n }", "boolean hasOperatingSystemVersionConstant...
[ "0.6531692", "0.58499134", "0.58296645", "0.57079905", "0.57079905", "0.5520281", "0.54601026", "0.54588234", "0.54526156", "0.5399881", "0.53597", "0.535177", "0.5295532", "0.5281749", "0.522575", "0.5224116", "0.51245826", "0.50766605", "0.5071201", "0.5062554", "0.50576067...
0.63346004
1
Constructor which receives and assigns user's service.
@Autowired public RegistrationController(UserService userService) { this.userService = userService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UserService() {\n }", "public UserResource(UserService userService) {\n\t\tthis.userService = userService;\n\t\tsetupEndpoints();\n\t}", "public UserController(UserService service) {\n\t\tSystem.out.println(\"Autowiring using parameterized constructor\");\n\t\tthis.service = service;\n\t}", "public...
[ "0.7607096", "0.7374956", "0.7200461", "0.7134079", "0.691278", "0.6867112", "0.68217856", "0.6769601", "0.6677795", "0.6652945", "0.66524845", "0.66458815", "0.6599725", "0.65901077", "0.65418345", "0.64932626", "0.6453946", "0.6427919", "0.6417545", "0.6401606", "0.6401606"...
0.6033743
49
This method handles request "/registration". It receives model, adds new object of User to model and return "registration" view.
@RequestMapping(value = "/registration", method = RequestMethod.GET) public String showPageRegistration(Model model) { model.addAttribute("registeredUser", new User()); return "registration"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/registration\")\n\t public String registration(Model model) {\n\t model.addAttribute(\"userForm\", new User());\n\t return \"registration\";\n\t }", "@RequestMapping(value = \"/registration\")\n public String registration(Model model) {\n User user = new User();\n ...
[ "0.8119786", "0.8064919", "0.79050636", "0.7474789", "0.7343915", "0.7205294", "0.7193786", "0.7192709", "0.69969994", "0.69630176", "0.6801882", "0.67723936", "0.6698615", "0.6661453", "0.6595473", "0.65825874", "0.65786535", "0.65775144", "0.65745825", "0.6552187", "0.65411...
0.78941286
3
This method handles request "/registration/user". It receives new user, binding result and repeated password. If this user is valid, password and repeated password is same and input binding result doesn't have errors registers user and returns "authorization" view. Else returns "registration" view.
@RequestMapping(value = "/registration/user", method = RequestMethod.POST) public String registerNewUser( @ModelAttribute("registeredUser") User user, BindingResult result, @RequestParam String passwordRepeat) throws ServiceException { userRegistrationValidator.validate(user, passwordRepeat, result); if (result.hasErrors()) { return "registration"; } userService.register(user); return "authorization"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value={\"/register\"}, method = RequestMethod.POST)\n public String registeraccount(@Valid User user,\n \t\tBindingResult result,\n \t\tModel model,\n \t\tHttpServletRequest request) {\n\n \t//titulo de la ventana\n \tmodel.addAttribute(\"title\", messages.getMessage(\"text.regist...
[ "0.70355755", "0.6996758", "0.69912183", "0.6989063", "0.6903828", "0.6750548", "0.67104214", "0.6689766", "0.6533973", "0.6492603", "0.6474355", "0.6425539", "0.6362336", "0.6322782", "0.6308986", "0.6301297", "0.6292048", "0.62781936", "0.6241531", "0.62204814", "0.62079495...
0.7205159
0