query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Returns the result of interpreting the object as an instance of 'Web Driver Action Condition'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseWebDriverActionCondition(WebDriverActionCondition object) { return null; }
[ "public Conditionable getCondition();", "public T caseWebDriverAction(WebDriverAction object)\n {\n return null;\n }", "public T caseCondition(Condition object) {\n\t\treturn null;\n\t}", "String getCondition();", "public T caseCondition(Condition object)\n {\n return null;\n }", "public String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flips the ith bit in 128 bit byte array.
public static byte[] flipBit(byte[] byteArr, int i) { byte[] newByteArr = byteArr.clone(); int b = Byte.toUnsignedInt(byteArr[i / Byte.SIZE]); newByteArr[i / Byte.SIZE] = (byte) Math.floorMod(b ^ (1 << (Byte.SIZE - 1 - i % Byte.SIZE)), 256); return newByteArr; }
[ "public void flip(int bitIndex);", "public void flip(int index) {\n\t\tfinal int word = index >>> 5;\n\t\tbits[word] ^= 1 << (index & 31);\n\t}", "public static int flipBit(int value, int bitIndex) {\n\n// value = value ^ (1<<(bitIndex-1));\n\n return value ^ (1<<(bitIndex-1)); // put your implementat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use MachineImage.newBuilder() to construct.
private MachineImage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "public Job createMachineImage(final MachineImage mi) throws CloudProviderException {\n mi.setType(MachineImage.Type.IMAGE);\r\n\r\n mi.setTenant(this.getTenant());\r\n mi.setCreated(new Date());\r\n mi.setUpdated(mi.getCreated());\r\n mi.setState(MachineImage.State.AVAILABLE);\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getActiveAttributeList method, of class RouteGridpointDBModel.
@Test public void testGetActiveAttributeList() { RouteGridpointDBModel instance = new RouteGridpointDBModel(); List<Attribute> expResult = new ArrayList<>(); expResult.add(ROUTE_ID_ATTRIBUTE); expResult.add(GRID_X_ATTRIBUTE); expResult.add(GRID_Y_ATTRIBUTE); List<Attr...
[ "@Test\n public void testGetAllAttributeList() {\n RouteGridpointDBModel instance = new RouteGridpointDBModel();\n List<Attribute> expResult = new ArrayList<>();\n expResult.add(ROUTE_ID_ATTRIBUTE);\n expResult.add(GRID_X_ATTRIBUTE);\n expResult.add(GRID_Y_ATTRIBUTE);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.protocol.FuncModuleInfo func_module_info = 5;
protocol.Message.FuncModuleInfo getFuncModuleInfo();
[ "protocol.Message.FuncModuleInfoOrBuilder getFuncModuleInfoOrBuilder();", "public protocol.Message.FuncModuleInfo getFuncModuleInfo() {\n if (funcModuleInfoBuilder_ == null) {\n return funcModuleInfo_ == null ? protocol.Message.FuncModuleInfo.getDefaultInstance() : funcModuleInfo_;\n } else...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Concatena Ponto Y com Y1
static public int[] concatenarVetorY(int[] vetor_y, int[] vetor_y1) { int[] concatenarY = new int[vetor_y.length + vetor_y1.length]; int cont = 0; for (int i = 0; i < vetor_y.length; i++) concatenarY[cont++] = vetor_y[i]; for (int i = 0; i < vetor_y1.length; i++) concatenarY[cont++] = vetor_y1[i]; retu...
[ "static public int[] concatenarVetorX(int[] vetor_x, int[] vetor_x1) {\n\t\tint[] concatenarX = new int[vetor_x.length + vetor_x1.length];\n\t\tint cont = 0;\n\t\tfor (int i = 0; i < vetor_x.length; i++)\n\t\t\tconcatenarX[cont++] = vetor_x[i];\n\t\tfor (int i = 0; i < vetor_x1.length; i++)\n\t\t\tconcatenarX[cont+...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the primary key of this e s f match type.
@Override public void setPrimaryKey(long primaryKey) { _esfMatchType.setPrimaryKey(primaryKey); }
[ "@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_esfMatchResult.setPrimaryKey(primaryKey);\n\t}", "public void setPrimaryKey(long pk);", "@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_esfTournament.setPrimaryKey(primaryKey);\n\t}", "@Override\n\tpublic void setPrimaryKey(long...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get drawable based on the entities direction, number in sequence, or dead
public BufferedImage getDrawable(){ if(this.isOilContamination()){ return this.myFlyweight.getDeadDrawable(); } //check direction -- such a horrible way to write a method //redundant checking and ugh.... design this away please........................... if(this.getDirection().getX() > 0 && !this.myFlywei...
[ "DrawableType getType();", "private int getSourceDrawableIndex() {\n if (mPreviewImageDrawable.getDrawable(0).getClass()\n .equals(mPreviewImageDrawable.getDrawable(1).getClass())) {\n // At this point we know that user is using the SeekBar to adjust background, so that\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lowpass filter the data in a TimeSeriesTable at a provided cutoff frequency. If padData is true, then the data is first padded with pad() using numRowsToPrependAndAppend = table.getNumRows() / 2. The filtering is performed with Signal::LowpassIIR()
public static void filterLowpass(TimeSeriesTable table, double cutoffFreq) { opensimCommonJNI.TableUtilities_filterLowpass__SWIG_1(TimeSeriesTable.getCPtr(table), table, cutoffFreq); }
[ "public static void filterLowpass(TimeSeriesTable table, double cutoffFreq, boolean padData) {\n opensimCommonJNI.TableUtilities_filterLowpass__SWIG_0(TimeSeriesTable.getCPtr(table), table, cutoffFreq, padData);\n }", "public static void perform_lowpass (double[] data, int sampling_rate, double cutoff, int or...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the top level streams, which are the streams pointed to by the TrailerStream.
public Stream[] getTopLevelStreams() { return trailer.getPointedToStreams(); }
[ "public List<Stream> listStreams() {\n\t\tStreamCommand streamCommand = multiChainCommand.getStreamCommand();\n\t\ttry {\n\t\t\treturn streamCommand.listStreams(null);\n\t\t} catch (MultichainException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public List<Stream> getStream...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to get all the debt user
public static List<DebtUser> getAllDebtRecords() { return DebtUserDAO.findAll(); }
[ "public List<User> getAllUsers(){\n Controller controller= Controller.getInstance();\n List<User> users= new LinkedList<>();\n for(Map.Entry user: controller.getUsers().entrySet()){\n users.add((User)user.getValue());\n }\n return users;\n }", "public List<UserDeta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Float Variable'.
FloatVariable createFloatVariable();
[ "Float createFloat();", "FloatT createFloatT();", "FloatValue createFloatValue();", "public void createNewFloat(double value);", "Vector3fVariable createVector3fVariable();", "public FloatBase(org.semanticwb.platform.SemanticObject base)\r\n {\r\n super(base);\r\n }", "public abstract AnyFl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that excluded classes are not executed.
@Test public void testIgnore_excludedClasses() throws Throwable { RunNotifier notifier = spy(new RunNotifier()); RunListener listener = mock(RunListener.class); notifier.addListener(listener); Bundle ignores = new Bundle(); ignores.putString(LongevityClassRunner.FILTER_OPTION...
[ "@Test\n public void exclusionsTest() {\n // TODO: test exclusions\n }", "@Test\n public void excludedCancerTypesTest() {\n // TODO: test excludedCancerTypes\n }", "final public void testSingleExclude () {\n\tPatternFilter pattern = new PatternFilter (\"-:.*[.]class\") ;\n\tassertTrue ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int64 nvalues = 10;
public long getNvalues() { return nvalues_; }
[ "long getNvalues();", "public long getNvalues() {\n return nvalues_;\n }", "default long countValues() {\n\t\treturn values(Long.MAX_VALUE, false).value();\n\t}", "public int getInt64ValCount() {\n return int64Val_.size();\n }", "protected abstract int getValuesLength();", "int getRequ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads a long array from the stream.
public long[] readLongArray(final int maxLength) throws IOException { int len = readInt(); if (len == NULL_LIST_ARRAY_LENGTH) { // if length is negative, it's a null value return null; } checkLengthLimit(len, maxLength); long[] data = new long[len]; ...
[ "public abstract void read_long_array(int[] value, int offset, int\nlength);", "public long[] readLongArray() throws IOException {\n long[] a = new long[readCompressedUint()];\n for (int i = 0; i < a.length; ++i)\n a[i] = readLong();\n return a;\n }", "public abstract v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A handler for the export to PNG option in the context menu.
private void handleExportToPNG() { FileChooser chooser = new FileChooser(); chooser.setTitle("Export to PNG"); FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter( "Portable Network Graphics (PNG)", "*.png"); chooser.getExtensionFilters().add(filter); ...
[ "private void exportAsPng() {\n\t\ttry {\n\t\t\tunselectAllShapes();\n\t\t\t\n\t\t\tpnlDrawing.repaint();\n\t\t\t\n\t\t\tDimension size = pnlDrawing.getSize();\n\t\t\tBufferedImage image = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);\n\t\t\tGraphics g = image.createGraphics();\n\t\t\tpnlD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Check points: 1. the tabWidget view and tabContent view associated with tabHost are created. 2. no exception occurs when uses TabSpec.setContent(android.content.Intent) after setup().
@TestTargetNew( level = TestLevel.COMPLETE, method = "setup", args = {android.app.LocalActivityManager.class} ) public void testSetup2() throws Throwable { final ActivityGroup activity = launchActivity("com.android.cts.stub", ActivityGroup.class, null); ...
[ "private void setupTabHost() {\n final TabHost tabHost = findViewById(R.id.tabhost);\n tabHost.setup();\n\n //Creates a builder for TabHost and sets the content of the tab as the view set up in\n //activity-main.xml\n TabHost.TabSpec tabSpec1 = tabHost.newTabSpec(\"Mackor\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use SCAskFriendMarketListRet.newBuilder() to construct.
private SCAskFriendMarketListRet() {}
[ "private SCAskFriendListRet() {}", "private CSAskFriendMarketList() {}", "private ListFriendRequestRet(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "private ListFriendRet(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method that reads in a line of text and checks if the text is "quit". If the text is "quit" it will exit the game. Otherwise returns the input.
public static String getStringOrQuit(Scanner scan) { String input = scan.nextLine(); if(input.equalsIgnoreCase("quit")) { System.out.println("Thanks for playing! Goodbye!"); System.exit(0); } return input; }
[ "private void checkQuit(String input){\n if (input.contentEquals(\"quit\") || input.contentEquals(\"QUIT\") ){\n System.out.println(\"Thank you for using our Application!\");\n System.exit(0);\n }\n }", "private static boolean getQuit()\n {\n System.out.println(\"Do y...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
insertCalendarData method to insert data into calendar database
private void insertCalendarData(String mode) { ContentValues values = new ContentValues(); ContentResolver cr = getContentResolver(); //if updating, deletes old data and inserts new. if(mode.contentEquals(UPDATE)){ cr.delete(CalendarContentProvider.CONTENT_URI, ...
[ "void saveCalendar(Calendar calendar);", "public void insert() {\n\t\tCalendarCompat.registerCalendarEvent(this, title, location, description, startTime, endTime);\n\t\tfinish();\n\t}", "public void saveCalendarDate(DayModel calendarDate);", "public static void addAppointment(String title, String description,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getCommentString is used to get the CommentString
public String getCommentString() { return this.commentString; }
[ "public String getCommentText(){\n\t\treturn this.commentText;\n\t}", "@Override\n\tpublic java.lang.String getCommentText() {\n\t\treturn _comment.getCommentText();\n\t}", "public String getComment();", "public String commentText() {\n return getComment() != null ? getComment().commentText() : \"\";\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Specification of a service owned user entitlement to be used to link entitlements to code.
public interface IServiceEntitlementSpec extends IGeneralEntitlementSpec { /** * * @return The service owning the entitlement. */ MultiTenantService getOwner(); /** * Return the is of this entitlement given the external userId for the owner. * * @param ownerId The external userId for the owne...
[ "IEntitlementId getEntitlementId(PodAndUserId ownerId);", "public void grantEntitlementToUser(String userLogin, String appInstName, String entitlementCode, HashMap<String,Object> entitlementAttributes) throws NoSuchUserException, UserLookupException, UserNotFoundException, GenericProvisioningException, GenericEnt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Codecs must be threadsafe, the individual MingleEncoder or MingleDecoder instances which they return need not be (almost certainly: will not be)
public interface MingleCodec { public MingleEncoder createEncoder( Object me ) throws MingleCodecException; public < E > MingleDecoder< E > createDecoder( Class< E > cls ) throws MingleCodecException; }
[ "public VideoEncoderCore2(int width, int height, int bitRate)\n throws IOException {\n\n mHandlerThread = new HandlerThread(\"encode_worker\");\n mHandlerThread.start();\n mHandler = new PushStreamHandler(mHandlerThread.getLooper(), mFrameMessages);\n\n\n MediaFormat format = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the full path to the working directory
public String getWorkingDir() { return this.workingDir.getAbsolutePath(); }
[ "public String workingDirectory() {\n\t\treturn workingDir.getAbsolutePath();\n\t}", "static String getCurrentDirectory() {\n return workingDirectory.toString();\n }", "public String getWorkDir()\n \t{\n \t\ttry {\n \t\t\treturn workDir.getCanonicalPath();\n \t\t}\n \t\tcatch (IOException e)\n \t\t{\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
INTERNAL: Returns true if the content store contains an entry with the specified key.
boolean containsKey(int key) throws ContentStoreException;
[ "public boolean contains(Object key) {\n return cache.containsKey(key);\n }", "@Override\n\tpublic boolean contains(String key) {\n\t\t// recursive\n\t\treturn get(root, key,0) != null;\n\n\t}", "@Override\n\tpublic boolean containsKey(K key){\n\t\treturn subcaches.get(getIndex(key)).containsKey(key);\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle request to download a CSV document
@Secured({ AuthoritiesConstants.PROFESSOR }) @RequestMapping(value = "/submissions/download", method = RequestMethod.GET, produces = "text/csv") public void download(HttpServletResponse response) throws IOException { List<Submissions> listSubmissions = new ArrayList<>(); List<Submissions> subm...
[ "@RequestMapping(value = {\"downloadCsvFile\"})\r\n\tpublic void downloadCsvFile(@Valid DownLoadFilePara downLoadFilePara,\r\n\t\t\tHttpServletResponse response, HttpServletRequest request, \r\n\t\t\tRedirectAttributes redirect, ModelMap model) throws Exception {\r\n\t\tSampleModel sample = new SampleModel();\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SELECT p FROM Partner p WHERE p.customer = true
public List<Partner> findAllCustomer(){ Session session = em.unwrap(Session.class); Query<Partner> query = session.createNamedQuery("Partner.findByCustomer", Partner.class); return query.getResultList(); }
[ "public Partner findCustomerByName(String customerName){\n Session session = em.unwrap(Session.class);\n Query<Partner> query = session.createNamedQuery(\"Partner.findCustomerByName\", Partner.class);\n query.setParameter(\"name\", customerName);\n query.setParameter(\"isCustomer\", true...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Operation__Group_5_3__1__Impl" $ANTLR start "rule__Event__Group__0" ../com.mguidi.soa.ui/srcgen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3735:1: rule__Event__Group__0 : rule__Event__Group__0__Impl rule__Event__Group__1 ;
public final void rule__Event__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3739:1: ( rule__Event__Group__0__Impl rule__Event__Group__1 ) ...
[ "public final void rule__Event__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3751:1: ( ( '@event' ) )\n // ../com.mguidi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a map of datasets and included files for the current authentication context.
@Override public Map<String, List<String>> getDatasetFileMapping() { if (getAuthentication() instanceof OAuth2Authentication) { OAuth2Authentication authentication = (OAuth2Authentication) getAuthentication(); if (authentication != null && authentication.getUserAuthentication() instanceof Cu...
[ "public java.util.Map<java.lang.String, java.lang.String> getFilesMap() {\n return internalGetFiles().getMap();\n }", "Map<String, List<Dataset>> findPrivateDatasets();", "public Map<Long, PIAInputFile> getFiles() {\n return inputFiles;\n }", "public Map<String, String> getAllAssets(Context...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether the specified item stack can be charged. This is primarily meant to filter meta item subitems that are not meant to be chargeable.
boolean canCharge(ItemStack stack);
[ "public boolean isItemValid(ItemStack stack) {\n return stack.isDamageable() || stack.getItem() == Items.ENCHANTED_BOOK || stack.isEnchanted();\n }", "@Override\n\tpublic boolean canTakeStack(EntityPlayer playerIn) {\n\t\treturn !this.getItemHandler().extractItem(this.getIndex(), 1, true).isEmp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Utility method to convert the JWT claims into JSON for use by the display of this sample.
private static String claimsAsJson(Map<String, Claim> claims) { ObjectMapper objectMapper = new ObjectMapper(); ObjectNode node = objectMapper.createObjectNode(); claims.forEach((key, value) -> { if (value.asMap() != null) { node.putPOJO(key, value.asMap()); ...
[ "private String getPlainClaims() {\n StringWriter claimsWriter = new StringWriter();\n\n Json.createWriter(claimsWriter).writeObject(this.claims);\n\n return claimsWriter.getBuffer().toString();\n }", "String toToken(JwtClaims claims, SecretKey key);", "public String formatAsJSONString()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs DFT transofrmation and save is in "out" arraylist.
@Override void transform() { long begin = System.currentTimeMillis(); for(int k = 0; k< in.size(); ++k){ complex total = new complex(); for(int n=0;n<in.size();++n){ total.real = total.real + (in.get(n) * Math.cos((2*Math.PI*k*n)/in.size())); t...
[ "public DFT(){\r\n outreal = new ArrayList<>();\r\n outimag = new ArrayList<>();\r\n }", "private void fftAction() {\n float[] dataTemp = new float[outputDate.length];\n //此处添加dataTemp复制data数组中值,防止在排序后data数组值混乱,导致fft操作后重绘时域波形,发生错误。\n System.arraycopy(data, 0, dataTemp, 0, dat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for logdate. Convenient for those who do not want to deal with Objects for primary types.
public void setLogdate(long newVal) { setLogdate(new java.sql.Timestamp(newVal)); }
[ "public void setLogdate(java.sql.Timestamp newVal) {\n if ((newVal != null && this.logdate != null && (newVal.compareTo(this.logdate) == 0)) || \n (newVal == null && this.logdate == null && logdate_is_initialized)) {\n return; \n } \n this.logdate = newVal; \n logda...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Post employee attendance between processing date from and processing date to , either by employee wise or category wise
@Override public String postAttendanceProcessing(HrAttendanceDetailsTO hrAttendanceDetailsTO, String selectionCriteria, String selectedValues, String mode,String fromdate,String todate ) throws ApplicationException { long begin = System.nanoTime(); int compCode = hrAttendanceDetailsTO.getHrAttendanc...
[ "private int calTotalAttendanceDays(String month, String year, String empJoinDate,String fromDate,String toDate,String empId) {\r\n\t\tint totalAttendanceDays = 0;\r\n\t\tint resignDays = 0;\r\n\t\ttry {\r\n\t\t\tString startDate = \"01-\" + month + \"-\" + year;\r\n\t\t\tString endDate = getMonthDays(month, year) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
From the set of classes a new set is built containing all indexed subclasses, but removing then all subtypes of indexed entities.
private static Set<Class<?>> toRootEntities(final SearchFactoryImplementor searchFactoryImplementor, final Class<?>... selection) { final Set<Class<?>> entities = new HashSet<Class<?>>(); // first build the "entities" set containing all indexed subtypes of // "selection". for (final Clas...
[ "public Set<JClassType> getAllSubTypesOfClass() {\n\n Set<JClassType> result = new HashSet<>(directSubClasses);\n\n // Recursion stops, if the Set directSubClasses is empty\n for (JClassType directSubClass : directSubClasses) {\n result.addAll(directSubClass.getAllSubTypesOfClass());\n }\n\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluates the current Sequence.
public void evaluate() { int score = sequence.getScore(); // sequence has already been evaluated if (score > 0) { sequence.setScore(score); return; } int sum = 0; for (SingleConstraint c : singleConstraints) { sum += c.sumOfPen...
[ "public void evaluate() {\r\n Statistics.evaluate(this);\r\n }", "public void evaluate()\n\t{\n\t\tpheno.evaluate(geno);\n\t\t\n\t}", "public double eval() {\n getExpression();\n if (!exp.isEmpty())\n pos = 0;\n\n return evalExpression();\n }", "public final void e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Dashboard__PanelsAssignment_8" $ANTLR start "rule__Dashboard__PanelsAssignment_9_1" InternalMyDsl.g:14273:1: rule__Dashboard__PanelsAssignment_9_1 : ( rulePanel ) ;
public final void rule__Dashboard__PanelsAssignment_9_1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:14277:1: ( ( rulePanel ) ) // InternalMyDsl.g:14278:2: ( rulePanel ) { // InternalMyDsl.g:14278:2...
[ "public final void rule__Dashboard__PanelsAssignment_8() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:14262:1: ( ( rulePanel ) )\n // InternalMyDsl.g:14263:2: ( rulePanel )\n {\n // InternalM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field169' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField169() { field169 = null; fieldSetFlags()[169] = false; return this; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField168() {\n field168 = null;\n fieldSetFlags()[168] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the defending Pokemon hurt themselves in confusion Adds the appropriate case num to completed for both scenarios Confirms the correct stages for the attacking Pokemon
private void checkConfusionDamage(int caseNum, HashSet<Integer> completed, TestBattle battle, TestStages attackingStages) { TestPokemon attacking = battle.getAttacking(); TestPokemon defending = battle.getDefending(); // Did not hurt self in confusion -- move would be executed and attacking sta...
[ "void defenseChoosing() {\n\t\tif (defenseSelected == 1) {\n\t\t\tdefense = 1;\n\t\t\tmoatState = moatEnum.moatIntake;\n\t\t}\n\t\tif (defenseSelected == 2) {\n\t\t\tdefense = 2;\n\t\t}\n\t\tif (defenseSelected == 3) {\n\t\t\tdefense = 3;\n\t\t\trockWallState = rockWallEnum.rockWallIntake;\n\t\t}\n\t\tif (defenseSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devuelve true si existe la palabra clave especificada, false en caso contrario
public boolean existeEstaPalabraClave(PalabraClave palabraClave);
[ "@AssertTrue(message=\"La clave debe ser alfanumerica \")\r\n\tpublic boolean validarClave(){\r\n\t\tboolean a=StringUtils.isAlphanumeric(clave);\r\n\t\tboolean b=StringUtils.isNotBlank(clave);\r\n\t\treturn (a && b);\r\n\t}", "public boolean existeVacuna(String codigo){\n boolean resultado = false;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the data file exists.
public boolean exist_datafile() { return LayerManager.get_instance().exist_datafile(); }
[ "public boolean doesFileExist();", "public boolean existFile() {\n return this.file.exists();\n }", "@Override\n\tpublic boolean exists() {\n\t\treturn Files.exists(this.path);\n\t}", "public boolean checkIfFileExist(){\n if(f.exists()) {\n return true;\n }else{\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Locate and return the verification point BNSubcriptionRelCreated object in the SUT.
protected IFtVerificationPoint BNSubcriptionRelCreatedVP() { return vp("BNSubcriptionRelCreated"); }
[ "public CoverageSubscriber getSubscriberElement() { \n\t\tif (mySubscriber == null) {\n\t\t\tmySubscriber = new CoverageSubscriber();\n\t\t}\n\t\treturn mySubscriber;\n\t}", "String getContainmentReference();", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.NewSubscriberExtRequestSubscriber getSubscri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if stmt is copy register to register
private boolean isCopyStatement(LirNode stmt) { return (stmt.opCode == Op.SET && stmt.kid(0).opCode == Op.REG && stmt.kid(1).opCode == Op.REG); }
[ "@Test\n public void testRegisterCopy() {\n System.out.println(\"registerCopy\");\n boolean expResult = true;\n boolean result = instance.registerCopy();\n assertEquals(expResult, result);\n }", "boolean isSink(Stmt stmt);", "public boolean isCopyState() {\n\t\treturn true;\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Is Authorizable Algo Model' reference. If the meaning of the 'Is Authorizable Algo Model' reference isn't clear, there really should be more of a description here...
AnnJavaAlgoResourceModel getIsAuthorizableAlgoModel();
[ "AnnJavaResourceModel getIsAuthorizableResourceModel();", "AnnJavaResourceModelManager getIsAuthorizableModelManager();", "boolean hasExternalAttributionModel();", "public boolean hasAuthor() {\n return fieldSetFlags()[0];\n }", "public boolean isAuthorityIndex() {\n return \"metadataAuthorit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Must handle retrieving weather data by given coordinates
void handleWeatherDataForLocation(String lon, String lat);
[ "public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;", "public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;", "public void getWeather(double lat, double lon) {\n Log.d(TAG, \"getWeather called for lat: \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a note in vNote or SIFN format to a Note object. (client > server directrion) we have to set the original format of the input data
private Note convert(String content, String contentType) throws Exception { Note note = null; // Finds out which target type is required for (int i = 0; i < TYPE.length; i++) { if (contentType.equals(TYPE[i])) { // Bingo! // Uses the proper converter method ...
[ "private Note convert(SyncItem syncItem) throws Exception {\n return convert(getContentFromSyncItem(syncItem), syncItem.getType());\n }", "private String convert(Note note, String contentType)\n throws Exception {\n\n // Finds out which target type is required\n for (int i = 0; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new Bingo item.
public BingoItem(Parcel source) { setTitle(source.readString()); setImageUrl(source.readString()); }
[ "public static BingoItem generateItem(int position) {\n BingoItem item = new BingoItem();\n item.setTitle(\"BingoItem \" + position);\n\n Random randomGenerator = new Random();\n int width = randomGenerator.nextInt(300) + 200;\n int height = randomGenerator.nextInt(300) + 200;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the method under test.
public Method getTestMethod() { return method.getMethod(); }
[ "public Method getMethod() {\n return testResult.getMethod().getConstructorOrMethod().getMethod();\n }", "public static String currentMethodName() {\n String fm = CURRENT_TEST.get();\n if (fm != null) {\n return fm;\n } else {\n return \"<no current test>\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CONSTRUCTORS Declare a resource with the given number of instances available.
public RandomResource(int instances_) { super(instances_); stream = new UniformStream(0.0, 1.0); waitingList = new Vector(); }
[ "public ResourcePool(int nbR) {\r\n\t\tthis.nbRes = nbR;\r\n\t\tthis.availableR = new ArrayList<R>();\r\n\t\tfor(int i =0; i < nbRes; i++) {\r\n\t\t\tthis.availableR.add(this.createRes());\r\n\t\t}\r\n\t\tthis.busyR = new ArrayList<R>();\r\n\t}", "public void setInstances(final int number) {\r\n instances ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build the XML header for the return message.
protected String buildHeader(String documentType) { return ("<?xml version=\"1.0\" ?>" + "\n<!DOCTYPE " + documentType + " SYSTEM \"" + ConocoInformation.MESSAGE_DTD + "\">\n"); }
[ "public String getHeaderAsXML() {\n\n final String sep = System.getProperty(\"line.separator\");\n StringBuilder builder = new StringBuilder(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" + sep + \"<meta>\" + sep + \"<fits>\" + sep);\n\n HeaderCard headerCard;\n for (Cursor iter ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field tputs is set (has been assigned a value) and false otherwise
public boolean isSetTputs() { return this.tputs != null; }
[ "public boolean isSetTgets() {\n return this.tgets != null;\n }", "public boolean isSetT() {\n return this.t != null;\n }", "public boolean isSetTs() {\n return this.ts != null;\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetTget(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to validate the Power Tracker Message in Pay By Phone Email
public void validating_PPH_PowerTrackMessage() throws IOException, InterruptedException { navigateToFrame(); // To verify that Power Tracker Promo Message Header is displayed correctly or not in Email commonFunction.verifyElementPresentEqualsText(getPageElement(PayByPhoneObjects.lbl_PowertrackerHeader), PayBy...
[ "public void validatePayByphoneMail() throws InterruptedException, IOException\n\t{\n\t\tnavigateToFrame();\n\t\t\n\t\t// To verify that Customer Name is displayed correctly or not in Email\n\t\tcommonFunction.verifyElementPresentEqualsText(getPageElement(PayByPhoneObjects.lbl_CustomerName), PayByPhoneObjects.lbl_C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "OrganizationId" element
public com.microsoft.schemas._2003._10.serialization.Guid xgetOrganizationId() { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas._2003._10.serialization.Guid target = null; target = (com.microsoft.schemas._2003._10.serialization.Guid)get_s...
[ "com.google.protobuf.ByteString getOrganizationId();", "public java.lang.String getId_Organization() {\n return id_Organization;\n }", "public Number getOrganizationId() {\n return (Number) getAttributeInternal(ORGANIZATIONID);\n }", "public String getOrganizationId()\n\t{\n\t\treturn orga...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Writes the specified configurations to the specified file.
private void writeConfigs(File file, LinkedList<TestRerunConfiguration> configs, int numReruns) { try { ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file))); // Write the total number of configurations - subsequent reruns might remove configurations (if forking) ...
[ "void writeConfiguration(String fileName) throws IOException;", "private void writeConfigFile() {\n\n File configFile = new File(selectedConfigPath);\n\n FileOutputStream fos;\n\n try {\n configFile.delete();\n configFile.createNewFile();\n\n fos = new FileOut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The request builder for this collection of GovernanceSubject
public GovernanceSubjectCollectionRequestBuilder(final String requestUrl, final IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { super(requestUrl, client, requestOptions); }
[ "private GeofencingRequest getGeofencingRequest() {\n GeofencingRequest builder = new GeofencingRequest.Builder()\n .addGeofences(Constants.geofenceArrayList)\n .setInitialTrigger(Geofence.GEOFENCE_TRANSITION_ENTER)\n .setInitialTrigger(Geofence.GEOFENCE_TRANSITIO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use QuestAcceptRequestProto.newBuilder() to construct.
private QuestAcceptRequestProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private QuestAcceptResponseProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private AcceptReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private QuestRedee...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Abator for iBATIS. This method sets the value of the database column eventlist.eventid
public void setEventid(Integer eventid) { this.eventid = eventid; }
[ "public void setEventID(int value) {\r\n this.eventID = value;\r\n }", "public void setEventId(Number value) {\n setAttributeInternal(EVENTID, value);\n }", "public void setEVENTID(java.lang.Long value) {\n this.EVENT_ID = value;\n }", "@Override\n\tpublic void setEventId(long eventId)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deserializes a Trip from a ByteBuffer.
public static Trip fromByteBuffer( java.nio.ByteBuffer b) throws java.io.IOException { return DECODER.decode(b); }
[ "T deserialize(ByteBuffer byteBuffer);", "Object deserialize(ByteBuffer bb);", "public static TripleObject fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException {\n return DECODER.decode(b);\n }", "public static FinalTaskInfo fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the codingSchemeName value for this CodingScheme.
public void setCodingSchemeName(java.lang.String codingSchemeName) { this.codingSchemeName = codingSchemeName; }
[ "public java.lang.String getCodingSchemeName() {\n return codingSchemeName;\n }", "public void setCodingSchemeURI(java.lang.String codingSchemeURI) {\n this.codingSchemeURI = codingSchemeURI;\n }", "public void setScheme(String Scheme) {\n this.Scheme = Scheme;\n }", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set joining position field
public ImageBuffersReadyFlyweight joiningPosition(final long joiningPosition) { buffer().putLong(offset() + JOINING_POSITION_OFFSET, joiningPosition, ByteOrder.LITTLE_ENDIAN); return this; }
[ "public long joiningPosition()\n {\n return buffer().getLong(offset() + JOINING_POSITION_OFFSET, ByteOrder.LITTLE_ENDIAN);\n }", "@Override\n\tpublic void setJoined(int joined) {\n\t\t_commitment.setJoined(joined);\n\t}", "public abstract void addLeftColumnSuffix(\n PSSqlBuilderContext context...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Avanza hasta el siguiente mes del calendario
public void siguienteMes(){ //si la fecha es valida avanzando un mes if(esFechaValida(anio, mes+1, dia)){ this.setFecha(anio, mes+1, dia); return; } //si no, retocedemos el dia hasta que lleguemos al maximo del mes if(esFechaValida(anio, mes+1, dia-1)){ this.setFecha(anio, mes+1, dia-1); ...
[ "public void avanzarFecha()\n {\n day.incrementaValorAlmacenado();\n if(day.getValorAlmacenado() == 1){\n month.incrementaValorAlmacenado();\n if(month.getValorAlmacenado() == 1){\n year.incrementaValorAlmacenado();\n } \n }\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the text of the tag name TextVie to the tag String Set the container onClick to Intent to TagActivity
private void setupTagItemLayout() { tagNameTextView.setText(tag); tagLinearLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { IntentHelper.intentToTagActivity(context, tag); } ...
[ "void tagClicked (String tag);", "public void tagClick(View view)\n\t{\n\t\tif(view.getId() == R.id.tagTile33)\n\t\t{\n\t\t\t// Choose a random pic and go fullscreen\n\t\t\tIntent intent = new Intent(this, FullscreenActivity.class);\n\t\t\tintent.putExtra(\"IMAGE_ID\", Gallery.Singleton().getRandomId());\n\t\t\ts...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluates the double[] returning the result of the evaluation.
double evaluate(double[] values);
[ "double evaluate(double[] values, int begin, int length);", "public double evaluateAsDouble();", "public abstract double[] evaluate (\n\t\tfinal double[] adblVariate);", "public abstract double evaluate(double position[]);", "@Override\r\n\tprotected double evaluate(double[] values) throws EvaluationExcepti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a collection of API templates (recorded whenever a user promotes a template). This is a paged method similar to listApiDesignActivity().
public Collection<ApiTemplatePublication> listApiTemplatePublications(String designId, int from, int to) throws StorageException;
[ "public List<StoredApiTemplate> getStoredApiTemplates(ApiDesignType type) throws StorageException;", "public List<StoredApiTemplate> getStoredApiTemplates() throws StorageException;", "public ArrayList<Template> getTemplates() {\n\t\treturn getPageObjects(Template.class);\n\t}", "private Response findTemplate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the list of CC for each method in the specified class
public PairVector getCCs(){ return mccabe.getCCs(javaclass); }
[ "Object getCclist();", "public List<String> getNameCMethods(){\n return cMethods;\n }", "public List<ConversionMethod> getConversionMethods (Class<?> clazz){\r\n\t\tList<ConversionMethod> conversions = new ArrayList<ConversionMethod>();\r\n\t\tMap<String, List<ConversionMethod>> conversionsMap = this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
6. get a Node at position k O(n)
public Node getNode(int k) { int c = 0; Node p = head; while(p != null && c < k) { p = p.next; c ++; } return p; }
[ "public int getKthNodeFromEnd(int k){\n // [10 -> 20 -> 30 -> 40 -> 50]\n // k = 1(50) dist = 0;\n // k = 2(40) dist = 1\n\n if(isEmpty()) throw new IllegalStateException();\n\n int distance = k - 1;\n var pointerOne = first;\n var pointerSecond = first;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the associated media link, never null
@Override public Link getMediaLink() { if (mediaLink == null) { setMediaLink(new Link("#"), true); } return mediaLink; }
[ "String media(Link link) {\n return evaluator.attribute(link.id(), Attribute.media);\n }", "Link getEditMediaLink();", "URI getMediaURI();", "public org.hl7.fhir.Media getMedia()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Media target...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Name of the allocator used. string allocator_name = 6;
java.lang.String getAllocatorName();
[ "com.google.protobuf.ByteString\n getAllocatorNameBytes();", "public java.lang.String getAllocatorType() {\n java.lang.Object ref = allocatorType_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.go...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
render the image of the player depending on the next antibiotic to throw
@Override public void render(Graphics g) { if(antibioticos.size()>0){ g.drawImage(animBactCarg[antibioticos.peek().getTipoInt()].getCurrentFrame(), getX(), getY(), getWidth(), getHeight(), null); } else { g.drawImage(animBact.getCurrentFrame(), getX(), getY(), getWidth(...
[ "private void drawImagePlayer() {\n\n DropShadow dropShadow = new DropShadow(7,Color.BLACK);\n\n if (controller.getPlayer().getCrouching()) {\n\n iV_player.setImage(imageLoader.getImg_playerCrouched());\n\n } else {\n\n if(controller.getPlayer().getJumping()){\n\n iV_player...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form frameAddDepartments
public frameAddDepartments() { initComponents(); }
[ "public void addNewFlight () {\n final JFrame saFrame = new JFrame ();\n saFrame.setBackground (new java.awt.Color (255, 255, 255));\n saFrame.setSize (321, 360);\n saFrame.setLocationRelativeTo (null);\n saFrame.setType (java.awt.Window.Type.UTILITY);\n saFrame.setTitle (R...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Type qualifier' attribute. If the meaning of the 'Type qualifier' attribute isn't clear, there really should be more of a description here...
String getType_qualifier();
[ "default String qualifierTypeName() {\n return typeName().name();\n }", "Metadata.Restriction.Type getTyp();", "public String getQualificationType() {\n return qualificationType;\n }", "public String getQualifier() {\r\n\t\treturn (getAttributeValue(QUALIFIER_NAME));\r\n\t}", "public String ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns computed value for this attribute of specified item. This method is called only if mustBeCreateNewValueAtCreationTimeOfItem() method returns true.
public Object createNewValueFor(Item createdItem) throws CadseException;
[ "public boolean mustBeCreateNewValueAtCreationTimeOfItem();", "public String getCreateDateItem() {\n return createDateItem;\n }", "PropertyValue createPropertyValue();", "public VALUE_TYPE getValue(){\n\t\tDate date = new Date();\n\t\tlong currentTime = date.getTime();\n\t\tif (currentTime - lastUpd...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Incrementa os dados do voto no cache
public static void incrementVotesDataInCache(String contestSlug, Integer idCandidate) { // Adiciona os votos no cache do Redis, por contest redisCacheHelper.incrementValueInCache(getKeyCacheForVoteResultsByContest(contestSlug), 1); // Adiciona os votos no cache do Redis, por co...
[ "public void incrMetaCacheHit() {\n metaCacheHits.inc();\n }", "public void increment() {\n this.data++;\n }", "public void incrementaRivisteInPrestito() {\r\n\t\trivisteInPrestito += 1;\r\n\t}", "public void prestar(){\n vecesPrestado = vecesPrestado + 1;\n }", "public void incremen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns the value of the database column Vis_card_user.card_hao
public String getCardHao() { return cardHao; }
[ "public String getUserCardno() {\r\n return userCardno;\r\n }", "public void setCardHao(String cardHao) {\n this.cardHao = cardHao;\n }", "public String getUserCard() {\n return userCard;\n }", "public String getHealthcardno() {\n return healthcardno;\n }", "public int getH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a new JsonUrlGrammar.
public JsonUrlGrammar( CharIterator text, JsonUrlLimits limits, Set<JsonUrlOption> options) { super(text, limits, options); }
[ "private UrlParser() {}", "public Grammar() {\n unaryRulesMap = new HashMap<>();\n binaryRulesMap = new HashMap<>();\n }", "public URLBuilder(String url) {\n this.url = url;\n }", "public HttpURLBuilder() {\n\t\t// Empty\n\t}", "public RuleGroup(URL url, Grammar grammar) throws IO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'var109' field has been set.
public boolean hasVar109() { return fieldSetFlags()[110]; }
[ "public boolean hasVar108() {\n return fieldSetFlags()[109];\n }", "public boolean hasVar139() {\n return fieldSetFlags()[140];\n }", "public boolean hasVar102() {\n return fieldSetFlags()[103];\n }", "public boolean hasVar123() {\n return fieldSetFlags()[124];\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests cancel adding banner by editor.
@Test(groups = "wso2.ds.dashboard", description = "Cancel adding banner by editor") public void cancelAddingBannerByEditor() throws XPathExpressionException, MalformedURLException { login(editor.getUserName(), editor.getPassword()); goToDesigner(); clickEditBannerButton(0); ...
[ "@Test(groups = \"wso2.ds.dashboard\", description = \"Cancel adding banner by viewer\",\n dependsOnMethods = \"addBannerByEditor\")\n public void cancelAddingBannerByViewer()\n throws XPathExpressionException, MalformedURLException {\n login(viewer.getUserName(), viewer.getPassword(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Two BaseModels arre equal if the id is the same
@Override public boolean equals(Object other){ if(other instanceof BaseModel){ return this.id == ((BaseModel) other).getId(); } return super.equals(other); }
[ "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof DeviceDefault)) {\n return false;\n }\n DeviceDefault that = (DeviceDefault) other;\n Object myId = this.getId();\n Object yourId = that....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new ActualBlockKeyV1 RecordBuilder by copying an existing ActualBlockKeyV1 instance.
public static no.ruter.avro.entity.actual.block.key.ActualBlockKeyV1.Builder newBuilder(no.ruter.avro.entity.actual.block.key.ActualBlockKeyV1 other) { return new no.ruter.avro.entity.actual.block.key.ActualBlockKeyV1.Builder(other); }
[ "public static no.ruter.avro.entity.actual.block.key.ActualBlockKeyV1.Builder newBuilder(no.ruter.avro.entity.actual.block.key.ActualBlockKeyV1.Builder other) {\n return new no.ruter.avro.entity.actual.block.key.ActualBlockKeyV1.Builder(other);\n }", "public static no.ruter.avro.entity.actual.block.key.Actual...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if an entity is bleeding.
public static boolean isBleeding(LivingEntity entity){ return bleedingEntities.containsKey(entity); }
[ "public void checkEntityCollision() {\n\t\tEntity[] el = level.getDrawnEntities();\r\n\t\tfor (int i = 0 ; i < el.length ; i++) {\r\n\t\t\tif (el[i] != this && ((el[i].getClass() != TNT.class && el[i].getClass() != BlackHole.class) || el[i].isHostile)) {\r\n\t\t\tif (el[i].isTouching(this) && !el[i].getDying() && !...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fluent API Delimiter used in splitting messages. Can be turned off using the value false. The default value is ,
public SplitDefinition delimiter(String delimiter) { setDelimiter(delimiter); return this; }
[ "public void setDelims(String delims)\n {\n _delims = delims;\n }", "public void setDelimiter(String delimiter);", "public String getDelimiter() {\n return _delimiter;\n}", "public void setDelimiter(String delimiter) {\r\n this.delimiter = delimiter;\r\n }", "public void setDelimitator(St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This program generates a mad libbed story. Author: Andi Date: 27.03.2021 import java.util.Scanner;
public static void main(String[] args) { Scanner eingabe = new Scanner(System.in); System.out.println("Insert name: "); String name1 = eingabe.nextLine(); System.out.println("Insert adjective: "); String adjective1 = eingabe.nextLine(); System.out.println("Inser...
[ "public static void intro(){\n System.out.println(\"Welcome to the game of Mad Libs.\");\n System.out.println(\"I will ask you to provide various words\");\n System.out.println(\"and phrases to fill in a story.\");\n System.out.println(\"The result will be written to an output file.\");\n S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User clicked the "Upgrade to Premium" button.
public void onUpgradeAppButtonClicked(View arg0) { Log.d(TAG, "Upgrade button clicked; launching purchase flow for upgrade."); setWaitScreen(true); /* * TODO: for security, generate your payload here for verification. See * the comments on verifyDeveloperPayload() for more info. Since this is * a SA...
[ "public void onUpgradeAppButtonClicked(View arg0) {\n Log.d(TAG, \"Upgrade button clicked; launching purchase flow for upgrade.\");\n setWaitScreen(true);\n\n startBuyFlow(Skus.SKU_PREMIUM_ID);\n }", "public void onUpgradeAppButtonClicked(View arg0) {\n // Log.d(TAG, \"Upgrade button clicked; lau...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a MySQL backed model and reads the wordnet RDF files into it
public static void main(String args[]) { try { // Instantiate database driver Class.forName(mysqlDriver); } catch (ClassNotFoundException e) { System.err.println("MySQL driver class not found"); System.exit(-1); } // Get a connection to t...
[ "private void initOntology() {\n\n\tontology = ModelFactory.createDefaultModel();\n\t\t\t\n\ttry \n\t{\n\t\t//ontology.read(new FileInputStream(\"ontology.ttl\"),null,\"TTL\");\n\t\tontology.read(new FileInputStream(\"Aminer-data.ttl\"),null,\"TTL\");\n\t\t//ontology.read(new FileInputStream(\"SO data.ttl\"),null,\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XClosure__Group__1__Impl" $ANTLR start "rule__XClosure__Group__2" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:20477:1: rule__XClosure__Group__2 : rule__XClosure__Group__2__Impl rule__XClosure__Group__3 ;
public final void rule__XClosure__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:20481:1: ( rule__XClosure__Group__2__Impl ru...
[ "public final void rule__XClosure__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:20493:1: ( ( ( rule__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
and csol_from is null
public M csolFromNull(){if(this.get("csolFromNot")==null)this.put("csolFromNot", "");this.put("csolFrom", null);return this;}
[ "public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}", "public M csoqDistanceStartNull(){if(this.get(\"csoqDistanceStartNot\")==null)this.put(\"csoqDistanceStartNot\", \"\");this.put(\"csoqDistanceStart\", null);return this;}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the forward reference of the dual.
public final QuadEdge getForwardFromDual() { return dual.f; }
[ "public Reference getBaseRef()\r\n \t{\r\n \t return this.baseRef;\r\n \t}", "public final QuadEdge getForward() {\n return f;\n }", "public org.apache.xmlbeans.XmlDouble xgetRefX()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.Xm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Displays a trains GUI
public void showTrainGUI() { //Make sure to set it visible this.getTrainGUI().setTitle(this.getTrainID()); this.getTrainGUI().setVisible(true); }
[ "public AllTrainsUI() {\n initComponents();\n }", "public void setupGUI(){\n UI.addButton(\"All Stations\", this::listAllStations);\n UI.addButton(\"Stations by name\", this::listStationsByName);\n UI.addButton(\"All Lines\", this::listAllTrainLines);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor for the wall class
public Wall(){ xPos = 0; yPos = 0; bounds = new Rectangle(0,0,15,15); wallDestroyed = false; bounds.setFill(Color.BEIGE); }
[ "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "public WallWorld() {\n super();\n }", "public Wall()\n {\n super();\n setCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getPreparator method, of class PskEcDheServerKeyExchangeHandler.
@Test public void testGetPreparator() { assertTrue(handler.getPreparator(new PskEcDheServerKeyExchangeMessage()) instanceof PskEcDheServerKeyExchangePreparator); }
[ "@Test\n public void testGetPreparator() {\n assertTrue(handler.getPreparator(new ServerHelloDoneMessage()) instanceof ServerHelloDonePreparator);\n }", "@Test\n public void testGetParser() {\n assertTrue(handler.getParser(new byte[1], 0) instanceof PskEcDheServerKeyExchangeParser);\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets whether the decoder allows to loosen the masking requirement on received frames. It's not allowed by default.
public WebSocketClientBuilder allowMaskMismatch(boolean allowMaskMismatch) { this.allowMaskMismatch = allowMaskMismatch; return this; }
[ "public void setMaskBadChannels(boolean maskBadChannels){\n this.maskBadChannels = maskBadChannels; \n }", "void setApplyMask(boolean applyMask);", "public void setNotMask(final int aNotMask) {\n notMask = aNotMask;\n }", "void setMask();", "private void setBlocked(boolean value) {\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve data for issue whose id is supplied
private String getIssueData(Integer issue) { String data = "{}"; if (issue != null) { String issuesTable = env.getProperty("postgres.local.issuesTable"); if (issuesTable != null && !issuesTable.isEmpty()) { /* Other systems will use the issues Postgres table ...
[ "public java.util.Optional<Issue> findIssueById(String id);", "public String getIssue(String id) {\n String cred = env.getUserName()+\":\"+env.getPassword();\n String str = env.getURL();\n URI uri;\n String result = \"\";\n\t\ttry {\n\t\t\turi = new URI(\"https\", null, env.getURL(), -...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets row selected foreground.
public void setSelectedForeground(Color selectedForeground) { Color old = this.selectedForeground; this.selectedForeground = selectedForeground; this.firePropertyChange("selectedForeground", old, this.selectedForeground); this.repaint(); }
[ "public void setBackgroundSelectionColor(Color color);", "public void setSelected(Color selected)\r\n {\r\n this.selectedFg = selected;\r\n this.selectedBg = selected;\r\n }", "protected void setRowSelectedColor(Color rowSelectedColor) {\n this.rowSelectedColor = r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Decodes a geometry value from the result of a query specifying the column as an index.
Geometry decodeGeometryValue(final GeometryDescriptor descriptor, final ResultSet rs, final int column, final GeometryFactory factory, final Connection cx ) throws IOException, SQLException;
[ "private DB2GeometryColumn getGeometryColumn(String tableSchema,\n String tableName, String columnName) throws IOException {\n String geomKey = geomKey(tableSchema, tableName, columnName);\n DB2GeometryColumn gc = (DB2GeometryColumn) this.geometryColumns.get(geomKey);\n\n if (gc == null)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all employees on spesiffic shift.
public List<EmpEachShift> getAll(){ return empEachShiftList; }
[ "public ArrayList<Employee> getEmployeesForShift(int shift_id, String date){\n ArrayList<Employee> out = new ArrayList<>();\n if(setUp()){\n try{\n conn = getConnection();\n prep = conn.prepareStatement(\"SELECT b.* FROM Shift_list AS a NATURAL JOIN Employee AS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the specimen req.
private void setSpecimenReq(final Specimen objSpecimen) throws LabelException { if(objSpecimen.getSpecimenRequirement() == null && objSpecimen.getId() != null) { String hql = "select specimen.specimenRequirement from edu.wustl.catissuecore.domain.Specimen as specimen" +" where specimen.id="+ objSpecime...
[ "void setSpecimen(org.hl7.fhir.Specimen specimen);", "void setSpecimen(org.hl7.fhir.ResourceReference specimen);", "public io.confluent.developer.InterceptTest.Builder setReqMethod(java.lang.String value) {\n validate(fields()[6], value);\n this.req_method = value;\n fieldSetFlags()[6] = true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
builder factory method for ProjectCategoryRecommendationMeta
public static ProjectCategoryRecommendationMetaBuilder builder() { return ProjectCategoryRecommendationMetaBuilder.of(); }
[ "public static ProjectCategoryRecommendationMetaBuilder builder(final ProjectCategoryRecommendationMeta template) {\n return ProjectCategoryRecommendationMetaBuilder.of(template);\n }", "public static GeneralCategoryRecommendationBuilder builder() {\n return GeneralCategoryRecommendationBuilder.o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to close the cursor
public void closeCursor(Cursor cursor) { if (cursor != null && !cursor.isClosed()) { cursor.close(); } }
[ "private void closeCursor(Cursor cursor) {\n try {\n if (cursor != null)\n cursor.close();\n } catch (Exception e) {\n }\n }", "private void closeCursor(Cursor c) { // TEMPORARILY PUBLIC\n if (c != null) {\n c.close();\n }\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__GetAttributeBody__Group_1__0" $ANTLR start "rule__GetAttributeBody__Group_1__0__Impl" InternalAADMParser.g:16907:1: rule__GetAttributeBody__Group_1__0__Impl : ( Entity ) ;
public final void rule__GetAttributeBody__Group_1__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:16911:1: ( ( Entity ) ) // InternalAADMParser.g:16912:1: ( Entity ) { // InternalAADMPars...
[ "public final void rule__GetAttributeBody__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:16872:1: ( rule__GetAttributeBody__Group_0__1__Impl )\n // InternalAADMParser.g:16873:2: rule__GetAttribute...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for the calculated attribute ProductAttrValue
public String getProductAttrValue() { return (String)getAttributeInternal(PRODUCTATTRVALUE); }
[ "public Integer getProductAttributeValueId() {\n return productAttributeValueId;\n }", "public Number getPriceVal() {\n return (Number)getAttributeInternal(PRICEVAL);\n }", "public Number getValue() {\n return (Number) getAttributeInternal(VALUE);\n }", "public double getValue() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }