query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Setter method for the COM property "onselectstart"
@DISPID(-2147412075) @PropPut void onselectstart( java.lang.Object rhs);
[ "@DISPID(-2147412075)\n @PropGet\n java.lang.Object onselectstart();", "@DISPID(-2147412032) //= 0x800117c0. The runtime will prefer the VTID if present\n @VTID(9)\n void onselectionchange(\n @MarshalAs(NativeType.VARIANT) java.lang.Object p);", "@DISPID(-2147412032) //= 0x800117c0. The runtime will pref...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Default constructor of Automobile
protected Automobile(){}
[ "public Mobile() { }", "protected AbstractDevice() {\n \t\tthis( \"\", \"\", null, null, null );\n \t}", "public MAI()\n\t{\n\t\t\n\t}", "public Device() {\n }", "public MyUber() {\r\n\t}", "public Laptop() {\n }", "protected AirspaceObject() {}", "public MountainBike() {\n }", "public Agen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets whether or not revivals will be included in a song list (CS only)
public boolean getIncludeRevivals() { return prefs.getBoolean(KEY_REVIVALS, Boolean.valueOf(context.getResources().getString(R.string.revivals_default))); }
[ "boolean hasIsRevanche();", "public boolean isRevSolenoidBlackListed() {\n int blackList = getPCMSolenoidBlacklist(m_reverseChannel.ordinal() / 8) & (1 << m_reverseChannel.ordinal());\n return blackList != 0;\n }", "public final boolean isListedForaVolume() {\n return listedForaV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the id_empresa_totvs value for this Funcionario.
public int getId_empresa_totvs() { return id_empresa_totvs; }
[ "public void setId_empresa_totvs(int id_empresa_totvs) {\n this.id_empresa_totvs = id_empresa_totvs;\n }", "public java.lang.Integer getId_cidade_funcionario_totvs() {\n return id_cidade_funcionario_totvs;\n }", "public int getEmpresa_id() {\n return empresa_id;\n }", "public int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Testing getters and setters for Subject with valid value
@Test public void testGetSetValidSubject() { Lecture lecture = new Lecture(); lecture.setSubject(validSubject); assertEquals(validSubject, lecture.getSubject()); }
[ "@Test\n public void testSetSubject() {\n System.out.println(\"setSubject\");\n String c = \"TestSubj\";\n PhoneConvRecord instance = new PhoneConvRecord();\n instance.setSubject(c);\n assertEquals(c, instance.getSubject());\n }", "public void testGetSubject() {\n S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of Method Main method that sets the font and creates loginWindow object
public static void main(String[] args) {// Start of Main Method setFont(new FontUIResource(new Font("Arial", Font.BOLD, 17))); // Create loginWindow object LoginWindow login =new LoginWindow(); }
[ "private static void loginWindow() {\r\n\t\tloginFrame = new JFrame(\"Please login\");\r\n\t\tloginFrame.setLayout(new GridLayout(5, 1));\r\n\t\tloginFrame.setSize(400, 200);\r\n\t\theaderLabel.setText(\"Please enter username and password or register\");\r\n\t\tusernameField = new JTextField();\r\n\t\tpasswordField...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invoke a javascript function exported by the specified module Note: This name mimics the javax.script.Invocable standard from JSR223.
public Object invokeMethod(String moduleName, String functionName, Object...args) throws Exception { Object result = null; RhinoEngine theEngine = getRhinoEngine(); Context cx = theEngine.getContextFactory().enterContext(); try { // Load the specified module. // Note: Ringo's RhinoEngine returns previ...
[ "JSFunction createJSFunction(Object instance, Method method);", "public static void exportFunction(String name, Object params, String returnType,\n String jsFunctionName, String perm) {\n\n\n FunctionDefinitionBuilder fdBuilder = new FunctionDefinitionBuilder();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generates the board rotation part of the trick (based on the popshuv)
public String Board_R() //generates the board rotation part of the trick { String str_board_rotation = ""; double board_rotation= generator.nextInt(72); if(board_rotation%3 == 0) { str_board_rotation = ""; } else { board_rotation= generator.nextInt(13); if(board_rotation%3 == 1) ...
[ "private void rotateTiles() {\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tfor (int j = 0; j < SIZE; j++) {\r\n\t\t\t\tif (i % 2 == 1 || j % 2 == 1) {\r\n\t\t\t\t\tboard[i][j].rotate((int)(Math.random()*4));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void rotatePiece() {\n boolean temp = this.left;\n bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bundles the script into a function f and builds it into an invocable object.
public static Invocable buildScript(String script,String... arguments){ ScriptEngine engine; try{ engine = new NashornScriptEngineFactory().getScriptEngine(new String[] { "--no-java" }); engine.eval(bundleAsFonctionF(script,arguments)); } catch(ScriptException e){ return null; } return (Invocable)...
[ "Script createScript();", "Executescript createExecutescript();", "Value eval(String script, String name, String contentType, boolean interactive) throws Exception;", "protected static Object eval(File script, Context context)\n throws EllaIOException, EllaParseException, EllaException {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET 64 BITES FROM ALL FILE BITES
public void get64bitesBlock() { this.sixtyFourBitesBlock.clear(); if(this.allBitesFromFile.size() >= 64) { for(int i = 0; i < 64; i++) this.sixtyFourBitesBlock.add(this.allBitesFromFile.get(i)); this.deleteBitesFromallBitesFromFile(64); } ...
[ "int getBits();", "public static byte[] getBitCode64() {\n return getBitCode64Internal();\n }", "byte [] readBin128();", "public int getAnalysisBits();", "private byte[] decode(Node root) {\n BitSet dataInBits = BitSet.valueOf(Arrays.copyOfRange(buffer.array(), bufferPosition, buffer.capaci...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AboutMe__Group__5" $ANTLR start "rule__AboutMe__Group__5__Impl" InternalLPDSL.g:2621:1: rule__AboutMe__Group__5__Impl : ( '}' ) ;
public final void rule__AboutMe__Group__5__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalLPDSL.g:2625:1: ( ( '}' ) ) // InternalLPDSL.g:2626:1: ( '}' ) { // InternalLPDSL.g:2626:1: ( '}' ) ...
[ "public final void rule__AboutMe__Group__5() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalLPDSL.g:2614:1: ( rule__AboutMe__Group__5__Impl )\r\n // InternalLPDSL.g:2615:2: rule__AboutMe__Group__5__Impl\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Requests a number of point feedback controller(s) for the given endeffector.
public void enablePointFeedbackController(RigidBodyBasics endEffector, int numberOfControllers) { pointFeedbackControllerTemplate.put(endEffector, 1); }
[ "public void enablePointFeedbackController(RigidBodyBasics endEffector)\n {\n enablePointFeedbackController(endEffector, 1);\n }", "public void enableSpatialFeedbackController(RigidBodyBasics endEffector, int numberOfControllers)\n {\n spatialFeedbackControllerTemplate.put(endEffector, numberOfCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the AbstractPatriciaTrie.TrieEntry lowerEntry(K) method test.
@Test public void testLowerEntry_5() throws Exception { PatriciaTrie fixture = new PatriciaTrie(); fixture.incrementSize(); fixture.modCount = 1; AbstractPatriciaTrie.TrieEntry<Object, Object> result = fixture.lowerEntry(null); // add additional test code here assertEquals(null, result); }
[ "@Test\n\tpublic void testLowerEntry_1()\n\t\tthrows Exception {\n\t\tPatriciaTrie fixture = new PatriciaTrie();\n\t\tfixture.incrementSize();\n\t\tfixture.modCount = 1;\n\n\t\tAbstractPatriciaTrie.TrieEntry<Object, Object> result = fixture.lowerEntry(null);\n\n\t\t// add additional test code here\n\t\tassertEquals...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the kcUnitName attribute value.
public void setKcUnitName(String kcUnitName) { this.kcUnitName = kcUnitName; }
[ "public void setKcUnit(String kcUnit) {\n this.kcUnit = kcUnit;\n }", "public String getKcUnitName() {\n return kcUnitName;\n }", "@Override\n\tpublic void setName(java.lang.String name) {\n\t\t_unit.setName(name);\n\t}", "void setStorageUnitName(String value);", "public void setUnitName...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
READ PRODUCT KEYWORDS FROM FILE
public ArrayList<String> readProduct() throws FileNotFoundException, IOException { File f = new File("D:/Our Files/Eric/J2EE Mars/QCRepo/question-classifier/questionclassifier/lib/Essentials/Product.txt"); FileInputStream fis_file = new FileInputStream(f); BufferedReader br_file = new BufferedR...
[ "public ArrayList<String> readKnowledge() throws FileNotFoundException, IOException {\n File f = new File(\"D:/Our Files/Eric/J2EE Mars/QCRepo/question-classifier/questionclassifier/lib/Essentials/Knowledge.txt\");\n FileInputStream fis_file = new FileInputStream(f);\n BufferedReader br_file =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the snapshot source.
@Override public MarketDataSnapshotSource getSnapshotSource() { return _toolContext.getMarketDataSnapshotSource(); }
[ "public Source getSource()\n {\n if (streams.isEmpty()) return null;\n return streams.get(0).get().getSource();\n }", "public Object getSource() {\n\t\treturn fSource;\n\t}", "public Resource getSource() {\n return getResource(AbstractEmbeddedState.SOURCE_RESOURCE);\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
visit the expressions (children) and ensure they are the same type the return type is "Ljava/util/ArrayList;" where type0 is the type of elements in the list this should handle lists of lists, and empty list. An empty list is indicated by "Ljava/util/ArrayList;".
@Override public Object visitListExpression(ListExpression listExpression, Object arg) throws Exception { if (listExpression.expressionList.isEmpty()) { listExpression.setType(emptyList); return emptyList; } String oldListType = (String) listExpression.expressionList.get(0).visit(this, arg); ...
[ "@Override\n public AST visitTypeNotVoidNotFunction(TypeNotVoidNotFunctionContext ctx){\n visit(ctx.typeName());\n if(ctx.typeArguments()!=null){ //se tem argumento de tipo é lista\n visit(ctx.typeArguments());\n Inner listType = new Inner(LIST_TYPE,NO_TYPE);\n list...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the next three alphabets from the alphabet list and
public List<Alphabets> getNextThreeAlphabetList(){ List<Alphabets> threeAlphabets= new ArrayList<Alphabets>(); shuffle(alphabetList); for(int i=0; i<3;i++) { Gdx.app.log("alphabets size","::"+alphabetList.size()); threeAlphabets.add(alphabetList.get(i)); alphabetList.remove(i); } Gdx.app.log("th...
[ "static private String nextLetterSequence(String s) {\n\t\tif (s.length() > 1)\n\t\t\treturn s;\n\n\t\tif (s.equals(\"z\"))\n\t\t\treturn \"a\";\n\n\t\treturn (char) ((int) s.charAt(0) + 1) + \"\";\n\t}", "static String generateAlphabetLC(){\n\t\tfor (int i = 97; i <= 122; i++){\n\n\t\t\talphabetLowerCase = alpha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the dummy value.
public String dummy() { return this.dummy; }
[ "public coop.guenoa.afip.FECredService.DummyReturnType getDummyReturn() {\r\n\t\treturn dummyReturn;\r\n\t}", "public double getMissingValueCode();", "public int getEmptyX()\n\t{\n\t\treturn x0;\n\t}", "public int getValue()\n\t{\n\t\treturn bitHolder.getValue();\n\t}", "@Test\r\n public void testINCHI_P...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get default notification template locale for a given notification channel.
private String getDefaultNotificationLocale(String notificationChannel) { if (NotificationChannels.SMS_CHANNEL.getChannelType().equals(notificationChannel)) { return DEFAULT_SMS_NOTIFICATION_LOCALE; } else { return DEFAULT_EMAIL_LOCALE; } }
[ "@Override\n public List<NotificationTemplate> getDefaultNotificationTemplates(String notificationChannel) {\n\n if (NotificationChannels.SMS_CHANNEL.getChannelType().equals(notificationChannel)) {\n return I18nMgtDataHolder.getInstance().getDefaultSMSTemplates();\n }\n return I18...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all Line List Groups with corresponding identifiers.
Collection<LineListGroup> getLineListGroups( Collection<Integer> identifiers );
[ "LineListGroup getLineListGroupByName( String name );", "Collection<LineListGroup> getLineListGroupsBySource(OrganisationUnit source);", "Collection<LineListGroup> getLineListGroupsByElement(LineListElement lineListElement);", "List<String> getGroups();", "Collection<LineListGroup> getLineListGroupsBySource...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
prints the remote address, throws an error if there is an issue
static void printRemoteAddress(String name, PrintStream out) { try { out.println("Looking up " + name + "..."); InetAddress machine = InetAddress.getByName(name); out.println("Host name : " + machine.getHostName()); //To client... out.println("Host IP : " + toText (machine.getAddress())); }catch(Unk...
[ "private static void printRemoteAddress(String host) {\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Looking up: \" + host + \"...\");\r\n\t\t\t// Look up host name and IP address of input host.\r\n\t\t\tInetAddress inetAddress = InetAddress.getByName(host);\r\n\t\t\tSystem.out.println(\"Host name: \" + inetAddress.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates all stock ticker symbols stored in tickers.
public boolean ValidateTickers(List<String> tickers){ if(tickers.isEmpty()){ return false; } boolean areValid = true; for(String s : tickers){ if(!ValidateTicker(s)){ areValid = false; } } return are...
[ "protected void setupLocaleSymbolsInputValidation() {\n\n\t\tLocale locale = LocalizationContext.getCurrent().filter(l -> l.isLocalized()).flatMap(l -> l.getLocale())\n\t\t\t\t.orElse(getLocale());\n\t\tif (locale == null) {\n\t\t\t// use default\n\t\t\tlocale = Locale.getDefault();\n\t\t}\n\n\t\t// check grouping\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the is delete of this dm port harbour.
public void setIsDelete(int isDelete) { _dmPortHarbour.setIsDelete(isDelete); }
[ "public void setDelete(boolean value) {\r\n this.delete = value;\r\n }", "public void setDelete(java.lang.Boolean _delete)\n {\n delete = _delete;\n }", "public final native void setForDelete(boolean del) /*-{\n\t\tthis.forDelete = del;\n\t}-*/;", "public void setDelete(boolean delete)\n {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests a matrix with a particular predicate.
public abstract boolean test(Matrix A);
[ "public boolean matches(ItemMatrix grid);", "private Boolean isValidColumnMatrix(SimpleMatrix matrix) {\n\t\tInteger nrows = matrix.numRows();\n\t\tInteger ncols = matrix.numCols();\n\n\t\treturn (ncols == 1) && (nrows == 3);\n\t}", "KTable<K, V> filter(Predicate<K, V> predicate);", "protected boolean checkRo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the first event called. This event suggest that a json document will read.
void startJSON() throws SAJException;
[ "void startJSON() throws JSONParseException, IOException;", "void startJSON() throws ParseException, IOException;", "private void loadJsonAcitivty() {\n\n // log the event\n Log.i(this.getClass().getSimpleName(), \"changing activity to JSON list activity\");\n\n // start new intent to chang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run compression in number of threads
List<CompressResult> parallelCompress(Path input, Path output, int maxSizeInMB, int nThread) throws IOException;
[ "@Test\n\tpublic void generateCompressedFile() throws Exception {\n\t\tint sourceRecords = 10000000;\n\t\tint bufferSize = 1000;\n\t\tAssert.isTrue(sourceRecords % bufferSize == 0); // make sure its divisible without the remainder\n\t\tfinal int outerLoop = sourceRecords / bufferSize;\n\t\tfinal CountDownLatch latc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is one of the "automagic" methods from this framework. It is responsible for injecting the listeners declared for a given view to the components within that view. Notice that whatever the kind of listener declared, we are going to create a proxy that fits the requirements of the component, but the method it...
private void injectListeners(ViewContainer view,Component component, Map<String,List<ViewController<? extends EventListener,? extends EventObject>>> viewControllers, String prefixAction) throws Exception { /* Getting component information */ String viewId = view.getId(); String componentName = c...
[ "public void addListeners()\n {\n view.addListeners(new FileButtonClick(view, this), new ViewButtonClick(view, this), new ClassClick(view, this), new RelationshipClick(view, this), new RightClickListenerFactory(view, this));\n\t}", "void addListener(IViewListener listener);", "private void addListener...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of all entries in the queue.
public List<WorkOrderResponse> getAllEntries() { List<QueueEntry> allEntries = queueDao.getAllEntries(); allEntries.sort(new PriorityQueueComparator(dateProvider)); return allEntries.stream() .map((queueEntry -> new WorkOrderResponse(queueEntry.getId(), queueEntry.getDate()))) ...
[ "public ArrayList<E> values(){\n\t\tArrayList<E> out = new ArrayList<E>(queue.size());\n\t\tfor( Node n : queue )\n\t\t\tout.add( n.e );\n\t\treturn out;\n\t}", "public List<T> getAll() {\n return Arrays.asList(buffer);\n }", "List <List <DHashEntry>> getAllEntries();", "Collection<V> getAllEntries(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use AddressBook.newBuilder() to construct.
private AddressBook(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "public AddressBook() {\n\t\t/* We use a linked list to keep the contacts in the address book.\n\t\t * A LinkedNode object that corresponds to the first node in the linked list.\n\t\t */\n\t\tcontacts = new LinkedList<>();\n\t}", "private Address(Builder builder) {\n super(builder);\n }", "AddressBook c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns value of attacksPerRound
public int getAttacksPerRound() { return attacksPerRound; }
[ "public void setAttacksPerRound(int attacksPerRound) {\n\t\tthis.attacksPerRound = attacksPerRound;\n\t}", "int getGameRound();", "public float trumpsPerGame() {\n if (totalGames() == 0) return 0;\n float res = (float) trumps / (float) (totalGames());\n return Math.round(res * 10) / 10f;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The troid (id) of the column's entry in the columninfo table. It will always have one (except during initialisation, which the application programmer will never see).
final Integer columnInfoID() { return info == null ? null : info.troid(); }
[ "public String getColumnId() {\r\n return columnId;\r\n }", "public String getColumnId() {\n return columnId;\n }", "java.lang.String getColId();", "public java.lang.Integer getColumnID() {\n return columnID;\n }", "@Override\n\tpublic long getColumnId() {\n\t\treturn _expandoC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display's the specified enchantments in a list format to the specified player; does nothing if list is empty
public void sayEnchantments(String enchantments, Player player){ String[] baseSplit = enchantments.split(";"); if(Integer.valueOf(baseSplit.length)>0){ if(baseSplit[0]!=""){ player.sendMessage(ChatColor.GREEN+"Enchantments:"); for(int i=0; i<baseSplit.length;i++){ String[] bigSplit= baseSplit[i].spl...
[ "public void printAssistants(Player player);", "void onAttackButtonClicked() {\n combatView.showWeaponList(Arrays.asList(GameManager.getPlayer().getEquippedWeapons()));\n }", "public void onEnable() {\n\n // Listeners\n new EListener(this);\n getCommand(\"enchantlist\").setExecuto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new 1D tensor with the given size.
public static JTensor newWithSize1d(long size0) { return new JTensor( TH.THTensor_(newWithSize1d)(size0) ); }
[ "public static JTensor newWithStorage1d(JStorage storage, long storageOffset, long size0, long stride0) {\n return new JTensor(\n TH.THTensor_(newWithStorage1d)(storage, storageOffset, size0, stride0)\n );\n }", "public static JTensor newWithSize(LongStorage size, LongStorage strid...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds all entries from a specific region and prints out all their information.
public void findByRegion(String region) { boolean found = false; for(KantoDex entry : entries) { if(entry.getRegion().equals(region)) { found = true; } } if(!found) { System.out.println("You have input a nonexistent region."); } else { System...
[ "public void printRegionsNames() {\n for (int i = 0; i < regionList.length; i++) {\n System.out.println(\"Region #\" + (i + 1) + \": \" + regionList[i].getRegionName());\n }\n }", "public void printRegionStatus() {\n for (int i = 0; i < numRegions; i++) {\n System.out.print(regionList[i].getRe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds up the value of every coin in the bank array list
public double getBankMoney(){ double total = 0.0; for(Coin c : bank){ total += c.getValue(); } return total; }
[ "private int getTotalNumberOfCoinsInBank(List<Integer> listTotalNumberOfEachCoin)\n {\n int totalNumberOfAllCoins = 0;\n for(Integer totalNumberOfCoin : listTotalNumberOfEachCoin)\n {\n totalNumberOfAllCoins += totalNumberOfCoin;\n }\n return totalNumberOfAllCoins;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of ClassifierStage for which there are at least two results in database. Only ClassifierStages with at least two results are taken into account when generating a ranking.
@Override public Map<ClassifierStage, Double> getClassifierStagesWithTwoOrMoreResults(IPSCDivision division) { EntityManager entityManager = HaurRankingDatabaseUtils.createEntityManager(); Map<ClassifierStage, Double> resultClassifierStages = new HashMap<ClassifierStage, Double>(); try { for (Classif...
[ "public Collection<String> get_stages() {\r\n\t\t// Get all available stages\r\n\t\tFunctionalGroup g = controller.getSelectedFunctionalGroup();\r\n\t\tif (g != null) {\r\n\t\t\tCollection<String> stages = g.getStageNames();\r\n\t\t\tArrayList<String> stage_names = new ArrayList<String>();\r\n\t\t\tfor (String s : ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Complete the 'minimumChunksRequired' function below. The function is expected to return an INTEGER. The function accepts following parameters: 1. LONG_INTEGER totalPackets 2. 2D_LONG_INTEGER_ARRAY uploadedChunks
public static int minimumChunksRequired(long totalPackets, List<List<Long>> uploadedChunks) { List<Integer> s=Arrays.asList(2,2,2,5,5,8); int[] a=s.stream().mapToInt(x->x).toArray(); int chunks=totalPackets/uploadedChunks.size(); int size=a.length/chunks+((a.length%chunks)>0?1:0); int[][] array...
[ "private static int getChunkSize(final int nChunks, final int nElements) {\n // Integer ceil\n return (nElements + nChunks - 1) / nChunks;\n }", "long getTotalChunksInUse();", "int getChunkSize();", "private int readChunkSize(int desired) {\n return Math.min(availableFirst(), desired);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The name of a group of labels. Data in this field will be retained for service usage. Follow best practices for the security of your data.
public String getLabelGroupName() { return this.labelGroupName; }
[ "java.lang.String getGroupName();", "public void setLabelGroupName(String labelGroupName) {\n this.labelGroupName = labelGroupName;\n }", "public void setGroupName(String value) {\n this.groupName = value;\n }", "java.lang.String getLabelName();", "public String getGroupName() {\n return gr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enrollment weight of a section if the given request is assigned. In order to overcome rounding problems with lastlike students ( e.g., 5 students are projected to two sections of limit 2 each section can have up to 3 of these lastlike students), the weight of the request with the highest weight in the section is change...
public static double getEnrollmentWeight(Section section, Request request) { return section.getEnrollmentWeight(request) + request.getWeight() - Math.max(section.getMaxEnrollmentWeight(), request.getWeight()) + sNominalWeight; }
[ "public boolean isWeightStudentsToFillUpOffering();", "public void reCalcuateWeight() {\n if (totalConnections > 0) {\n double weightRatio = (double) fixedWeight / totalWeight;\n double connectionRatio = (double) currentConnectionCount / totalConnections;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the setSpec attribute of the HarvesterAdminForm object
public void setSetSpec(String val) { setSpec = val; }
[ "public void updateSpec()\r\n\t{\r\n\t\tspec.setName(nameField.getText());\r\n\t\tspec.setColor(colorButton.color());\r\n\t\tspec.setFilter(filter.filter());\r\n\t}", "public HarvesterAdminForm() {\n\n\t\tsetShSet(\"split\");\n\n\t\tprtln(\"HarvesterAdminForm() \");\n\n\t}", "public void setShSetSpec(String val...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a HudItemRegistry which consists of three registers: pre, normal, and post.
public HudItemRegistry() { pre = new ArrayList<HudItem>(); normal = new ArrayList<HudItem>(); post = new ArrayList<HudItem>(); all = new ArrayList<HudItem>(); }
[ "public static void createItems(){\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"breadly\"), BREADLY);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"hard_boiled_egg\"), HARD_BOILED_EGG);\n\n\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"ender_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the list of Connectathon Participants attending on FRIDAY, depending on the logged in user (admin or vendor)
@Override public List<ConnectathonParticipant> getPeopleAttendingOnFriday() { if (LOG.isDebugEnabled()) { LOG.debug("getPeopleAttendingOnFriday"); } renderAddPanel = false; if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) ...
[ "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnWednesday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnWednesday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.is...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new application collection task with the specified context. Register the specified measurement listener with this task.
public ApplicationCollectionTask(Context context, MeasurementListener measurementListener) { this(context, SensorConstants.DEFAULT_COLLECTION_INTERVAL, measurementListener); }
[ "public ApplicationCollectionTask(Context context) {\n this(context, SensorConstants.DEFAULT_COLLECTION_INTERVAL, null);\n }", "public ApplicationCollectionTask(Context context, long collectionInterval, MeasurementListener measurementListener) {\n mContext = context;\n mPackageManager = mC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the ComponentOrientation object indicating the orientation of components, for example, whether they are arranged vertically or horizontally or placed from righttoleft or lefttoright.
public void setComponentOrientation(ComponentOrientation componentOrientation) { this.componentOrientation = componentOrientation; }
[ "private void changeOrientation ()\n {\n if (getComponentOrientation ().equals (ComponentOrientation.LEFT_TO_RIGHT))\n {\n setComponentOrientation (ComponentOrientation.RIGHT_TO_LEFT);\n }\n else\n {\n setComponentOrientation (ComponentOrientation.LEFT_TO_RIGHT);\n }\n }", "public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the kwLookBack property.
public void setKWLookBack(int value) { this.kwLookBack = value; }
[ "public void setKWhLookBack(int value) {\n this.kWhLookBack = value;\n }", "public int getKWLookBack() {\n return kwLookBack;\n }", "public void setKWLookForward(int value) {\n this.kwLookForward = value;\n }", "public int getKWhLookBack() {\n return kWhLookBack;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get a list of employess who are not locked out
@Override public List<Employee> retrieveAllActiveEmployees(){ List<Employee> allActiveEmployees = new ArrayList<Employee>(); try{ Query q = em.createQuery("SELECT a from Employee " + "AS a WHERE a.employeeLockOut=:employeeLockOut"); q.setParameter("employeeLockOut", false); ...
[ "public List<Individual> getInactiveMembers() {\n\n List<Individual> list1 = new ArrayList<Individual>();\n\n Iterator<Individual> itr = members.iterator();\n while (itr.hasNext()) {\n Individual ind = itr.next();\n Boolean a = false;\n Boolean b = ind.isActive(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notifies listeners when a breakpoint changes
private void fireBreakpointChange(Breakpoint breakpoint) { for(int i=listeners.size()-1; i>=0; i--) { ((BreakpointListener)listeners.get(i)).breakpointChanged(new BreakpointChangeEvent(this,breakpoint.getPcodeIndex(),breakpoint.getType())); } }
[ "@Override\n public void breakpointsChanged(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {\n updateBreakpointMessages(breakpoints);\n }", "public void addBreakpointlListener(BreakpointListener l) {\r\n\tlisteners.add(l);\r\n}", "public void addBreakpointListener(String identifier) throws CoreE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the kwLookBack property.
public int getKWLookBack() { return kwLookBack; }
[ "public int getKWhLookBack() {\n return kWhLookBack;\n }", "public void setKWLookBack(int value) {\n this.kwLookBack = value;\n }", "public int getKWLookForward() {\n return kwLookForward;\n }", "public void setKWhLookBack(int value) {\n this.kWhLookBack = value;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
True if has "subject" element
public boolean isSetSubject() { synchronized (monitor()) { check_orphaned(); return get_store().count_elements(SUBJECT$20) != 0; } }
[ "public boolean isSetSubject()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SUBJECT$0) != 0;\n }\n }", "private static boolean containsSubject(CoreMap sentence) {\n boolean hasSubject = false;\n SemanticGr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
In order to delete category and the whole dishes in that category > we need to get all the dishes from the wanted Category
private void deleteCategory(String key) { DatabaseReference foods = database.getReference("Foods"); Query foodInCategory = foods.orderByChild("menuId").equalTo(key); foodInCategory.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChang...
[ "boolean delete(DishCategory dishCategory);", "void deleteCategory(Category category);", "void delete(Category category);", "@Override\n public void deleteCategory(Category category) throws CostManagerException {\n try {\n Connection connection = DriverManager.getConnection(protocol);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of removeDevice method, of class AbstractModel.
@Test public void testRemoveDevice() { System.out.println("removeDevice"); final AbstractDeviceImpl dev1 = new AbstractDeviceImpl(); final UUID uid = dev1.getuID(); final AbstractModel<AbstractDeviceImpl, AbstractSettingsImpl> instance = new AbstractModelImpl(); instance.addD...
[ "@Test\n public void testCleanUpDevices() {\n System.out.println(\"cleanUpDevices\");\n final AbstractDeviceImpl dev1 = new AbstractDeviceImpl();\n final AbstractDeviceImpl dev2 = new AbstractDeviceImpl();\n final AbstractDeviceImpl dev3 = new AbstractDeviceImpl();\n final Abst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /cashbalances : get all the cashBalances.
@GetMapping("/cash-balances") @Timed public List<CashBalanceDTO> getAllCashBalances() { log.debug("REST request to get all CashBalances"); return cashBalanceService.findAll(); }
[ "@GetMapping(\"/bank-accounts\")\n @Timed\n public List<BankAccount> getAllBankAccounts() {\n log.debug(\"REST request to get all BankAccounts\");\n return bankAccountRepository.findAll();\n }", "public String getBalances() {\n\n\t\treturn getJson(API_VERSION, ACCOUNT, \"getbalances\");\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function is used to import the test data into an array.
public static void getTestData(){ try { BufferedReader in = new BufferedReader(new FileReader("src/testing.txt")); testData = new int[1797][65]; for(int i = 0; i < 1797; i++){ String[] line = in.readLine().split(","); for(int j = 0; j < 65; j++){ testData[i][j] = Integer.parseInt(line[j]); }...
[ "public static void getData(){\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"src/training.txt\"));\n\t\t\tinputData = new int[3823][65];\n\t\t\tfor(int i = 0; i < 3823; i++){\n\t\t\t\tString[] line = in.readLine().split(\",\");\n\t\t\t\tfor(int j = 0; j < 65; j++){\n\t\t\t\t\tinputData[i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method sets the value of the database column V_RP_DY_SGSN_AUTHEN_PAGING.PAGING_REQUEST
public void setPagingRequest(Long pagingRequest) { this.pagingRequest = pagingRequest; }
[ "public void setPagingRequest2g(Long pagingRequest2g) {\r\n this.pagingRequest2g = pagingRequest2g;\r\n }", "public void setRequestedPage(final java.lang.Integer requestedPage)\n\t{\n\t\tthis._requestedPage = requestedPage;\n\t}", "public Long getPagingRequest() {\r\n return pagingRequest;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Helper method to implement serverside validation of geographic coordinate values.
private String validateGeographicCoordinate(String stringValue, float minValue, float maxValue, String defaultValue) { String returnValue = defaultValue; String warning = ...
[ "public void testLatValid() throws Exception {\n assertTrue(SyntaxChecker.latValid(\"-43.516479\"));\n assertFalse(SyntaxChecker.latValid(\"-180000000\"));\n }", "public boolean validateLng() {\r\n\t\treturn true;\r\n\t}", "private boolean isValidLocation(float lat, float lon)\n {\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merge an answer tree into another answer tree.
public AnswerNode merge(AnswerNode base, AnswerNode newnode) { if (newnode != null) { if (base == null) { base = new AnswerNode(); } base.count++; AnswerNode newkids[] = new AnswerNode[Math.max(base.children.length, newnode.children.length)]; ...
[ "public void merge(Tree other)\n {\n\n }", "public AnswerNode buildAnswerTree() {\n AnswerNode root = null;\n for (TreeNode child : children) {\n root = merge(root, child.buildAnswerTree());\n }\n\n AnswerNode result = new AnswerNode();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.out.println("add log: " + _sid +" " + _query +" "+ _did +" "+_action);
public static void addLog(int _sid, String _query, int _did, String _action){ Logger log = new Logger(_sid, _query, _did, _action); if(_logs.containsKey(_sid) == false){ _logs.put(_sid, new Vector<Logger>()); } _logs.get(_sid).add(log); }
[ "abstract protected void logRequest();", "public Object LogAction(Object ... _p) {\n mVar idSession = m$.newVarRef(\"idSession\",(((_p!=null)&&(_p.length>=1))?_p[0]:null));\n //<< ;-------------------------------------------------------------------------------\n //<< ; Log last Action Event\n //<< ;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test 1 for getItemCount for LongTermStorage: checking counter for empty storage
@Test public void testLongTermStorageGetItemCount1() { assertEquals("The counter is wrong", BASE_VALUE, testLongTermStorage.getItemCount(item2.getType())); }
[ "@Test\r\n public void testLongTermStorageGetItemCount2()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"The counter is wrong\", BASE_VALUE, testLongTermStorage.getItemCount(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the SubnodeBTree class by reading in traversing the PST file and displaying all the subnode Btree leaves.
@SuppressWarnings("PMD.DoNotCallSystemExit") public static void main(final String[] args) { if (args.length == 0) { System.out.println("use:\n\tjava io.github.jmcleodfoss.pst.NodeBTree pst-file [pst-file ...]"); System.exit(1); } for (final String a: args) { System.out.println(a); try { java.i...
[ "static void parseGbk(File gbk_file, int subsequenceLength, BTree myBTree) {\n\n try {\n // Creates the File/Buffered Readers to process gbk file\n FileReader readFile = new FileReader(gbk_file);\n BufferedReader readBuffer = new BufferedReader(readFile);\n // Vari...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new instance of ReviewPhaseHandler using the default namespace for loading configuration settings.
public ReviewPhaseHandler() throws ConfigurationException { super(DEFAULT_NAMESPACE, false); }
[ "public ReviewPhaseHandler(String namespace) throws ConfigurationException {\r\n super(namespace, false);\r\n }", "public AggregationReviewPhaseHandler() throws ConfigurationException {\r\n super(DEFAULT_NAMESPACE);\r\n }", "public AggregationReviewPhaseHandler(String namespace)\r\n t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Determines the array index in which to insert the control point / into the internal control point array. /
public int findInsertionPos (double value) throws ExceptionInvalidParam { int insertionPos; for (insertionPos = 0; insertionPos < controlPointCount; insertionPos++) { if (value < controlPoints[insertionPos]) // We found the array index in which to insert the new control point. ...
[ "public int getShapePointIndex();", "public NurbsPoint get_control_point(int segment, int point) {\n return points[segment][point];\n }", "private int getArrayIndex() {\n\t\tswitch (getId()) {\n\t\tcase 3493:\n\t\t\treturn Recipe_For_Disaster.AGRITH_NA_NA_INDEX;\n\t\tcase 3494:\n\t\t\treturn Recipe_Fo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set old type (used for last geometry)
public void setOldType(TypeElement type) { oldType = type; }
[ "public void alterType(AttrType newType) { type = newType; }", "void changeType(NoteTypes newType) {\n this.type = newType;\n }", "protected void updateType() {\n\t\tsType = type.getItem(type.getSelectionIndex());\n\n\t}", "protected void updatePointType()\n {\n if ( inhibitChanges ) return;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The surface area of the can.
public double getSurfaceArea () { return ((2 * Math.PI) * (radius * radius) + (2 * Math.PI) * radius * canHeight); }
[ "public double getSurfaceArea() {\n\n return surfaceArea;\n }", "public double getSurfaceArea() {\n return getSurfaceWidth() * getSurfaceLength();\n }", "public double surfaceArea()\r\n {\r\n double surfaceArea = baseArea() + sideArea();\r\n return surfaceArea;\r\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
hasNextExpansion(); return true if it can generate another expansion. Mimics a breadth 1st search to return shortest first. Stops when combinations available, given existing leaf, maxDepth and maxHistory, is exhausted.
public boolean hasNextExpansion() { ParameterSelected lastElement; do { do { lastElement = (ParameterSelected) expansion.lastElement(); expansion.remove(lastElement); lastElement = nextElement(lastElement); if (lastElement != null) expansion.add(lastElement); } while (lastElement == nu...
[ "public void checkExpansion() {\r\n if (currentNode.isLeaf()) { //If this node is a leaf, we've reached the bottom of the tree.\r\n currentNode.expand(currentDepth + turnLookAhead); //Expand node to next turn look ahead. \r\n currentDepth += turnLookAhead; //Update the current depth of ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get api random code
public static String getAPIRandomCode() { return getRandomCode(20); }
[ "private int generateRandomCode() {\n Random r = new Random( System.currentTimeMillis() );\n return ((1 + r.nextInt(2)) * 10000 + r.nextInt(10000));\n }", "@GET\n @Path(\"/randomquestion\")\n public String getRandomQuestion() {\n return \"test\";\n //return map.keySet().toArra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__S_Action__Group_4__0__Impl" $ANTLR start "rule__S_Action__Group_4__1" InternalGaml.g:8032:1: rule__S_Action__Group_4__1 : rule__S_Action__Group_4__1__Impl rule__S_Action__Group_4__2 ;
public final void rule__S_Action__Group_4__1() throws RecognitionException { int rule__S_Action__Group_4__1_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 444) ) { return ; } // Inte...
[ "public final void rule__S_Action__Group__4__Impl() throws RecognitionException {\n int rule__S_Action__Group__4__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 437) ) { return ; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__HttpHeader__Group__4" $ANTLR start "rule__HttpHeader__Group__4__Impl" InternalPartitur.g:2362:1: rule__HttpHeader__Group__4__Impl : ( ')' ) ;
public final void rule__HttpHeader__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalPartitur.g:2366:1: ( ( ')' ) ) // InternalPartitur.g:2367:1: ( ')' ) { // InternalPartitur.g:2367:1: ( ')' ) ...
[ "public final void rule__HttpHeader__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:2355:1: ( rule__HttpHeader__Group__4__Impl )\n // InternalPartitur.g:2356:2: rule__HttpHeader__Group__4__Impl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column user_bind_mlx.open_id
public void setOpenId(String openId) { this.openId = openId == null ? null : openId.trim(); }
[ "public void setOpenId(String openId) {\n this.openId = openId == null ? null : openId.trim();\n }", "public void setOpenId(String openId) {\n this.openId = openId;\n }", "public void setUserOid(long value) {\r\n this.userOid = value;\r\n }", "public void setOpenid(String openid)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the IsIndividualProvider value for this IsIndividualProvider.
public String getIsIndividualProvider() { return IsIndividualProvider; }
[ "public void setIsIndividualProvider(String IsIndividualProvider) {\n this.IsIndividualProvider = IsIndividualProvider;\n }", "public ProviderIdentity getProviderIdentity() {\n\t\treturn this.providerIdentity;\n\t}", "public boolean isProviderEnabled() {\n Criteria criteria = this.criteria == n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs and initialize a CardBalance of balance (dollar.cent)
public CardBalance(Integer dollar, Integer cent) { this.dollar = dollar; this.cent = cent; }
[ "public CurrencyControl()\r\n {\r\n customerBalance = 0.00;\r\n machineBalance = 50.00;\r\n }", "public Balance() {\r\n value = BigDecimal.ZERO;\r\n }", "public BankAccount() {\n\t\tbalance = 0.0;\n\t}", "public Cash(double amount) {\n this.amount = amount;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor to create an instance of class 'Gripper_io'. This constructor is automatically generated. Please, do not modify!
@Inject public Gripper_ioIOGroup(Controller controller) { super(controller, "Gripper_io"); addDigitalOutput("Close", IOTypes.BOOLEAN, 1); addDigitalOutput("Open", IOTypes.BOOLEAN, 1); addInput("Status", IOTypes.BOOLEAN, 1); }
[ "public void openGripper(){\r\n\t\tbuffer += gripperOpenCommand;\r\n\r\n\t}", "public Pile() {\r\n\t\tconstruirePile();\r\n\t}", "public Nim() {\n\n /*\n Instance Variable newPile Initialized to new Pile\n */\n newPile = new Pile() ;\n\n }", "public void setGripperSocket(@Nulla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an array of independent nodes containing a code from 0 to 254 and a frequency. Order them in a specific way : find the minimum of frequencies and the minimum comparing ASCII code
private ArrayList<Node> fillNodes(int[] freq){ ArrayList<Node> nodes = new ArrayList<Node>(); int min = 0; //Parcourt le tableau de frequence et trouve le minimum dans l'ordre Ascii //Puis lui met la valeur 0, jusqu'à que toutes les valeurs soient passées à 0 while((min = getMinFromFreqs(freq)) != -1){ Nod...
[ "PriorityQ<BinaryTreeNode<Byte>> makeQueue(int[] array){\n PriorityQ<BinaryTreeNode<Byte>> queue = new PriorityQ<BinaryTreeNode<Byte>>();\n \n for (int i=0;i<256;i++){\n if (array[i] != 0){ //Make sure the character actually exists in the data\n BinaryTreeNode<Byte> newNode = new BinaryTreeNode...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: parameterize extracting other blob metadata, eg. md5, crc, etc. This initializes the gcs storage client.
@Override public void initialize(Map<String, Param> params) throws TikaConfigException { //params have already been set...ignore them //TODO -- add other params to the builder as needed storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService(); }
[ "private RequestBlob() {\n initFields();\n }", "public AWSStorageGatewayClient() {\n this(new DefaultAWSCredentialsProviderChain(), new ClientConfiguration());\n }", "private StorageAccess(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Open file path and return input stream
private InputStream open(File path) { try { return new FileInputStream(path); } catch (FileNotFoundException err) { throw new RuntimeException(err); } }
[ "InputStream openInputStream() throws IOException;", "InputStream getInputStream (String fileName);", "@Override\n public InputStream openInputFile(@NonNull String pathname) throws FileNotFoundException {\n Uri dataUri = getInputFileUri(pathname);\n return TestStorageUtil.getInputStream(dataUri, contentR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the string of Sector for the GINI image file
String gini_GetSectorID(int ent_id) { String name; switch (ent_id) { case 0: name = "Northern Hemisphere Composite"; break; case 1: name = "East CONUS"; break; case 2: name = "West CONUS"; break; case 3: name = "Alaska Regional"; ...
[ "public java.lang.CharSequence getSector() {\n return sector;\n }", "public String getSrcIndustrySector() {\r\n return (String) getAttributeInternal(SRCINDUSTRYSECTOR);\r\n }", "int getSector();", "public abstract char getOccupationRepresentation();", "java.lang.String getDisk();", "java.lan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method which initializes the board object, including creating all the pieces and inserting them in the correct piece list, and placing the pieces on the board
public static void boardInit() { ArrayList<Piece> white_piece_list = new ArrayList<>(); ArrayList<Piece> black_piece_list = new ArrayList<>(); ArrayList<Piece> piece_array = PieceFactory.createPieces(); for(Piece p : piece_array) { if(p.getColor()) { ...
[ "public void initBoard() {\n\t//\temptyBoard(); //removes the board from pieces\n\t\tcreatePieces(); //creates piece objects\n\t//\tpopulateBoard(); //populates the board with piece objects\n\t}", "private void setUpBoard() {\r\n board[0][0] = new Piece(Piece.PieceType.ROOK, Piece.ColorType.BLACK, \"0_BRoo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether blitaccelerated scrolling is feasible, and if so, checks whether true double buffering is available.
private void checkScrollingCapabilities() { if (myPreviousNotification == null || myPreviousNotification.isExpired()) { if (!Boolean.TRUE.equals(isWindowBlitterAvailableFor(this))) { myPreviousNotification = notify("Scrolling: cannot use window blitter"); //NON-NLS } else { if (!Bo...
[ "private static @Nullable Boolean isTrueDoubleBufferingAvailableFor(JComponent component) {\n if (ourGetPaintManagerMethod.isAvailable()) {\n Object paintManager = ourGetPaintManagerMethod.invoke(RepaintManager.currentManager(component));\n\n if (!\"javax.swing.BufferStrategyPaintManager\".equals(paint...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the recipe description.
public String getRecipeDescription() { return recipeDescription; }
[ "public String getDescription(){\n\n //returns the value of the description field\n return this.description;\n }", "public String getDescription(){\r\n \tString retVal = this.description;\r\n return retVal;\r\n }", "public String getDescription() {\n return getGenericFieldValue(\"Desc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.kitty_protos.StopServer stopServer = 1;
private void setStopServer(kitty_protos.StopServerOuterClass.StopServer value) { if (value == null) { throw new NullPointerException(); } stopServer_ = value; }
[ "kitty_protos.StopServerOuterClass.StopServer getStopServer();", "kitty_protos.WorldMessageOuterClass.W2G_StopServer getW2GStopServer();", "StopServerAction.Builder stop(Server server);", "void stopRpcServer(Pointer executor);", "void stopHelloSender();", "void stopEngineServer(Pointer executor);", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_ydzf_complaint.COMPLAINT_INSPECT_AUDIT_ADVICE
public String getComplaintInspectAuditAdvice() { return complaintInspectAuditAdvice; }
[ "public String getComplaintAuditAdvice() {\n return complaintAuditAdvice;\n }", "public Integer getNeedAudit() {\n return needAudit;\n }", "public Long getAuditDoctor() {\n return auditDoctor;\n }", "public String getIsaudit() {\n return isaudit;\n }", "AuditType getA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the upgrade execution context.
public void setContext( UpgradeContext context ) { this.context = context; upgradeContext = context; }
[ "public void setContext(Object context);", "@Override\n public void setContext (Object context){\n this.context = (Context)context;\n }", "public void setContext(Context context) {\n this.contextMain = context;\n }", "public void setContext(ScriptContext context);", "public void setCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update information in rental table Method use for update rental bike
@Override public boolean update(Rental rental) throws SQLException { String sqlUpdate = "UPDATE RENTAL " + "SET bike_id = ?," + "rent_station_id = ?," + "return_station_id = ?," + "status = ?," +...
[ "public void updateRental(Rental rental) throws ValidatorException {\n this.rentalRepository.update(rental)\n .orElseThrow(() -> new ControllerException(String.format(\"(Update) Rental id not found: %d\", rental.getId())));\n }", "@FXML\n public void updateRental(ActionEvent e) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtiene los impactos de todas las actividades. Por ser una actividad compuesta el peso del impacto sera el promedio del peso del impacto de las actividades que la componen para dicho objetivo.
@Override public List<Impacto> getImpactos() { return null; }
[ "public void obtenerPromedioActividades() {\r\n\t\tint cantActividades = 0;\r\n\t\tint acumuloActividades = 0;\r\n\t\tint cantSocios = 0;\r\n\t\tdouble promedio = 0;\r\n\r\n\t\tfor (Socio socio : socios) {\r\n\t\t\tcantActividades = socio.dameLaCantDeActividades();\r\n\t\t\tacumuloActividades += cantActividades;\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filter Requirement according to date,if Open Date2 is null, it will take Current Date
@Override public ResponseEntity<List<Requirement>> filterRequirementsByDate(LocalDate openDate1, LocalDate openDate2) { // Will filter the Requirement List according to Dates provided List<Requirement> requirementListByFilter = requirementRepository.findRequirementByDates(openDate1, openDate2); if (requirementL...
[ "boolean isFilterByDate();", "private boolean validFilterTestCondition() {\r\n\t\tboolean flag = true; \r\n\t\tif(advanceFilterModel.getFromDate()!=null && advanceFilterModel.getToDate()!=null){\r\n\t\t\tint comparison=advanceFilterModel.getFromDate().compareTo(advanceFilterModel.getToDate());\r\n\t\t\tif(compari...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Object__Group_2__0__Impl" $ANTLR start "rule__Object__Group_2__1" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:6084:1: rule__Object__Group_2__1 : rule__Object__Group_2__1__Impl ;
public final void rule__Object__Group_2__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:6088:1: ( rule__Object__Group_2__1__Impl ) ...
[ "public final void rule__Object__Group__1() 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:5773:1: ( rule__Object__Group...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if the effect of the first draw works
@Test public void firstDrawEffectsTest(){ gameCore = new GameCore(null); gameCore.setupGame(4, uuids, false); gameCore.deck.getCards().add(0, new Card(Color.RED, Type.DRAW, 1)); gameCore.firstDraw(); assertEquals(9, gameCore.getPlayers().get(gameCore.getNextPlayer()).getCards().size()); assertTrue(gameCore...
[ "boolean hasIsDraw();", "public boolean isDrawn();", "public void testIsDraw() {\n System.out.println(\"isDraw\");\n assertEquals(false, model.isDraw());\n }", "int getIsDraw();", "boolean isLineDrawn();", "private boolean withdraw() {\n\t\tdouble value = random.nextDouble();\n\t\treturn ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the url for a specified logical site map entry
public String getSiteMapURL(HttpServletRequest req, String logicalName, String additionalParms, boolean javaScriptOK) { return getSiteMapURL(req,logicalName, additionalParms,javaScriptOK,false); }
[ "public String getSiteMapURL(HttpServletRequest req, String logicalName) {\r\n\t\treturn getSiteMapURL(req, logicalName, null, true);\r\n\t}", "public String getSiteMapURL(HttpServletRequest req, String logicalName, String additionalParms) {\r\n\t\treturn getSiteMapURL(req, logicalName, additionalParms, true);\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Expands an array of Objects to double of its current size. Remember to use cast to turn the result into an array of the appropriate class, i.e: someArray=(SomeClass [])unlekker.util.Util.expandArray(someArray);
static public Object expandArray(Object[] list) { int newSize=list.length*2; Class type = list.getClass().getComponentType(); Object temp = Array.newInstance(type, newSize); System.arraycopy(list, 0, temp, 0, Math.min(Array.getLength(list), newSize)); return temp; }
[ "private void expandArray() {\n\t\tReturnObjectImpl[] tempArray = new ReturnObjectImpl[Storage * 2];\n\t\tfor(int i = 0; i < Storage; i++) {\n\t\t\ttempArray[i] = arrayList[i];\n\t\t}\n\t\tarrayList = tempArray;\n\t\tStorage = Storage * 2;\n\t}", "private void doubleSizeOfElementsArray() {\n\t\tObject[] doubleSiz...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the innerProperties property: Metadata describing a workbook for an Azure resource.
private WorkbookTemplateProperties innerProperties() { return this.innerProperties; }
[ "private BackupItemProperties innerProperties() {\n return this.innerProperties;\n }", "private MarketplaceProperties innerProperties() {\n return this.innerProperties;\n }", "private SiteExtensionInfoProperties innerProperties() {\n return this.innerProperties;\n }", "private Wo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a common OnClickListener for operators
private void setOperatorOnClickListener() { View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { // If the current state is Error do not append the operator // If the last input is number only, append the ope...
[ "public OperatorButtonListener(String anOperator)\r\n {\r\n operator = anOperator;\r\n }", "public void clickOperator(View view){\n button = (Button)view;\n operatorSelected = true;\n\n //assigns clicked operator to proper operator variable\n //the firstOperator and...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessors and mutators for ScriptID
protected void setScriptID(int newScriptID) { scriptID = newScriptID; }
[ "public int getScriptId() {\r\n return scriptId;\r\n }", "public String getScriptId() {\n return scriptId;\n }", "public String getScriptId() {\n return scriptId;\n }", "public void setScriptId(int value) {\r\n this.scriptId = value;\r\n }", "public String getScriptScriptId...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the current parameter
public void setCurrentParameter( StoredProcedureParameter currentParameter ) { this.currentParameter = currentParameter; }
[ "public synchronized void setCurrentParameter(Object currentParameter) {\n\t\tthis.currentParameter = currentParameter;\n\t}", "void setParameter(String name, String value);", "void set(Parameter param, Object value);", "public void setParameter(String parameter, String value);", "void setParameterValue(Par...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Format a double cost value as a string (returns NaN if the cost is > 1d)
private static String formatCost(double cost) { if (cost <= 1d) return new Double(cost).toString(); return "NaN"; }
[ "public String getShippingCostsAsString()\r\n {\r\n final DecimalFormat f = new DecimalFormat(\"#0.00\");\r\n double temp = shippingCosts;\r\n temp = temp * 100;\r\n temp = Math.round(temp);\r\n temp = temp / 100;\r\n return f.format(temp).replace(',', '.');\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
auto generated Axis2 call back method for insertUser method override this method for handling normal response from insertUser operation
public void receiveResultinsertUser( com.solusoft.jpa.IDocServiceStub.InsertUserResponse result ) { }
[ "public void receiveResultinsertUserExt(\r\n com.solusoft.jpa.IDocServiceStub.InsertUserExtResponse result\r\n ) {\r\n }", "eu.aladdin_project.storagecomponent.CreateUserResponseDocument.CreateUserResponse addNewCreateUserResponse();", "public void receiveResu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method prompts for row and seat number, checks to see if it is taken, it if is it alerts the user, if not, it creates the row and passes the seat to the Row class.
public void reserveSeat() { Scanner input = new Scanner(System.in); int row; int seat; int arrayCounter = 0; // Used as a counter to iterate through the ArrayList. boolean rowExists = false; ...
[ "public void chooseSeat() {\n\t\tboolean correctSeat = false;\n\t\twhile (correctSeat = false) {\n\t\t\tfor (int i = 0; i < 6; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tseat[i][j] = \"#\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (String[] a : seat) {\n\t\t\t\tfor (String i : a) {\n\t\t\t\t\tSystem.out.print(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: com.fasterxml.jackson.databind.f.c / compiled from: SchemaAware
public interface SchemaAware { /* renamed from: a */ JsonNode mo31470a(SerializerProvider zVar, Type type) throws JsonMappingException; /* renamed from: a */ JsonNode mo31471a(SerializerProvider zVar, Type type, boolean z) throws JsonMappingException; }
[ "@Override\n public JsonNode getSchema(SerializerProvider provider, Type typeHint)\n {\n return createSchemaNode(\"date\", true);\n }", "@JsonPropertyOrder(value = { \"type\", \"format\" }, alphabetic = true)\npublic interface SortedSchemaMixin {\n\n\t/**\n\t * Gets extensions.\n\t *\n\t * @return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the transport for this server
Transport getTransport();
[ "public String getTransport() {\n\t\treturn messageProcessor.getTransport();\n\t}", "public String getTransport() {\n return (String) getAttributeInternal(TRANSPORT);\n }", "public String getTransportType() {\n return transportType;\n }", "public final HttpTransport getTransport() {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the array of inner classes for the class and all its superclasses.
PsiClass @NotNull [] getAllInnerClasses();
[ "@Override\n PsiClass @NotNull [] getInnerClasses();", "public List<InnerClass> getInnerClasses() {\n\t\treturn innerClasses;\n\t}", "public RubyArray declared_classes() {\n if (Ruby.isSecurityRestricted()) // Can't even get inner classes?\n return getRuntime().newArray(0);\n Class[] ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the set of ice cream flavors.
public void makeSet() { for (int i = 1; i <= 12; i++) { if (i % 2 == 0 && i % 3 == 0) { // Any flavor number divisible by 2 AND 3 is vanilla chocolate this.flavors[i - 1] = new Flavor(i, "Vanilla Chocolate", i * 2); } else if (i % 2 == 0) { // Any flavor number divisible by 2 is vanilla ...
[ "Flavor create(Flavor flavor);", "@NonNull\n private static String[] getFlavorNames(@NonNull Context context, int app) {\n final Resources res = context.getResources();\n switch(app) {\n case APP_BEER:\n return res.getStringArray(R.array.beer_flavor_names);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }