query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Gets the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Separate multiple triggers with a space. e.g., partialTri...
final public String[] getPartialTriggers() { return (String[])getProperty(PARTIAL_TRIGGERS_KEY); }
[ "final public void setPartialTriggers(String[] partialTriggers)\n {\n setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));\n }", "protected ArrayList fireTemplateGetComponents() {\r\n // Guaranteed to return a non-null array\r\n Object[] listeners = componentListenerList.getListenerList();\r\n Arra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "startStat" $ANTLR start "mainfunction" myParser.g:17:1: mainfunction : type 'main(' ( params ) RPAREN ( WS ) LBRACE ( WS ) ( stats ) ( WS ) RETURN_ ( DEC_NUM | FLOAT_NUM )? SEMICOL RBRACE ( WS ) ;
public final void mainfunction() throws RecognitionException { int mainfunction_StartIndex = input.index(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 2) ) { return; } // myParser.g:17:13: ( type 'main(' ( params )* RPAREN ( WS )* LBRACE ( WS )* ( stats )* ( WS )* RETURN_ ( DEC_NUM | FLOAT_...
[ "public final void function() throws RecognitionException {\n\t\tint function_StartIndex = input.index();\n\n\t\ttry {\n\t\t\tif ( state.backtracking>0 && alreadyParsedRule(input, 9) ) { return; }\n\n\t\t\t// myParser.g:86:9: ( type FUNCTION_CALL ( params )* RPAREN LBRACE ( stats )* ( WS )* 'return' ( DEC_NUM | FLO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets whether the DataSource should be marked as primary
default boolean isPrimary() { return getConfigPropertyValue(PRIMARY, Boolean.FALSE); }
[ "public Boolean isPrimary() {\n return primary;\n }", "public boolean isIsPrimary() {\n return isPrimary;\n }", "public boolean isIsPrimary() {\r\n return isPrimary;\r\n }", "public boolean is_Primary_Key() {\n\t\treturn this.isPr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function will give you the Caption of AddItem button
public String getCaptionOfAddItemButton() throws Exception { try { logInstruction("LOG INSTRUCTION: INSIDE GET CAPTION OF ADD ITEM BUTTON METHOD"); frameSwitch.switchToFrameContent(); uiDriver.waitToBeDisplayed(btnAddItemCaption, waitTime); data = btnAddItemCaptio...
[ "private Button createAddItemButton() {\r\n\t\tfinal Button b = new Button(this);\r\n\t\tb.setText(\"Add item\");\r\n\t\tb.setAllCaps(false);\r\n\r\n\t\tb.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(final View v) {\r\n\t\t\t\titems.add(0, new ReadOnlyLibraryItem(g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the field errorMessage.
public java.lang.String getErrorMessage() { return errorMessage; }
[ "public String getErrorMessage() {\n return errorMessage;\n }", "public String getErrorMessage () {\n if (watch != null) return watch.getErrorMessage ();\n return errorMessage;\n }", "@Override\n\tpublic java.lang.String getErrorValidationMessage() {\n\t\treturn _formItem.getErrorVali...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XFeatureCall__Group__4" $ANTLR start "rule__XFeatureCall__Group__4__Impl" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8927:1: rule__XFeatureCall__Group__4__Impl : ( ( rule__XFeatureCall__Group_4__0 )? ) ;
public final void rule__XFeatureCall__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8931:1: ( ( ( rule__XFeatureCall__G...
[ "public final void rule__XFeatureCall__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8920:1: ( rule__XFeatureCall_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Commits a transaction, and notifies listeners that the transaction is complete.
public void commitTransaction() { }
[ "@Override\n public void commit() {\n getTransaction().commit();\n }", "public void commit() {\n\t\tgetEntityManager().getTransaction().commit();\n\t}", "void commit(Transaction transaction);", "public void commit() { transmit( Command.COMMIT ); }", "public void transactionCommit() throws DDlogEx...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets re expires in.
public void setReExpiresIn(String reExpiresIn) { this.reExpiresIn = reExpiresIn; }
[ "void setExpiresAt(long expiresAt);", "void setExpiration(long time)\n {\n expiration = time;\n }", "private void setExpireIn(int value) {\n \n expireIn_ = value;\n }", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "public void set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
// checkDashIntersect // //
private boolean checkDashIntersect (List<?extends Dash> items, int maxItemWidth, PixelRectangle box) { int startIdx = Dash.getDashIndexAtX(items, box.x - maxItemWidth); if (startIdx < items.si...
[ "@Test\r\n\tpublic void testABAD(){\n\t\t doesIntersect = IntersectUtil.getIntersection( intersect, 100, 100, 200, 100, 100, 100, 100, 200);\r\n\t // intersect = IntersectUtil.intersect();\r\n\t assertTrue(doesIntersect);\r\n\t assertEquals(intersect[0], 100, 0.00001);\r\n\t assertEquals(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__JodaTimeTypes__Alternatives" $ANTLR start "rule__WrapperTypes__Alternatives" ../com.idobjects.dsl.ui/srcgen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:615:1: rule__WrapperTypes__Alternatives : ( ( 'Byte' ) | ( 'Short' ) | ( 'Integer' ) | ( 'Long' ) | ( 'Float' ) | ( 'Doub...
public final void rule__WrapperTypes__Alternatives() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:619:1: ( ( 'Byte' ) | ( 'Short' ) | ( 'Integer...
[ "public final void ruleWrapperTypes() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:468:2: ( ( ( rule__WrapperTypes__Alternatives ) ) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method will get the total cost of the egg
public int getCost() { if(num_egg<0||price_per_dozen<0) { return 0; } return num_egg*price_per_dozen/12; //cost = number of egg * price of a dozen of egg / 12, and return an integer }
[ "public double calcCost() {\n // $2 per topping.\n double cost = 2 * (this.cheese + this.pepperoni + this.ham);\n // size cost\n switch (this.size) {\n case \"small\":\n cost += 10;\n break;\n case \"medium\":\n cost += 12;\n brea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
shows the Help page at page 1
public void showHelpPage(){ changeToFirstPage(); helpStage.show(); }
[ "private void doHelp()\r\n {\r\n Help.showHelp(page, ref, null);\r\n }", "public void showHelp() {\n\n\t\tview.showHelpDialog();\n\t}", "public static void ShowHelpScreen() {\n ToggleVisibility(HelpPage.window);\n }", "private void help() {\n HelpMenuView helpMenu = new HelpMenuView(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new customer RecordBuilder by copying an existing customer instance.
public static Builder newBuilder(customer other) { if (other == null) { return new Builder(); } else { return new Builder(other); } }
[ "public static com.github.evandrocarvalho.avro.reflection.ReflectedCustomerGenerated.Builder newBuilder(com.github.evandrocarvalho.avro.reflection.ReflectedCustomerGenerated.Builder other) {\n return new com.github.evandrocarvalho.avro.reflection.ReflectedCustomerGenerated.Builder(other);\n }", "public static...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the amount of work object for the UnitOfWork specified. Only sets it if the UnitOfWork = Rate.UnitOfWork.HOURLY or Rate.UnitOfWork.PAGE_COUNT
void setAmountOfWork(AmountOfWork p_work);
[ "AmountOfWork getAmountOfWork(Integer p_unitOfWork);", "public void setForLimit(Long forLimit) {\r\n this.forLimit = forLimit;\r\n }", "public void setBudget(int budget) {userBudget = budget;}", "public int selectTotalNumberOfConcepts(IUnitOfWork unitOfWork) throws DataAccessException;", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the UI with the provided BoxItem
private void updateUi(final BoxItem sharedItem){ if (!checkIfHasRequiredFields(sharedItem)){ refreshShareItemInfo(); return; } if (getMainItem().getId().equals(sharedItem.getId())) { setMainItem(sharedItem); runOnUiThread(new Runnable() { ...
[ "private void updateItem(ItemBox itemBox) {\n\t\ttry {\n\t\t\tItem temp = getNewItem(itemBox.getGtin());\n\n\t\t\t// checks if the currently fetched temp Item is the still the same\n\t\t\t// item as the one online\n\t\t\tif (!temp.equals(itemBox.getItem())) {\n\t\t\t\tlog.info(temp.name + \" unequal to \" + itemBox...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method flip() used to flip the square symbol
public Piece flip(){ if(this == BLACK){ return WHITE; } else{ return BLACK; } }
[ "public void flip() {\n\t\tif (this.isFlipped) {\n\t\t\tthis.isFlipped = false;\n\t\t} else {\n\t\t\tthis.isFlipped = true;\n\t\t}\n\t}", "public void flip(){\n\t\tsetSize(cardwidth, cardheight);\n\t\tfaceup = !faceup;\n\t\tif(faceup){\n\t\t\tsetIcon(cardfront);\n\t\t} else {\n\t\t\tsetIcon(cardback);\n\t\t}\n\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Derives the original transport layer sequence number from the network layer sequence number that was received with every segment
final int getTransportLayerSequenceNumber(final int networkLayerSequenceNumber, final int seqZero) { if ((networkLayerSequenceNumber & TRANSPORT_SAR_SEQZERO_MASK) < seqZero) { return ((networkLayerSequenceNumber - ((networkLayerSequenceNumber & TRANSPORT_SAR_SEQZERO_MASK) - seqZero) - (TRANSPORT_SAR...
[ "long getOriginseqnum();", "long getSenderSeqNum();", "protected void incrementSeqNum() {\n intToNetworkByteOrder(mySeqNum++, sequenceNum, 0, 4);\n }", "public void setInitialReceiveSequenceNumber(int irs){\n this.irs = irs;\n }", "public Integer getCompoundSequenceNumber();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface to represents a dumper. A dumper is responsible for periodically dumping the statistically data to some underlying file.
public interface Dumper { String CLASS_NAME = "0"; String METHOD_NAME = "1"; String INVOCATION_COUNT = "3"; String MAX_DURATION = "4"; /** * Add the tabular data to this dumper. * This data will be displayed on the HTML page. * @param data */ void addTabula...
[ "IDumpManager dump();", "public CoreDump() {\n stringWriter = new StringWriter();\n printWriter = new PrintWriter(stringWriter);\n }", "public void store() {\n try {\n if (FILE.exists() || FILE.createNewFile()) {\n ObjectOutputStream os = new ObjectOutputStream(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Redirects supplied loggers to the console.
private static void redirectLoggersToConsole(List<Logger> loggers) { Handler consoleLog = new ConsoleHandler(); consoleLog.setLevel(Level.ALL); for (Logger lg : loggers) { lg.addHandler(consoleLog); } }
[ "public static void setupLogger() {\n System.setOut(createLoggingProxy(System.out));\r\n System.setErr(createLoggingProxy(System.err));\r\n }", "public void enableConsoleLogs()\r\n\t\t{\r\n\t\t\tthis.logger.addHandler(this.consoleHandler);\r\n\t\t}", "private static void addConsoleAppender() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setting install date of app
public void setInstallDate() { if (PrefUtils.getInstallDate(mContext) == 0) { //getting the current time in milliseconds, and creating a Date object from it: Date date = new Date(System.currentTimeMillis()); //or simply new Date(); long millis = date.getTime(); Pr...
[ "void setStartupDate(Date date);", "public void setInstallTime(Date installTime) {\n this.installTime = installTime;\n }", "public Date getInstallTime() {\n return installTime;\n }", "public void setExeDate(Date exeDate);", "void setKitDate(Date kitDate);", "@Override\n public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint32 publisherGroupID = 19;
public Builder setPublisherGroupID(int value) { bitField0_ |= 0x00001000; publisherGroupID_ = value; onChanged(); return this; }
[ "int getPublisherGroupID();", "public int getPublisherGroupID() {\n return publisherGroupID_;\n }", "public boolean hasPublisherGroupID() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }", "public boolean hasPublisherGroupID() {\n return ((bitField0_ & 0x00001000) == 0x00001000...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all attributes of this node.
@Override public void removeAttributes() { attributes.clear(); }
[ "public void clearAttributes() {\n\t\t// Clear all attributes\n\t\tfor (BusinessObject child : getChildren()) {\n\t\t\tif (child.isAttribute()) {\n\t\t\t\tchild.clear();\n\t\t\t}\n\t\t}\n\t}", "public void removeAllAttributes()\n {\n attributes = new HashMap();\n }", "void resetAllAttributes();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the payment configuration by resetting.
private PaymentConfig() { reset(); }
[ "@Test\n public void resetTest() {\n\n Match match = new Match();\n VirtualView virtualView = new VirtualView(new Server());\n SingleActionManager singleActionManager = new SingleActionManager(match, virtualView, new TurnManager(match, virtualView));\n Payment payment = new Payment(ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a user, find their home page based on their role
private ReportTO getBestHomeURLForUser(Collection<GrantedAuthority> u) { List<ReportTO> roleEntries = getHomePageByRoleEntries(); if(roleEntries != null) { Iterator<ReportTO> it = roleEntries.iterator(); while (it.hasNext()) { ReportTO entry = it.next(); if (hasRole(u, entry.getAllRoles())) { ...
[ "@PreAuthorize(\"hasRole('ROLE_ADMIN') or hasRole('ROLE_TEACHER') \" +\n \"or hasRole('ROLE_PARENT') or hasRole('ROLE_PUPIL')\")\n @GetMapping(\"/userPage\")\n public String userPage() {\n final Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleSKIP" $ANTLR start "ruleSKIP" InternalDsl.g:1088:1: ruleSKIP : ( ( rule__SKIP__Group__0 ) ) ;
public final void ruleSKIP() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:1092:2: ( ( ( rule__SKIP__Group__0 ) ) ) // InternalDsl.g:1093:2: ( ( rule__SKIP__Group__0 ) ) { // InternalDsl.g:1093:2: ( ( ru...
[ "public final void rule__SKIP__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:11628:1: ( ( 'skip' ) )\n // InternalDsl.g:11629:1: ( 'skip' )\n {\n // InternalDsl.g:11629:1: ( 'sk...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns whether the most recently clicked square is a legal choice in the game. Pre: gameBoard is a 2dimensional array type variable that holds the status of current game board. xSquare and ySquare represent the column and row of the most recently clicked square. Post: Returns true if and only if the square is a lega...
private boolean legalSquare(int xSquare, int ySquare) { // TODO if (DEBUGGING) { System.out.println("x: "+xSquare); System.out.println("y: "+ySquare); } if (gameBoard[xSquare][ySquare] != EMPTY) return false; return true; }
[ "public boolean canSelect(int x, int y) {\n \tif (x < 0 || x > 7 || y < 0 || y > 7) {\n \t\treturn false;\n \t}\n \t// true if there is a piece, it is yours, and you have not already moved\n \tif (this.pieceAt(x, y) != null && (this.pieceAt(x, y).side() == player) && moved == false) {\n \t\treturn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs an event command.
public EventCommand(String detail, Time on) { this.detail = detail; this.on = on; }
[ "public AddCommand(Event event) {\n this.event = event;\n }", "public EventCommand(String description) {\n super(description);\n }", "public UnitEvent(Command command)\n {\n this.command = command;\n }", "public AddEventCommand(Event event) {\n requireNonNull(event);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the shape according to it's brush configuration (if any).
public final void init(Shape shape) { if (shape.getCustomConfig() instanceof BrushConfig) { BrushConfig bc = (BrushConfig) shape.getCustomConfig(); Brush brush = getBrush(bc.getBrush()); brush.init(shape, bc.getRulerMode()); for (Vector2 point : bc.ge...
[ "private void setupBrushShape() {\n\t\tpickBrushShapeVBox = new VBox();\r\n\t\tpickBrushShapeVBox.setAlignment(Pos.TOP_LEFT);\r\n\t\tpickBrushShapeVBox.setPadding(new Insets(DEFAULT_PADDING, DEFAULT_PADDING, DEFAULT_PADDING, DEFAULT_PADDING));\r\n\t\tpickBrushShapeVBox.setSpacing(DEFAULT_SPACING);\r\n\r\n\t\t// ini...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor accepts arguments for line1, line2, city, state and zipCode
public Address(String aLine1, String aLine2, String aCity, String aState, String zip) { line1 = aLine1; line2 = aLine2; city = aCity; state = aState; zipCode = zip; }
[ "public Address(String aLine1, String aCity, \n\t\t\tString aState, String zip) {\n\t\tline1 = aLine1;\n\t\tcity = aCity;\n\t\tstate = aState;\n\t\tzipCode = zip;\n\t}", "public ProductLocation(long productId, String addressLine1, String addressLine2, String city, String state, String country, long zipCode) {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the current value for the peer who is the leader.
Peer getLeader() { return leader; }
[ "public String getLeader() {\n\t return network.getLeader();\n\t}", "public String getLeader() {\n return leader;\n }", "PeerId getLeaderId();", "public LiveInstance getLeader() {\n return _leader;\n }", "public int getCurrentValue() {\n\t\treturn this.currentValue;\n\t}", "public Card getLeade...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test group by level without aggregation function used in select clause. The expected situation is throwing an exception.
@Test public void TestGroupByLevelWithoutAggregationFunc() { try (Connection connection = EnvFactory.getEnv().getConnection(); Statement statement = connection.createStatement()) { statement.executeQuery("select temperature from root.sg1.* group by level = 2"); fail("No expected exception thr...
[ "public boolean supportsGroupByBeyondSelect()\n throws SQLException\n {\n return false;\n }", "@Test\n public void testGroupBy() throws Exception {\n failWithSemanticException(\"select \\\"int\\\" from alltypes \"\n + \"group by \\\"Int\\\";\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SimpleExpr__Group_2_1__2" $ANTLR start "rule__SimpleExpr__Group_2_1__2__Impl" InternalMGPL.g:4209:1: rule__SimpleExpr__Group_2_1__2__Impl : ( ( rule__SimpleExpr__ToucheeAssignment_2_1_2 ) ) ;
public final void rule__SimpleExpr__Group_2_1__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMGPL.g:4213:1: ( ( ( rule__SimpleExpr__ToucheeAssignment_2_1_2 ) ) ) // InternalMGPL.g:4214:1: ( ( rule__SimpleExpr__ToucheeAssign...
[ "public final void rule__SimpleExpr__Group_2_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:4202:1: ( rule__SimpleExpr__Group_2_1__2__Impl )\n // InternalMGPL.g:4203:2: rule__SimpleExpr__Group_2_1__2__Impl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field carsource1l is set (has been assigned a value) and false otherwise
public boolean isSetCarsource1l() { return __isset_bit_vector.get(__CARSOURCE1L_ISSET_ID); }
[ "public boolean isSetCandidate_source() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CANDIDATE_SOURCE_ISSET_ID);\n }", "public boolean isSetCarprovincename() {\n return this.carprovincename != null;\n }", "public boolean isSetSource() {\n return this.source != null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the current value used for easing.
public float getEasing() { return easing; }
[ "public float getAnimatedValue() {\n return mStartValue + (mEndValue - mStartValue) * mProgress;\n }", "public float getValue() {\n return mInterpolatingValue;\n }", "public double getValue() {\n return ((double)slider.getValue())/scale;\n }", "public double getValue() {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The accuracy test of the method containsDefinedTag.
public void test_containsDefinedTag_accuracy() { instance.addDefinedTag(tag); assertTrue("The tag is not added properly.", instance.containsDefinedTag(tag)); }
[ "public void test_getDefinedTags_1_accuracy() {\n instance.addDefinedTag(tag);\n assertEquals(\"DefinedTag got incorrectly\", 1, instance.getDefinedTags().size());\n }", "public void test_countDefinedTags_accuracy() {\n instance.addDefinedTag(tag);\n assertEquals(\"The tag is not ad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up the main pane and add all components.
public void setupMainPane() { context = (PrideInspectorContext)uk.ac.ebi.pride.gui.desktop.Desktop.getInstance().getDesktopContext(); JPanel mainPanel = new JPanel(new BorderLayout()); JPanel northPanel = new JPanel(); northPanel.setLayout(new BorderLayout()); nort...
[ "public MainContentPane() {\r\n\t\tsuper();\r\n\r\n\t\t// Add design-time configured components.\r\n\t\tinitComponents();\r\n\t}", "private void setupMainPane() {\n\t\tColumnConstraints gameConstraints = new ColumnConstraints();\n\t\tgameConstraints.setPercentWidth(60);\n\t\tColumnConstraints menuConstraints = ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adding boards for testing winnerDecider function:
public static void tests(){ int[][] board1 = new int[][]{ { 0, 1, 2}, { 2, 0, 1}, { 0, 1, 2} }; int[][] board2 = new int[][]{ { 1, 2, 1}, { 2, 1, 1}, { 2, 1, 2} }; int[][] board3 = new...
[ "private void setUpBoard() {\r\n board[0][0] = new Piece(Piece.PieceType.ROOK, Piece.ColorType.BLACK, \"0_BRook\");\r\n board[1][0] = new Piece(Piece.PieceType.KNIGHT, Piece.ColorType.BLACK, \"0_BKnight\");\r\n board[2][0] = new Piece(Piece.PieceType.BISHOP, Piece.ColorType.BLACK, \"0_BBishop\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column account_login.login_token_validity_period
public void setLoginTokenValidityPeriod(Date loginTokenValidityPeriod) { this.loginTokenValidityPeriod = loginTokenValidityPeriod; }
[ "public Date getLoginTokenValidityPeriod() {\n return loginTokenValidityPeriod;\n }", "private void validateToken(){\n\n LoginCache loginToken = tokenAuthenticationService.decodeToken();\n\n if(StringUtils.isEmpty(loginToken)) throw new UnAuthorizedException(\"invalid_token\");\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find a TAP schema by name
public TapSchema findOneSchema(String schemaName);
[ "private SchemaWrapper findSchemaWrapperInTree( String name )\n {\n List<TreeNode> schemaWrappers = ( ( TreeNode ) viewer.getInput() ).getChildren();\n for ( TreeNode sw : schemaWrappers )\n {\n if ( ( ( SchemaWrapper ) sw ).getSchema().getName().toLowerCase().equals( name.to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
UUID avId = avService.commenceActivityVerification(principal, body); Map dto = new HashMap(); dto.put("avId", avId); return new ResponseEntity(avId, HttpStatus.CREATED);
@PostMapping("/commence") public ResponseEntity<?> commenceTpvRequest( @AuthenticationPrincipal AuthPrincipal principal, @RequestBody @Valid ActivityVerificationRequest body) throws IOException { Map<String, UUID> dto = new HashMap<>(); dto.put("id", avService.commenceAct...
[ "@Post \n public JsonRepresentation createActivity(Representation entity) {\n \tJSONObject jsonReturn = new JSONObject();\n \tlog.info(\"createActivity(@Post) entered ..... \");\n\t\tEntityManager em = EMF.get().createEntityManager();\n\t\t\n\t\tString apiStatus = ApiStatusCode.SUCCESS;\n\t\tthis.setStatu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return AABB.testOverlap(proxyA.aabb, proxyB.aabb); return m_tree.overlap(proxyIdA, proxyIdB);
@Override public boolean testOverlap(int proxyIdA, int proxyIdB) { final AABB a = m_tree.getFatAABB(proxyIdA); final AABB b = m_tree.getFatAABB(proxyIdB); if (b.lowerBound.x - a.upperBound.x > 0.0f || b.lowerBound.y - a.upperBound.y > 0.0f) { return false; } if (a.lowerBound.x - b.upperBound...
[ "bool doOverlap(Point l1, Point r1, Point l2, Point r2)\n{\n // If one rectangle is on left side of other\n if (l1.x > r2.x || l2.x > r1.x)\n return false;\n \n // If one rectangle is above other\n if (l1.y < r2.y || l2.y < r1.y)\n return false;\n \n return true;\n}", "static boolean ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the default root element that should be selected by default. Can be null.
String getDefaultRoot() { return mDefaultRoot; }
[ "public Object getDefaultElement() {\r\n return defaultElement;\r\n }", "public Element getUIDefault(String ui_default) {\n List defaultsElements = getRootElement().getChild(\"lasui\").getChildren(\"defaults\");\n for (Iterator defsIt = defaultsElements.iterator(); defsIt.hasNext()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleCompositeLit" $ANTLR start "ruleCompositeLit" InternalGo.g:2738:1: ruleCompositeLit : ( ( rule__CompositeLit__Group__0 ) ) ;
public final void ruleCompositeLit() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalGo.g:2742:2: ( ( ( rule__CompositeLit__Group__0 ) ) ) // InternalGo.g:2743:2: ( ( rule__CompositeLit__Group__0 ) ) { /...
[ "public final void rule__CompositeLit__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:14693:1: ( rule__CompositeLit__Group__0__Impl rule__CompositeLit__Group__1 )\r\n // InternalGo.g:14694:2: rule_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required bool b24 = 24;
boolean getB24();
[ "boolean getB23();", "boolean getB22();", "boolean getB21();", "boolean getB25();", "boolean getB20();", "NFP_Boolean createNFP_Boolean();", "boolean getB27();", "boolean getB19();", "BooleanVariable createBooleanVariable();", "BoolConstant createBoolConstant();", "Bool createBool();", "boolea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleBSOperation" $ANTLR start "entryRuleBoolOperation" InternalBSQL2Java.g:228:1: entryRuleBoolOperation : ruleBoolOperation EOF ;
public final void entryRuleBoolOperation() throws RecognitionException { try { // InternalBSQL2Java.g:229:1: ( ruleBoolOperation EOF ) // InternalBSQL2Java.g:230:1: ruleBoolOperation EOF { before(grammarAccess.getBoolOperationRule()); pushFollow(FOLL...
[ "public final void entryRuleBooleanLiteral() throws RecognitionException {\n try {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:902:1: ( ruleBooleanLiteral EOF )\n // ../org.iobserve.rac.constraint.ui...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the labor intensity of land used.
public double getLaborIntensityOfLandUsed();
[ "public double getWaterIntensityOfLandUsed();", "public double getCostIntensityOfLandUsed();", "LuminousIntensityType getLuminousIntensity();", "double getIntensity();", "public double getFoodIntensityOfLandUsed();", "public int getIntensity() {\n return intensity;\n }", "private int getIntens...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor that gets the number of gridlines for paint.
public int getNumberOfYGridLines() {return yGridLines;}
[ "public int getNumberOfXGridLines() {return xGridLines;}", "final public int getYMajorGridLineCount()\n {\n return ComponentUtils.resolveInteger(getProperty(YMAJOR_GRID_LINE_COUNT_KEY), 3);\n }", "int getSpanCountOfGridMode();", "final public int getXMajorGridLineCount()\n {\n return Compone...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
used to distinguish between various address formats (nonsegwit, segwit, etc.) optional .InputScriptType script_type = 5 [default = SPENDADDRESS];
public com.satoshilabs.trezor.lib.protobuf.TrezorType.InputScriptType getScriptType() { com.satoshilabs.trezor.lib.protobuf.TrezorType.InputScriptType result = com.satoshilabs.trezor.lib.protobuf.TrezorType.InputScriptType.valueOf(scriptType_); return result == null ? com.satoshilabs.trezor.lib.protobuf.TrezorT...
[ "java.lang.String getAddressType();", "public com.satoshilabs.trezor.lib.protobuf.TrezorType.InputScriptType getScriptType() {\n\t\t\tcom.satoshilabs.trezor.lib.protobuf.TrezorType.InputScriptType result = com.satoshilabs.trezor.lib.protobuf.TrezorType.InputScriptType.valueOf(scriptType_);\n\t\t\treturn result ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merge hai mang con cua A[]. mang con thu nhat la A[l..m] mang con thu hai la A[m+1..r]
void merge(int A[], int l, int m, int r) { // Tim kich thuoc cua 2 mang con de merged int n1 = m - l + 1; int n2 = r - m; // Tao mang tam int L[] = new int[n1]; int R[] = new int[n2]; // Copy du lieu vao mang tam for (int i = 0; i < n1; ++i) ...
[ "void merge();", "String combine();", "private Word_Key[] merge(Word_Key[] l, Word_Key[] r){\n\t\t\n\t\tWord_Key combined[]=new Word_Key[l.length+r.length];\n\t\t\n\t\tint index=0;\n\t\tint leftIndex=0;\n\t\tint rightIndex=0;\n\t\t\n\t\twhile(leftIndex<l.length&&rightIndex<r.length){\n\t\t\tString left = l[left...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the status of the file
public byte getFileStatus() { return filestatus; }
[ "public String getFileStatus() {\n return fileStatus;\n }", "public final int getFileStatus() {\n\t return m_fileStatus;\n\t}", "String getFileStatus(Long fileId);", "@Override\n public FileStatus getFileStatus(Path f) throws IOException {\n org.apache.hadoop.fs.FileStatus status = this.hadoopF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
write a method product that takes an array of int and returns the product (multiplicatino) of those numbers
int product(int[] nums) { int total = 1; for (int n: nums) { total = total * n; } return total; }
[ "public static int multiply(int[] input) {\n int result = 1;\n for (int i = 0; i < input.length; i++) {\n result *= input[i];\n }\n return result;\n\n }", "public int multi(){\n int multi,counter;\n counter=0; \n multi=1;\n for(counter=0;cou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructors for SearchResultEntry The only time a client will create a SearchResultEntry is when it is decoding it from an InputStream
public RfcSearchResultEntry(ASN1Decoder dec, InputStream in, int len) throws IOException { super(dec, in, len); // Decode objectName // set(0, new RfcLDAPDN(((ASN1OctetString)get(0)).stringValue())); // Create PartitalAttributeList. This does not need to be decoded, only ...
[ "public SearchResultDeserializer() {\n super(SearchResult.class);\n }", "public Entry() {\n }", "Object unmarshall(InputStream inputStream) throws SearchAPIUnmarshallingException;", "public BoxSearchHolder(BoxRequestsSearch.Search searchRequest) {\n super(\"\", \"\", null);\n impo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Animation to slide in texts to the screen Texts start from a position based on the parameters passed stays in the center of the screen for (duration) time leaves the screen afterwards
public void slideTexts(final TextView view, int duration, final int repeat, int offset, Interpolator interpolator, int stay_time, boolean left) { float x1, x2, x3; x1 = -(view.getLeft() + view.getWidth()); x2 = 0; x3 = view.getRight() + view.getWidth(); ...
[ "public void startAnimation() {\n TextView pressAnywhere = findViewById(R.id.press_anywhere);\n Animation animation = new AlphaAnimation(0.0f, 1.0f);\n animation.setDuration(750);\n animation.setStartOffset(20);\n animation.setRepeatMode(Animation.REVERSE);\n animation.setR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the slogans before and after the current slogan in the ordered set where groupId = &63; and status = &63;.
public static com.inkwell.internet.slogan.model.Slogan[] findByG_S_PrevAndNext( long sloganId, long groupId, int status, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.inkwell.internet.slogan.NoSuchSloganException, com.liferay.portal.kernel.exception.SystemException { return g...
[ "public static com.inkwell.internet.slogan.model.Slogan[] filterFindByG_S_PrevAndNext(\n\t\tlong sloganId, long groupId, int status,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.inkwell.internet.slogan.NoSuchSloganException,\n\t\t\tcom.liferay.portal.kernel.exception.Syst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load the list of attributes for display. The Enum values are converted to a list of strings for the combo box. The selected index is set from the current Enum value;
private void loadList() { this.removeAllItems(); ArrayList<String> values = _attr.getValueList(); String value = _attr.getEnum().name(); int index = 0; for(int i = 0; i < values.size(); i++) { String s = values.get...
[ "private void setupAttributeBox() {\n\t\t// make combobox with all attributes\n\t\tAttribute[] allAttributes = document.getAttributeMap().values()\n\t\t\t\t.toArray(new Attribute[0]);\n\t\tattributeBox = new JComboBox(allAttributes);\n\n\t\t// make renderer that greys out already-used attributes\n\t\tComboBoxRender...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Logs SQL error related messages into the log file
public static void logSQLErrors(SQLException e, String tableName) { if(e.getSQLState() == null && e.getErrorCode() == 0) { JobTypeParser.getLogger().error("Error: Connection error - connection to \'" + e.getMessage().substring(e.getMessage().indexOf("socket orig=") + 12).split(" ")[0] + "\' cannot be establishe...
[ "static void logSQLError(SQLException e) {\n log.log(Level.SEVERE, \"SQL Error\", e);\n }", "public void logSql(String sql)\n {\n String entry = (getId() == null ? \"\" : getId() + \": \") + sql;\n\n //See if they have specified a file handler or not\n if (_config.getLogger() == ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the single instance of ProductFacade.
public static ProductFacade getInstance(){ if(pf==null){ synchronized(ProductFacade.class){ if(pf==null){ pf = new ProductFacade(); } } } return pf; }
[ "public static synchronized DJIBaseProduct getProductInstance() {\n if (null == mProduct) {\n mProduct = DJISDKManager.getInstance().getDJIProduct();\n }\n return mProduct;\n }", "public ProductFacade()\n\t{\n\t\tthis.productManager = new ProductManager();\n\t}", "Product getP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The transport service is responsible of handling all transport related requests.
public interface TransportService { /** * Create and persist a new transport. * * @param request the new transport data * * @return the new transport object, if successful */ Transport storeTransport(@NotNull EezerStoreTransportRequest request); /** * Remove an existing ...
[ "Transport getTransport();", "abstract public Transports createTransports();", "public interface Transport\n{\n\n public static final int DISCARD_STREAM_TIMEOUT_MILLIS = 100;\n\n public abstract boolean canReuseConnection();\n\n public abstract wm createRequestBody(Request request, long l);\n\n publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Funcion sintactico() Esta funcion se encarga de analizar si existe algun error sintactico en el hecho/recla ingresado
public static void sintactico(String dato) throws Exception{ //Analisis sintactico en caso que sea una regla parser p = new parser(); p.main(""); // Si el archivo reglas.txt esta vacio la regla ingresa esta sintacticamente correcta FileReader fichero = (new FileReader("reglas.txt")); if(fichero....
[ "public static int analisisSintactico(String dato) throws Exception{\n \t//Analisis sintactico en caso que sea una regla\n \tparser p = new parser();\n\t\tp.main(\"\");\n \t\n\t\t// Si el archivo reglas.txt esta vacio la regla ingresa esta sintacticamente correcta\n\t\tFileReader fichero = (new FileReader(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deletes this square removing it from its peice
public void delete() { getPiece().delete(this); }
[ "public void removePiece(){\n piece = null;\n }", "public void removeTargetSquare(Square square);", "void operativeRemoveQueue() {\n\t\tsuper.setBorder(BORDER);\n\t\tsetBackground(originColor);\n\t\toccupied = false;\n\t\tfirstRow = false;\n\t\tcontroller.delete(queue);\n\t\tqueue = null;\n\t}", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Forces a basic event to be sent.
public void sendBasicEvent() { // Checking before sending ArrayList<JsonEvent> events = getEvents(); // Sending the data if (events != null) { BasicEvent basicEvent = (BasicEvent) events.get(BASIC_EVENT_INDEX); if (basicEvent != null) { basicEvent.forceReady(); sendJSON(basicEvent.receiveEvent());...
[ "public void setSendEvent(EventOccurrence sendEvent);", "public void simpleEvent() {\n AdGyde.onSimpleEvent(\"SimpleEventID\");\n Toast.makeText(this, \"Simple event clicked\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void send(final EventData data) {\n LOGGER.debug(\"asy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the parser associated with the named context. In a federation of namespaces, different naming systems will parse names differently. This method allows an application to get a parser for parsing names into their atomic components using the naming convention of a particular naming system. Within any single nami...
public NameParser getNameParser(Name name) throws NamingException { return null; }
[ "public abstract String getParserExpr(String parserName);", "private TwigcsResultParser getParser() {\n\t\tif (parser == null) {\n\t\t\tparser = new TwigcsResultParser();\n\t\t}\n\t\treturn parser;\n\t}", "public static ParameterParser getParameterParser() {\r\n\t\tif( parameterParser == null ) parameterParser ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the list of observers observing this.
public void clearObservers() { observers.clear(); }
[ "public void clearObservers() {\r\n\r\n\t\t// In case an observer wants to clear the list\r\n\t\tfor (IntegerStorageObserver observer : observers) {\r\n\t\t\tremoveObserver(observer);\r\n\t\t}\r\n\t}", "public void removeAllObservers() {\n\t\tobservers.clear();\n\t}", "public void clearChangeListeners() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
helper method only called if the user is out of turns game ends.
private void endGame() { System.out.println("You are out of turns!!"); System.out.println("You have gotten up to round " + this.round + " with a score of " + this.userScore); System.exit(0); }
[ "public void playerTurnEnd() {\n playersTurn = false;\n }", "public void endGame() {\n StateSingleton.instance().getUser().addGame(game.gameData());\n StateSingleton.instance().changeCenter(new UserDashboardView());\n }", "public void Gamefinished()\n\t\t{\n\t\t\tplayers_in_game--;\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
kerberos5 principal for external GAL sync queries, if not set fallback to zimbraGalLdapKerberos5Principal
@ZAttr(id=595) public String getGalSyncLdapKerberos5Principal() { return getAttr(Provisioning.A_zimbraGalSyncLdapKerberos5Principal, null); }
[ "@ZAttr(id=595)\n public void setGalSyncLdapKerberos5Principal(String zimbraGalSyncLdapKerberos5Principal) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalSyncLdapKerberos5Principal, zimbraGalSync...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The flames Constructor for the game. Takes in a level and creates a game with the player on the spawning location and enemies generated.
public Game(Level level) { this.level = level; this.player = new Bomberman(Constants.MAP_X, Constants.MAP_Y); this.enemies = initializeEnemies(); this.bombs = new ArrayList<Bomb>(); this.flames = new ArrayList<Flame>(); this.state = Constants.GAME_ACTIVE; }
[ "public Level(){\n\t\tthis.lvlFile = new File(\"C:/EclipseWorkspaces/csse220/DiggerProject/src/Level0.txt\");\n\t\tthis.lvlNum = -1;\n\t\tthis.emeraldCount=0;\n\t\tthis.objectList= new ArrayList<Interactable>();\n//\t\tthis.positionList = new int[1][1];\n//\t\tthis.spawnList = new int[1][1];\n\t\tenemyxpositions = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the root calendar
@Override public BwCalendar getRootCollection() { return entity.getRootCollection(); }
[ "public FactoryCalendar getCalendar()\n {\n return this.calendar;\n }", "public PlayedTime getRoot() {\n\t\t\t\treturn root;\n\t\t\t}", "private YFCDocument getCalendarDetailsTemplDoc() {\n\t\tYFCDocument getCalendarTemp = YFCDocument.createDocument(XMLLiterals.CALENDAR);\n\t\tYFCElement calendarEl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets up the directories for creation, audio and video files
private void setUpDirectories() { File creation = new File("Creations"); File audio = new File("Audio"); File quiz = new File("Quiz"); File temp = new File("Temp"); if (!creation.isDirectory()) { creation.mkdir(); } if (!audio.isDirectory()) { audio.mkdir(); } if (!quiz.isDirectory(...
[ "public static void CreateFilesAndDirectories()\r\n {\r\n //Check if the directories exists, otherwise create it.\r\n if(!Files.exists(PixelCenter.instance.saveFile.getParent()))\r\n {\r\n try \r\n {\r\n Files.createDirectories(PixelCenter.instance.saveFi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to get a reference to another storage, so you can share files with it, etc. In the case this storage is not online, it will return null. You can then proceed to use any files on this storage from the database.
IFileProvider getStorageReference(String username) throws RemoteException;
[ "public Storage getStorage()\n {\n return __m_Storage;\n }", "public Storage getStorage()\r\n\t{\r\n\t\treturn storage;\r\n\t}", "public static StorageReference getFirebaseStorage() {\n if (referenciaStorage == null) {\n referenciaStorage = FirebaseStorage.getI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MISCELLANEOUS FUNCTIONS Method to return the "current" NodeProto, as maintained by the user interface.
public NodeProto getCurrentNodeProto() { return currentNodeProto; }
[ "public void setCurrentNodeProto(NodeProto np) { currentNodeProto = np; }", "public Node getCurrentNode();", "public Node getLocalNode() {\n \treturn mCommThread.getLocalNode();\n }", "public PetriNet getCurrentNet() {\n\t\treturn currentNet;\n\t}", "public ArcProto getCurrentArcProto() { return curre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleOrExpression" $ANTLR start "entryRuleImpliesExpression" InternalDsl.g:1381:1: entryRuleImpliesExpression returns [EObject current=null] : iv_ruleImpliesExpression= ruleImpliesExpression EOF ;
public final EObject entryRuleImpliesExpression() throws RecognitionException { EObject current = null; EObject iv_ruleImpliesExpression = null; try { // InternalDsl.g:1382:2: (iv_ruleImpliesExpression= ruleImpliesExpression EOF ) // InternalDsl.g:1383:2: iv_ruleImplie...
[ "public final EObject entryRuleImpliesExpr() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleImpliesExpr = null;\n\n\n try {\n // InternalSafetyParser.g:7159:52: (iv_ruleImpliesExpr= ruleImpliesExpr EOF )\n // InternalSafetyParser.g:7160:2: iv_ru...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given the provided model containing a patch location (bank, number, etc.), this should return a model containing the NEXT patch location. For example, if the model's location is B072, then perhaps the next model might be B073. And if the model was B128, maybe the next model should be C001. This should wrap around as we...
public Model getNextPatchLocation(Model model) { return null; }
[ "public Model getNextPatchLocation(Model model)\n {\n return null;\n }", "private Location getNextLocation() {\n Location location = new Location(MockLocationEngine.class.getSimpleName());\n location.setLatitude(locations[currentIndex][0]);\n location.setLongitude(locations[currentIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modifies the type of data
public void setTypeOfData(final String typeOfData);
[ "void setDataType(int type );", "public void changeDataType(int type) throws IOException, NumberFormatException {\r\n saveDataType(type);\r\n loadDataType();\r\n }", "public void setData_type(String data_type) {\n this.data_type = data_type;\n }", "public void setDataType(int atype)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts the XPathExpressions in the list of references into XPathStacks. We distinguish between references which are injected as attributes, and references which are injected as new elements (we keep two separated lists for them, to make things a bit easier to understand)
private void prepareReferences(List<Reference> refs, NamespaceContext context) throws IOException { elementReferences = new HashMap<Reference, Stack<String>>(); attributeReferences = new HashMap<Reference, Stack<String>>(); for(Reference reference : refs) { LocalElement localElement = (LocalElement...
[ "ElementRefExpression createElementRefExpression();", "List<PsdReferenceEntity> wrapReferenceEntity(List<CDSReferenceEntity> xmlReferEntitiesList);", "WhiteboxElementRefsType getWhiteboxElementRefs();", "private static List<IConfigurationElement> resolveReferences(List<String> refs,\r\n String attr, S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'bankID' field.
public void setBankID(String value) { this.bankID = value; }
[ "public Builder setBankID(String value) {\n validate(fields()[7], value);\n this.bankID = value;\n fieldSetFlags()[7] = true;\n return this; \n }", "public void setBankId(long bankId) {\n this.bankId = bankId;\n }", "public void setBankId(Integer bankId) {\n this.bankId =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the idAgenta property.
public void setIdAgenta(long value) { this.idAgenta = value; }
[ "void setIdAgente(int idAgente);", "public long getIdAgenta() {\n return idAgenta;\n }", "@Override\n\tpublic void setId(long id) {\n\t\t_tincanAgent.setId(id);\n\t}", "public void setIdAmigo(int idAmigo) {\n\t\tthis.idAmigo = idAmigo;\n\t}", "public void AgentID(Agent agent) {\n se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retorna o site mais postado pelo usuario atual
public String getSiteMaisPostado() { String siteMaisPostado= ""; int maximoDePostagens = 0; for(String key : postagensDoSite.keySet()){ if(postagensDoSite.get(key) > maximoDePostagens){ siteMaisPostado = key; maximoDePostagens = postagensDoSite.get(key); } } return siteMaisPost...
[ "Site getSite();", "public int getClientSite () {\n return clientSite;\n }", "SameSite getSameSite();", "public String getSite() {\r\n return site;\r\n }", "String getWebsite();", "Post findLastUserPost(SocialUserAccount socialAccount);", "public String getSite() {\n return site;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will be used to write records in existing excel sheet
public static void writeSpecificRowInExistingExcelWorkbook(File existingExcelSheet, String []strRecord, int startColumn, int row) throws IOException, BiffException, RowsExceededException, WriteException { if(strRecord != null) { //Get the existing workbook Workbook book = Workbook.getWorkbook(existingExcelS...
[ "public static void writeDataInExistingExcelWorkbook(File existingExcelSheet, String [][]strRecord) throws IOException, BiffException, RowsExceededException, WriteException\n\t{\n\t\t//Get the existing workbook\n\t\tWorkbook book = Workbook.getWorkbook(existingExcelSheet);\n\t\tWritableWorkbook copiedBook = Workboo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns the string of the piece in the square or '.' if empty
public String print() { if (piece == null) { return String.valueOf('.'); } else { return piece.print(); } }
[ "private String getPieceName(int x, int y) {\n Component component = chessBoard.findComponentAt(x, y);\n if (component instanceof JLabel) {\n JLabel awaitingPiece = (JLabel) component;\n return awaitingPiece.getIcon().toString();\n } else {\n return \"empty\";\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SeverityRange__Group__3" $ANTLR start "rule__SeverityRange__Group__3__Impl" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:4900:1: rule__SeverityRange__Group__3__Impl : ( ( rule__SeverityRange__MinSeverityAssignment_3 ) ) ;
public final void rule__SeverityRange__Group__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:4904:1: ( ( ( rule__S...
[ "public final void rule__SeverityRange__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:4892:1: ( ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the RuleSetsClient object to access its operations.
RuleSetsClient getRuleSets();
[ "public RuleSetsClient getRuleSets() {\n return this.ruleSets;\n }", "ManagedRuleSetsClient getManagedRuleSets();", "public ManagedRuleSetsClient getManagedRuleSets() {\n return this.managedRuleSets;\n }", "RulesClient getRules();", "public RulesClient getRules() {\n return this.r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo para inicializar as variaveis para os pontos iniciais de Bezier
public void inicializarCurvaBezier() { this.idCurvaDesenho = this.BEZIER; this.existeDesenho = false; for (int i = 0; i < 4; i++) { this.pontosCurva[i] = new Point(-1, -1); } this.numPonto = 0; limparMatriz(); repaint(); }
[ "public void set_knots_bezier() {\n int segments = nr_of_segments;\n int nr_of_points = points_per_segment;\n int i;\n surface_type = 1;\n\n u[0] = 0;\n u[1] = 0;\n u[2] = 0;\n u[3] = 0;\n v[0] = 0;\n v[1] = 0;\n v[2] = 0;\n v[3] = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the cc_type value for this SalesOrderPaymentEntity.
public java.lang.String getCc_type() { return cc_type; }
[ "public String getcType() {\n return cType;\n }", "public String getFinancialDocumentCreditCardTypeCode() {\n return financialDocumentCreditCardTypeCode;\n }", "public String getCocType() {\n\t\treturn cocType;\n\t}", "public void setCc_type(java.lang.String cc_type) {\n this.cc_typ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to update the disease type updateDiseaseType
@Override public Disease updateDiseaseType(int diseaseId, Disease disease) { // setting logger info logger.info("update the Disease Type"); Optional<Disease> diseases = diseaseRepo.findById(diseaseId); if(!diseases.isPresent()) { return null; } diseases.get().setDiseaseType(disease.getDiseaseTyp...
[ "protected void updateType() {\n\t\tsType = type.getItem(type.getSelectionIndex());\n\n\t}", "UpdateType updateType();", "public String getdiseaseType(){\n \treturn this.diseaseType;\n }", "public int updateDictType(SysDictType dictType);", "private void selectedDasTypeChanged() {\n\t\tselectedDasType...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new damage player event
public DamagePlayerEvent(Entity e) { this.e = e; }
[ "public RandomEvent(Player thePlayer)\r\n {\r\n player = thePlayer;\r\n }", "private PlayerEvent createPlayerEvent() {\n int i = rand.nextInt(PlayerEvent.TEMPLATEVALS.length); // Choose the random event template\n return new PlayerEvent(PlayerEvent.TEMPLATEVALS[i][0], PlayerEvent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method has been deprecated, please use method buildIscsi instead.
@java.lang.Deprecated public io.kubernetes.client.openapi.models.V1ISCSIPersistentVolumeSource getIscsi();
[ "public void setIscsiSupported(boolean iscsiSupported) {\r\n this.iscsiSupported = iscsiSupported;\r\n }", "public boolean isIscsiSupported() {\r\n return iscsiSupported;\r\n }", "public DriveSubsystem() {\n }", "private DeviceSysInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> buil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when a PROPOSE message is received or when processing a formerly out of context propose which is know belongs to the current consensus.
public void proposeReceived(Epoch epoch, ConsensusMessage msg) { int cid = epoch.getConsensus().getId(); int ts = epoch.getConsensus().getEts(); int ets = executionManager.getConsensus(msg.getNumber()).getEts(); Logger.println("(Acceptor.proposeReceived) PROPOSE for consensus " + cid); if (msg.getSender() == ...
[ "private void zabPropose() {\r\n\t\tif (!proposed && !msg_queue.isEmpty()) {\r\n\t\t\tproposed = true;\r\n\t\t\tList<Object> list = new LinkedList<Object>();\r\n\t\t\twhile (!msg_queue.isEmpty()) {\r\n\t\t\t\tfor (Object o : ((TotalOrderMessage) msg_queue.poll())\r\n\t\t\t\t\t\t.getMessages()) {\r\n\t\t\t\t\tlist.a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
dateChanged, This function will be called each time that the date in the applicable date picker has changed. Both the old date, and the new date, are supplied in the event object. Note that either parameter may contain null, which represents a cleared or empty date.
public void dateChanged(DateChangeEvent event);
[ "public void setDateChanged(Date dateChanged);", "public interface DateChangeListener {\n\n /**\n * dateChanged, This function will be called each time that the date in the applicable date\n * picker has changed. Both the old date, and the new date, are supplied in the event object.\n * Note that e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SavingsAccount sAobj =new SavingsAccount("john",500,4);
public static void main (String[] args) { Account a = new SavingsAccount("john",500,4); System.out.println("\n Savings Account details"); System.out.println("----------------------"); System.out.println(""+a.getName()+"has an initial balance of:"+a.getBalance()); a.deposit(200); a.withdraw(200); System.out.print...
[ "public SavingsAccount(String n) {\n super(n); \n balance = 0;\n }", "public SavingsAccount(int AccountID)\r\n\t{\r\n\t\tthis.m_AccountID = AccountID;\r\n\t\t\r\n\t}", "public SavingsAccount()\n {\n super();\n this.interestRate = DEFAULT_RATE;\n System.out.println(\"Construc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the CRM State Rep local service.
public void setCrmStateRepLocalService( contact.manager.service.CrmStateRepLocalService crmStateRepLocalService) { this.crmStateRepLocalService = crmStateRepLocalService; }
[ "public void setLocalRichService(LocalRichService localRichService) {\n\t\tthis.localRichService = localRichService;\n\t}", "public synchronized void changeServiceStatus() {\n\t\tthis.serviced = true;\n\t}", "public abstract void setServiceName(String serviceName);", "public void setStatusService(StatusServic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The phase id for which this phase listener is active. This phase listener observes all JSF lifecycle phases.
public PhaseId getPhaseId() { return PhaseId.ANY_PHASE; }
[ "String getPhaseId();", "public Number getPhaseId() {\r\n return (Number) getAttributeInternal(PHASEID);\r\n }", "public String getPhaseName() {\r\n return phaseName;\r\n }", "public String getPhaseName() {\n return _phaseName;\n }", "public String phaseName() {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a system time to a variant representation.
int SystemTimeToVariantTime(SYSTEMTIME lpSystemTime, DoubleByReference pvtime);
[ "public void setTimeFromSystem() {\n Calendar cal = Calendar.getInstance();\n setTime( cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n }", "IDateTimeValueType normalize();", "public T caseTime(Time object) {\n\t\treturn null;\n\t}", "private SystemDateTime(LocalDateTime time) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the upper value of the level
public double getUpperValue() { return this.upperMeasure.getValue(); }
[ "double getLevel();", "public int getUpperEdge() {\n return range.high;\n }", "public float getLevelValue() {\n return this.level.getValue1();\n }", "int getMaxLevel();", "public int getUpperBoundary() \n\t{\n\t\treturn this.upperBoundary;\n\t}", "long getLevel();", "public int getLe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
loads all the claims from memory.
private ArrayList<Claim> loadFromFile() { // TODO Auto-generated method stub Gson gson = new Gson(); ArrayList<Claim> claims = null; try { FileInputStream fis = openFileInput(FILENAME); //https://sites.google.com/site/gson/gson-user-guide Type dataType = new TypeToken<ArrayList<Claim>>()...
[ "public void loadAllUserData(){\n\n }", "public Map<String, Claim> getAllClaims() {\n Map<String, Claim> claims = new HashMap<>(userInfoClaims);\n claims.putAll(idTokenClaims);\n return claims;\n }", "List<Claim> getClaims(User user) throws ClaimManagerException;", "public LoadClaim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the Representation of the Kind to the one supplied.
public void representation(Element.Kind kind, Representation representation) { assert(kind != null); assert(representation != null); _representations.put(kind, representation); }
[ "void setKind(Kind kind);", "public void setKind(String _kind) { kind = _kind; }", "public void setKind(int value) {\n this.kind = value;\n }", "public void setKind(int kind)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleVal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the provDeptId field is properly copied when a message object is passed through the transformer.
@Test public void testClaimProvDeptId() { new ClaimFieldTester() .verifyStringFieldCopiedCorrectly( FissClaim.Builder::setProvDeptId, RdaFissClaim::getProvDeptId, RdaFissClaim.Fields.provDeptId, 3); }
[ "@Test\n public void testClaimProvEmerInd() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setProvEmerInd,\n RdaFissClaim::getProvEmerInd,\n RdaFissClaim.Fields.provEmerInd,\n 1);\n }", "@Test\n public void testClaimPro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Calculation of the position with 3 receiverpositions, with the RSSIvalues calculatet radian [in meter].
private void dist2Pos3Beacons() { //Betrachtung bei 3 Empfaengern double dist12 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2)); double dist13 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[2][0], 2) + Math.pow(posRec...
[ "private void dist2Pos2Beacons(){\n double dist = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n //Wenn Distanz ist größer als summe der Radien, dann gibt es keine Überschneidungen\n if (dist > (radius[0] + radius[1])) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column cj_resume_deliver.birth
public void setBirth(Date birth) { this.birth = birth; }
[ "public void setEmployeeBirth(String employeeBirth) {\n this.employeeBirth = employeeBirth;\n }", "public void setBirth(Date birth) {\r\n this.birth = birth;\r\n }", "@Override\n\tpublic void setDateOfBirth(java.util.Date dateOfBirth) {\n\t\t_candidate.setDateOfBirth(dateOfBirth);\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AssureStatement__Group__4__Impl" $ANTLR start "rule__TakeStatement__Group__0" ../de.bomzhi.petrinet.ui/srcgen/de/bomzhi/petrinet/ui/contentassist/antlr/internal/InternalPetrinetDsl.g:1185:1: rule__TakeStatement__Group__0 : rule__TakeStatement__Group__0__Impl rule__TakeStatement__Group__1 ;
public final void rule__TakeStatement__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../de.bomzhi.petrinet.ui/src-gen/de/bomzhi/petrinet/ui/contentassist/antlr/internal/InternalPetrinetDsl.g:1189:1: ( rule__TakeStatement__Group__0__Impl ru...
[ "public final void rule__TakeStatement__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../de.bomzhi.petrinet.ui/src-gen/de/bomzhi/petrinet/ui/contentassist/antlr/internal/InternalPetrinetDsl.g:1309:1: ( rule__TakeStatement__Group...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.calculator.Sum sum = 1;
com.proto.calculator.Sum getSum();
[ "public void setSum(int value) {\r\n this.sum = value;\r\n }", "public void makeSum() {\n\t\tsetSum(kor + eng + math);\r\n\t}", "public Calculator() \r\n\t{\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t}", "public void setSum(Integer sum) {\n this.sum = sum;\n }", "@Test\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }