query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
assert the table content is equal with dataSet, the dataSet table schema should same as tableName.
public static void assertTable(String tableName, IDataSet expectDataSet) throws Exception { assertPartialTable(tableName, null, expectDataSet); }
[ "public static void assertPartialTable(String tableName, String sql, IDataSet expectDataSet) throws Exception {\n QueryDataSet loadedDataSet = new QueryDataSet(connection);\n loadedDataSet.addTable(tableName, sql);\n ITable table1 = loadedDataSet.getTable(tableName);\n ITable table2 = ex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the correct add command based on the task given
String generateAddCommand(Task p) { StringBuffer cmd = new StringBuffer(); cmd.append("add \""); cmd.append(p.getName().toString()); cmd.append("\""); return cmd.toString(); }
[ "public String generateAddTaskCommand(Task p) {\n StringBuffer cmd = new StringBuffer();\n\n cmd.append(\"add \");\n\n cmd.append(p.getTask().toString());\n cmd.append(\" /desc \").append(p.getDescription().get().toString());\n cmd.append(\" /by \").append(p.getDeadlineValue());\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for property serializerIndex.
public Byte getSerializerIndex() { return serializerIndex; }
[ "@ApiModelProperty(value = \"The index of the entity as it was found in the investment tables.\")\n public Integer getIndex() {\n return index;\n }", "@ApiModelProperty(value = \"Gets index of the option. \")\n public Integer getIndex() {\n return index;\n }", "@JsProperty(name = \"index\")\n\tnative ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get names of sql fragments loaded.
public List<String> listSqlFragments() { return new ArrayList<>(sqlFragments.keySet()); }
[ "List<String> readSQLStatements() {\n\t\tString s = loadStreamData(path);\n\n\t\tString[] lines = s.split(\"\\n\");\n\t\tArrayList<String> output = new ArrayList<>();\n\t\tfor (String line : lines) {\n\t\t\toutput.add(line.trim());\n\t\t}\n\t\treturn output;\n\t}", "String getInitSql();", "public java.lang.Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the organizationNameIdPK value for this TCRMOrganizationNameBObjType.
public void setOrganizationNameIdPK(java.lang.String organizationNameIdPK) { this.organizationNameIdPK = organizationNameIdPK; }
[ "public java.lang.String getOrganizationNameIdPK() {\n return organizationNameIdPK;\n }", "@JsonSetter(\"org_id\")\n public void setOrgId (String value) {\n this.orgId = value;\n }", "public void xsetOrganizationId(com.microsoft.schemas._2003._10.serialization.Guid organizationId)\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value set definition.
public NameOrURI getValueSetDefinition() { return valueSetDefinition; }
[ "org.hl7.fhir.ValueSet getValueSet();", "public com.sforce.soap._2006._04.metadata.ValueSet getValueSet() {\r\n return valueSet;\r\n }", "public NameOrURI getValueSet() {\r\n\t\treturn valueSet;\r\n\t}", "public DataDefinition getDefinition() {\n checkRegistry();\n return definition;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate random verification code image.
public void generateVerifyCode(HttpServletRequest request, HttpServletResponse response, HttpSession session) { //no-cache response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expires", 0); // buffered image BufferedImage...
[ "public static String GenerateVerificationCode(){\n\t\tString strRandom=\"123456789qazwsxedcrfvtgbyhnujmiklopQAZPLMOKIJNBHUYGVFTXCSDWRE\";\n\t\tStringBuilder verificationCode=new StringBuilder();\n\t\tfor(int i=0;i<4;i++){\n\t\t\tint random=\n\t\t\t\t\t(int)((Math.random())*(strRandom.length()-1));\n\t\t\t//Log.i(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the field editors. Field editors are abstractions of the common GUI blocks needed to manipulate various types of preferences. Each field editor knows how to save and restore itself.
public void createFieldEditors() { addField(new BooleanFieldEditor(SUAEntityPreferenceConstants.FILTER_DIFFS, "Filter &Diff on startup", getFieldEditorParent())); addField(new BooleanFieldEditor(SUAEntityPreferenceConstants.FILTER_DIFFS, "Filter D&oclocs on startup", getFieldEditorParent())); addField(n...
[ "public void createFieldEditors() {\n\t\t\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SPACES_PER_TAB, \"Spaces per tab (Re-open editor to take effect.)\", getFieldEditorParent(), 2 ) );\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SECONDS_TO_REEVALUATE, \"Seconds between syntax reevaluation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use QueryInflationResponse.newBuilder() to construct.
private QueryInflationResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private QueryInflationRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SuggestQueriesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public QueryResponseInner() {\n }", "private ResponseQuery(co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the Getter of fileObjContentType
@Column(name = "FILE_CONTENT_TYPE", length = 100 ) public String getFileObjContentType() { return fileObjContentType; }
[ "public String getFilecontentContentType() {\n return filecontentContentType;\n }", "public String getFileContentType() {\r\n return (String) getAttributeInternal(FILECONTENTTYPE);\r\n }", "public String getContentType() {\n return this.fileItem.getContentType();\n }", "public Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method: getFileLength() returns the length of the shape file in bytes
public long getFileLength() { return fileLength; }
[ "public Integer getFileLength() { return fileLength; }", "public long length()\n\t{\n\t\treturn file.length();\n\t}", "public long length() {\n return file.length();\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "int getFileLen();", "@ApiModelProperty(required = true, valu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mapbox Isochrone Url Builder Tests
@Test public void urlsAreEqual_MapboxIsochroneWalk() { assertEquals("https://api.mapbox.com/isochrone/v1/mapbox/walking/-6.2767,53.407?contours_minutes=10&contours_colors=009688&polygons=true&access_token=pk.eyJ1Ijoiam9obmRvd2F0ZXIiLCJhIjoiY2szcWNjdHIyMDA3cDNlcGlseWt3cjRiNiJ9.Bu2jIzXSGZNcxQBtGCrwbQ", ...
[ "@Test\r\n public void testCreateXYZBuilder()\r\n {\r\n Builder builder = new Builder();\r\n builder.setSingleFusedMapCache(true);\r\n ArcGISLayer layer = new ArcGISLayer(builder);\r\n\r\n TileUrlBuilder urlBuilder = TileUrlBuilderFactory.getInstance().createBuilder(layer);\r\n\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles project opening control. Updates main frame, then delegates control to child controllers.
public void projectOpenedAction(Project project) { projectController.setProject(project); editorView = new EditorView(projectController); frame.setView(editorView); projectController.projectOpened(); application.getActionManager().projectOpened(); // do status update ...
[ "public void doProjectOpen() {\r\n\t\tthis.observerList.notifyObservers(GNotification.PROJECT_OPEN, null);\r\n\t}", "@FXML private void handleOpenButton(ActionEvent event) throws IOException {\n\t\t\n\t\tif(albumList.getSelectionModel().getSelectedIndex() < 0 || albumList.getSelectionModel().getSelectedIndex() >=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the codiceFiscaleVersante value for this QuietanzaType.
public void setCodiceFiscaleVersante(java.lang.String codiceFiscaleVersante) { this.codiceFiscaleVersante = codiceFiscaleVersante; }
[ "public java.lang.String getCodiceFiscaleVersante() {\r\n return codiceFiscaleVersante;\r\n }", "public void setCodiceFiscale(String codiceFiscale) {\n this.codiceFiscale = codiceFiscale;\n }", "public void setIncentivoFiscal(byte value) {\n this.incentivoFiscal = value;\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function verify that search result is empty
public void verifySearchResultIsEmpty() { if (title_list.size() == 0) { System.out.println("Verified that search result is empty."); ATUReports.add(time + " Verified that search result is empty.", "True.", "True.", LogAs.PASSED, null); Assert.assertTrue(true); ...
[ "public void ifSearchResultIsEmptyResultPageDisplayed() {\r\n if (title_list.size() == 0) {\r\n\r\n String structure_displayed = breadcrumbs_box.getText();\r\n String[] splited_structure_displayed = structure_displayed.split(\">\");\r\n String[] splited_third_structure_displa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the current color for selected indicator dots.
@ColorInt public int getSelectedDotColor() { return selectedDotColor; }
[ "public Color getCurrentColor();", "public Color getSelectedColor()\n {\n return choose.getColor();\n }", "public Color getSelectedColor();", "@ColorInt\n public int getUnselectedDotColor() {\n return unselectedDotColor;\n }", "synchronized Color getCurrentColor() {\r\n\r\n\t\tswit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This tests RpcSnk/Source for both Avro and Thrift type.
@Test public void testRpcSourceSinks() throws IOException, InterruptedException, FlumeSpecException { testRpc(FlumeConfiguration.RPC_TYPE_THRIFT); testRpc(FlumeConfiguration.RPC_TYPE_AVRO); }
[ "@Test\n public void testRpcSourceSinksInit() throws FlumeSpecException {\n FlumeConfiguration.get().set(FlumeConfiguration.EVENT_RPC_TYPE, \"garbage\");\n Context ctx = LogicalNodeContext.testingContext();\n\n // making sure default is Thrift\n EventSource rpcSrc = srcfact.createSource(ctx, \"rpcSourc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the totalAmount value for this VApplicationLog.
public java.lang.String getTotalAmount() { return totalAmount; }
[ "public double getTotalamount() {\n return totalamount;\n }", "public int getTotalAmount() {\n return totalAmount;\n }", "public BigDecimal getTotalAmount() {\n return totalAmount;\n }", "public BigDecimal getTOTAL_AMOUNT() {\r\n return TOTAL_AMOUNT;\r\n }", "public B...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string interactionPlayer = 1;
java.lang.String getInteractionPlayer();
[ "void interactPlayer(Player pl);", "default void interactWith(EnigmePlayer player) {\n\t\t// by default the interaction is empty\n\t}", "public void interact(Player player) {\n talk(player);\n }", "public void setInteraction(boolean interaction);", "public void setInteraction(boolean flag) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get COMPONENT_NUMBER: Chapter, section or part inside the book/conf. proceeding (e.g. Section 3)
public String getComponentNumber() { return componentNumber; }
[ "public int getSection()\r\n\t{\r\n\t\treturn sectnum;\r\n\t}", "public int getSectionNumber() {\n return sectionNumber;\n }", "@Override\n public java.lang.String getPart_number() {\n return _parts.getPart_number();\n }", "public abstract int getChapterNumber(XMLObject xml);", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the search to the given value.
private void setSearch(Search search){ if(search == null){ throw new IllegalArgumentException("Search may not be null!"); } this.search = search; }
[ "public void setSearchKey(int value) {\n this.searchKey = value;\n }", "public void setIsSearch(boolean value) {\r\n this.isSearch = value;\r\n }", "public Search(String value) {\n this(value, false);\n }", "public void setSearchFlag(String arg)\n\t{\n\t\twSearchFlag = arg;\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Locks the specified table.
public void lockTable(Connection con, String table) throws SQLException { }
[ "public abstract void lockTableForReading(String table) throws RollbackException;", "public abstract void lockTableForWriting(String table) throws RollbackException;", "public void lockTable(Connection con, String table) throws SQLException\n {\n Statement statement = con.createStatement();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is this job status younger/less final than or equals the other one
public boolean smallerThanEquals(final JobStatus another) { return this.level <= another.level; }
[ "public boolean biggerThan(final JobStatus another) {\n\t\treturn level > another.level;\n\t}", "private boolean ok() {\n \t\tboolean r = false;\n \t\tif(currentstatus < 300 ) {\n \t\t\tif(currentstatus >= 200) {\n \t\t\t\tr = true;\n \t\t\t}\n \t\t}\n \t\t// Specific stuff for two-way\n \t\tif(goes_both_ways && ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Mass__Group__8__Impl" $ANTLR start "rule__Joint__Group__0" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:4830:1: rule__Joint__Group__0 : rule__Joint__Group__0__Impl rule__Joint__Group__1 ;
public final void rule__Joint__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:4834:1: ( rule__Joint__Group__0__Im...
[ "public final void rule__JointType__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:5163:1: ( ( (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the underlying "native" object for the cookie.
public Object getUnderlying() { return ahcCookie; }
[ "Node.Cookie getCookie( Class type ) {\n return null;\n }", "public String getCookie();", "private static Cookie getCookie() {\n if (cookie == null) {\n synchronized (DefaultEntityManagerImpl.class) {\n if (cookie == null) {\n cookie = new Cookie(cookieName, getAppTokenId());\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'FLIGHT_ID' field.
public void setFLIGHTID(java.lang.Long value) { this.FLIGHT_ID = value; }
[ "public org.LNDCDC_ADS_PRPSL.DEAL_POINT.apache.nifi.LNDCDC_ADS_PRPSL_DEAL_POINT.Builder setFLIGHTID(java.lang.Long value) {\n validate(fields()[15], value);\n this.FLIGHT_ID = value;\n fieldSetFlags()[15] = true;\n return this;\n }", "public org.LNDCDC_ADS_PRPSL.DEAL_PNT_FEAT_LN.apache.nifi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An interface to NGPH response code types. This interface facilitates to add all kinds of NGPH response codes (RTGS/NEFT/SWIFT) to ValidationMessage object.
public interface IEnumResponseCode { /** * Returns the code of a response message * @return {@link String} */ public String getCode(); /** * Returns the description of a response message * @return {@link String} */ public String getDescription(); }
[ "private ResponseStatus(int code) {\n this.code = code;\n this.formatted = format(code, \"???\");\n this.symbolicName = String.format(\"0x%04x\", code);\n }", "public static int responseClass(int code) {\r\n\t\treturn (code >> 5) & 0x7;\r\n\t}", "public void setCode(ResponseTypes code) \n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Takes either the mean or median of three real numbers, read from the user. This method asks for the three numbers, then asks whether the user wishes to take the mean or median, and then calculates and outputs the result.
public static void stats() { String choice; Scanner input = new Scanner(System.in); double n1 = 0.0, n2 = 0.0, n3 = 0.0, result = 0.0; boolean valid = false; System.out.print("Enter 1st number: "); n1 = input.nextDouble(); System.out.print("E...
[ "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Please enter 3 numbers: \");\n int num1 = scanner.nextInt(), num2 = scanner.nextInt(), num3 = scanner.nextInt();\n\n System.out.println(\"Average of \" + num1 + \", \" + num2 + ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column FreeHost_Product_VPS.repaymoney
public void setRepaymoney(BigDecimal repaymoney) { this.repaymoney = repaymoney; }
[ "public BigDecimal getRepaymoney() {\r\n return repaymoney;\r\n }", "public void setRepayAmount(BigDecimal repayAmount) {\n this.repayAmount = repayAmount;\n }", "public void setRechargeMoney(BigDecimal rechargeMoney) {\n this.rechargeMoney = rechargeMoney;\n }", "public BigDecim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
menu for searching for documents
public static ArrayList<Document> searchDocument(Scanner sc){ ArrayList<Document> matchingDocs = new ArrayList<Document>(); System.out.println("1. Search by Title"); System.out.println("2. Search by Author"); System.out.println("3. Search by Publisher"); System.out.println("4. Back to previous menu"); while...
[ "private void searchMenu(){\n\t\t\n\t}", "public static void SearchBookMenu() throws FileNotFoundException, SQLException {\n\t\t\t\n\t\t// Scanner Variable\n\t\tScanner searchPublisherScanner = KeyScanner.keyInput;\n\t\tString userInput = \"\";\n\t\t\n\t\t// SQL Search Variables\n\t\tString searchVariable = \"\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
True if has "border" attribute
public boolean isSetBorder() { synchronized (monitor()) { check_orphaned(); return get_store().find_attribute_user(BORDER$22) != null; } }
[ "boolean isBorder();", "public boolean hasBorder()\n\t{ return hasBorder; }", "public boolean isBorder() {\n boolean borderWidth = false;\n Object border = getObject(BORDER_KEY);\n if (border instanceof List) {\n List borderProps = (List) border;\n if (borderProps.size...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method builds the interpreter tree It defines the rule "Owen and (John or (Henry or Mary))"
static Expression buildInterpreterTree() { ArrayList<Expression> SentenceParts = new ArrayList<Expression>(); // Lid woorden Expression terminal1 = new TerminalExpression("De", "The"); Expression terminal2 = new TerminalExpression("Het", "The"); Expression terminal3 = new...
[ "public void constructTree(){\n if (this.regularExpression.equals(\"\")){\n System.err.println(\"Regular Expression Empty\");\n return;\n }\n Stack<NodeSyntax<Integer>> stackNode = new Stack<>();\n\n // currNode\n NodeSyntax<Integer> currNode = new NodeSyntax...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Purpose: Checks if a password of eight letters that is not in the dictionary is a good one Method: isGoodPassword Parameters: a password that is less than eight letters Correct result: False
@Test void isGoodPasswordLessThanEight() { assertFalse(PasswordChecker.isGoodPassword("cocoa")); }
[ "@Test\n\tvoid isGoodPasswordInDict() {\n\t\tPasswordChecker.addToDict(\"Supercalifragilisticexpialidocious\");\n\t\tassertFalse(PasswordChecker.isGoodPassword(\"Supercalifragilisticexpialidocious\"));\n\t\tassertFalse(PasswordChecker.isGoodPassword(\"suoicodilaipxecitsiligarfilacrepuS\"));\n\t}", "@Test\n\tvoid ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
seri_cdoc_electronic character Documento electronico
public String getSeriCdocElectronic() { return seriCdocElectronic; }
[ "public void setSeriCdocElectronic(String seriCdocElectronic) {\n this.seriCdocElectronic = seriCdocElectronic;\n }", "public void utimoCaracter() {\n\t\t// VALIDAMOS.\n\t\tchar ultimo = cadena.charAt(cadena.length() - 1);\n\t\t// IMPRIMIMOS.\n\t\tSystem.out.println(\"Ultimo caracter :\" + ultimo);\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devuelve el valor de la celda Devuelve si la celda esta vacia
public boolean isEmpty() { return _valor == 0;}
[ "public boolean PilaVacia() {\r\n return UltimoValorIngresado == null;\r\n }", "public boolean noFill(){\n return fillCharacter == EMPTY_CHAR;\n }", "private boolean camposNoVacios() {\n boolean vacio = false;\n\n if (!txtNombreGrupo.getText().isEmpty() || !txtDescripcion.getTe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "or_key" main.java.PLSQLKeys.g:2396:1: or_key : SQL92_RESERVED_OR ;
public final or_key_return or_key() throws RecognitionException { or_key_return retval = new or_key_return(); retval.start = input.LT(1); Object root_0 = null; Token SQL92_RESERVED_OR523=null; Object SQL92_RESERVED_OR523_tree=null; try { // main.java.PLSQ...
[ "public final AntlrDatatypeRuleToken ruleOpOr() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token kw=null;\n\n enterRule(); \n \n try {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/Interna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleExpr" $ANTLR start "entryRuleArrowExpr" ../com.rockwellcollins.atc.agree/srcgen/com/rockwellcollins/atc/agree/parser/antlr/internal/InternalAgree.g:2027:1: entryRuleArrowExpr returns [EObject current=null] : iv_ruleArrowExpr= ruleArrowExpr EOF ;
public final EObject entryRuleArrowExpr() throws RecognitionException { EObject current = null; EObject iv_ruleArrowExpr = null; try { // ../com.rockwellcollins.atc.agree/src-gen/com/rockwellcollins/atc/agree/parser/antlr/internal/InternalAgree.g:2028:2: (iv_ruleArrowExpr= ruleArr...
[ "public final EObject entryRuleArrowExpr() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleArrowExpr = null;\n\n\n try {\n // InternalAgreeParser.g:5514:2: (iv_ruleArrowExpr= ruleArrowExpr EOF )\n // InternalAgreeParser.g:5515:2: iv_ruleArrowExpr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ void displayDirections print directions conversionType = read string from user temp_from = read string from user calculateCtoF returns double (c 9 / 5) + 32 calculateFtoC returns double (f 32) 5 / 9 if conversionType equals f double temp_to = calculateCtoF(c_from) else if conversionType equals c double temp_to = calc...
public static void displayDirections() { System.out.println("Press C to convert from Fahrenheit to Celsius."); System.out.println("Press F to convert from Celsius to Fahrenheit.\n"); }
[ "public static void main(String[] args) {\n\n Solution18 obj = new Solution18();\n final Scanner scan = new Scanner(System.in);\n\n String character;\n double temp;\n String output;\n\n System.out.print(\"Enter [F] to convert Fahrenheit to Celcius \\nOr [C] to convert Celci...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a database file mentalcalculator.db to /db/ folder.
public void createDataBase() { String url = "jdbc:sqlite:db/mentalcalculator.db"; try (Connection conn = DriverManager.getConnection(url)) { if (conn != null) { DatabaseMetaData meta = conn.getMetaData(); System.out.println("The driver name is " ...
[ "private void createDatabase() {\n if (!plugin.getDataFolder().exists()) plugin.getDataFolder().mkdir();\n\n File file = new File(plugin.getDataFolder(), \"database.db\");\n\n if (!file.exists()) {\n try {\n file.createNewFile();\n StringUtil.infoLog(plu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the local solar flare cache. If no data exists within the persistence layer, a full import will be performed. If data does exist, only an incremental update will be performed based on the last entry.
public void updateCache() { log.info("Updating solar flare cache"); Date fallbackStartDate = DateHelper.getFallbackDate(); solarFlareRepository.count() .map(total -> { if (total > 0) { solarFlareRepository.findTopByBeginTimeIsNotNullOr...
[ "private void refreshDataCache(){\n this.stageplaatsen = dbFacade.getAllStageplaatsen();\n this.bedrijven = dbFacade.getAllBedrijven();\n }", "private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModifica...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
From car, telling this role he/she is at destination
@Override public void msgImAtDestination() { myEvent = CarPassengerEvent.ATDESTINATION; if (parent != null) parent.setActivityBegun(); stateChanged(); }
[ "private void travelTo(Location destination) \n\t{\n\t\tSystem.out.println(destination.name());\n\t\tif (destination == Location.Home) {\n\t\t\t\n\t\t\tif (role == Role.Attacker) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) { \n\t\t\t\t\t/*case 1: travelTo(Location.X4); travelTo(Location.AttackBase); break;\n\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method for deserializing histograms with sparse encoding mode. Assumes that the serialization header is not present or has already been read.
private static FixedBucketsHistogram fromBytesSparse(ByteBuffer buf) { double lowerLimit = buf.getDouble(); double upperLimit = buf.getDouble(); int numBuckets = buf.getInt(); OutlierHandlingMode outlierHandlingMode = OutlierHandlingMode.values()[buf.get()]; long count = buf.getLong(); long l...
[ "public static ActionHistogram decodeFromCompressedByteBuffer(final ByteBuffer buffer,\n final long minBarForHighestTrackableValue) throws DataFormatException {\n return decodeFromCompressedByteBuffer(buffer, ActionHistogram.class, minBarForHigh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to create an offscreen image
public void createOffScreenImage(String fname) { //create the image Toolkit tk = Toolkit.getDefaultToolkit(); offscreen = tk.createImage("fname"); offscreenImage = new BufferedImage(2400, 3300, BufferedImage.TYPE_INT_RGB); //set class boolean to true so drawSkyMap draws to offsc...
[ "protected boolean _createImageOffScreen_(int intW, int intH)\r\n {\r\n String strMethod = \"_createImageOffScreen_(intW, intH)\";\r\n \r\n if (! isDisplayable())\r\n {\r\n MySystem.s_printOutError(this, strMethod, \"! isDisplayable()\");\r\n return false;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__TransformationDependency__Group__12__Impl" $ANTLR start "rule__TransformationDependency__Group__13" ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/srcgen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:3329:1: rule__TransformationDependency__Group__13 : rul...
public final void rule__TransformationDependency__Group__13() throws RecognitionException { int stackSize = keepStackSize(); try { // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/Internal...
[ "public final void rule__TransformationDependency__Group__12() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/inter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of SendSuccessfullUploadEmail method, of class Email.
@Test public void testSendSuccessfullUploadEmail() throws JSONException { System.out.println("SendSuccessfullUploadEmail"); String email = units.get(2).getString("UserName"); String userName = units.get(2).getString("UserEmail"); String link = units.get(2).getString("ViewLink"); ...
[ "@Test\n public void testUploadOK() throws Exception {\n String fileName = \"orig\";\n String content = \"bar\";\n MockMultipartFile file = new MockMultipartFile(\"file\", fileName, MediaType.APPLICATION_OCTET_STREAM_VALUE, content.getBytes());\n doUploadTest(file, \"{}\", \"\", status().isOk());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get y set Obtiene id pedido.
public String getIdEntrega() { return this.idEntrega; }
[ "public final int getPedidoId() {\n return pedidoId;\n }", "@Override\n public long getPartidoId() {\n return _partido.getPartidoId();\n }", "public int getIdComentario() {\n return id;\n }", "public Integer getIdEntidad() {\r\n\t\treturn idEntidad;\r\n\t}", "public int getI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test null pointer exception in indexOf
@Test public void testIndexOfException() { try { slist.indexOf(null); fail("Should have generated an exception"); } catch(NullPointerException e) { // normal } }
[ "@Test\n public void test217() throws Throwable {\n int int0 = StringUtils.indexOf((String) null, \"\", 229);\n }", "int indexOf(data element) throws ElementNotExist;", "public void testContains_NullAddress() {\r\n try {\r\n storage.contains(null);\r\n fail(\"IllegalArgumen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test cases for 171. Excel Sheet Column Number
@Test void testExcelSheetColumnNumber() { assertEquals(1, new ExcelSheetColumnNumber().titleToNumber("A")); assertEquals(28, new ExcelSheetColumnNumber().titleToNumber("AB")); assertEquals(701, new ExcelSheetColumnNumber().titleToNumber("ZY")); assertEquals(50835706, new ExcelSheetColumnNumber().titleToNumber(...
[ "private static int getTestCols(XlsReader xls, String sheet, int testStartRowNum) {\n\n\t\tint colStartRowNum = testStartRowNum + 1;\n\t\tint totalCols = 0;\n\n\t\t// Count headers till find empty header column\n\t\twhile (!xls.getCellData(sheet, totalCols, colStartRowNum).equals(\"\")) {\n\t\t\ttotalCols++;\n\t\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.google.protobuf.Any content = 2 [(.cosmos_proto.accepts_interface) = "Content"];
com.google.protobuf.AnyOrBuilder getContentOrBuilder();
[ "com.google.protobuf2.AnyOrBuilder getContentOrBuilder();", "com.google.protobuf2.Any getContent();", "com.google.protobuf.Any getContent();", "com.google.protobuf.ByteString getContent();", "public interface Content {\n}", "Object getContent(Object message);", "com.google.protobuf.AnyOrBuilder getOutpu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
open a todo item for editing
private void onEditTodo() { int row = todoTable.getSelectedRow(); if (row == -1) return; // Ensure only one row is selected. todoTable.getSelectionModel().setSelectionInterval(row, row); TableSorter tm = (TableSorter) todoTable.getModel(); int k = tm.getMappedIndex(row); // get the object and edit ...
[ "public void editToDoItem(ToDoItem toDoItem) {\n Intent intent = new Intent(MainActivity.this, EditItemActivity.class);\n intent.putExtra(EditItemActivity.TODO_ITEM_ID, toDoItem.getId());\n startActivityForResult(intent, kEditToDoResultCode);\n }", "void showTodoViewToEdit(Task task);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
////////////////////////////////////////////////////////////////////// Description: Reads one (indexed) value from file. Returns FALSE on error. Use: private
public boolean read1Value(SoInput in, int index) // //////////////////////////////////////////////////////////////////////// { DoubleConsumer[] ref = ((SbVec2f)values[index]).getRef(); return (in.read(ref[0]) && in.read(ref[1])); }
[ "public Value readValue() throws JBasicException {\n\n\t\tValue result = null;\n\t\tif (mode != MODE_INPUT) {\n\t\t\tthrow new JBasicException(Status.INFILE, fname);\n\t\t}\n\n\t\tif (!fReadAhead)\n\t\t\ttry {\n\t\t\t\tfReadAhead = true;\n\t\t\t\tbuffer = getStdin().readLine();\n\t\t\t} catch (final IOException e) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all values of property StartedAtTime as an Iterator over RDF2Go nodes
public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllStartedAtTime_asNode() { return Base.getAll_asNode(this.model, this.getResource(), STARTEDATTIME); }
[ "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllTime_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), TIME);\r\n\t}", "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllStartedAtTime_asNode(Model model, org.ontoware.rdf2go.model.node.Resource ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the shoppingCentersNumbers property.
public int getShoppingCentersNumbers() { return shoppingCentersNumbers; }
[ "public void setShoppingCentersNumbers(final int value) {\n this.shoppingCentersNumbers = value;\n }", "public String getCentificatenumber() {\n return centificatenumber;\n }", "public Integer getAutoCent() {\n return autoCent;\n }", "public long getCenturies() {\n return getD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new car
public void createCar(final Car car) { try { em.getTransaction().begin(); em.persist(car); em.getTransaction().commit(); } finally { if (em.getTransaction().isActive()) em.getTransaction().rollback(); } }
[ "public void createVehicle(Vehicle vehicle);", "Vehicle createVehicle(VehicleRequest vehicleRequest);", "public final String insertNewCar(){\r\n\t\tfinal Car newCar = new Car(this.marca,\r\n\t\t\t\t\t\t\t\t this.modelo,\r\n\t\t\t\t\t\t\t\t this.precio,\r\n\t\t\t\t\t\t\t\t this.disponible);\r\n\t\tcarsServ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a string s, return all the palindromic permutations (without duplicates) of it. Return an empty list if no palindromic permutation could be form.
public List<String> generatePalindromes(String s) { List<String> resultList = new ArrayList<String>(); if(s == null || s.length() == 0) { return resultList; } HashMap<Character, Integer> map = new HashMap<Character, Integer>(); int oddCount = 0; for(int i = 0...
[ "public static ArrayList<ArrayList<String>> getAllPalindromePartition(String s) {\n\t\tArrayList<ArrayList<String>> res = new ArrayList<ArrayList<String>>();\n\t\tArrayList<String> x = new ArrayList<String>();\n\t\trun(s, x, res);\n\t\treturn res;\n\t}", "public static String[] findPermutations(String s){\n Ar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares two terms by their hebrew String.
public final int compare(final Term first, final Term second) { return first.getHebrewString().compareTo(second.getHebrewString()); }
[ "@Test\n public void testInternationalChars()\n {\n String pw1 = \"ππππππππ\";\n String pw2 = \"????????\";\n BcryptFunction function = BcryptFunction.getInstance(10);\n\n\n String h1 = function.hash(pw1.getBytes(StandardCharsets.UTF_8)).getResult();\n Assert.assertFalse(fun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Signature Sink'.
SignatureSink createSignatureSink();
[ "SignatureSource createSignatureSource();", "Sink createSink();", "public Signature() {}", "SignatureIdentification createSignatureIdentification();", "GenericSink createGenericSink();", "public void setSignatureSource(SourceType signatureSource);", "public CopySink() {}", "public SourceType getSignat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create a method isHungry that will accept boolean value and print , if passed value is true >go cook otherwise go study
void isHungry(boolean areYouHungry) { if(areYouHungry) { System.out.println("Please cook for yourself"); }else { System.out.println("Go ahead and study"); } }
[ "boolean isAngry();", "public boolean isHungry() {\t\t\n\t\tif (hungry <= 20) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "void isSnowing(boolean isSnowing) {//method header\n\t//method body\n\tif(isSnowing) {\n\t\tSystem.out.println(\"Stay home\");\n\t}else {\n\t\tSystem.out.println(\"Go for a walk\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method gets b2b order list
SearchPageData<OrderModel> getB2BOrderList(CustomerModel currentCustomer, BaseStoreModel currentBaseStore, OrderStatus[] statuses, PageableData pageableData, List<B2BUnitModel> b2bUnit);
[ "public List<Bouquet> getAllBouquetsInOrder() {\n readOrderId();\n if (orderId != null) {\n return orderDAO.get(orderId).getBouquets();\n }\n return new LinkedList<>();\n }", "@Override\r\n public List<IBooking> getBookingList() throws IOException {\r\n bookingL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
nextCursor will continue call to each cluster node to iterate through server side cursor isEnd() return true, mean the end of cursor for each cluster
public ClusterCursor nextCursor(ClusterCursor clusterCursor) { //clear out keyValueList first clusterCursor.resetCursorParaList(); if ( clusterCursor.isEnd()) { logger.info("isEnd true for clusterCursor size "+clusterCursor.getCursorParaList().size()); return clusterCurs...
[ "protected void nextCursor() {\n checkValid();\n index = ++index % cursors.length;\n }", "public boolean hasNext()\r\n {\r\n return cursor != null;\r\n }", "public boolean gotoEnd() {\n\t\tcursor = head;\n\t\tif (!isEmpty()) {\n\t\t\twhile (cursor.getNext() != null) {\n\t\t\t\tcur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method initializes detailsToggleButton
private JToggleButton getDetailsToggleButton() { if (detailsToggleButton == null) { try { detailsToggleButton = new JToggleButton(); detailsToggleButton.setText("Vis detaljer"); detailsToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.e...
[ "public void setupToggleButtons(){\n\t\ttoggle_textContacts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t if (isChecked) {\n\t\t // The toggle is enabled\n\t\t\t if(prefsH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recebe o id da entidade associativa e exclui (desassocia)
private void desassocia(String idObjeto) { try { // recuperando a entidade associativa para exclui-la, conforme id // passado Object objeto = getFacade().edit(getContext(), plcConfigManyToManyMatrix.classeAssociativa(), Long.parseLong(idObjeto))[0]; setEntity(objeto); } catch (Exception e) { t...
[ "void incluir(Entidade entidade);", "@Override\n\tpublic void incluirEntity() {\n\t\t// Se for nova instancia\n\t\tif(entity.getId()==0) {\n\t\t\tentity.setDataSolicitacao(Calendar.getInstance());\n\t\t\tentity.setRespondido(false);\n\t\t}\n\t\tincluirGeneric( entity!=null? entity.getId():0);\n\t}", "void exclu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SELECT a FROM m.g GROUP BY a HAVING COUNT(b) > 0
@Test public void testHavingFunction() throws Exception { String sql = "SELECT a FROM m.g GROUP BY a HAVING COUNT(b) > 0"; Node fileNode = sequenceSql(sql, TSQL_QUERY); Node queryNode = verify(fileNode, Query.ID, Query.ID); Node selectNode = verify(queryNode, Query.SELECT_REF_NAME,...
[ "public int andNotCardinality(final EWAHCompressedBitmap a) {\n\t\tfinal BitCounter counter = new BitCounter();\n\t\tandNot(a, counter);\n\t\treturn counter.getCount();\n\t}", "@Test\n public void testGroupByHaving() throws Exception {\n String sql = \"SELECT a FROM m.g GROUP BY b, c HAVING b=5\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Produces a file name for the layout of the given pathway within the given organism in the query.
public String getFileName(Query query, P pathway);
[ "public interface PathwayFileNamer<P> {\n\n /**\n * Produces a file name for the layout of the given pathway within the given organism in the query.\n *\n * @param query\n * @param pathway\n * @return file name (not complete path) for the layout output.\n */\n public String getFileName...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstStatementIf__Group__3__Impl" $ANTLR start "rule__AstStatementIf__Group__4" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:16572:1: rule__AstStatementIf__Group__4 : rule__AstStatementIf__Group__4__Impl rule__AstStatementIf__Group__5 ;
public final void rule__AstStatementIf__Group__4() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:16576:1: ( rule__AstStatementIf__Group__4__Impl...
[ "public final void rule__AstStatementIf__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:16588:1: ( ( ( rule__AstState...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the CarrierShape parent for this shape
public void setParent(CarrierShape parent) { this.parent = parent; }
[ "public CarrierShape parent()\n\t{\n\t\treturn parent;\n\t}", "public void setParent(RMParentShape aShape) { _parent = aShape; }", "public RMParentShape getParent() { return _parent; }", "public void setParent(GateContainer parent) {\r\n\tthis.parent = parent;\r\n }", "public void setParent(RadioGroup ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for the FindOwnersPage object with the driver and baseURL as parameters
public FindOwnersPage(WebDriver driver, String baseUrl) { this.driver = driver; this.baseUrl = baseUrl; }
[ "public LinkedInSearchPage(WebDriver driver) {\n super(driver);\n PageFactory.initElements(driver, this);\n }", "public PageUtils(WebDriver driverTopNavigationPage)//400\n\t{\n\t\tthis.driver=driverTopNavigationPage;\n\t\t//System.out.println(\"PageUtils constructor starts\");\n\t}", "public Pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the tile at the given coords is collidable
public boolean isTileCollidable(int x, int y) { MapCell cell = getCellAt(x, y); return cell != null && (collidables.contains(cell.getTile().getId()) || (cell.hasObject() && cell.getObject().isCollidable())); }
[ "public boolean isCollidable() {\n return tileCollidable;\n }", "private boolean colliding() {\n for (Position p: activeBrick.getSquares()){\n if (p.getX() >= NUMCOLUMNS || p.getX() < 0){\n return true;\n }\n if (p.getY() >= NUMROWS || (p.getY()>=0 && gr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the objectClass attribute of the SearchField object
public String getObjectClass() { return objectClass; }
[ "public String getSearchClass() {\r\n return searchClass;\r\n }", "private LDAPAttribute getObjectClassAttribute(String field) {\n\t\tfinal String lowCaseField = field.toLowerCase();\n\t\tif(lowCaseField.equals(\"o\")) {\n\t\t\treturn new LDAPAttribute(\"objectclass\", new String[] { \"top\", \"organiza...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method used to setUp dagger
private void setUpDagger() { mAppComponent = DaggerApplicationComponent.builder().applicationModule(new ApplicationModule(this)).build(); }
[ "private void setup(){\n\n // menginisialisasi variabel component\n component = DaggerApplicationComponent.builder()\n .applicationModule(new ApplicationModule(this)).build();\n\n // memanggil fungsi inject\n component.inject(this);\n }", "public void poisonDagger ()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor. Creates a cache for 100 entries.
public SessionCache() { this(100, 0.75f); }
[ "public LRUFilesCache()\n {\n this(100);\n }", "public LRUCache(int N) {\n //Your code here\n cacheMap=new HashMap<Integer, Integer>(); // empty HashMap\n cacheSchedule=new LinkedList<Integer>(); // scheduling list\n capacity=N;\n }", "public SearchCache() {\n this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the score for a given review Returns 1 if there is no review with the given identifier
public int getReviewScore(int reviewId) { if (reviewId > reviews.getNumOfReviews() || reviewId <= 0) { return -1; } return reviews.getScore(reviewId - 1); }
[ "public int getReviewScore(int reviewId) {\n\t\tif (!reviewIndex.isReviewIdValid(reviewId - 1)) { return -1;}\n\t\treturn reviewIndex.getScore(reviewId - 1);\n\t}", "public double reviewScore(String review) {\r\n\r\n\t\tArrayList<String> words = this.getValidWords(review);\r\n\r\n\t\tdouble score = 0;\r\n\r\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate change status request.
String generateChangeStatusRequest(RequestMQ requestMQ);
[ "private String changeRequestStatus() {\r\n //split the drop down item into array using : as a delimiter\r\n String[] selectionArray = selectedRequest.split(\":\");\r\n try {\r\n requestId = Long.parseLong(selectionArray[0]);\r\n userRequest.updateStatus(requestId, reqStat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the tree object for this commit
public void setTree(final Tree t) { treeId = t.getTreeId(); treeObj = t; }
[ "public void setTreeRoot(Node root) { treeRoot = root; }", "public void setLeaf(Commit c) {\n\t\tmyLeaf = c;\n\t}", "protected void setPropertyTree(PropertyTree tree) {\n propertyTree = tree;\n }", "public void setTreeId(final ObjectId id) {\n \t\tif (treeId==null || !treeId.equals(id)) {\n \t\t\ttr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__MulExpr__Group_1__1__Impl" $ANTLR start "rule__MulExpr__Group_1__2" InternalMGPL.g:4063:1: rule__MulExpr__Group_1__2 : rule__MulExpr__Group_1__2__Impl ;
public final void rule__MulExpr__Group_1__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMGPL.g:4067:1: ( rule__MulExpr__Group_1__2__Impl ) // InternalMGPL.g:4068:2: rule__MulExpr__Group_1__2__Impl { pushFo...
[ "public final void rule__MulExpr__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:3986:1: ( rule__MulExpr__Group__1__Impl )\n // InternalMGPL.g:3987:2: rule__MulExpr__Group__1__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/24 COR556 Free Spins: Configured and active games only
public static void allFreeSpinsShowActiveGamesOnly() { UserData userData = DataContainer.getUserData().getFreeSpinUserData(); PortalUtils.loginUser(userData); AllFreeSpinsPage allFreeSpinsPage = (AllFreeSpinsPage) NavigationUtils.navigateToPage(ConfiguredPages.freeSpinsBalance); allFreeS...
[ "boolean isGameActive();", "boolean hasRequestPlayerSeat();", "@Override\n public boolean isLegal(AdvancedData data)\n {\n return super.isLegal(data) && ((data.gameState == GameControlData.STATE_PLAYING)\n && (data.gamePhase != GameControlData.GAME_PHASE_PENALTYSHOOT)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Verify Status code is 404 for Invalid Posts and log full response
@Test public void verifyInvalidStatusCode(){ given() .header("Content-type","application/json") .header("charset","utf-8") .when() .get("https://jsonplaceholder.typicode.com/invalidposts"). then() .statusCode(Htt...
[ "public final void doPost(HttpServletRequest req, HttpServletResponse resp) { resp.setStatus(404); }", "@Override\n public void onFailure(int statusCode, cz.msebera.android.httpclient.Header[] headers, byte[] responseBody, Throwable error) {\n if (statusCode == 404) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated method Setter of the BrainTreePaymentInfo.expirationYear attribute.
public void setExpirationYear(final SessionContext ctx, final String value) { setProperty(ctx, EXPIRATIONYEAR,value); }
[ "public void setExpirationYear(java.math.BigInteger expirationYear) {\r\n this.expirationYear = expirationYear;\r\n }", "public int getExpirationYear() {\n return expirationYear_;\n }", "public java.math.BigInteger getExpirationYear() {\r\n return expirationYear;\r\n }", "public int ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the financialDocumentReferenceInvoiceNumber attribute value.
public void setFinancialDocumentReferenceInvoiceNumber(String financialDocumentReferenceInvoiceNumber) { if (financialDocumentReferenceInvoiceNumber != null) financialDocumentReferenceInvoiceNumber = financialDocumentReferenceInvoiceNumber.toUpperCase(); this.financialDocumentReferenceInvoi...
[ "public String getFinancialDocumentReferenceInvoiceNumber() {\n return financialDocumentReferenceInvoiceNumber;\n }", "public void setInvoiceNumber(String num)\r\n {\r\n _invoiceNumber = num;\r\n addField(\"x_invoice_num\", num);\r\n }", "public void setInvoiceNumber(String value)\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field440' field has been set
public boolean hasField440() { return fieldSetFlags()[440]; }
[ "public boolean hasField441() {\n return fieldSetFlags()[441];\n }", "public boolean hasField420() {\n return fieldSetFlags()[420];\n }", "public boolean hasField430() {\n return fieldSetFlags()[430];\n }", "public boolean hasField44() {\n return fieldSetFlags()[44];\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Truncates the given collection.
public void truncate(DBCollection collection) { log("truncate('" + collection.getName() + "')", Loglevel.DEBUG); mongoApi.truncate(collection); }
[ "void truncateAll();", "private void truncate() {\n\t\twhile (this.list.size() > k) {\n\t\t\tthis.list.removeLast();\n\t\t}\n\t}", "public void truncate() {\n final long firstPage = getPageAddress(0);\n final long pageSize = getMapPageSize();\n Vect.memset(firstPage, pageSize, 0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "ObjectID" element
void xsetObjectID(org.apache.xmlbeans.XmlString objectID);
[ "void setObjectID(java.lang.String objectID);", "public void xsetOID(org.apache.xmlbeans.XmlString oid)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
hydro ic nonmetal acid ic polyatomic acid none of the above not an acid
public String solver(String name){ name = name.toLowerCase(); boolean b1 = name.startsWith("hydro"); boolean b2 = name.endsWith("ic"); String answer = ""; if(b1 && b2){ answer = "non-metal acid"; }else if(b1==false && b2 ==true){ answer = "polyato...
[ "@Override\n public boolean isAlcoholic() {\n return false;\n }", "@Override\n protected void processAccessionAndDisplay(uk.ac.ebi.intact.model.Interactor polymer, Interactor mitabInteractor, boolean hasFoundUniprotIdentity) {\n if (hasFoundUniprotIdentity){\n // the shortlabel i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associates the given animator with the provided drawable state specs so that it will be run when the View's drawable state matches the specs.
public void addState(int[] specs, Animator animator) { Tuple tuple = new Tuple(specs, animator); tuple.mAnimator.addListener(mAnimatorListener); mTuples.add(tuple); mChangingConfigurations |= animator.getChangingConfigurations(); }
[ "public void setStateListAnimator(android.animation.StateListAnimator stateListAnimator) { throw new RuntimeException(\"Stub!\"); }", "public boolean animate(V view, Drawable drawable, Mirage.Source source);", "public void changeAnimation(String mood){\n switch (mood){\n\n // Blink case\n case \"bl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove posts by pictureID
@DeleteMapping("/posts/picture/{pictureId}") void removePostsByPic(@PathVariable Long pictureId);
[ "boolean removePost(long id);", "void removePost(int id) throws RemoteException, SQLException;", "void deletePostById(int id);", "private void deletePost(String id) {\n deleteValue(databasePost, id);\n DatabaseReference postCommenti = istanceReference(\"commento\");\n deleteValue(postCommenti, id);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .control.HeartbeatRequest heartbeatRequest = 5;
control.Heartbeatrequest.HeartbeatRequestOrBuilder getHeartbeatRequestOrBuilder();
[ "control.Heartbeatrequest.HeartbeatRequest getHeartbeatRequest();", "HeartBeat.Req getHeartBeatReq();", "private CSHeartbeat() {}", "public void sendHeartbeat();", "public void onHeartbeat(Event theEvent) { \n}", "private void setHeartBeatReq(HeartBeat.Req value) {\n if (value == null) {\n th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ProfileSyncService.SyncStateChangedListener implementation, listens to sync state changes. If the user has just turned on sync, this listener is needed in order to enable the encryption settings once the engine has initialized.
@Override public void syncStateChanged() { updatePreferences(); }
[ "public interface SyncListener\r\n{\r\n /** \r\n * Called to indicate that a sync session is being started. <br/><br/>\r\n * \r\n * This method will be called just before a new sync session is started (i.e. before any communication\r\n * has taken place with the SyncML server).\r\n * \r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove an annotation from the specified field.
public AnnotatedTypeBuilder<X> removeFromField(Field field, Class<? extends Annotation> annotationType) { if (fields.get(field) == null) { throw new IllegalArgumentException("field " + field + " not present on class " + getJavaClass()); } else { fields.get(field).remove(annotationType); } return this; }
[ "public AnnotatedTypeBuilder<X> removeFromField(AnnotatedField<? super X> field,\n\t\t\tClass<? extends Annotation> annotationType) {\n\t\treturn removeFromField(field.getJavaMember(), annotationType);\n\t}", "public void removeMember(Annotation member);", "@Override\n public void removeAnnotation(Annotation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Expected throws AccessException when inner method call throws it
@Test public void shouldThrownAccessExceptionWhenInnerMethodCallThrowsIt() throws Exception { // p4ic4idea: use a public, non-abstract class with default constructor executeAndExpectThrowsExceptions( AccessException.AccessExceptionForTests.class, AccessEx...
[ "@Test\n public void shouldThrowsExceptionWhenInnerMethodCallThrowsIt() throws Exception {\n thrown.expect(AccessException.class);\n //given\n // p4ic4idea: use a public, non-abstract class with default constructor\n doThrow(AccessException.AccessExceptionForTests.class).when(server)....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the AccessPoint key for a normal nonPasspoint network by ssid/bssid and security.
private static String getKey(String ssid, String bssid, int security) { StringBuilder builder = new StringBuilder(); builder.append(KEY_PREFIX_AP); if (TextUtils.isEmpty(ssid)) { builder.append(bssid); } else { builder.append(ssid); } builder.appen...
[ "java.lang.String getSsid();", "String getSsid();", "public static String getKey(WifiConfiguration config) {\n if (config.isPasspoint()) {\n return getKey(config.FQDN);\n } else {\n return getKey(removeDoubleQuotes(config.SSID), config.BSSID, getSecurity(config));\n }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "oleObj" element
public void setOleObj(org.openxmlformats.schemas.presentationml.x2006.main.CTOleObject oleObj) { synchronized (monitor()) { check_orphaned(); org.openxmlformats.schemas.presentationml.x2006.main.CTOleObject target = null; target = (org.openxmlformats.schemas.prese...
[ "public abstract void setObject(EObject obj);", "public abstract void setEncapsulatedObject(TagContent obj)\r\n\t\t\tthrows TagFormatException;", "public void setExtObject(java.lang.String extObject)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TwitterService service = mock(TwitterService.class);
@Test public void test_addNewTweet() throws Exception { Tweet tweet=new Tweet("id","Hello"); //doNothing().when(twitterRepository.save(any())); twitterService.addNewTweet(tweet); verify(twitterRepository).save(tweet); // verify method also mock things. Due to this no use of when met...
[ "@Test\npublic void getTweets() throws Exception {\n Twitter twitter = mock(Twitter.class);\n QueryResult result = mock(QueryResult.class);\n List<Status> list = new ArrayList<>();\n list.add(new FakeStatus(\"test\", mock(User.class), new SimpleDateFormat(\"yyyy-mm-dd\").parse(\"2020-11-17 10:30\")));\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Manager'.
Manager createManager();
[ "public Manager getManager();", "ImplementationManager createManager();", "private Manager getManager()\n {\n return Manager.getInstance();\n }", "Manager getManager() {\n return Manager.getInstance();\n }", "public static Manager getInstance() {\n if (instance == null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value related to the column: checkdate
public void setCheckdate( String checkdate ){ this.checkdate = checkdate; }
[ "public void setCheckdate(Date checkdate) {\n this.checkdate = checkdate;\n }", "public void setCheckDate(Date checkDate) {\n this.checkDate = checkDate;\n }", "public void setCheckDate(Date checkDate) {\n\t\tthis.checkDate = checkDate;\n\t}", "public void setChkDate(Date chkDate) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new intent, but always a like intent, i.e. all instances will be equal, but should not be the same.
protected abstract Intent createOne();
[ "private Intent createIntent() {\n Intent intent = new Intent(this, GameOverActivity.class);\n intent.putExtra(POINTS, presenter.getPoints() + points);\n intent.putExtra(PASS_USER, user);\n intent.putExtra(CORRECT, correct);\n intent.putExtra(INCORRECT, incorrect);\n intent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notify the tab at specific position has been inserted, and the TabIndicatorView should update to reflect the changes.
public final void notifyTabInserted(int position) { mView.getAdapter().notifyItemRangeInserted(position, 1); }
[ "public final void notifyTabSelected(int position){\n mView.onTabSelected(position);\n }", "public final void notifyTabChanged(int position) {\n mView.getAdapter().notifyItemRangeChanged(position, 1);\n }", "public final void notifyTabScrolled(int position, float positionOffs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_mp_num.validTime
public String getValidtime() { return validtime; }
[ "public Date getValidtime() {\n return validtime;\n }", "public java.util.Date getValidTime() {\r\n return validTime;\r\n }", "public com.walgreens.rxit.ch.cda.IVLTS getValidTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ void allocateMasterPack() In: Nothing Out: Nothing Description: This function fills the masterPack if it is not already filled. It fills the pack with valid card values.
private static void allocateMasterPack() { //If Deck.masterPack is null, then it needs to be filled, otherwise, nothing needs to be done. if (Deck.masterPack != null) { //For each suit, fill the masterPack with each valid card value from that suit. for (int i = 0; i < Card.Suit.values().le...
[ "private static void allocateMasterPack()\n {\n // check if masterPack has already been generated.\n if (masterPack != null)\n return;\n \n masterPack = new Card[56];\n int count = 0;\n char[] values = {'T', 'J', 'Q', 'K', 'A', 'X'};\n \n // make all the numbered cards\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Since executing this operation results in a pending request, let's use the same /pending endpoint.
@PUT @Path("/pending") StatusResponse queueCalculation(QueueCalculationParms parameters);
[ "public static void submitPendingOperations()\n {\n DELEGATE.submitPendingOperations();\n }", "private synchronized void incrementPending() {\n\t\tpending++;\n\t\tlogger.debug(\"Pending is now {}\", pending);\n\t}", "public void savePendingRequest(PendingRequest pendingRequest);", "@Override\n\tp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the background color of Gmail's action bar.
public static int getActionBarBackgroundResource(final Context context) { final TypedValue actionBarStyle = new TypedValue(); if (context.getTheme().resolveAttribute(android.R.attr.actionBarStyle, actionBarStyle, true) && actionBarStyle.type == TypedValue.TYPE_REFERENCE) { fi...
[ "Color getBackground();", "public Color getBackground();", "public Color getScreenBackgroundColor();", "public int backgroundColor() {\n // create/return the background color\n return Color.rgb(180, 200, 255);\n }", "public int getBackgroundColor() {\n return background_color;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }