query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
/Loop 12 times, to display readings for each month
public static void displayData(){ for (int i = 0; i < 12; i++){ int month = i + 1; System.out.println("Month "+ month +"; Total rainfall: "+ monthlyTotalRain[i]+"; Highest temperature: "+ monthlyHighestTemp[i] ); } }
[ "private void onShowMonthlyOrderList() {\r\n System.out.println(\"Monthly Sales Report \");\r\n \r\n Map<String,Float> resultMap = reportService.calculateMonthlyTotal();\r\n Set<String> keys=resultMap.keySet();\r\n for(String yearMonth : keys){\r\n //2016,02\r\n St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generiert eine Instanz des SelectionDjinnAdapters.
public SelectionDjinnAdapter() { super(); }
[ "protected abstract Adapter createAdapter();", "@Override\n public ObjectAdapter getAdapter() {\n return new ObjectAdapter<>(\n Arrays.asList(choices), getActivity()\n );\n }", "protected abstract ListAdapter createAdapter();", "private void createAdapters() {\n // Av...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that it's possible to delete the annotation body using a reference to a different format.
@Test public void deleteAnnotationBodyWithContentNegotiation() throws IOException { InputStream is = getClass().getClassLoader().getResourceAsStream("rdfStructure/mess-ro/.ro/annotationBody.ttl"); addAnnotation(ro, annotationBodyPath, is); ClientResponse response = webResource.ur...
[ "@Test\n public void deleteAnnotationBody()\n throws IOException {\n InputStream is = getClass().getClassLoader().getResourceAsStream(\"rdfStructure/mess-ro/.ro/annotationBody.ttl\");\n addAnnotation(ro, annotationBodyPath, is);\n ClientResponse response = webResource.uri(ro).path...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate the bytecode for a collection proxy for the given type.
protected BCClass generateProxyCollectionBytecode(Class type) { assertNotFinal(type); Project project = new Project(); BCClass bc = project.loadClass(Strings.getPackageName (ProxyManagerImpl.class) + "." + type.getName().replace('.', '$') + "$" + nextProxyId() + PRO...
[ "protected byte[] generateProxyCollectionBytecode(Class type, boolean runtime, String proxyClassName) {\n assertNotFinal(type);\n String proxyClassDef = proxyClassName.replace('.', '/');\n String superClassFileNname = Type.getInternalName(type);\n String[] interfaceNames = new String[]{T...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form ExcelImportMonitor
private ExcelImportMonitor() { initComponents(); TableModelListener lsn = new TableModelListener() { // always scroll down to the newest added row @Override public void tableChanged(final TableModelEvent e) { SwingUtilities.invokeLater(new Ru...
[ "public VistaExcel() {\n initComponents();\n }", "public FormImportar() {\n initComponents();\n }", "public ReportJFrame() {\n initComponents();\n }", "Monitor createMonitor();", "private void setupOpnameImportDialog( ) {\n\t// Create modal dialog for editing opname record\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the style of the overlay primitive
public abstract void setStyle(VectorOverlayStyles style);
[ "public void setStyle(Style newStyle){\r\n\tstyle = newStyle;\r\n }", "public void setStyle(int style)\r\n {\r\n this.style = style;\r\n }", "public abstract void setBezelStyle(int style);", "public void setStylePanel(StylePanel stylePanel);", "public void setOverlay(PlacementOverlay overlay);", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a spring whose minimum, preferred, maximum and value properties are defined by the widths of the minimumSize, preferredSize, maximumSize and size properties of the supplied component. The returned spring is a 'wrapper' implementation whose methods call the appropriate size methods of the supplied component. The...
public static Spring width(Component c) { checkArg(c); return new WidthSpring(c); }
[ "public float getSpringSize() {\r\n\t\treturn springSize;\r\n\t}", "public float getMinSpringSize() {\r\n\t\treturn minSpringSize;\r\n\t}", "Dimension getSize(Component component);", "public Component sizeComponent(Component component, double ratio) {\n\t\tif (component != null) {\n\t\t\tRectangle rect = calc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to save a drag on the screen. This works by capturing 2 points, the beginning point of the drag and the ending point of the drag. The user can drag how ever and wherever they want, as long as they initially start at the beginning point and end at the ending point.
public abstract void captureDrag(float[] startingPoint, float[] endingPoint, int sequenceNumber);
[ "Shape recordDragPoint(Point theEndPoint);", "public void mouseDragged(MouseEvent e) {\n\n try {\n dragEndScreen = e.getPoint();\n //Create a point2d.float with the\n Point2D.Float dragStart = transformPoint(dragStartScreen);\n Point2D.Float dragEnd = transformPo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the criterionType value for this SmmCriteria.
public void setCriterionType(java.lang.Short criterionType) { this.criterionType = criterionType; }
[ "public void setCriteriaType(String criteriaType)\r\n\t{\r\n\t\tthis.criteriaType = criteriaType;\r\n\t}", "public String getCriteriaType()\r\n\t{\r\n\t\treturn criteriaType;\r\n\t}", "com.google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType getType();", "com.google.ads.googleads.v13.enums.FeedMappin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse an SVG ellipse element and convert it to a JR ellipse
private JRDesignEllipse parseEllipse(SVGOMEllipseElement ellipseElement, AffineTransform previousTransform) { JRDesignEllipse result = new JRDesignEllipse(jConfig.getJasperDesign()); AffineTransform newTransofrm = getTransofrm(ellipseElement); previousTransform.concatenate(newTransofrm); double cx = Double....
[ "public String toSVG() {\n\n StringBuilder toReturn = new StringBuilder();\n toReturn.append(\"<svg width=\" + \"\\\"\" + Integer.toString(this.width)\n + \"\\\"\" + \" height=\" + \"\\\"\" + Integer.toString(this.height)\n + \"\\\"\" + \" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all rows from the T_DEVICE_INFO table that match the criteria 'RCOMMUNITY = :rcommunity'.
public List<TDeviceInfo> findWhereRcommunityEquals(String rcommunity) throws TDeviceInfoDaoException;
[ "public List<TDeviceInfo> findWhereWcommunityEquals(String wcommunity) throws TDeviceInfoDaoException;", "public List<TDeviceInfo> findWhereSridEquals(long srid) throws TDeviceInfoDaoException;", "public List<TDeviceInfo> findWhereRsnoEquals(String rsno) throws TDeviceInfoDaoException;", "public List<TDeviceI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public boolean contains(Packet p) Method to insert a packet into this message.
public void insert(Packet p) { this.packetMap.put(p.getPacketID(), p); this.messageID = p.getMessageID(); this.packetCount = p.getPacketCount(); }
[ "public void add(AisPacket p) {\n throw new UnsupportedOperationException(\"Stream is immutable\");// default stream is immutable.\n }", "private boolean addPacketToQueue(Queue<IPacket> queue, IPacket inPacket) {\n\t\tboolean success = false;\n\n\t\ttry {\n\t\t\tsuccess = queue.add(inPacket);\n\t\t} cat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replace "\n" characters by the systemdefined newline sequence and return as bytes.
private static byte[] newlineFix(String expText) { String newline = System.getProperty("line.separator"); return expText.replace("\n", newline).getBytes(); }
[ "private String convertNewlines( String input ) {\n String result = StringUtils.replace(input, \"\\r\\n\", BR_TAG);\n return StringUtils.replace(result, \"\\n\", BR_TAG);\n }", "public static String getNewLine() {\n\n\t\tif (isMacOSX())\n\t\t\treturn \"\\n\";\n\n\t\tif (isLinux())\n\t\t\treturn \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluates the "substring" function as per example 7 (for this function) from the F and O specs.
public void test_fn_substring_7() throws Exception { String inputFile = "/TestSources/emptydoc.xml"; String xqFile = "/Queries/XQuery/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-7.xq"; String resultFile = "/ExpectedTestResults/Functions/AllStringFunc/GeneralStringFunc/Subst...
[ "public void test_fn_substring_1() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-1.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/GeneralStr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the past/current status of a team at an event.
public static EventStatus evaluateStatusOfTeam(Event e, List<Match> teamMatches, String teamKey) { // There might be match info available, // but no alliance selection data (for old events) JsonArray alliances = JSONHelper.getasJsonArray(e.getAlliances()); int year = 2014; ...
[ "@java.lang.Override public com.google.ads.googleads.v14.enums.SeasonalityEventStatusEnum.SeasonalityEventStatus getStatus() {\n com.google.ads.googleads.v14.enums.SeasonalityEventStatusEnum.SeasonalityEventStatus result = com.google.ads.googleads.v14.enums.SeasonalityEventStatusEnum.SeasonalityEventStatus.forNu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The type of debit disbursement transaction.
@javax.annotation.Nullable @ApiModelProperty(example = "FUNDING", value = "The type of debit disbursement transaction.") public DisbursementTransTypeEnum getDisbursementTransType() { return disbursementTransType; }
[ "public String getDepositType() {\n\t\treturn depositType;\n\t}", "public String getDirectDebitArrangementType() {\n return directDebitArrangementType;\n }", "public ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType xgetDebtType()\n {\n synchronized (monitor())\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find a PetType by its primary key
public static PetType findByPrimaryKey(Long idPetType) throws H2ZeroFinderException { PetType petType = null; Connection connection = null; if(null == idPetType) { throw new H2ZeroFinderException("Could not find result as the primary key field [idPetType] was null."); } try { connection = ConnectionMa...
[ "public static PetType findByPrimaryKey(Connection connection, Long idPetType) throws H2ZeroFinderException {\n\t\tPetType petType = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\tif(null == idPetType) {\n\t\t\tthrow new H2ZeroFinderException(\"Could not find result a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of proteins associated with this peptide.
public List<ProteinHit> getProteinList() { return proteinHits; }
[ "public static CypherQuery getPeptidesByProteins() {\n\t\t\n\t\tList<CypherStartNode> startNodes = new ArrayList<CypherStartNode>();\n\t\tstartNodes.add(new CypherStartNode(\"peptides\", NodeType.PEPTIDES, ProteinProperty.IDENTIFIER, \"*\"));\n\t\t\n\t\tList<CypherMatch> matches = new ArrayList<CypherMatch>();\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete a routine from the maintenance table
public boolean deleteMaintenanceRoutine(MaintanceRoutinesClass routine) { return mWritableDB.delete(TABLE_MAINTANCE, TABLE_MAINTANCE_MID + "=" + String.valueOf(routine.getMid()), null) > 0; }
[ "private void deleteRoutine() {\n String message = \"Are you sure you want to delete this routine\\nfrom your routine collection?\";\n int n = JOptionPane.showConfirmDialog(this, message, \"Warning\", JOptionPane.YES_NO_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n Routine r = list...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the full path filename of Web image Text file corresponding to the web text file name
public static String getWebImageTextFileNameFullPath(String sParentFolder, String sWebTextFileName) { String sWebImageTextFileNameFullPath = ""; String sPlaceName = getPlaceNameFromWebTextFileName(sWebTextFileName); sWebImageTextFileNameFullPath = sParentFolder + File.separator + WEB_IMAGE_TEXT_FOLDER + File...
[ "java.lang.String getFilename();", "java.lang.String getFileName();", "private String getFileName(String url) {\n // get the begin and end index of name which will be between the\n //last \"/\" and \".\"\n int beginIndex = url.lastIndexOf(\"/\")+1;\n int endIndex = url.lastIndexOf(\".\");\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The signature for the resulting context. string linked_context = 2;
public com.google.protobuf.ByteString getLinkedContextBytes() { java.lang.Object ref = linkedContext_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); ...
[ "java.lang.String getLinkedContext();", "public java.lang.String getLinkedContext() {\n java.lang.Object ref = linkedContext_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.goog...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the HTML tree is valid. This check is more specific to standard doclet and not exactly similar to W3C specifications. But it ensures HTML validation.
public boolean isValid() { switch (htmlTag) { case A : return (hasAttr(HtmlAttr.NAME) || (hasAttr(HtmlAttr.HREF) && hasContent())); case BR : return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR))); case FRAME : retur...
[ "public boolean isHTML () {\n return root != null;\n }", "public boolean checkHTML(){\n\t\t\t//checks if every start tag has an end tag\n\t\t\tHTMLTag htmlToCheck = this.getTag();\n\t\t\tif(htmlToCheck.getEndTag()!=null){\n\t\t\t\tfor(DocumentElement de : htmlToCheck.getChildren()){\n\t\t\t\t\tif(de.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end DECLARATION $ANTLR start PROCEDURE
public final void mPROCEDURE() throws RecognitionException { try { int _type = PROCEDURE; // /Users/benjamincoe/HackWars/C.g:14:11: ( 'procedure' ) // /Users/benjamincoe/HackWars/C.g:14:13: 'procedure' { match("procedure"); } ...
[ "public interface ProcedureDecl extends CodeDecl \n{\n /** The procedure's name. */\n Id name();\n \n /** The procedure's flags. */\n FlagsNode flags();\n\n /**\n * The procedure's formal parameters.\n * @return A list of {@link polyglot.ast.Formal Formal}.\n */\n List<Formal> forma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
unlocks the function from the cache after certain time lapsed
public boolean unLockFunctionFromCache(int function_id) throws Exception { SchedulerDB sdb=SchedulerDB.getSchedulerDB(); try{ sdb.connectDB(); String usr=new SchedulerMgmt(getRequest()).getAuthorizedUser(sdb); removeLockFromCache(function_id,usr); return true; }catch(Exception e){ e.printStackTrac...
[ "void lockExpired(String lock);", "long lockTimeMills();", "protected void cacheMiss()\n {\n }", "void unlockMap();", "protected void unlockIfExpired(String inPath)\n\t{\n\t\tEditLock lock = getEditLock(inPath);\n\n\t\tif ((lock != null) && lock.isExpired())\n\t\t{\n\t\t\tgetPathToLockMap().remove(inPat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the modified date of this ib order.
@Override public void setModifiedDate(Date modifiedDate) { _ibOrder.setModifiedDate(modifiedDate); }
[ "@Override\n\tpublic void setModifiedDate(Date modifiedDate) {\n\t\t_bookOrder.setModifiedDate(modifiedDate);\n\t}", "public void setModified(Date modified)\n {\n this.modified = modified;\n }", "@Override\n\tpublic void setModifiedDate(Date modifiedDate);", "public void setModifiedDate(Date modi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove submissions older then given date from repository.
void purgeSubmissions(Date threshold);
[ "void deleteOlderThan(Date date);", "public void removeByDate(Date date);", "public void removeByUploadedDate(Date uploadedDate);", "public void cleanOld() {\n\t\tSimpleDateFormat sdfDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.DATE, -1);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable the idle timeout
public void disableIdleTimer() { try { mService.disableIdleTimer(); } catch (Exception e) { Log.w(TAG, "Error disabling idle timer", e); } }
[ "private void stopIdleDetectionTimer() {\n\t\tif (this.idleDetectionTimer != null) {\n\t\t\tthis.idleDetectionTimer.stop();\n\t\t\tthis.idleDetectionTimer = null;\n\t\t}\n\t}", "public void setIdleTimeout(int idleTimeout) {\n this.idleTimeout = idleTimeout;\n }", "public void setIdleTimeout(long idleTimeout...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
removes the feature at the submitted index from the collection
public Feature remove( int index );
[ "Feature removeFeature(int index);", "void removeFeature(int i);", "protected void removeFromIndex(SimpleFeature feature) {\n\t\tif (feature==null) return;\n\t\t\n\t\t// ID Index\n\t\tidIndex.remove( feature.getID() );\n\t\t\n\t\t// Type name index\n\t\tName type = feature.getType().getName();\n\t\tSet<SimpleFe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleTV_spec" $ANTLR start "entryRuleImplementableStandard" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1741:1: entryRuleImplementableStandard : ruleImplementableStandard EOF ;
public final void entryRuleImplementableStandard() throws RecognitionException { try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1742:1: ( ruleImplementableStandard EOF ) // ../org.xtext.example.rmodp.ui/src-gen/or...
[ "public final void rule__TV_spec__ImplementableStandardsAssignment_4() 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:30...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the siac r variazione stato.
public SiacRVariazioneStato addSiacRVariazioneStato(SiacRVariazioneStato siacRVariazioneStato) { getSiacRVariazioneStatos().add(siacRVariazioneStato); siacRVariazioneStato.setSiacTEnteProprietario(this); return siacRVariazioneStato; }
[ "public void setSiacRVariazioneStatos(List<SiacRVariazioneStato> siacRVariazioneStatos) {\n\t\tthis.siacRVariazioneStatos = siacRVariazioneStatos;\n\t}", "public SiacRVariazioneAttr addSiacRVariazioneAttr(SiacRVariazioneAttr siacRVariazioneAttr) {\n\t\tgetSiacRVariazioneAttrs().add(siacRVariazioneAttr);\n\t\tsiac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the URL that describes the location of the Marketcetera Exchange server.
@DisplayName("The URL for the Marketcetera Exchange Server") public void setURL(@DisplayName("The URL for the Marketcetera Exchange Server") String inURL);
[ "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public String getURL();", "void setURL(java.lang.String url);", "public void setConfigURL(String U) {\n properties.setProperty(\"URL\", U);\r\n }", "public static void setUrl() {\n\t\t// expetedUrl=\"https://delaware.craigslist.org...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column z_water_record.water_fee
public void setWaterFee(Integer waterFee) { this.waterFee = waterFee; }
[ "public Integer getWaterFee() {\n return waterFee;\n }", "public void setFee(int fee)\n {\n this.fee = fee;\n }", "public static native void CommitmentUpdate_set_update_fee(long this_ptr, long val);", "public void setBookingFee(double bookingFee)\r\n {\r\n this.bookingFee = bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert an integer to a boolean.
public static boolean intToBool(int v) { if (v == 0) return false; else return true; }
[ "public Boolean int_to_boolean(int arg){\r\n\t\tif (arg == 1)\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t}", "public static boolean toBoolean(int i){\n return ((i>0)?true:false);\n }", "boolean getConvertBoolToInt();", "public static boolean convertInt(int value)\n {\n return (va...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "matrixRows" $ANTLR start "matrixColumns" CalcLab.g:172:1: matrixColumns returns [ArrayList value] :e1= expression ( ( ' ' | ARGUMENTS_SEPARATOR ) e2= expression ) ;
public final ArrayList<Operand> matrixColumns() throws RecognitionException { ArrayList<Operand> value = null; ParserRuleReturnScope e1 =null; ParserRuleReturnScope e2 =null; try { // CalcLab.g:173:2: (e1= expression ( ( ' ' | ARGUMENTS_SEPARATOR ) e2= expression )* ) // CalcLab.g:173:4: e1= expression...
[ "public final Operand matrixRows() throws RecognitionException {\n\t\tOperand value = null;\n\n\n\t\tArrayList<Operand> a1 =null;\n\t\tArrayList<Operand> a2 =null;\n\n\t\ttry {\n\t\t\t// CalcLab.g:166:2: (a1= matrixColumns ( EXPRESSIONS_SEPARATOR a2= matrixColumns )* )\n\t\t\t// CalcLab.g:166:4: a1= matrixColumns (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets random shortcuts and returns them in Map (Set (String (shortcut)) > String (action name)).
private Map<Set<String>,ShortcutAction> setRandomShortcuts(final MutableShortcutsModel model) { final int[] ii = {1}; final Map<Set<String>,ShortcutAction> result = new HashMap<Set<String>,ShortcutAction>(); System.out.println("set random shortcuts"); forAllActions (model, new R () { ...
[ "private Map<Set<String>,ShortcutAction> getShortcuts(final MutableShortcutsModel model) {\n final Map<Set<String>,ShortcutAction> result = new HashMap<Set<String>,ShortcutAction>();\n System.out.println(\"get shortcuts\");\n forAllActions (model, new R () {\n public void run (Mutabl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the report phrase.
public String getReportPhrase () { return "with author"; }
[ "public String getReportPhrase () {\n\t\treturn \"in\";\n\t}", "public String getReport() {\n return reportDoc.toString();\n }", "public String getReport();", "public String getPhrase() {\n return this.phrase;\n }", "public String getReportDescription()\n {\n return reportDescr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when logoimageview clik open implicit intent
public void imageclick(View view) { //for logo image upload Intent i =new Intent(); i.setType("image/*"); i.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(i,"select an image"),imagerequestcode); ...
[ "protected void logoOnlick(View view){\n startActivity(new Intent(this, CaloryIntakeActivity.class));\n finish();\n }", "protected void logoOnlick(View view) {\n startActivity(new Intent(this, CaloryIntakeActivity.class));\n finish();\n }", "@Override\n\t\t\tpublic void onClic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test is there is at least one child which is aligned. Non recursive fonction.
private boolean hasChildAligned(DefaultMutableTreeNode node, int number) { Enumeration<DefaultMutableTreeNode> allSubNodes = node.breadthFirstEnumeration(); while(allSubNodes.hasMoreElements()) { // Le noeud "node" en parametre est inclu dans la boucle, donc je m'auto-test dans la foulée DefaultMutableTreeNod...
[ "private boolean correctlyAligned(NodeAlignment newAlignment,\n\t\t\tList<DrawMindMap> children) {\n\t\tif (newAlignment == NodeAlignment.TOP || newAlignment == NodeAlignment.BOTTOM) {\n\t\t\tfor (int i = 1; i < children.size(); i++) {\n\t\t\t\tint rightOfLeft = children.get(i - 1).rectangle.getRight();\n\t\t\t\tin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add charge count method
public TrnChargeCount addChargeCount(TrnChargeCount chargeCount){ return chargeCountDao.addChargeCount(chargeCount); }
[ "public List<TrnChargeCount> listChargeCount(){\r\n\t\treturn chargeCountDao.listChargeCount();\r\n\t}", "Charge(){\n\n\t}", "public void addCharge(double chargeAmount) {\n balance -= chargeAmount;\n\n }", "public void incrementChargeNumber() {\r\n mesh.incrementChargeNumber(myIndex);\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The operation that the specified job is configured to run on the objects listed in the manifest.
public void setOperation(JobOperation operation) { this.operation = operation; }
[ "public JobOperation getOperation() {\n return this.operation;\n }", "public IModifiableMultiEntryOperation getActualOperation();", "public Dsjob getJobObject() { return job; }", "java.lang.String getJob();", "public abstract Utility.Job getJob();", "public interface OperationJobExtendedInfo {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recursively computes plan quality as number of inconsistencies + weighted value for nonpersistent steps in a level + recursive cost calculation for unsupported preconditions.
private int calculateQuality() { int quality = inconsistencyCount; /* found solution */ if (inconsistencyCount == 0) return 0; /* add cost for each unsupported precondition*/ for(InconsistencyIterator iterator = new InconsistencyIterator(); iterator.hasNext();) { LPGInconsistency inconsistency...
[ "private int costToSupport(PlanGraphStep step, int currentLevel) {\n\t\t\n\t\tint cost = 0;\n\t\t\n\t\t/* make sure we can achieve step */\n\t\tif(step.getInitialLevel() != -1 && step.getInitialLevel() <= currentLevel) {\n\t\t\t\n\t\t\t/* cost of achieving a step is the max over the cost of achieving the preconditi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
read status of the specified CronJob
@Test public void readNamespacedCronJobStatusTest() throws ApiException { String name = null; String namespace = null; String pretty = null; V1beta1CronJob response = api.readNamespacedCronJobStatus(name, namespace, pretty); // TODO: test validations }
[ "public JobStatus getStatus();", "public JobStatus getStatus() {\n return this.status;\n }", "public int getJob_status() {\r\n return getAsNumber(\"job_status\").intValue();\r\n }", "public StatusCheckDataObject getJob_StatusCheck() {\r\n return job_StatusCheck;\r\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Name : expandCompositChar Function: LamAlef needs special handling as the LamAlef is one character while expanding it will give two characters Lam + Alef, so we need to expand the LamAlef in near or far spaces according to the options the user specifies or increase the buffer size. Dest has enough room for the expans...
private int expandCompositChar(char[] dest, int start, int length, int lacount, int shapingMode) throws ArabicShapingException { int lenOptionsLamAlef = options & LAMALEF_MASK; int le...
[ "private boolean expandCompositCharAtBegin(char[] dest,int start, int length,\n int lacount) {\n boolean spaceNotFound = false;\n\n if (lacount > countSpacesRight(dest, start, length)) {\n spaceNotFound = true;\n return spaceNotFound;\n }\n for (int r = sta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the tool is failed. By default, shows a error dialog with the details of the failure. THIS METHOD WILL BE INVOKED ON THE EVENTDISPATCH THREAD (EDT)!
protected void onToolFailed( final Exception aException ) { ToolUtils.showErrorMessage( getOwner(), "Tool failed!\nDetails: " + aException.getMessage() ); }
[ "protected void failed() {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n\n alert.setTitle(\"Error: Couldn't load image\");\n alert.setHeaderText(\"Could not load the selected item image\");\n alert.setContentText(\"The requested image could not be lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a calendar user's display name, falling back to his email or URI properties as needed.
public static String getDisplayName(CalendarUser calendarUser) { if (Strings.isNotEmpty(calendarUser.getCn())) { return calendarUser.getCn(); } if (Strings.isNotEmpty(calendarUser.getEMail())) { return calendarUser.getEMail(); } return CalendarUtils.extrac...
[ "public static String getUserDisplayName() {\r\n return getUsername();\r\n }", "java.lang.String getDisplayName();", "public static String getUserDisplayName() {\n // TODO: to be changed\n /*\n * String result = null; Uri databaseUri =\n * Uri.parse(\"content://com.orange...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column CIF_PROXY_BENEF_DET.TO_DATE
public Date getTO_DATE() { return TO_DATE; }
[ "public Date getToDate() {\n\t\treturn toDate;\n\t}", "public Date getToDate() {\n return (Date)getAttributeInternal(TODATE);\n }", "public String getOfferToDt() {\n return this.to_dt;\n }", "public Number getBudgetAsToDate() {\n return (Number)getAttributeInternal(BUDGETASTODATE);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executes the last open command if no arguments are specified. If l is specified prints a list of the last opened files. If a number (n) is specified as an argument the nth recent file is opened.
private void cmdReOpen(String line) { line = (line == null ? "" : line.trim()); LimitedStack<String> recentFiles = Options.getRecentFiles(); if (line.startsWith("-l")) { if (recentFiles.isEmpty()) { Log.println("No files were opened, yet."); return; } in...
[ "public String getNLastCommand(int n) {\n return history.get(history.size() - n);\n }", "public void showLast() {\n L.showLast();\n }", "public abstract long getLastOpenedAt();", "void recordOpenFiles(int delta);", "void seekToLast();", "public static void logOpenFiles( boolean listFil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sortByTime Ascending order: min > max
public ArrayList<Playable> sortByTime(){ Collections.sort(playableList, new TimeComaparator() ); return this.playableList; }
[ "private static Comparator<Event> sortTimeComparator() \n\t{\n\t\treturn new \n\t\t\t\tComparator<Event>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic int compare(Event event1, Event event2) {\n\t\t\t\tif (event1.getStart().substring(0, 2).equals(event2.getStart().substring(0, 2))) {\n\t\t\t\t\treturn Integer.parseInt(e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ courseId, semesterId, centerId
@Override public CourseSemester getByCourseIdAndSemesterIdAndCenterId( Long courseId, Long semesterId, Long centerId) throws Exception { return courseSemesterRepository .findByCourseIdAndSemesterIdAndCenterIdAndStatusNot(courseId, semesterId, centerId, Status.DELETED) ...
[ "@PreAuthorize(\"isAuthenticated()\")\n List<Course> findCoursesForSubjectAndCurrentSemester(\n Subject subject);", "List<Course> getCourses(long institutionId);", "courses selectByPrimaryKey(String courseId);", "@PreAuthorize(\"isAuthenticated()\")\n List<Course> findCoursesForCurrentSemeste...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds all pairs within values which sum up to targetSum
public Collection<MatchingPair> matchingPairs(Collection<Integer> values, Integer targetSum) { HashMap<Integer, Integer> tableCompteur = new HashMap<>(); LinkedHashMap<Integer, Integer> tablePaire = new LinkedHashMap<Integer, Integer>(); Collection<MatchingPair> paireSansDuplication = new Li...
[ "static boolean pairSum(int[] nums, int targetSum) {\n HashMap<Integer, Integer> hm = new HashMap<>();\n int appearsTwice = 0;\n for (int i=0; i<nums.length; i++) {\n if(!hm.containsKey(nums[i]))\n hm.put(nums[i],0);\n hm.put(nums[i], hm.get(nums[i])+1);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the location of the picture thumbnail
public void setThumbnailLocation(String thumbnailLocation) { this.thumbnailLocation = thumbnailLocation; }
[ "public void setThumbnail(Image thumbnail) {\r\n this.thumbnail = thumbnail;\r\n }", "void setThumbnail(Bitmap thumbnail) {\n\t\tthis.mThumbnail = thumbnail;\n\t}", "void setImageLocation(URL imageLocation) throws IOException;", "public String getThumbnailLocation() {\n\t\treturn this.thumbnailLocat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstType__Group_0_1_0__2" $ANTLR start "rule__AstType__Group_0_1_0__2__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20218:1: rule__AstType__Group_0_1_0__2__Impl : ( ( rule__AstType__Group_0_1_0_2__0 ) ) ;
public final void rule__AstType__Group_0_1_0__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20222:1: ( ( ( rule__AstType__Group_0_1_0_...
[ "public final void rule__AstType__Group_0_1_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20211:1: ( rule__AstType__Group_0_1_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a list with all the Announcements by type Id
public static java.util.List<com.gleo.plugins.hexiagon.model.Announcement> getAnnouncementsByTypeId( long typeId) throws com.liferay.portal.kernel.exception.SystemException { return getService().getAnnouncementsByTypeId(typeId); }
[ "public static List<Announcement> findByTypeId(long typeId) {\n\t\treturn getPersistence().findByTypeId(typeId);\n\t}", "public static Announcement fetchByTypeId_First(long typeId,\n\t\tOrderByComparator<Announcement> orderByComparator) {\n\t\treturn getPersistence().fetchByTypeId_First(typeId, orderByComparator)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries to scroll paintable referenced from given UIDL snippet to be visible.
void scrollIntoView(final UIDL uidl) { if (uidl.hasAttribute("scrollTo")) { Scheduler.get().scheduleDeferred(new Command() { public void execute() { final Paintable paintable = uidl.getPaintableAttribute( "scrollTo", connection); ...
[ "public void scroll();", "public abstract boolean scroll(Direction direction);", "private static void scrollToElement(JEditorPane editorPane, HTMLDocument.Iterator elementIterator) {\n\t\ttry {\n\t\t\tRectangle rectangle = editorPane.modelToView(elementIterator.getStartOffset());\n\t\t\tif (rectangle == null) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
resat the value of the encoder and the navx
public void resetValue() { navx.reset(); canEncoderLeftCIMcoder.setPosition(0); canEncoderRightCIMcoder.setPosition(0); }
[ "public void resetEncoder(){\n\t\tint absolutePosition = 0;\r\n\t\tflWheel.setEncPosition(absolutePosition);\r\n\t\t//absolutePosition = frWheel.getPulseWidthPosition() & 0xFFF;\r\n\t\tfrWheel.setEncPosition(absolutePosition);\r\n\t\t//absolutePosition = blWheel.getPulseWidthPosition() & 0xFFF;\r\n\t\tblWheel.setEn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field776' field has been set
public boolean hasField776() { return fieldSetFlags()[776]; }
[ "public boolean hasField654() {\n return fieldSetFlags()[654];\n }", "public boolean hasField653() {\n return fieldSetFlags()[653];\n }", "public boolean hasField543() {\n return fieldSetFlags()[543];\n }", "public boolean hasField786() {\n return fieldSetFlags()[786];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the next node in the tree.
private void findNextNode() { // go into the right subtree for the next node if(currentNode.right != null) { currentNode = currentNode.right; while(currentNode.left != null) { currentNode = currentNode.left; } // go to the parent for the next...
[ "public native Node nextNode();", "public DNode getNext() {\n\t\t\tif (!hasNext())\n\t\t\t\treturn null;\n\t\t\treturn next;\n\t\t}", "protected Node<NodeDataType> getNextNode() {\r\n\t\t\treturn myNext;\r\n\t\t}", "private int nextNode() {\n\n\t\tif (this.path.size() == 0) {\n\t\t\tList<CL_Pokemon> cl_fs = A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for the calculated attribute ProductAttrValue
public void setProductAttrValue(String value) { setAttributeInternal(PRODUCTATTRVALUE, value); }
[ "public void setProduct(entity.APDProduct value);", "void setValue(Attribute att, double value);", "public String getProductAttrValue() {\n return (String)getAttributeInternal(PRODUCTATTRVALUE);\n }", "public void setProductLine(entity.APDProductLine value);", "public void setAPDProduct(entity.APD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
OnClickVideoButton Called upon clicking the Video button.
public void onClickVideoButton(View view) { brightcoveVideoView.start(); }
[ "public void videoControl(View v){\n\n //connect\n ToggleButton controlVideo = (ToggleButton)findViewById(R.id.toggleButton);\n VideoView myVideo = (VideoView) findViewById(R.id.videoView);\n\n\n //configure a video controller to play the video\n myVideo.setVideoPath(filepath);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Relationship to another entity specification, might be dependency, substitution, etc.
@Schema(description = "Relationship to another entity specification, might be dependency, substitution, etc.") @Valid public Set<EntitySpecificationRelationship> getEntitySpecRelationship() { return entitySpecRelationship; }
[ "E relate(E sourceEntity, E targetEntity, String name, Map<String, Object> properties);", "Entity getReferencedEntity();", "YAnnotEntity getEntityref();", "public interface PartOfRelation\r\n{\r\n\r\n\t/**\r\n\t * Sets author\r\n\t * \r\n\t * @param author\r\n\t */\r\n\tvoid setAuthor(String author);\r\n\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENLAST:event_btnAddInstructorActionPerformed method to remove existing instructor from the system
private void btnRemoveInstructorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveInstructorActionPerformed txtDeleteInstID.setText(instDetails.get(tblInstructorDetails.getSelectedRow()).getInstructorID()); String tmpID = txtDeleteInstID.getText(); ...
[ "private void removeStudentButtonActionPerformed(java.awt.event.ActionEvent evt) {\n removeStudent();\n }", "private void btnAddInstructorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddInstructorActionPerformed\n Instructor inst = new Instructor(); ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Begins definition for a new IpFirewallRuleInfo resource.
IpFirewallRuleInfo.DefinitionStages.Blank define(String name);
[ "public CreateOrUpdateFirewallRuleParameters() {\n }", "private void createFirewall() throws IOException {\n Firewall firewallRule = new Firewall()\n .setName(\"cloud-loadtest-framework-firewall-rule\")\n .setDescription(\"A firewall rule to allow the driver to coordinate load test instances.\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
learns from the given neuron layer. Note: this is expected to be the next layer in a list of neuronLayers. (ie the one that used the outputs from this layer)
NeuronLayer learn(NeuronLayer followingLayer) { // loop through the neurons Iterator<Neuron> iter = this.neurons.iterator(); while(iter.hasNext()) { // calculate() the error for each neuron and set it in the neuron // if this is the correct point, pass it a 1 as the targe...
[ "private Neuron studyNeuronLayer1(Neuron neuronLayer, double[] inputData, double realOutput, int index){\n double y = realOutput;\n double n = 0.25;\n double d = 0;\n if (neuronLayer.w.length == 16) {\n for (Neuron aLayer2 : layer2) {\n d += (aLayer2.w[index] * ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start of user code (user defined attributes for Director) End of user code The constructor.
public Director() { // Start of user code constructor for Director) super(); // End of user code }
[ "public SiacTAttr() {\n\t}", "public AttributeNS() {\n }", "public Director() {\n }", "public Director() {\n }", "public Constructor(){\n\t\t\n\t}", "public AttributeBeforMch() {\n }", "public Doctor() {\r\n\r\n\t}", "public Owner()\n {\n // initialise instance variables\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the pixelGLConverter associated with this canvas.
public PixelGLConverter getPixelGLConverter() { return pixelGLConverter; }
[ "public Converter<?, ?> getConverter() {\n return converter;\n }", "@Nullable\n public Converter<?> getConverter() {\n return _converter;\n }", "public Converter getConverter() {\n return converter;\n }", "public Matrix44 getLocalToPixel() {\n return new Matrix44(_l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "StateOrProvince" element
public void setStateOrProvince(java.lang.String stateOrProvince) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STATEORPROVINCE$2, 0); ...
[ "public void setStateOrProvince(java.lang.String stateOrProvince)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STATEORPRO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field170' field. doc for field170
public java.lang.CharSequence getField170() { return field170; }
[ "public java.lang.CharSequence getField170() {\n return field170;\n }", "public void setField170(java.lang.CharSequence value) {\n this.field170 = value;\n }", "public java.lang.CharSequence getField169() {\n return field169;\n }", "public java.lang.CharSequence getField171() {\n return fie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first moi delete documents in the ordered set where uploadedBy = &63;.
public MOIDeleteDocuments findByUploadedBy_First( String uploadedBy, com.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments> orderByComparator) throws NoSuchMOIDeleteDocumentsException;
[ "public MOIDeleteDocuments fetchByUploadedBy_First(\n\t\tString uploadedBy,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator);", "public java.util.List<MOIDeleteDocuments> findByUploadedBy(\n\t\tString uploadedBy);", "public java.util.List<MOIDeleteDocuments> fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create Happening status values
private void createHappeningStatus() { HappeningStatus hsActive = happeningStatusRepo.findFirstByStatusName("ACTIVE"); if (hsActive == null) { hsActive = new HappeningStatus("ACTIVE", "The happening will happen as planned!"); happeningStatusRepo.save(hsActive); } HappeningStatus hsDeleted = happening...
[ "private void addStatus() {\n\t\tString[][] stats = new String[livingSheep.size()][7];\n\t\t\n\t\tfor (int i = 0; i < livingSheep.size(); i++) {\n\t\t\tstats[i][0] = Integer.toString(livingSheep.get(i).getId());\n\t\t\tstats[i][1] = Long.toString(System.currentTimeMillis()/1000);\n\t\t\tstats[i][2] = Integer.toStri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstExternalFunction__Group__2__Impl" $ANTLR start "rule__AstExternalFunction__Group__3" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9082:1: rule__AstExternalFunction__Group__3 : rule__AstExternalFunction__Group__3__Impl rule__AstExternalFunc...
public final void rule__AstExternalFunction__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9086:1: ( rule__AstExternalFunction__Group...
[ "public final void rule__AstExternalFunction__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9055:1: ( rule__AstExternalFun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load a producer directly in the layer foreground, without starting to play.
void load(Producer producer);
[ "public void startLoaderFromBackground() {\n Callbacks callbacks = getCallback();\n if (callbacks != null) {\n // Only actually run the loader if they're not paused.\n if (!callbacks.setLoadOnResume()) {\n startLoader(callbacks.getCurrentWorkspaceScreen());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a username reservation.
private UsernameReservation createUsernameReservation(final String username) { final String lowerCaseUsername = username.toLowerCase(); if (usernameReservations.containsKey(lowerCaseUsername)) { return usernameReservations.get(lowerCaseUsername); } else { return ((Si...
[ "public void createUser() {\n // Asks the user for a user name\n displayText(\"Player \" + (cluedoGame.getTempUserNum() + 1) + \", what is your preferred name?\");\n }", "protected void createUserName() {\n username = name + surname;\n }", "private void createReservations() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test error flow for POST /paymentSession
@Test public void TestPaymentSessionErrorMocked() throws Exception { Client client = createMockClientFromFile("mocks/checkout/paymentsession-error-invalid-data-422.json"); Checkout checkout = new Checkout(client); PaymentSessionRequest paymentSessionRequest = createPaymentSessionRequest(); ...
[ "@Test\n public void validSessionInvalidTransactionPostTest() {\n given()\n .header(\"X-session-ID\", sessionId)\n .body(TEST_TRANSACTION_INVALID)\n .post(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize the barcode decoder. Supports all iOS codes except [code138, code39mod43, interleaved2of5] Additionally supports [codabar, code128, upc_a]
private void initBarCodeScanner() { BarCodeScannerProvider barCodeScannerProvider = mModuleRegistry.getModule(BarCodeScannerProvider.class); if (barCodeScannerProvider != null) { mBarCodeScanner = barCodeScannerProvider.createBarCodeDetectorWithContext(getContext()); } }
[ "public static void initDecoder() {\n BarcodeScanner.MWBsetActiveCodes(\n BarcodeScanner.MWB_CODE_MASK_25 | BarcodeScanner.MWB_CODE_MASK_39 | BarcodeScanner.MWB_CODE_MASK_93 | BarcodeScanner.MWB_CODE_MASK_128\n | BarcodeScanner.MWB_CODE_MASK_AZTEC | BarcodeScanner.MWB_CO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the passwd. You can use getPasswd() to get the value of passwd
public void setPasswd(String passwd) { this.passwd = passwd; }
[ "public void setDBPasswd(String passwd) {\n dbPasswd = passwd;\n }", "public void setDo_passwd(java.lang.String Do_passwd) {\r\n this.Do_passwd = Do_passwd;\r\n }", "public void setPwd(String pwd) {\n this.pwd = pwd;\n }", "public void setPwd(String value) {\n setAttributeIntern...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updates the fighters in the battle, if any are 0 hp, add them to defeated list
public void findDefeated(){ for(Enemy enemy: enemies){ if(enemy.getCurrHP() <= 0 || enemy.isFriendly()){ if (!defeated.contains(enemy)) { defeated.add(enemy); } } } }
[ "private void updateDefense() {\n // Update the active towers\n updateTanks(tanks);\n updateTanks(superTanks);\n // Update any projectiles or explosives\n updateExplosive();\n updateProjectiles(tankProjectiles);\n updateProjectiles(superProjectiles);\n // Upda...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents a populator which generates large spikes of Ice.
public interface IceSpike extends Populator { /** * Creates a new {@link Builder} to build a {@link IceSpike} populator. * * @return The new builder */ static Builder builder() { return Sponge.getRegistry().createBuilder(Builder.class); } /** * Gets the number of spike...
[ "public Population(RandomEngine e) {\n super();\n genomes = new Vector();\n randomGenerator = e;\n uniform = new Uniform(randomGenerator);\n selectionObject = new RoulletteWheelSelector(randomGenerator);\n }", "private Population() {\n\n\t}", "public Clorus replicate() {\n double babyEner...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the sidebar overview link is showing
public boolean hasSideBarItemOverview() { try { findElementOnPage(By.xpath(sidebar_id + sidebar_item + sidebar_overview)); return true; } catch (Exception ex) { // We didn't find the element } return false; }
[ "protected final boolean isUsingSidebar() {\n return(_useSidebar);\n }", "public boolean hasSideBarItemDocumentation() {\r\n\t\ttry {\r\n\t\t\tfindElementOnPage(By.xpath(sidebar_id + sidebar_sub_item + sidebar_documentation));\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// We didn't find th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns array with sunrise/sunset colors
@Nullable @OnlyIn(Dist.CLIENT) public float[] calcSunriseSunsetColors(float celestialAngle, float partialTicks) { float f = 0.4F; float f1 = MathHelper.cos(celestialAngle * ((float)Math.PI * 2F)) - 0.0F; float f2 = -0.0F; if (f1 >= -0.4F && f1 <= 0.4F) { float f3 = (f1 - -0.0F) / ...
[ "protected int[] timeColors() {\n double[] ratios = timeSystem.timeRatios();\n\n if (settings.isDuplexed()) {\n ratios[0] = reduce(ratios[0] * 2);\n }\n\n return colorWheel.colors(ratios);\n }", "private java.awt.Color[] arrayofColors() {\n java.awt.Color[] colorar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mutate the DOM using Java and Elemental2, injecting the current Gust version. Called from JS.
public static Element mutateVersion(Element element) { element.textContent = Core.getGustVersion(); return element; }
[ "public void update(){\n\t\tresponse = buildHtml(new ArrayList<HtmlElement>(elements));\n\t}", "public interface HTMLModElement extends HTMLElement {\n @JSBody(script = \"return HTMLModElement.prototype\")\n static HTMLModElement prototype() {\n throw new UnsupportedOperationException(\"Available onl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XMemberFeatureCall__Group_1_1_0__0" $ANTLR start "rule__XMemberFeatureCall__Group_1_1_0__0__Impl" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10489:1: rule__XMemberFeatureCall__Group_1_1_0__0__Impl : ( ( rule__XMemberFeatureC...
public final void rule__XMemberFeatureCall__Group_1_1_0__0__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:10493:1: (...
[ "public final void rule__XMemberFeatureCall__Group_1_1__1__Impl() 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/InternalChe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
warning : This command will also impact the whole firmware OS env. If printer and pinpad are located in the same firmware OS. Reboot will make loss of session in pinpad.
public void reboot() { writeData(ESC.CMD_CONTROL_REBOOT); }
[ "@Override\n public void reboot() {\n\t setSounderMode(SounderMode.REBOOT_HUB,1);\n\t exitWithFailsafe(EXIT_CODE_REBOOT); // NOSONAR\n }", "public void rebootToRecoveryMode() {\n mPowerManager.reboot(\"recovery\");\n }", "public void rebootToBootloader() {\n mPowerManager.reboot(\"bootl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the energy forecast for every ERDS connected to the data center.
public List<ErdsForecast> getErdsForecasts() { return erdsForecasts; }
[ "public List<DataCenterForecast> execute(TimeSlotBasedEntity timeRange) {\n \tlogger.debug(\"Starting power planning loop for time range: \" + timeRange);\n \tlogger.debug(\"Requesting energy forecasts...\");\n\t\tList<DataCenterForecast> forecasts = erdsHandler.getEnergyForecasts(timeRange);\n logger....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use MessageProto.newBuilder() to construct.
private MessageProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "private EmailMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private Message(com.google.protobuf.Ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enter a new lot into the auction. Returns false if the auction is not open or if the description is null. The condition "this.isAuctionClosed()" checks if the auction is closed. If the auction is open, a new lot is added with the proper description and nextLotNumber is incremented
public boolean enterLot(String description) { if ((this.isAuctionClosed ()) || description==null) { return false ; } lots.add(new Lot(nextLotNumber, description)); nextLotNumber++; return true ; }
[ "public void enterLot(String description)\n {\n lots.add(new Lot(nextLotNumber, description));\n nextLotNumber++;\n }", "public org.hl7.fhir.String addNewLotNumber()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = nul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field167' field has been set
public boolean hasField167() { return fieldSetFlags()[167]; }
[ "public boolean hasField141() {\n return fieldSetFlags()[141];\n }", "public boolean hasField121() {\n return fieldSetFlags()[121];\n }", "public boolean hasField138() {\n return fieldSetFlags()[138];\n }", "public boolean hasField131() {\n return fieldSetFlags()[131];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the specified firewall rule group.
java.util.concurrent.Future<GetFirewallRuleGroupResult> getFirewallRuleGroupAsync(GetFirewallRuleGroupRequest getFirewallRuleGroupRequest, com.amazonaws.handlers.AsyncHandler<GetFirewallRuleGroupRequest, GetFirewallRuleGroupResult> asyncHandler);
[ "java.util.concurrent.Future<GetFirewallRuleGroupResult> getFirewallRuleGroupAsync(GetFirewallRuleGroupRequest getFirewallRuleGroupRequest);", "public String getRuleGroup() {\n return ruleGroup;\n }", "public String getFirewallRuleGroupId() {\n return this.firewallRuleGroupId;\n }", "IpFir...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a string representing the direct update URL of the default output.
public String getDefaultUpdateUrl() { return srvAbsURL(myServletDescr(), "format=" + OUTPUT_DEFAULT.name()); }
[ "public String getUpdateUrl() {\n return updateUrl;\n }", "String getUpdateSiteBaseURL();", "public URL buildUpdateUrl(final String core) throws MalformedURLException, UnsupportedEncodingException {\n\t\t\n\t\tfinal StringBuilder sb = new StringBuilder(url.toString()).append(\"/\").append(core).append...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates an Arraylist of valid assigned employee index
private ArrayList<Index> generateValidEmployeeIndices() { ArrayList<Index> indices = new ArrayList<Index>(); indices.add(INDEX_FIRST_PERSON); indices.add(INDEX_SECOND_PERSON); return indices; }
[ "@Override\n\tpublic List<Integer> getAllEmployeeIds() {\n\t\treturn new ArrayList<Integer>(employees.keySet());\n\t}", "private static ArrayList<Integer> createCourseSearchValuesArrayList(){\n ArrayList<Integer> courseSearchValues = new ArrayList<>();\n for(int i=0;i<MAX_SEARCH_VAL_ANNUAL;i++){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface to all datasource factory implementations.
public interface DataSourceFactory { DataSourceDefinition createDataSourceDefinition(CreateDataSourceDefinitionRequest sourceDefinitionRequest); DataFieldDefinition createDataFieldDefinition(CreateDataFieldDefinitionRequest fieldDefinitionRequest); DataSourceDefinitionParser createDataSourceDefinitionParser...
[ "public DataSourceFactory() {}", "public interface IDatasource {\n /**\n * Get name for this datasource\n * \n * @return name\n */\n String getName();\n\n /**\n * Get a graph containing the description of the datasources capabilities\n * \n * @return the capabilities graph\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called to signal whether unread content is available. Called once after the observer is initialized, and after that, called each time unread content status changes.
@CalledByNative("UnreadContentObserver") public void hasUnreadContentChanged(boolean hasUnreadContent) {}
[ "public void markNotificationsAsRead() {\n unreadNotifications = false;\n }", "private void markMessagesAsRead() {\n final ObservableValue<Chat> obsChat = BBMEnterprise.getInstance().getBbmdsProtocol().getChat(mChatId);\n mMarkMessagesReadObserver = new Observer() {\n @Override\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns true if the intrinsic is a leaf, i.e. it does not make any calls / itself. Most intrinsics are leafs, the exceptions being the patchpoint / and statepoint intrinsics. These call (or invoke) their "target" argument.
@Converted(kind = Converted.Kind.MANUAL_COMPILATION, source = "${LLVM_SRC}/llvm/lib/IR/Function.cpp", line = 916, FQN="llvm::Intrinsic::isLeaf", NM="_ZN4llvm9Intrinsic6isLeafENS0_2IDE", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Function.cpp -nm=_ZN4llvm9Intri...
[ "abstract boolean isLeaf();", "boolean hasTargetShape();", "public boolean isLeafContextNode();", "public boolean isLeafContainer() {\r\n\treturn (gateName != null && getChildCount() == 0);\r\n }", "private boolean isLeafStage(DispatchablePlanMetadata dispatchablePlanMetadata) {\n return dispatchableP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method allows to send the activate message to an email address.
public void sendActivateEmail(String email, String username, String activate) throws EmailException { try { String emailcontent = Files.readAllLines(Paths.get(Objects.requireNonNull(getClass().getClassLoader().getResource("activate.html")).toURI())).stream().collect(Collectors.joining()); ...
[ "void activateUser(String email, String activationToken);", "public RegisterConfirmedPage activateAccount(String email) {\r\n\t\tactiveRailwayAccount(email);\r\n\r\n\t\t/*\r\n\t\t * this.clickLinkEmail(_activateSubject, email); \r\n\t\t * // Switch tab chrome ---------\r\n\t\t * ArrayList<String> arr = new\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if a coordinates should be considered zero in this geometry.
public boolean almostZero(Coordinates a);
[ "public boolean isZero() {\n\t\treturn x == 0.0 && y == 0.0 && z == 0.0;\n\t}", "public final boolean is_zero()\n {\n return x.signum() == 0 && y.signum() == 0;\n }", "public boolean isZero() {\n return (this.getLength() == 0); //XXX: Change to make dependent on tolerance.\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the length of the 'attributes' field
@Dynamic(Field.Property.LENGTH) public int attributesLength() { return this.attributesLength; }
[ "public int attributeSize()\r\n\t{\r\n\t\treturn this.attributes.size();\r\n\t}", "public int attributes_count() {\n return myAttributes.length;\n }", "public int getNumberOfAttributes();", "@Override\n public int getAttributeCount()\n {\n return attributes.getSubNodes().size();\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get LogView data bytes size, as far as known modulo 16 and depends on the bytes received from device
public int getLovDataByteSize() { return 0; // sometimes first 4 bytes give the length of data + 4 bytes for number }
[ "long getLogSize();", "public static int size_infos_log_src() {\n return (16 / 8);\n }", "int getDataSize();", "int getDataLength();", "public int getLength()\n {\n return NUM_BYTES_IN_UINT16;\n }", "public static int size_infos_size_data() {\n return (8 / 8);\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test for valid login User logs in with username and password correct credentials
@Test(description = "User logs in with username and password - correct credentials", groups = {"smoke"},priority = 1) public void validLogin(){ logoutPageobj.clickLogoutLink("Portal"); setcurrentContext(null, null, false); }
[ "@Test\n\tpublic void testLogin(){\n\t\tboolean check1 = userdatabase.login(userExistsData[USER_IND],userExistsData[PASS_IND]);\n\t\tassertTrue(check1);\n\t\t\n\t\t//Existing user but wrong password\n\t\tboolean check3 = userdatabase.login(\"natalieportman\",\"wrongpassword1@\");\n\t\tassertFalse(check3);\n\t\t\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the modified date of this register.
@Override public void setModifiedDate(Date modifiedDate);
[ "public void setModifiedDate(Date modifiedDate);", "public void setModified(Date modified)\n {\n this.modified = modified;\n }", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_ext_information.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value property: Collection of available operation details.
List<OperationDetail> value();
[ "public static java.util.Collection getOperationDescs() {\n return _myOperationsList;\n }", "public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }", "public java.util.List<OperationSummary> getOperations() {\n if (operations == null) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EInt__Group__0__Impl" $ANTLR start "rule__EInt__Group__1" InternalBasicAttributes.g:1034:1: rule__EInt__Group__1 : rule__EInt__Group__1__Impl ;
public final void rule__EInt__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalBasicAttributes.g:1038:1: ( rule__EInt__Group__1__Impl ) // InternalBasicAttributes.g:1039:2: rule__EInt__Group__1__Impl { ...
[ "public final void rule__EInt__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:1011:1: ( rule__EInt__Group__0__Impl rule__EInt__Group__1 )\n // InternalBasicAttributes.g:1012:2: rule__EInt__Group...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }