query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Initializes the RootLayout and shows it.
public void initRootLayout() { try { FXMLLoader loader = new FXMLLoader(); loader.setLocation(MainApp.class.getResource("view/RootLayout.fxml")); rootLayout = (BorderPane) loader.load(); RootLayoutController controller = loader.getController(); controller.setMainApp(this); Scene scene = new S...
[ "public void initRootLayout() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_MAIN));\r\n\r\n try {\r\n rootLayout = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_MAIN, ex);\r\n\r\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
instantiates the DB connection
public void createDBconnection() { sqlQuery = new SQLQuery(dbDriver, dbServer, dbPort, dbName, dbInstance, dbUser, dbPasswd); }
[ "public Connection createDBConnection();", "public void createConnectoin() {\n DBConnect db = new DBConnect();\n this.con = db.createConnection();\n }", "private void connectDb() {\n // This block ensures that the MySQL driver is loaded in the classpath\n try {\n Class.forName(dbProp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Persist a previously saved HrCSchool entity and return it or a copy of it to the sender. A copy of the HrCSchool entity parameter is returned when the JPA persistence mechanism has not previously been tracking the updated entity.
public HrCSchool update(HrCSchool entity);
[ "public void save(HrCSchool entity);", "public void save(HrJBorrowcontract entity);", "public void save(HrJWorkcontract entity) throws DataChangeException;", "public void saveHerramienta(Herramienta entity) throws Exception;", "public void save(HrDOvertimetotal entity);", "Entity save(Entity entity);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads the environment variables and calls loginToHazelcastCloud() method with these variables.
public void loginToHazelcastCloudUsingEnvironment() throws CloudException, org.apache.thrift.TException;
[ "public void loginToHazelcastCloud(java.lang.String baseUrl, java.lang.String apiKey, java.lang.String apiSecret) throws CloudException, org.apache.thrift.TException;", "Map<String, String> interactiveLogin(CloudContext cloudContext, ExtendedCloudCredential extendedCloudCredential,\n CredentialNotifier...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the div's text.
public String getDivText(int index) { return getText(getDiv(index)); }
[ "public String getText() {\n\t\t\treturn text.get();\n\t\t}", "public String getText(){\r\n\t\treturn text;\r\n\t}", "public final String getText() {\n return text;\n }", "java.lang.String getTextContent();", "protected Text getText() {\n \t\treturn text;\n \t}", "public String getText() {\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notification from a user that an app has exitted. Don't trust this message unless the app is user launched. This method is untested since the client implementation of userlaunch is incomplete.
void handleAppExitted(WonderlandClientID clientID, AppConventionalCellAppExittedMessage message) { // make sure the app wasn't server launched if ("server".equalsIgnoreCase(serverState.launchLocation)) { logger.warning("Cannot notify of exit for server laun...
[ "public void onExit();", "public void onMenuExitApplication() {\n this.processWindowEvent(new WindowEvent(this,WindowEvent.WINDOW_CLOSING));\n }", "private void onExit() {\r\n System.out.println(\"Thank You For Using TCVM Service. \");\r\n System.exit(0);\r\n }", "private ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called by client when player wants to play Road Building card
public void playRoadBuildCard() { }
[ "public void playCard() {\n\t}", "public void playRoadBuildingCard(Road[] roads) {\n\t\tthis.clientCommunicator.playRoadBuilding(this.modelToJSON\n\t\t\t\t.createPlayRoadBuildingObject(getPlayerIndex(),\n\t\t\t\t\t\troads[0].getLocation(), roads[1].getLocation(), true),\n\t\t\t\tgetFullCookie());\n\t}", "void p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column IMAL141_DEV_O18.S_CONTROL_PARAM.ADD_STRING2_DESC
public void setADD_STRING2_DESC(String ADD_STRING2_DESC) { this.ADD_STRING2_DESC = ADD_STRING2_DESC == null ? null : ADD_STRING2_DESC.trim(); }
[ "public String getADD_STRING2_DESC() {\r\n return ADD_STRING2_DESC;\r\n }", "public void setADD_STRING10_DESC(String ADD_STRING10_DESC) {\r\n this.ADD_STRING10_DESC = ADD_STRING10_DESC == null ? null : ADD_STRING10_DESC.trim();\r\n }", "public void setADD_STRING12_DESC(String ADD_STRING12_DE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all the student records from the file and return it to the domain Layer for processing.
public StudentParameters[] getStudentList(){ StudentParameters[] stu; stu = new StudentParameters[100]; try { FileNames file1 = new FileNames(); String path = file1.getStudFileName(); //opening file to read s...
[ "private void readStudent() throws IOException {\n FileReader fd = new FileReader(\"/Users/dawitgebremichael/hcc/javaII/src/main/java/domain/student.txt\");\n BufferedReader br = new BufferedReader(fd);\n String line = br.readLine(); //This read the first line\n\n Student student; //vari...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checks if the List of coordinates representing a blob is a number according to the size of its bounding rectangle
private boolean isNumber(List<Point> pixels, int[][] img) { int tileHeight = img.length / 9; int tileWidth = img[0].length / 9; // if pixels are empty return null if (pixels.size() == 0) { return false; } // sort list of pixels; first and last of each list will be the bounds // of rect int xMax = (i...
[ "boolean hasNumSpatialBinsHeight();", "boolean hasNumSpatialBinsWidth();", "boolean hasIntSize();", "public static boolean isBigRectangle(List<Rectangle> rectangles) {\n\n double minX1 = Double.MAX_VALUE;\n double minY1 = Double.MAX_VALUE;\n double maxX2 = Double.MIN_VALUE;\n double maxY2 = Double...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string asm_name = 14;
public Builder setAsmName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00002000; asmName_ = value; onChanged(); return this; }
[ "java.lang.String getAsmName();", "public static String getName() {\n\t\treturn _asmFileStr;\n\t}", "com.google.protobuf.ByteString\n getAsmNameBytes();", "public java.lang.String getAsmName() {\n java.lang.Object ref = asmName_;\n if (ref instanceof java.lang.String) {\n return (java....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends an LDAP message to the directory server and waits for the response.
protected final BindResult sendMessage(final LDAPConnection connection, final LDAPMessage requestMessage, final long timeoutMillis) throws LDAPException { if (connection.synchronousMode()) { return sendMessageS...
[ "private BindResult sendMessageSync(final LDAPConnection connection,\n final LDAPMessage requestMessage,\n final long timeoutMillis)\n throws LDAPException\n {\n // Set the appropriate timeout on the socket.\n try\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the specified 'global' GraphicsNodeMouseListener which is notified of all MouseEvents dispatched.
void removeGraphicsNodeMouseListener(GraphicsNodeMouseListener l);
[ "public void removeMouseListener(IMouseListener l)\n {\n mouseHook.remove(l);\n }", "void removeGraphicsNodeMouseWheelListener(GraphicsNodeMouseWheelListener l);", "private void deregisterListeners()\n {\n eventSource.removeMouseMotionListener(this);\n eventSource.removeMouseListen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the validation regex value of this form item.
@Override public java.lang.String getValidationRegexValue() { return _formItem.getValidationRegexValue(); }
[ "public final String getRegex() {\n\t\treturn JsUtils.getNativePropertyString(this, \"regex\");\n\t}", "public String getRegex() {\n return regex;\n }", "public String getFeatureValidationRegex() {\n\t\treturn featureValidationRegex;\n\t}", "public String numberValidRegex() {\n\t\treturn configFileP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleID" $ANTLR start "ruleID" InternalMyDsl.g:10008:1: ruleID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_SIMPLE_ID_0= RULE_SIMPLE_ID | this_ESCAPED_ID_1= RULE_ESCAPED_ID ) ;
public final AntlrDatatypeRuleToken ruleID() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token this_SIMPLE_ID_0=null; Token this_ESCAPED_ID_1=null; enterRule(); try { // InternalMyDsl.g:10014:2: ( (this_SIMPLE_ID_0...
[ "public final String entryRuleID() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleID = null;\n\n\n try {\n // InternalMyDsl.g:10001:42: (iv_ruleID= ruleID EOF )\n // InternalMyDsl.g:10002:2: iv_ruleID= ruleID EOF\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a new slide.
public void addSlide(Slide slide);
[ "public void add(Slide slide);", "void addSlide(File slidePath){\n try{\n Slide newSlide = new Slide(slidePath,slideTypes.get(0),1);\n slides.add(++currentSlide, newSlide);\n }\n catch(Exception e){}\n \n \n }", "public void addSlide(Slide value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a string representation of the AlarmSpineFunctionReq object.
public String toString() { String s = "Alarm Function "; s += (this.isActivationRequest)? "Activation {": "Deactivation {"; s += "sensor = " + SPINESensorConstants.sensorCodeToString(sensor) + ", "; s += "dataType = " + SPINEFunctionConstants.functionalityCodeToString(SPINEFunctionConstants.FEATURE,...
[ "@Override\n public String toString() {\n return function.toString();\n }", "public String toString() {\n return \"TetheringRequest [ type= \" + mRequestParcel.tetheringType\n + \", localIPv4Address= \" + mRequestParcel.localIPv4Address\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Facade layer class for searching opportunities.
public interface OpportunitySearchFacade { }
[ "Search getSearch();", "Collection<HotelDetails> search(HotelRequest request);", "List<ShipmentInfoPODDTO> search(String query);", "@Transactional(readOnly = true)\n public static Result search() {\n // TODO(Rao): We need to make this more refined. We need to support\n // search criteria mul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
C++: int cv::face::FaceRecognizer::predict(Mat src)
public int predict_label(Mat src) { return predict_label_0(nativeObj, src.nativeObj); }
[ "public void predict(Mat src, int[] label, double[] confidence)\n {\n double[] label_out = new double[1];\n double[] confidence_out = new double[1];\n predict_0(nativeObj, src.nativeObj, label_out, confidence_out);\n if(label!=null) label[0] = (int)label_out[0];\n if(confidenc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the hostingEnvironmentDeploymentInfos property: Available App Service Environments with basic information.
public List<HostingEnvironmentDeploymentInfo> hostingEnvironmentDeploymentInfos() { return this.hostingEnvironmentDeploymentInfos; }
[ "public List<AppServiceEnvironmentInner> hostingEnvironments() {\n return this.hostingEnvironments;\n }", "public Set<Environment> getAllEnvironments() throws IllegalArgumentException, IOException {\n HashSet<Environment> environments = new HashSet<Environment>();\n AuthenticatedWebClient....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test 4 of getUnit method, of class Regex.
@Test public void testGetUnit4() { System.out.println("getUnit 4"); String valueWithUnit = "0.564 UTF-8S"; String expResult = "UTF-8S"; String result = Regex.getUnit(valueWithUnit); assertEquals(expResult, result); }
[ "@Test\n public void testGetUnit3() {\n System.out.println(\"getUnit 3\");\n\n String valueWithUnit = \"365 Knot\";\n\n String expResult = \"Knot\";\n String result = Regex.getUnit(valueWithUnit);\n\n assertEquals(expResult, result);\n }", "@Test\n public void testGetUn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
EPIJ 5.5: Remove duplicates from a Sorted Array Time Complexity: O(n) Space Complexity: O(1) return the size of the array with duplicates moved to end
public static int removeDuplicatesFromSortedArray(List<Integer> A) { if(A.isEmpty()) { return 0; } if(A.size() == 1) { return 1; } int writeIndex = 1; for(int i=1; i< A.size(); i++) { if(!A.get(writeIndex-1).equals(A....
[ "public int removeDuplicatesInSortedArray(int[] a) {\n\n int j = 0;\n for (int i = 1 ; i < a.length ; i++) {\n if (a[j] != a[i]) {\n a[++j] = a[i];\n }\n }\n\n return j+1;\n }", "static int removeDuplicates(int[] nums) {\n if(nums.length =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__OrExpression__Group__1__Impl" $ANTLR start "rule__OrExpression__Group_1__0" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:6933:1: rule__OrExpression__Group_1__0 : rule__OrExpression__Group_1__0__Impl rule__OrExpres...
public final void rule__OrExpression__Group_1__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:6937:1: ( rul...
[ "public final void rule__OrExpression__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper binding method for function: showEither.
public static final SourceModel.Expr showEither(SourceModel.Expr x) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showEither), x}); }
[ "public abstract L getLeftOr(L or);", "public static final SourceModel.Expr showMaybe(SourceModel.Expr maybe) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showMaybe), maybe});\n\t\t}", "public String getLeftOrRight() {\n\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a new subroutine to the symbol tables. Triggers an error if a subroutine with the specified signature already exists. Once the subroutine enters the symbol tables, it is the user's responsibility that the subroutine's signature does not change because it is put in a search tree.
public void addSubroutine(Subroutine subroutine) { if (subroutineTable == null) { subroutineTable = new ScopeTree<Subroutine>(subroutine); } else subroutineTable = subroutineTable.add(subroutine, subroutineTable); debug("Added subroutine " + subroutine); }
[ "public void addSubroutine(Subroutine subroutine) {\n this.add(subroutine);\n }", "public void addSymbol(Symbol symInfo) {\n if (symInfo.getName().startsWith(\"got.\") && !(symInfo instanceof GotSymbol)) {\n throw new InternalError(\"adding got. without being GotSymbol\");\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
============================================================================================== BITMAP LOADING ==
@Override protected void loadBitmap(int position) { }
[ "protected abstract IImageMap loadImageMap();", "private void loadMapImage() {\r\n\t\t// Run service API using the url with project id and contact id\r\n\t\tnew LoadMapTask().execute(Utils.getActionAPIString(Action.MAP, null, null));\r\n\t}", "private void loadBitmap() {\n\n BitmapDrawable bitmapDrawable...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an unmodifiable view of the filtered item list
ObservableList<Item> getFilteredItemList();
[ "public List<T> getCopyOfUnfilteredItemList(){\n synchronized (listsLock){\n if (originalList != null){\n return new ArrayList<T>(originalList);\n } else {\n // if original list is null filtered list is unfiltered\n return new ArrayList<T>(filteredList);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
builds PaymentCreatedMessagePayload with checking for nonnull required values
public PaymentCreatedMessagePayload build() { Objects.requireNonNull(payment, PaymentCreatedMessagePayload.class + ": payment is missing"); return new PaymentCreatedMessagePayloadImpl(payment); }
[ "public PaymentCreatedMessagePayload buildUnchecked() {\n return new PaymentCreatedMessagePayloadImpl(payment);\n }", "public static PaymentCreatedMessagePayloadBuilder of() {\n return new PaymentCreatedMessagePayloadBuilder();\n }", "public static PaymentCreatedMessagePayloadBuilder of(fina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the given successor node on the given field to the inside edge set of all of the given set of nodes. Also adds predecessor links from the successor node to the given nodes. Returns true if anything was changed, false otherwise.
public static boolean addEdges(Set s, jq_Field f, Node n) { boolean b = false; for (Iterator i=s.iterator(); i.hasNext(); ) { Node a = (Node)i.next(); if (a.addEdge(f, n)) b = true; } return b; }
[ "public boolean addAccessPathEdges(jq_Field m, Set s) {\n for (Iterator i=s.iterator(); i.hasNext(); ) {\n FieldNode n = (FieldNode)i.next();\n if (n.field_predecessors == null) n.field_predecessors = NodeSet.FACTORY.makeSet();\n n.field_predecessors.add(this)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Only cancel if the animation is actually running or has been started and is about to run
@Override public void cancel() { if (mPlayingState != STOPPED || sPendingAnimations.get().contains(this) || sDelayedAnims.get().contains(this)) { // Only notify listeners if the animator has actually started if (mRunning && mListeners != null) { A...
[ "public final void cancel() {\n if (mIsFinished || mCancelled) {\n // If we were already finished, ignore\n return;\n }\n\n mCancelled = true;\n if (mAnimationListener != null) {\n mAnimationListener.onCancel();\n }\n }", "void onAnimationCancel();", "public void cancel() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "SellerSupplyOrderNumber" element
void xsetSellerSupplyOrderNumber(org.apache.xmlbeans.XmlString sellerSupplyOrderNumber);
[ "void xsetSupplyOrderNumber(org.apache.xmlbeans.XmlString supplyOrderNumber);", "void setSellerSupplyOrderNumber(java.lang.String sellerSupplyOrderNumber);", "void setNilSellerSupplyOrderNumber();", "org.apache.xmlbeans.XmlString xgetSellerSupplyOrderNumber();", "void setSupplyOrderNumber(java.lang.String s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form OrderForm
public OrderForm() { initComponents(); mWaffleList = new ArrayList<Product>(); mCoffeeList = new ArrayList<Product>(); mbdb = new BelgianDatabaseHandler(dbpath+menuDbName); resetQuantityBox(); generateMenu(); //if done generating menu //update orderhandler...
[ "public formOrderParts() {\n initComponents();\n }", "public NewOrderController() {\r\n\t\tnewOrderForm = new MyOrder();\r\n\t\tcurrentTerm = new TerminiDiConsegna.Entry();\r\n\t\tcurrentFrItem = new FreightItem();\r\n\t\titemList = new ArrayList<FreightItem>();\r\n\r\n\t}", "public PlaceOrderForm() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get Unit price for video type
public Integer getPrice(VideoTypeEnum videoTypeId);
[ "double getPricePerUnit();", "public float getProductUnitPrice() {\n switch (pType)\n {\n case \"A\":\n \tprice = 50;\n break;\n case \"B\":\n price = 30;\n break;\n case \"C\":\n price = 20;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ get count product of shop get count by field productId, productName, type
public Long getCountProductOfShop(int shopId, String productId, String productName, String type){ try{ Session session = getSessionFactory().openSession(); Transaction tx = session.beginTransaction(); String sql = "select count(p) from " + ProductTable.class.getName() + " p, " + ShopPartyRelationship.cl...
[ "public int countByProductType(String productType);", "int queryShopAuthCountByShopId(@Param(\"shopId\") long shopId);", "int getProductCount();", "public int countByProductId(long productId);", "public int countByProductName(String productName);", "int getTotalProductCount();", "public int countByNumbe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a process to the pipeline
public void addPipelineProcess(PipelineProcess process) { process.setMainOutputDir(outputDir); processList.add(process); }
[ "void addProcess(IveProcess process);", "void addActorProcess(IveProcess process);", "public void addPipeline(Pipeline pipeline) {\n node2PipelineMap.addPipeline(pipeline);\n }", "public synchronized void addProcess(Proc p) {\n jobQueue.add(p);\n Collections.sort(jobQueue, new SjfCompare());...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleOrderingDef" $ANTLR start "ruleOrderingDef" InternalDsl.g:2163:1: ruleOrderingDef : ( ( rule__OrderingDef__Group__0 ) ) ;
public final void ruleOrderingDef() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:2167:2: ( ( ( rule__OrderingDef__Group__0 ) ) ) // InternalDsl.g:2168:2: ( ( rule__OrderingDef__Group__0 ) ) { // Interna...
[ "public final void rule__OrderingDef__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:18756:1: ( ( () ) )\n // InternalDsl.g:18757:1: ( () )\n {\n // InternalDsl.g:18757:1: ( () )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the shopping cart.
public void setCart(Cart cart){ this.cart = cart; }
[ "public void setShoppingCart(ShoppingCart shoppingCart)\n\t{\n\t\tthis.shoppingCart = shoppingCart;\n\t}", "public void setShoppingCart(ShoppingCart shoppingCart) {\n\t\tthis.shoppingCart = shoppingCart;\n\t}", "public final void setCart(final List<Item> cartNew) {\n this.cart = cartNew;\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a string, returns the length of the largest run. A a run is a series of adajcent chars that are the same.
public static int maxRun(String str) { int maxRun = 0; char currentChar; char previousChar = 0; int count = 1; for(int i=0; i<str.length(); i++) { currentChar = str.charAt(i); if(i>0) previousChar = str.charAt(i-1); if(currentChar == previousChar) { count++; }else { if(count > maxRun) m...
[ "public static int maxRun(String str) {\n\t\tif(str.length() == 0) return 0;\n\t\tint max = 1, curLen = 1;\n\t\tchar lastChar = str.charAt(0);\n\t\tfor(int i = 1; i < str.length(); i++){\n\t\t\tif(str.charAt(i) == lastChar) {\n\t\t\t\tcurLen++;\n\t\t\t} else {\n\t\t\t\tlastChar = str.charAt(i);\n\t\t\t\tcurLen = 1;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw the views in the given bitmap.
private static void drawViews(final List<ViewConfig> configs, final Bitmap bitmap) { for (ViewConfig config : configs) { drawView(config, bitmap); } }
[ "private void drawBitmap(Canvas canvas) {\n\t\tmMatrix.postTranslate(200, 200);\r\n\t\t\r\n\t\tcanvas.drawBitmap(mBitmap, mMatrix, mPaint);\r\n\t}", "private void draw()\n {\n setImageBitmap(blankBitmap);\n\n // Wipe the screen with a white color\n canvas.drawColor(Color.argb(255, 255, 255...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sequence of indices for horizontal seam
public int[] findHorizontalSeam() { if (!transposed) { transpose(); } return operateFindSeam(); }
[ "public int[] findHorizontalSeam() {\n return null;\n }", "public int[] findHorizontalSeam() {\n if (!transposed) {\n transpose();\n }\n return findSeam();\n }", "public int[] findHorizontalSeam() {\n isHorizontalCall = true;\n checkTransposed();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to store the adjective attribute
private int storeAdjectiveAttribute(Tree inChild, int adjectiveNoun, int nnCount, String adj) { List<Tree> leaves; String attribute = ""; if ((inChild.value().equals("NN")) || inChild.value().equals("NNS")) { leaves = inChild.getLeaves(); adjectiveNoun++; nnCo...
[ "public void addAdjective(String adjective, String propertyID)\r\n {\r\n \t\r\n //add this adjective to the word/wordclass lookup table\r\n vocabulary.addWordToDictionary(adjective, Word.WT_ADJECTIVE);\r\n\r\n //add this adjective to the adjective list as long as it doesn't already exist\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Select (if they exist) the train instances so that the dataset will appear to be composed only of them for a weka class (classifiers, filters...)
public void selectTrainInstances(){ if (existsTrainSet()) m_Instances = m_TrainInstances; }
[ "public Instance selectTrainingInstance(int index) {\n\t\tInstance trainingInstance = new Instance(RF_trainingInstances.instance(index)); \n\n\t\t// Specify that the instance belong to the training set \n\t\t// in order to inherit from the set description \n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the total capacity of Alluxio's BlockStore.
public long getCapacityBytes() throws IOException { try (CloseableResource<BlockMasterClient> blockMasterClientResource = mContext.acquireBlockMasterClientResource()) { return blockMasterClientResource.get().getCapacityBytes(); } }
[ "public static int getTotalCapacity()\r\n {\r\n //returns total capacity.\r\n return totalCapacity;\r\n }", "public long getCapacityInMB() {\n return capacityInMB;\n }", "int totalCapacity();", "int calculateTotalCapacity();", "public long getTotalStorageVolume()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devuelve el numero de recargas realizadas dentro de un periodo de tiempo
public int dameNumeroDeRecargas(String periodo) throws SQLException { numeroRecargas=daoRecarga1.recuperaTamaño(periodo); return numeroRecargas; }
[ "public int getHowManyInPeriod();", "public long getTotMntPeriodo()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check device is belonging to a Device Group.
boolean isDeviceMappedToGroup(String groupName, String owner, int deviceId, int tenantId) throws GroupManagementDAOException;
[ "boolean groupSupports(Object groupID, int groupConstant) throws Exception;", "public boolean check(Group group){\n return false;\n }", "boolean isMember(PyxisUserGroup group);", "boolean existGroup(String groupName);", "private boolean sendGroupUpdate() {\n List<Integer> existingGroupMembe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set all associated companion app that belongs to a userId.
public abstract void setCompanionAppUids(int userId, Set<Integer> companionAppUids);
[ "@Override\n\tpublic void setUserId(long userId) {\n\t\t_scienceAppManager.setUserId(userId);\n\t}", "public void setUserId(long userId) {\n _app.setUserId(userId);\n }", "@Override\n public void setUserId(long userId) {\n _appVersion.setUserId(userId);\n }", "@Override\n public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses an Atom feed located at the URL given in the PARAM_URL_TO_PARSE parameter
public void parseUrl(ActionRequest request, ActionResponse response) throws Exception{ String urlToParse = request.getParameter(PARAM_URL_TO_PARSE); if ((urlToParse != null) && !urlToParse.equals("")) { mFeedParser.runFeedParser(urlToParse); } }
[ "public AtomFeed(String feedURL) throws ParserConfigurationException, IOException\r\n\t{\r\n\t\tthis.feedURL = feedURL;\r\n\t\txml = null;\r\n\t\tdocumentbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\tif (!refresh()) throw new IOException();\r\n\t}", "public static void processFeed(Fe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CM569484 Process when Selection button of List cell is pressed. Pass selected information to the parents screen, and close the list box. [Return Data] Consignor Code Consignor Name Storage plan date Item Code Item Name CaseStorage Location PieceStorage Location
public void lst_ListStoragePlanModify_Click(ActionEvent e) throws Exception { if (lst_ListStoragePlanModify.getActiveCol() == 1) { //#CM569485 // A present line is set. lst_ListStoragePlanModify.setCurrentRow(lst_ListStoragePlanModify.getActiveRow()); lst_ListStoragePlanModify.getValue(1); //#CM56...
[ "public void chooseSelectedButtonPressed()\r\n {\r\n try {\r\n List<String> clientInfoStrings = ((List<String>) clientsLV.getSelectionModel().getSelectedItem());\r\n String clientFirstName = clientInfoStrings.get(0);\r\n clientLastName = clientInfoStrings.get(1);\r\n clien...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called when a line specifying that we've stopped examining a game is received.
protected boolean processStoppedExamining(int gameNumber){return false;}
[ "private boolean handleStoppedObserving(String line){\n if (!line.startsWith(\"Removing game \"))\n return false;\n \n Matcher matcher = STOPPED_OBSERVING_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n int gameNumber = Integer.parseInt(matcher.group(1));\n\n if (!pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the SMB error code
public final int getErrorCode() { return (int) m_smbbuf[ERROR + m_offset] & 0xFF; }
[ "int getErrcode();", "public final int getErrorClass() {\n return (int) m_smbbuf[ERRORCLASS + m_offset] & 0xFF;\n }", "com.google.rpc.Status getError();", "public final int getLongErrorCode() {\n return DataPacker.getIntelInt(m_smbbuf, ERRORCODE + m_offset);\n }", "public int getErrorCod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the specific BlockServiceApiImpl based on the storage system type.
private BlockServiceApi getBlockServiceImpl(final StorageSystem system) { BlockServiceApi blockServiceApiImpl = null; String systemType = system.getSystemType(); if (systemType.equals(DiscoveredDataObject.Type.rp.name()) || systemType.equals(DiscoveredDataObject.Type.vplex.name()...
[ "public interface BlockVolumeService extends RestService {\n\n /**\n * The volume type defines the characteristics of a volume\n *\n * @return List of VolumeType entities\n */\n List<? extends VolumeType> listVolumeTypes();\n\n /**\n * Deletes the specified VolumeType\n *\n * @p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that checks for the presence of a specific atom in a given bond.
public boolean containsAtom(Atom currentAtom) { if (firstAtom != null && firstAtom.getCenterX() == currentAtom.getCenterX() && firstAtom.getCenterY() == currentAtom.getCenterY()) { return true; } if (secondAtom != null && secondAtom.getCenterX() == currentAtom.getCent...
[ "@Override\n public boolean isConnectedTo(IBond bond) {\n for (IAtom atom : atoms) {\n if (bond.contains(atom)) return true;\n }\n return false;\n }", "public boolean isConnectedTo(IBond bond) {\n for (IAtom atom : atoms) {\n if (bond.contains(atom)) return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets array of all "businessName" element
public void setBusinessNameArray(au.gov.asic.types.bn.OutboundBusinessNameType[] businessNameArray) { synchronized (monitor()) { check_orphaned(); arraySetterHelper(businessNameArray, BUSINESSNAME$2); } }
[ "public void setBusinessName(java.lang.String businessName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BUSINESSNAME$16, 0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the SQL query string to get the data from the database.
protected String buildDataQuery() { StringBuilder sql = new StringBuilder("select"); String delim = " "; for (String vname : getColumnNames()) { sql.append(delim).append(vname); delim = ", "; } Element ncElement = getNetcdfElement(); ...
[ "String getQuerySql();", "protected String createQueryString() {\n StringBuilder variables = new StringBuilder();\n StringBuilder paths = new StringBuilder();\n StringBuilder namespaces = new StringBuilder();\n Set<String> addedNamespaces = new HashSet<String>();\n \n for (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ritorna il modulo Piatto.
private PiattoModulo getModuloPiatto() { return (PiattoModulo)Progetto.getModulo(Ristorante.MODULO_PIATTO); }
[ "private static void helloHelloModulo() {\n int a = 1;\n int b = 10;\n int c = 1 / 10;\n\n int d = 1 % 10;\n\n\n System.out.println(\" Result deleniya \" + c);\n System.out.println(\" Result deleniya \" + d);\n\n\n int делимое = 75;\n int делитель = 13;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the ith "identifier" element
public void removeIdentifier(int i) { synchronized (monitor()) { check_orphaned(); get_store().remove_element(IDENTIFIER$0, i); } }
[ "void removeIdentifier(int i);", "public void unsetIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(IDENTIFIER$0, 0);\n }\n }", "void unsetIdentifier();", "void removeLocationID(int i);", "void removeId(String i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A basic hashCode method for the Door object, using the id, room, isLocked, and keyID fields compared in the equals method.
public int hashCode() { int result = 17; result = 37 * result + id; result = 37 * result + room.hashCode(); result = 37 * result + ( isLocked ? 1 : 0 ); result = 37 * result + keyID; return result; }
[ "@Override\n public int hashCode() {\n return (int) (id ^ (id >>> 32));\n }", "@Override\n public int hashCode() {\n int result = id;\n result = 31 * result + person.hashCode();\n result = 31 * result + quote.hashCode();\n return result;\n }", "@Override\r\n\tpubli...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Purpose: Writes 's' to the log Throws: IOException
private void logGeneral(String s) throws IOException { this.log.write(s + "\n"); }
[ "private static void write(String s) { \r\n\t\tString logfile = logger.getLogFileNameOfThisThread() ;\r\n\t\tif (logfile == null) {\r\n\t\t\tassert s == null || s == \"\" ;\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tFileUtils.fwrite(logfile, false, s) ;\r\n\t\tdebugLogCopy(s) ;\r\n }", "private String logString(String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns a list of all of the coupons in the system. available to a customer user.
@GET @Path("/read/all/customer") public List<Coupon> getAllCouponsInSystem(@Context HttpServletRequest req) throws CouponSystemException{ try { CustomerFacade facade = (CustomerFacade) (req.getSession().getAttribute("facade")); return facade.getAllCouponsInSystem(); } catch (ClassCastException e) { throw...
[ "@GET\n\t@Path(\"/purchased/read/all/customer\")\n\tpublic List<Coupon> getAllPurchasedCoupons(@Context HttpServletRequest req) throws CouponSystemException{\n\t\ttry {\n\t\t\tCustomerFacade facade = (CustomerFacade) (req.getSession().getAttribute(\"facade\"));\n\t\t\treturn facade.getAllPurchasedCoupons();\n\t\t} ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates and returns a requests queue
public RequestQueue getRequestQueue(){ try { if(mRequestQueue==null){ mRequestQueue = Volley.newRequestQueue(mCtx.getApplicationContext()); } }catch (Exception e){ e.printStackTrace(); } return mRequestQueue; }
[ "BlockingQueue<RequestUtil.Request> getQueue();", "protected Queue getRequestQueue() {\r\n \t\treturn this.requestQueue;\r\n \t}", "private RequestQueue getRequestQueue() {\n if (mRequestQueue == null) {\n mRequestQueue = Volley.newRequestQueue(getApplicationContext());\n }\n\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse an instance of RHEntry from the given Reader
public static RHEntry parse(java.io.Reader inpt) throws scg.history.ParseException{ return new scg.history.TheParser(inpt).parse_RHEntry(); }
[ "public static RHEntry parse(java.io.InputStream inpt) throws scg.history.ParseException{\n return new scg.history.TheParser(inpt).parse_RHEntry();\n }", "private Entry readEntry(XmlPullParser parser) throws XmlPullParserException, IOException {\n\t parser.require(XmlPullParser.START_TAG, ns, \"e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getters/Setters // Get the width of the imageWriter
public double getWidth() { return _imageWidth; }
[ "public int getWidth() { return width; }", "int getWidth() { return width; }", "public int getImageWidth()\n {\n return image_width_;\n }", "public int width() {\n return picture.width();\n }", "public int width() \n {\n return this.picture.width();\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last foo in the ordered set where groupId = &63;.
public com.sohlman.liferay.foobar.model.Foo findByGroup_Last(long groupId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException, com.sohlman.liferay.foobar.NoSuchFooException;
[ "public com.sohlman.liferay.foobar.model.Foo fetchByGroup_Last(\n long groupId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException;", "public Object getLastGroupValue(){\n\t\treturn groupValues.get(groupValues.siz...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the isCanLoanAgain property.
public void setIsCanLoanAgain(boolean value) { this.isCanLoanAgain = value; }
[ "public boolean isIsCanLoanAgain() {\n return isCanLoanAgain;\n }", "public void setIsCanAddLoan(boolean value) {\n this.isCanAddLoan = value;\n }", "public void setTryAgain(boolean t) {\n\t\ttryAgain = t;\n\t}", "public void setLoan(int loan) {\n\t\tthis.loan = loan;\n\t}", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SpecialFacetKey__Group_1__0" $ANTLR start "rule__SpecialFacetKey__Group_1__0__Impl" InternalGaml.g:10109:1: rule__SpecialFacetKey__Group_1__0__Impl : ( 'when' ) ;
public final void rule__SpecialFacetKey__Group_1__0__Impl() throws RecognitionException { int rule__SpecialFacetKey__Group_1__0__Impl_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 577) ) { retu...
[ "public final void rule__S_Reflex__Group_3__0__Impl() throws RecognitionException {\n int rule__S_Reflex__Group_3__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 405) ) { retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make sure brokers are registered for the round Also check if participating brokers have an agent available (we don't check for agents checking in, brokers are responsible for availability).
private boolean checkBrokers () { if (game.getAgentMap().size() < 1) { log.info(String.format("Game: %s (round %s) reports no brokers " + "registered", game.getGameId(), game.getRound().getRoundId())); return false; } for (Agent agent: game.getAgentMap().values()) { ...
[ "public void checkAuctions() {\n\n checkDutchAuctions();\n checkSecondPriceAuctions();\n }", "private void waitForServiceBroker() throws InterruptedException {\n boolean connectionEstablished = false;\n try {\n logger.trace(\"Attempt to reach Service Broker via catalog en...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Menu constructor sets up console and thread executor
public Menu() { es = Executors.newSingleThreadExecutor(); console = new Scanner(System.in); langs = Language.values(); }
[ "public void start() {\n\t\tThread thread = new Thread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\n\t\t\t\t\tprintMenu();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString commandLine = in.readLine();\n\t\t\t\t\t\tString arr[] = commandLine.split(\" \");\n\t\t\t\t\t\tString command ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update meal list when the meal name is not in database
private boolean updateMealList(String mealName) throws SQLException { // if meal not added into database if (!mealObservableList.contains(mealName) && !mealName.equalsIgnoreCase("NA") && !mealName.equals("")) { facadeDAO.createMeal(new Meal(mealName)); ...
[ "public int updateMeal(MealItem meal) // UPDATE MEAL AS SEEN IN THE MENU\n {\n Connection conn = getConnection();\n String updateString = \"UPDATE Meal SET \"\n + \"mealName = ?,\"\n + \"mealShelfLife = ?\"\n + \"WHERE mealItemNo = ?\";\n try\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Grabs ingredients from the Dish object passed as a parameter and returns them as an array of array of strings. This is then used for creating a table in the ingredient view.
public Object[][] ingredientsForTable (Dish dish) { Set<Ingredient> ingredients = dish.getIngredients(); Object[][] data = new Object[ingredients.size()][3]; int i = 0; for(Ingredient ing : ingredients) { data[i] = new Object[] {ing.getName(), String.valueOf(ing.getQuantity...
[ "public org.hl7.fhir.SubstanceIngredient[] getIngredientArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(INGREDIENT$6, targetList);\n org.hl7.fhir....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test modify PK value
public void testModifyPK() throws Exception { DAS das = DAS.FACTORY.createDAS(getConfig("customerMapping.xml"), getConnection()); // Read a customer Command select = das.createCommand("SELECT * FROM CUSTOMER WHERE CUSTOMER.ID = 1"); DataObject root = select.executeQuery(); Data...
[ "@Test\n public void testSetPK() {\n System.out.println(\"setPK\");\n int pk = 5;\n Regime instance = r1;\n instance.setPK(pk);\n int result=instance.getPK();\n int expResult=5;\n assertEquals(expResult, result);\n }", "public void testGetPrimaryKey() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares two EnumDomain objects with each other.
final private void compareDomain( de.uni_koblenz.jgralab.schema.EnumDomain domain, EnumDomain gDomain) { List<String> enumConstants = domain.getConsts(); List<String> gEnumConstants = gDomain.get_enumConstants(); assertTrue("The size of enum constants are not equal.", enumConstants.size() == gEnumConstan...
[ "final private void compareDomain(\n\t\t\tde.uni_koblenz.jgralab.schema.Domain domain, Domain gDomain) {\n\n\t\tcompareNamedElement(domain, gDomain);\n\n\t\t// Differentiated comparison of different Domain types\n\t\tif ((domain instanceof de.uni_koblenz.jgralab.schema.MapDomain)\n\t\t\t\t&& (gDomain instanceof Map...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a service point that is identified by its id.
public ServicePointDefinition getServicePoint(String id);
[ "public ServicePoint getServicePoint(String serviceId);", "Optional<Point> getCoordinate(int id);", "@Override\n @Transactional(readOnly = true)\n public Optional<Point> findOne(Long id) {\n log.debug(\"Request to get Point : {}\", id);\n return pointRepository.findById(id);\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the given messagetype is registered at this messagedistributor.
public boolean isRegistered(Class<?> messageType) { if (messageType == null) return false; MLink tmp = linkOf(messageType); if (tmp == null) return false; // type not registered here else return true; }
[ "private boolean isType(Channel type, MessageReceivedEvent event) {\n final ChannelType channel = event.getChannelType();\n\n switch (type) {\n case DEFAULT -> { // Used for all channels except group\n return channel != ChannelType.GROUP;\n }\n case GUIL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleModel" $ANTLR start "entryRuleNestedModel" PsiInternalExUnorderedGroupsTestLanguage.g:1531:1: entryRuleNestedModel returns [Boolean current=false] : iv_ruleNestedModel= ruleNestedModel EOF ;
public final Boolean entryRuleNestedModel() throws RecognitionException { Boolean current = false; Boolean iv_ruleNestedModel = null; try { // PsiInternalExUnorderedGroupsTestLanguage.g:1531:53: (iv_ruleNestedModel= ruleNestedModel EOF ) // PsiInternalExUnorderedGroups...
[ "public final Boolean entryRuleModel() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleModel = null;\n\n\n try {\n // PsiInternalBug296889ExTestLanguage.g:58:47: (iv_ruleModel= ruleModel EOF )\n // PsiInternalBug296889ExTestLanguage.g:59:2: iv_r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column PROFILE_USER.profile_name
public String getProfile_name() { return profile_name; }
[ "java.lang.String getProfileName();", "public String getProfileName() { return this.profileName; }", "public java.lang.String getProfileName() {\n return profileName;\n }", "public String getProfileName()\r\n\t{\r\n\t\tGameProfile selectedProfile = this.authentication.getSelectedProfile();\r\n\t\tre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
process other node load proseccor class & process current node
protected void proessOtherNodeOfMeta(Node node, CobolRecordMetaData meta) { try { if (node.getNodeType() != Node.TEXT_NODE) { String name = node.getNodeName(); if (classesOfMeta.containsKey(name)) { String classname = classesOfMeta.getProperty(name); Class<? extends MetaDataNodeProcessor> clazz =...
[ "private void startParameterLoader()\n {\n NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(hostName);\n\n nodeConfiguration.setMasterUri(masterUri);\n nodeConfiguration.setNodeName(\"parameter_loader_node\");\n \n ParameterLoaderNode paramNode = new ParameterL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds index according to specified index name.
public PgIndex getIndex(final String name) { PgIndex index = null; for (PgIndex curIndex : indexes) { if (curIndex.getName().equals(name)) { index = curIndex; break; } } return index; }
[ "public Index getIndex(String name) {\n Index index = indexes.get(name);\n if (index == null) {\n throw DbException.get(ErrorCode.INDEX_NOT_FOUND_1, name);\n }\n return index;\n }", "public Index findIndex(Session session, String name) {\n Index index = indexes.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads the keystore to obtain credentials
private void readKeyStore(Configuration conf) throws IOException, OfficeWriterException { if ((this.howc.getCryptKeystoreFile()!=null) && (!"".equals(this.howc.getCryptKeystoreFile()))) { LOG.info("Using keystore to obtain credentials instead of passwords"); HadoopKeyStoreManager hksm = new HadoopKeyStoreManager(c...
[ "public KeyStore getKeyStore(InputStream keystoreIS, String password) throws CertException;", "public KeyStoreFile readJVMKeyStore();", "KeyStore loadKeystore(char[] keystorePassword) {\n try {\n // Load the keystore in the user's home directory\n bufferedInputStream.reset();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct with specified PDU composer.
public DefaultPDUSender(PDUComposer pduComposer) { this.pduComposer = pduComposer; }
[ "private DAPMessage constructFrom(DatabaseTableRecord record) {\n return DAPMessage.fromXML(record.getStringValue(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_DATA_COLUMN_NAME));\n }", "void create(Transmission transmission);", "private MsgInstantiateContract(com.google.protobuf.GeneratedM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enable or disable frame interpolation. Interpolation automatically blends between consecutive frames in hardware, and it does so with 16bit per channel resolution. Combined with dithering, this helps make fades very smooth. Interpolation is on by default.
public void setInterpolation(boolean enabled) { if (enabled) firmwareConfig &= ~0x02; else firmwareConfig |= 0x02; sendFirmwareConfigPacket(); }
[ "void setInterpolate(boolean value);", "public void setInterpolateColors(boolean b) {\n interpolateColors_ = b;\n }", "public void setInterpolation(int interp) {\r\n interpolation = interp;\r\n }", "@Override\n public void setInterpolation(int interpolation) {\n getSWTGraphics()....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column web_product_cat.cat_name
public void setCatName(String catName) { this.catName = catName; }
[ "public void setNameCat(String pNameCat){\n this.nameCat = pNameCat;\n }", "public void setCatName(String value) {\n setAttributeInternal(CATNAME, value);\n }", "public void setName(String ac) {\n categoryName = ac;\n }", "public void setCategory(String cat) {\t//TODO\n\t\tcatego...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ showTaskListByDate() this method is used to show the list of tasks sorted by date this method uses the sort() method of Collections class to sort the tasks by date
public String showTaskListByDate() { List<Task> fileContentDate = fileHandler.readFromFile(); String retStr = ""; if (fileContentDate.size() != 0) { retStr = Constants.SUCCESS; Collections.sort(fileContentDate, Task.DateComparator); System.out.println("Tasks list sorted by Date"); printTask(fileConten...
[ "public ArrayList<Task> displayByDate()\n {\n ArrayList<Task> displayDate = (ArrayList<Task>) taskList.stream().sorted(Comparator.comparing(task->task.getDueDate())).collect(Collectors.toList());\n\n\n return displayDate;\n //displayList(sorted);\n }", "void listTasksByDueDate();", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds card to playing pile
public void addCard(Card card){ this.pile.add(0, card); }
[ "public void addCardToPile(Card card) {\n myHand.addCardToBottom(card);\n }", "public void playTurn() {\n\n CardPlayer player = getGameState().getCurrentPlayer();\n\n if (player.hasNoCards()) {\n return;\n }\n\n Card topCard = pile.topCard();\n getGameState().setT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: ATLAS getMostCommentedWebsites DONE TESTED
public List getMostCommentedWebsites(Date startDate, Date endDate, int offset, int length) throws RollerException { String msg = "Getting most commented websites"; if (endDate == null) endDate = new Date(); try { Session session = ((HibernatePersistenc...
[ "public void getPostWithMostComments(){\n Map<Integer, Integer> postCommentCount = new HashMap<>();\n Map<Integer, Post> posts = DataStore.getInstance().getPosts();\n \n for(Post p: posts.values()){\n for(Comment c : p.getComments()){\n int commentCount = 0;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
shows the tool used by active player
public void showTool(PlayerClient[] players, DraftPoolMP draft, RoundTrackMP track, int[] tools, int activePlayer, int me, ToolCardEvent event) throws InvalidIntArgumentException, FileNotFoundException { printOut(cliToolsManager.sceneInitializer(width)); printOut(printerMaker.getGameScene(players, draft...
[ "public void viewTools()\r\n {\r\n // Create the tools variable ArrayList and store the current\r\n // type and amount of tools in the list.\r\n ArrayList<ListItem> tools = theGame.getTools();\r\n \r\n System.out.println(\"\\nHere are the tools available in the storehouse:\");\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo invalidar un certificado
public abstract void invalidarCertificado(int codigo) throws PersistenceException;
[ "protected void validateCerts(Certificato[] param){\r\n \r\n }", "public abstract void putCertificado(int codigo, String nombre, String valido) throws PersistenceException;", "protected void validateCerts(Cert[] param){\r\n \r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Restore address book from storage.
void restoreAddressBook(ReadOnlyAddressBook restoredAddressBook);
[ "void restoreExpenseBook(ReadOnlyExpenseBook restoredExpenseBook);", "void restoreTaskBook(ReadOnlyTaskBook restoredTaskBook);", "void restoreEventBook(ReadOnlyEventBook restoredEventBook);", "public abstract void restore();", "void restore(Snapshot state);", "public void restore() {\n\t\t\t// Restore ele...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads message from one of communication objects.
private Message readMessage() throws IOException { return transportManager.getMessageFromQueue(); }
[ "private Message readMessage() throws IOException, ClassNotFoundException {\n Message message = (Message) objectInputStream.readObject();\n Message.Command temp = message.getCommand();\n if (temp != Message.Command.GET_RESERVED && temp !=\n Message.Command.GET_AVAILABLE) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test 2 del constructor, se espera un NullPointerException El autor es NULL
@Test (expected = NullPointerException.class) public void constructor2(){ System.out.println("Valoracion: test constructor2"); new Valoracion(null, 5); }
[ "@Test\r\n\tpublic void testConstructor() {\r\n\t\tUser u = null;\r\n\t\tu = new User(1, \"Joe\", \"Bloggs\", \"Student\", 18, 'M');\r\n\t\tassertTrue(u != null);\r\n\t}", "public TiendaBonsaisTest()\n {\n }", "@Test\n\tvoid testeNomeNull()\n\t{\n\t\ttry\n\t\t{\n\t\t\tcontatoBasico = new Contato(null, \"G...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Migration Comments Generated from trigger: SOVLCUR_STVSTYP_DESC.WHENNEWITEMINSTANCE
@ActionTrigger(action="WHEN-NEW-ITEM-INSTANCE", item="SOVLCUR_STVSTYP_DESC", function=KeyFunction.ITEM_CHANGE) public void sovlcurStvstypDesc_itemChange() { getSoqolibSovlcurController().sovlcurStvstypDesc_itemChange(); }
[ "@ActionTrigger(action=\"WHEN-NEW-ITEM-INSTANCE\", item=\"SOVLCUR_STVRATE_DESC\", function=KeyFunction.ITEM_CHANGE)\n\t\tpublic void sovlcurStvrateDesc_itemChange()\n\t\t{\n\t\t\t\n\t\t\t\tgetSoqolibSovlcurController().sovlcurStvrateDesc_itemChange();\n\t\t\t}", "public BigDecimal getINVESTMENTONBS_CV()\r\n {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the serviceKind value for this MonthFeeQueryVO.
public void setServiceKind(int serviceKind) { this.serviceKind = serviceKind; }
[ "public void setFeeKind(String feeKind) {\r\n this.feeKind = feeKind == null ? null : feeKind.trim();\r\n }", "public void setServiceFee(BigDecimal serviceFee) {\n this.serviceFee = serviceFee;\n }", "void setService(java.lang.String service);", "void setServiceName(String serviceName);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the specified word from this trie and map if it exists.
public void remove(String word) { if (word != null) { this.trie.remove(word); this.wordMap.remove(word.toLowerCase().strip()); } }
[ "public void remove(String word) {\r\n\t\t// verify that the trie contains the word as a value first\r\n\t\tif (!contains(word)) {\r\n\t\t\t// the trie doesn't contain the given word throw an exception\r\n\t\t\tthrow new IllegalArgumentException(\"the string word: \" + word + \" is not a value\");\r\n\t\t}\r\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate the cost of a route
public double RouteCost(LinkedList<Node> route) { int i = 0; double cost = 0; while (true) { Node first = route.get(i); Node second = null; if (i < route.size() - 1) { second = route.get(i + 1); cost += CalDistance(first, second...
[ "public Double getEstimatedCost(Route route, Point goal) {\r\n double gValue = route.getRoute().size();\r\n double hValue = getHammingDistance(route.getLastNode(), goal);\r\n return (gValue + hValue - 1);\r\n }", "public double totalCost() {\n double result = 0;\n for (T route : routes)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a wall to the current row.
public void addWall() { this.addStaticElement(new Wall(new Point(colPointer, rowPointer))); }
[ "public void addWall(){\n Wall[] wall = new Wall[25];\n\n for(int j=0; j<wall.length; j++){\n wall[j]=new Wall();\n addObject(wall[j],j*wall[j].getImage().getWidth(), wall[j].getImage().getHeight()/2);\n }\n }", "public void addWall(Wall wall) {\n\t\twallList.add(wall...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the IP address currently entered in the text box.
public String getIPAddress () { return _ipTextField.getText(); }
[ "private ZapTextField getTxtProxyIp() {\n \t\tif (txtProxyIp == null) {\n \t\t\ttxtProxyIp = new ZapTextField(\"\");\n \t\t}\n \t\treturn txtProxyIp;\n \t}", "private JTextField getIpField() {\r\n\t\tif (ipField == null) {\r\n\t\t\tipField = new JTextField();\r\n\t\t\tipField.setBounds(new Rectangle(77, 91, 162, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the taskTypeID value for this NextCall.
public java.lang.String getTaskTypeID() { return taskTypeID; }
[ "public java.lang.String getTaskTypeId() {\n\t\treturn taskTypeId;\n\t}", "public Integer getTaskId() {\n\t\treturn taskInfo.getTaskId();\n\t}", "public long getTaskId() {\n\t\treturn _timesheetTask.getTaskId();\n\t}", "String getTaskIdentifier();", "public String getTaskType() {\n return taskType;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replaces a field of this class with another.
protected final void replaceField(org.apache.bcel.classfile.Field old, org.apache.bcel.classfile.Field _new) { classGen.replaceField(old, _new); }
[ "public Field set(String fieldPath, Field newField);", "private static void assignField(UuidIdentifiable original, UuidIdentifiable target, Field field) {\n if (null == original || null == target || null == field) {\n return;\n }\n\n if (java.lang.reflect.Modifier.isStatic(field.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accesses a resource by name and returns the (non comment) lines containing data. A comment line is any line that starts with the character ""
public List<String> getLines(String resource) throws IOException { return getLines(resource, UTF_8); }
[ "@Override\n public String readLine() throws IOException {\n\n String line = null;\n\n while (true) {\n\n line = super.readLine();\n\n if (line == null) {\n\n return null;\n }\n\n // Get rid of comments\n\n // VT: FIXME: not hand...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries inserting a Student into the hash map. Throw RuntimeException if the student is already in the table or the table is full.
public void add(Student s){ //TODO: My Code here. if(s==null) throw new RuntimeException("You want to add null to the hash table!"); int position=this.hashFunction(s); boolean isfull=true; for(int i=0;i<this.array.length;i++){ if(this.array[i]==null){ isfull=false; break; } } if(isfull) ...
[ "public void insert(Student student) {\t\t\r\n\t\tdao.insertStudent(student); \r\n\t}", "public static void insertStudent(Statement stmt, Student std) throws SQLException {\n String sql = \"insert into student (id, name, gpa)\" +\n \" values (\" + std.getId() + \",\" + \"'\" + std.getNa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns endpoint entry set
private Set<Map.Entry<String, Integer>> getEndpointFrequencyEntrySet() { return endpointVisitFrequency.entrySet(); }
[ "@GET\n @Path(\"endpoints\")\n EndpointsList getEndpoints();", "Set<ListenerEndpoint> getEndpoints();", "public java.util.Map<String, String> getEndpoints() {\n return endpoints;\n }", "EndpointsClient getEndpoints();", "public com.microsoft.schemas.xrm._2014.contracts.EndpointCollection get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }