query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
This request is handled when user wants to sort projects by technologies They will be sorted and displayed
@PostMapping("/matchProjectsByTechnologies") public String sortProjectsByTechnologies( @RequestParam(name = "tech", required = false) List<String> techs, Model model, Principal auth, RedirectAttributes redirectAttributes ) { if (auth != null) { ...
[ "public void sortProjects(){\n\t\tProject.sort(\"eval\", projects);\n\t}", "public void sortByNameLocation()\r\n\t{\n\t\tSorts.sort(projectList, new ProjNameComparator());\r\n\t}", "public default void addOrderBy(JPAQuery<Collaborator_ProjectEntity> query, Collaborator_ProjectEntity alias,\n Sort sort) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleLogicalNotExpression" $ANTLR start "ruleLogicalNotExpression" ../org.yakindu.sct.model.stext/srcgen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2692:1: ruleLogicalNotExpression returns [EObject current=null] : (this_BitwiseXorExpression_0= ruleBitwiseXorExpression | ( () other...
public final EObject ruleLogicalNotExpression() throws RecognitionException { EObject current = null; Token otherlv_2=null; EObject this_BitwiseXorExpression_0 = null; EObject lv_operand_3_0 = null; enterRule(); try { // ../org.y...
[ "public final EObject ruleLogicalNotExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_2=null;\r\n EObject this_LogicalRelationExpression_0 = null;\r\n\r\n EObject lv_operand_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method gets the tabindex of the input.
public int getTabIndex() { return _tabindex; }
[ "public int getTabIndex() {\n return tabindex;\n }", "public final String getTabIndexAttribute() {\n return getAttributeValue(\"tabindex\");\n }", "public final String getTabIndexAttribute() {\n return getAttributeValue(\"tabindex\");\n }", "public int getTabIndex() {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if passengers is greater than seating, throws exception
public void seatPassengers(int passengers) throws IllegalSizeException { if (passengers > seating) { throw new IllegalSizeException(); } }
[ "@Test\n\tpublic void testPassengerBoardMoreThanNumOfSeats() throws TrainException\n\t{\n\t\tInteger grossWeight = 1;\n\t\tInteger numberOfSeats = 10;\n\t\tInteger newPassengers = 15;\n\t\t\n\t\tasgn2RollingStock.RollingStock passengerCarUnderTest = \n\t\t\tnew asgn2RollingStock.PassengerCar((Integer)grossWeight, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner NONNULL_PTR this_arg);
public static native long InMemorySigner_funding_outpoint(long this_arg);
[ "public static native long DirectedChannelTransactionParameters_funding_outpoint(long this_arg);", "public static native long ChannelTransactionParameters_get_funding_outpoint(long this_ptr);", "public static native void ChannelTransactionParameters_set_funding_outpoint(long this_ptr, long val);", "public sta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve all the book IDs from the database
public List<Long> getBookIds() throws SQLException { List<Long> ids = new ArrayList<>(); String selectString = String.format("SELECT %s FROM %s", Column.ID.name, TABLE_NAME); LOG.debug(selectString); Statement statement = null; ResultSet resultSet = null; try { Connection connection = database.getConne...
[ "ArrayList<Integer> getBookIds();", "public List<Long> getBookIds() throws SQLException {\n\t\tList<Long> ids = new ArrayList<>();\n\n\t\tString selectString = String.format(\"SELECT %s FROM %s\", Column.ID.name, TABLE_NAME);\n\t\tLOG.debug(selectString);\n\n\t\tStatement statement = null;\n\t\tResultSet resultSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lazy creation of the singleton instance of the SearchServiceManager. A userprovided name is used for the SearchServiceManager.
public static SearchServiceManager getInstance(String name) { if (instance == null) { instance = new SearchServiceManager(name); try { Logger.setup("ssm"); } catch (IOException e) { System.err.println("Could not set up ssm logging"); } } return instance; }
[ "public static SearchServiceManager getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new SearchServiceManager(ud.unique());\n\t\t\ttry {\n\t\t\t\tLogger.setup(\"ssm\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Could not set up ssm logging\");\n\t\t\t}\n\t\t}\n\t\treturn instance;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a cell to this row.
public void addCell(DataCell cell) { cells.add(cell); }
[ "public void addCell(Cell cell) \n {\n cells.add(cell);\n }", "public void addCell(Matcher<Cell> cell) {\n this.cells.add(cell);\n }", "private void addCell() {\n this.cellList.add(new Cell());\n }", "protected void addCell(Cell cell) {\n cells[size] = cell;\n ++si...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method takes in one in value, and sets the goon's attack equal to that value
public void setAttack(int value) { this.attack = value; }
[ "public void setAttack(int attack) {\n base.setAttack(attack);\n }", "public void setAttack(int amount) {\n\t\tthis.attack += amount;\n\t\tif (this.attack < 0) {\n\t\t\tthis.attack = 0;\n\t\t}\n\t}", "public void setAttackNum(int attackNum)\n {\n this.attackNum = attackNum;\n }", "@Over...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field new_pwd is set (has been assigned a value) and false otherwise
public boolean isSetNew_pwd() { return this.new_pwd != null; }
[ "boolean hasNewPwd();", "boolean hasIschangePwd();", "private boolean doCheckNewPassword() {\n\t\tif (!newPassword.equals(confirmPassword)) return false;\n\t\trecord(\"new password checked\");\n\t\treturn true;\n\t}", "boolean hasChangePwdFlg();", "public boolean isSetIsNewPasswordValid() {\n return Enco...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "decproc" $ANTLR start "ptvg" projet.g:83:1: ptvg : ( ';' |);
public final void ptvg() throws RecognitionException { try { // projet.g:83:7: ( ';' |) int alt22=2; int LA22_0 = input.LA(1); if ( (LA22_0==18) ) { alt22=1; } else if ( (LA22_0==EOF||LA22_0==ID||LA22_0==27||(LA22_0 >= 29 && LA22_0 <= 30)||LA22_0==34||LA22_0==48||LA22_0==50||LA22_0==54) ) { ...
[ "public final void decprocs() throws RecognitionException {\n\t\ttry {\n\t\t\t// projet.g:77:9: ( ( decproc ptvg )+ )\n\t\t\t// projet.g:77:11: ( decproc ptvg )+\n\t\t\t{\n\t\t\t// projet.g:77:11: ( decproc ptvg )+\n\t\t\tint cnt17=0;\n\t\t\tloop17:\n\t\t\twhile (true) {\n\t\t\t\tint alt17=2;\n\t\t\t\tint LA17_0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Store Pax Combination in Generic Search
public void storeGenericPaxCombination() { adultCountGen = genericSearchResponse.path("data[0].travellerInfo.adult").toString(); logger.info("Adult Count in Generic Search is: " + adultCountGen); childCountGen = genericSearchResponse.path("data[0].travellerInfo.child").toString(); logg...
[ "public abstract void searchMutant();", "public PostingsList search( Query query, int queryType, int rankingType, int structureType ) {\r\n\t// \r\n\t// REPLACE THE STATEMENT BELOW WITH YOUR CODE\r\n\t// DONE\r\n // for (String s: docIDs.keySet()){\r\n // System.out.format(\"Key: %s Value:%s\",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given an ontology, an optional set of annotation properties, and an optional set of subject, return a set of annotation assertion axioms for those subjects and those properties.
public static Set<OWLAnnotationAssertionAxiom> getAnnotationAxioms( OWLOntology ontology, Set<OWLAnnotationProperty> properties, Set<IRI> subjects) { Set<OWLAnnotationAssertionAxiom> results = new HashSet<OWLAnnotationAssertionAxiom>(); for (OWLAxiom axiom : ontology.getAxioms()) { if (!(axiom inst...
[ "public static Set<OWLAnnotationAssertionAxiom> getAnnotationAxioms(\n OWLOntology ontology, OWLAnnotationProperty property, IRI subject) {\n Set<OWLAnnotationProperty> properties = new HashSet<OWLAnnotationProperty>();\n properties.add(property);\n Set<IRI> subjects = null;\n if (subject != null) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return path to project build script.
public String getBuildScriptPath() { return fBuildPath; }
[ "java.lang.String getProjectDir();", "String getTemplateProjectPath();", "public String getProjectPath() {\n String path = null;\n try {\n String tmp = Paths.get(ClassLoader.getSystemResource(\"\").toURI()).getParent().toString();\n int idx = tmp.lastIndexOf(File.separator);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a HashCodeHasher using the specified salt value.
public HashCodeHasher(String salt) { this.salt = salt; postConfig(); }
[ "public abstract byte[] hash(String value, byte[] salt);", "public static String hashN( String value, String salt ) throws Exception {\r\n String hashValue = hash(value, salt);\r\n\r\n for( int i = 0; i < iterations; i++ ) {\r\n hashValue = hash( hashValue, salt );\r\n }\r\n\r\n return hashValue;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new Upgrade SOAPHeaderElement object initialized with the specified List of supported SOAP URIs and adds it to this SOAPHeader object. This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
public SOAPHeaderElement addUpgradeHeaderElement(Iterator soapURIs) throws SOAPException;
[ "public SOAPHeaderElement addUpgradeHeaderElement(String[] soapURIs) throws SOAPException;", "public SOAPHeaderElement addUpgradeHeaderElement(String soapURI) throws SOAPException;", "public interface SOAPHeader extends SOAPElement\n{\n /**\n * Creates a new SOAPHeaderElement object initialized with the sp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set page number of SQLowIdentifier
public void setPage(SQLInteger page) { this.page = page; }
[ "public void setInitialPageNumber(int page) {}", "public void setNumDBPages(int num)\n throws IOException\t\n {\n Convert.setIntValue (num, NUM_DB_PAGE, data);\n }", "public void setPageNumber(String id, int pageNumber)\n { \n IDNode node=(IDNode)idReferences.get(id); ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populates the testManagers ArrayList with 3 ArrayLists representing the types of board managers.
private void addTestManagerLists() { testManagers = new ArrayList<>(); ArrayList<BoardManager> slidingManagers = new ArrayList<>(0); ArrayList<BoardManager> _4096Managers = new ArrayList<>(0); ArrayList<BoardManager> pipelinesManagers = new ArrayList<>(0); testManagers.add(slid...
[ "private void addManagersToTestManagers() {\n BoardManagerSlidingTiles boardManagerSlidingTiles = new BoardManagerSlidingTiles(3,\n 3);\n BoardManager4096 boardManager4096 = new BoardManager4096(new GridMover(), new Score(0));\n BoardManagerPipelines boardManagerPipelines = new B...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Contexts: MusicSpecification returns MusicSpecification Constraint: (buffersize=INT MusicPath+=MusicPath)
protected void sequence_MusicSpecification(ISerializationContext context, MusicSpecification semanticObject) { genericSequencer.createSequence(context, semanticObject); }
[ "private String addMusic() {\n\t\t// One Parameter: MusicName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|music:\" + parameters[0]);\n\t\treturn tag.toString();\n\n\t}", "protected void sequence_MusicPath(ISerializationContext context, MusicPath semanticObject) {\n\t\tif (errorAcceptor != nul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PrintLogStatement__StAssignment_1" $ANTLR start "rule__GenCodeStatement__CompAssignment_1_0" InternalDsl.g:40506:1: rule__GenCodeStatement__CompAssignment_1_0 : ( RULE_ID ) ;
public final void rule__GenCodeStatement__CompAssignment_1_0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:40510:1: ( ( RULE_ID ) ) // InternalDsl.g:40511:2: ( RULE_ID ) { // InternalDsl.g:40511:2: ( R...
[ "public final void rule__GenLnCodeStatement__CompAssignment_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:40540:1: ( ( RULE_ID ) )\n // InternalDsl.g:40541:2: ( RULE_ID )\n {\n // Internal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to read line from console view
public String getLine() throws IOException { return view.readLineFromScreen(); }
[ "private String readLine() {\n safePrinter.print(PROMPT);\n return console.nextLine();\n }", "private String readLine() throws IOException {\n\t\tif(stdIn==null) {\n\t\t\tstdIn=new BufferedReader\n\t\t\t\t(new InputStreamReader(System.in));\n\t\t}\n\t\treturn stdIn.readLine();\n\t}", "public st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "verStmt" element
public void unsetVerStmt() { synchronized (monitor()) { check_orphaned(); get_store().remove_element(VERSTMT$22, 0); } }
[ "public void setVerStmt(edu.umich.icpsr.ddi.VerStmtType verStmt)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.VerStmtType target = null;\n target = (edu.umich.icpsr.ddi.VerStmtType)get_store().find_element_user(VERSTMT$22, 0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/given I display a week which is not the current week, when I click on the refresh icon, I still see the week I have selected.
private static void adminCanSeeSamePageOfCalendarAfterRefresh(WebDriver driver) { // TODO Auto-generated method stub System.out.println("given I display a week which is not the current week, when I click on the refresh icon, I still see the week I have selected."); driver.findElement(By.xpath("//div[@id='sidebar'...
[ "@FXML\n private void weeklyViewClicked() {\n try {\n calendar.setCurrentView(CalendarView.Timetable);\n } catch (Exception e) {\n logger.log(Level.SEVERE, e.toString());\n }\n }", "public void weeklyRadioAction() {\r\n isWeekly = true;\r\n appointmen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method to prepare the GameScoresList into a list of String.
abstract void buildDisplayGameScoresList();
[ "private ArrayList<String> convertToStringArrayList() {\r\n\t\tArrayList<String> strList = new ArrayList<String>();\r\n\t\tStringBuilder strBuilder = new StringBuilder();\r\n\t\tfor (int i = 0; i < gameBoard.getmBoard().length; i++) {\r\n\t\t\tfor (int j = 0; j < gameBoard.getmBoard()[0].length; j++) {\r\n\t\t\t\ts...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the hyperbolic sine Matrix matrix.
public static Matrix sinh(Matrix matrix) { double[][] M = matrix.getArray(); int row = matrix.getRowDimension(), col = matrix.getColumnDimension(); Matrix X = new Matrix(row, col); double[][] C = X.getArray(); double val = 1.0; for (int i = 0; i < row; i++) { ...
[ "public double sine()\n {\n return Math.sin( result );\n }", "public static Matrix sin(Matrix matrix)\n {\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n double[][] M = matrix.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the description of a digital object with the uuid
String getDescription(String uuid) throws DatabaseException;
[ "ObjectDetails describeObject(String objectId);", "java.lang.String getDesc();", "public static String getDescriptionOf(Object object) {\n return getDescriptionOf(object.getClass());\n }", "String getCardDescription();", "String getObjectDescription(int speed);", "String getTechnicalDescription();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'XStep Min' attribute. If the meaning of the 'XStep Min' attribute isn't clear, there really should be more of a description here...
float getXStepMin();
[ "public int getxMin() {\n\t\treturn xMin;\n\t}", "public int getxMin() {\n return xMin;\n }", "public double get_min_x() {\n\t\treturn min_x;\n\t}", "float getMinStep();", "public Double getXmin() {\n\treturn xmin;\n }", "public int getMinX() {\n return getX();\n }", "public doubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test hasNextBytes() method, successfully done, return the flag for hasNextBytes.
public void testhasNextBytesSuccess() throws Exception { String text = "A piece of text"; byte[] bytes = text.getBytes(); InputStream is = new ByteArrayInputStream(bytes); BytesIterator iterator = new InputStreamBytesIterator(is, bytes.length + 1); assertTrue("Should have ne...
[ "boolean hasMoreBytes();", "public boolean hasMore() {\n return bytes.hasRemaining();\n }", "public synchronized boolean hasRemaining() {\n return byteBuffer.hasRemaining();\n }", "boolean hasBytesValue();", "boolean hasEndByte();", "public void testNextBytesSuccess() throws Exce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find car by Model
public abstract List<CarTO> findCarByModel(String model);
[ "@Override\n public List<Car> findCarsByModel(String model) throws CarDBException {\n Session session = null;\n List<Car> cars = null;\n try {\n session = factory.openSession();\n tx = session.beginTransaction();\n cars = session.getNamedQuery(\"findCarsByMod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ / Notifies the DataGrid that the display index for this column changed. /
private static void DisplayIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { // Cells and ColumnHeaders invalidate Arrange; ColumnCollection handles modifying the DisplayIndex of other columns. ((DataGridColumn)d).NotifyPropertyChanged( d, ...
[ "private static Object OnCoerceDisplayIndex(DependencyObject d, Object baseValue) \r\n {\r\n DataGridColumn column = (DataGridColumn)d;\r\n\r\n if (column.DataGridOwner != null) \r\n {\r\n column.DataGridOwner.ValidateDisplayIndex(column, (int)baseValue); \r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If update file exist, run it and exit.
private void checkUpdate() { // for Linux platforms, this will be done in the startserver.sh if (!Constant.isWindows()) { return; } File file = new File(System.getProperty("user.dir") + File.separator + "parosnew.exe"); String dir =...
[ "public void run()\n\t{\n\t\tString releaseFilename = null;\n\n\t\t// 1. Find the local release.xml file. Bail with exception if we cannot find it.\n\t\ttry\n\t\t{\n\t\t\treleaseFilename = _util.getLocalReleaseFile().getAbsolutePath();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\ts_log.error(\"Unexpected exception...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor that provides a set of hops to mock.
public MockPathService(String[] pathHops) { this.pathHops = pathHops; String[] reversed = pathHops.clone(); Collections.reverse(Arrays.asList(reversed)); reversePathHops = reversed; }
[ "public Hop() {\n // empty\n }", "public MockBaseMiscService() {\n // Empty\n }", "public GumballMachineTest()\n {\n gumballM1 = new GumballMachine(gumballCount);\n }", "private ResourceOperatorSupplier mockNewCluster(StatefulSet sts, StrimziPodSet sps, List<Pod> pods) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers a custom handler for the specified phase type and operation. If a handler already exists for the specified type/operation combination, it will be replaced by the specified handler. Note that type is stored in the registry by reference (rather than copied) so the caller should take care not to subsequently mod...
public void registerHandler(PhaseHandler handler, PhaseType type, PhaseOperationEnum operation) { this.delegate.registerHandler(handler, type, operation); }
[ "public <Type> void registerResultHandler(\n Class<Type> type,\n Function<Object, ? extends Type> handler\n )\n {\n this.handlers.put(\n type,\n handler\n );\n }", "public void registerServiceHandler(String name, Object handler);", "public void register...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets array of all "DeliveryID" elements
@Deprecated java.lang.String[] getDeliveryIDArray();
[ "java.util.List<java.lang.String> getDeliveryIDList();", "java.util.List<x0301.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax255Car> xgetDeliveryIDList();", "public List<Delivery> getAllDeliveryItems() {\n return deliveryRepo.findAll();\n }", "int sizeOfDeliveryIDArray();", "@Deprecated\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all rows from the renquiry table that match the criteria 'doc_subject = :docSubject'.
public Renquiry[] findWhereDocSubjectEquals(String docSubject) throws RenquiryDaoException;
[ "public TableModel getBooksBySubject(String subject)\n\t{\n\t\topenDbConnection();\n\t\tTableModel mdl = null;\n\t\ttry\n\t\t{\t\t\t\n\t\t\tPreparedStatement myPrepStmt = myConn.prepareStatement(\"SELECT Title, Edition_Number, GROUP_CONCAT(First_name, ' ', Last_Name separator ',') AS Authors FROM book \" + \n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set Lyrics from File
public AudioCong setLyrics(File f){ StringBuilder sb = new StringBuilder(); if (f.exists()){ BufferedReader br = null; try { br=new BufferedReader(new FileReader(f)); String line; while((line=br.readLine())!=null){ ...
[ "void setLyrics(int lyricsFile, String songName) {\n mActivityMainBinding.customLyricView.setLyricFile(getFile(lyricsFile, songName));\n }", "public AudioCong setLyrics(String data, String fname){\n tvLyrics.setText(Html.fromHtml(data));\n saveLyrics(data, fname);\n return this;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get species by id
SpeciesEntity getSpeciesById(Integer id);
[ "Species getSpeciesById(int index);", "public Species getSpecificSpecies(String name){\n\t\treturn speciesRepo.findByName(name);\n\t}", "ESpecies getSpecies();", "Species searchSpecies(String name);", "List<Species> getAllSpecies();", "Foodie getById(String id);", "List<ProteinCurrent> searchBySpecies(i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
receive file paths by argument, first file contains the users and the second file must contain the logs.
public static void main(String[] args) { if(args == null || args.length < 2) throw new IllegalArgumentException("please provide the path to users list and the path to the log files"); String usersPath = args[0]; String logsPath = args[1]; FileInputStream inputStream; SocialMediaQ...
[ "private void addUserFiles(String user, String[] userFiles) {\n List<Path> currentFiles = files.getOrDefault(user, new ArrayList<>());\n for (String file : userFiles) {\n currentFiles.add(Path.of(file));\n }\n files.put(user, currentFiles);\n }", "public ArrayList<User> p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the set of features to be ignored by this property section. The default implementation returns an empty set; subclasses can override.
protected Set<EStructuralFeature> getFeaturesToIgnore() { return ImmutableSet.of(); }
[ "public Set<String> getDisabledFeatures() {\n return disabledFeatures;\n }", "public List<IFeature> getInvisibleFeatures() {\n return this.invisibleFeatureList;\n }", "public Set<String> getExcludedProperties() {\r\n return this.excludeProperties;\r\n }", "@Override\n public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if no products are available, show an empty state text
private void checkAvailability() { if (productList != null) { if (productList.size() == 0) { noProductText.setVisibility(View.VISIBLE); } else { noProductText.setVisibility(View.GONE); } } }
[ "private void listAllProducts() {\n if(bookRegister.getBookRegister().isEmpty()) {\n System.out.println(\"You don't have any books.\");\n }\n else {\n System.out.println(\"The books you have is:\");\n System.out.println(bookRegister.listAllBooks());\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send a block change. This fakes a block change packet for a user at a certain location. This will not actually change the world in any way.
public void sendBlockChange ( Location loc , BlockData block ) { execute ( handle -> handle.sendBlockChange ( loc , block ) ); }
[ "public void sendBlockChange ( Location loc , Material material , byte data ) {\n\t\texecute ( handle -> handle.sendBlockChange ( loc , material , data ) );\n\t}", "void updateBlock(Block block) ;", "public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__DecisionNode__OutgoingAssignment_4_3_1" $ANTLR start "rule__IntegerCalculationExpression__AssigneeAssignment_0" InternalActivityDiagram.g:7759:1: rule__IntegerCalculationExpression__AssigneeAssignment_0 : ( ( RULE_ID ) ) ;
public final void rule__IntegerCalculationExpression__AssigneeAssignment_0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalActivityDiagram.g:7763:1: ( ( ( RULE_ID ) ) ) // InternalActivityDiagram.g:7764:1: ( ( RULE_ID ) ) ...
[ "public final void rule__IntegerComparisonExpression__AssigneeAssignment_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:7835:1: ( ( ( RULE_ID ) ) )\n // InternalActivityDiagram.g:7836:1: ( ( RULE_ID ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .RewardMsg rewardList = 2;
java.util.List<com.message.ActivityProto.RewardMsg> getRewardListList();
[ "java.util.List<buffer.GCBattlePveResult.ItemProto> \n getTargetRrewardItemList();", "java.util.List<buffer.GCBattlePveResult.ItemProto> \n getResultRewardItemList();", "java.util.List<com.message.ActivityProto.RewardDataMsg> \n getAllRewardListList();", "java.util.List<buffer.GCBattlePve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Object__Group_2__1" $ANTLR start "rule__Object__Group_2__1__Impl" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:6095:1: rule__Object__Group_2__1__Impl : ( ( rule__Object__SuperObjectAssignment_2_1 ) ) ;
public final void rule__Object__Group_2__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:6099:1: ( ( ( rule__Object__SuperObjec...
[ "public final void rule__Object__Group_2__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:6088:1: ( rule__Object__Gro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'System Configuration Src' attribute.
String getSystemConfigurationSrc();
[ "public String getSrc() {\n return getAttribute(ATTRIBUTE_SRC);\n }", "public String getSrc() {\n return (String) attributes.get(\"src\");\n }", "public String getFileSrc() {\n return fileSrc;\n }", "public String getSourceSystem() {\r\n\t\treturn sourceSystem;\r\n\t}", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ get the custom attributes as a String
public String getCustomAttributes() { String v = (String)this.getOptionalFieldValue(FLD_customAttributes); return StringTools.trim(v); }
[ "private String getCustomAttributes() {\n StringBuilder sb = new StringBuilder();\n\n customAttribute.forEach((key, value) -> {\n sb.append(key).append(\"='\").append(value).append(\"' \");\n });\n\n return sb.toString().trim();\n }", "protected String getAttributes() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get address of parsing method for key item with given index.
public final ParseItem getParseKeyItem(final int i) {return _parseItems[i];}
[ "public final int getParseMethod() {\n\t\treturn _keyIndex!=-1 ? _parseItems[_keyIndex].getParseMethodAddr() : -1;\n\t}", "String getKey(int index);", "public String getNameFromMethodIndex(int index) {\n \tint saveReaderPosition = getPos();\n \tseek(getOffsetMethodIdItem(index) + 4); // + 4 to skip class_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the relation captured by match has a type. THis method just returns null but any child class using writeResultAsSIF method can implement this to have a relationship type between gene symbol pairs.
public String getRelationType() { if (this instanceof SIFMiner) { return ((SIFMiner) this).getSIFType().getTag(); } else return null; }
[ "java.lang.String getRelationType();", "org.apache.xmlbeans.XmlString xgetRelationType();", "String getRelationType();", "protected abstract RelationshipType getRelationshipType();", "boolean isSetRelationType();", "public java.lang.String getRelationType()\n {\n synchronized (monitor())\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ When a subeditor's options are modified, this method is called so that the editor can react appropriately to its now settings.
protected abstract void updateEditorWithNewOptions(int optionBits, boolean enable);
[ "void editorChanged() {\r\n editorSection.editorChanged(this);\r\n }", "public void optionsChanged() {\n treeBuilt = false;\n }", "private SizeModifierSettingsEditor() {\n\t\tinitComponents();\n\t\tsettings = SizeModifierSettings.getInstance();\n\t\tloadSettings();\n\t\tmainShell.pack();\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the nmUF value for this ResultadoBuscarListaUFUF.
public java.lang.String getNmUF() { return nmUF; }
[ "public void setNmUF(java.lang.String nmUF) {\n this.nmUF = nmUF;\n }", "public java.lang.String getUF() {\r\n return UF;\r\n }", "public java.lang.String getNome_uf_localidade() {\n return nome_uf_localidade;\n }", "public String getUnitnm() {\r\n return unitnm;\r\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks for collisions between mcProjectiles and playerProjectiles and codecadet; and between playerProjectiles and masterCoders
static void checkCollisions(LinkedList<Projectile> mcProjectiles, LinkedList <Projectile> playerProjectiles, MasterCoder[] masterCoders, Codecadet player) { for (int j = 0; j < mcProjectiles.size(); j++) { check(mcProjectiles.get(j), player); for (int i = 0; i < playerProjectiles.size(...
[ "private void checkPlayerCollisions() {\r\n\t\tGObject left = getElementAt(player.getX() - 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tGObject right = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tif(dragon1 != null && (left == dragon1 || right == dra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
public static native long InvoiceFeatures_empty();
[ "public static native long InvoiceFeatures_known();", "public static native long ChannelFeatures_empty();", "public static native long InitFeatures_empty();", "public static native long NodeFeatures_empty();", "public static native void InvoiceFeatures_free(long this_obj);", "public static native long Raw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String designating the build type, such as "nightly" or "dist".
public DevStatus getBuildType() { return buildType; }
[ "java.lang.String getOperatingSystemBuild();", "public void setBuild(java.lang.String value);", "public final String getTypeAsString()\n\t{\n\t\tString str = null;\n\t\t\n\t\tswitch( isType())\n\t\t{\n\t\tcase TargetFile:\n\t\t\tstr = \"File\";\n\t\t\tbreak;\n\t\tcase TargetFolder:\n\t\t\tstr = \"Folder\";\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Marks the leaf "filecreationperiod" with operation "merge".
public void markFileCreationPeriodMerge() throws JNCException { markLeafMerge("fileCreationPeriod"); }
[ "public void markFileCreationPeriodReplace() throws JNCException {\n markLeafReplace(\"fileCreationPeriod\");\n }", "public void markFileCreationPeriodCreate() throws JNCException {\n markLeafCreate(\"fileCreationPeriod\");\n }", "public void markMaxRecordsPerPeriodMerge() throws JNCExceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
display2 function ends display the processes in the form of a gantt chart
public static void display3() { round2[0]=0; System.out.println(); System.out.println("Gantt Chart:"); for(int i=1;i<=50;i++) { if(round1[i]!=0) System.out.print("|\tP" +round1[i]); } // for ends System.out.print("|"); System.out.println(); System.out.print...
[ "public static void display2() {\r\n\t\t\tSystem.out.println(\"Your Information is as follows -->\");\r\n\t\t\tSystem.out.println(\"Process \\t Completion Time\");\r\n\t\t\tfor(int i=1;i<=50;i++)\r\n\t\t\t\tif(round1[i]!=0)\r\n\t\t\t\t\tSystem.out.println(round1[i]+\"\\t \\t \\t\"+round2[i]);\r\n\t\t\tSystem.out.pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The significand of a floatingpoint numeral as a bitvector expression Remarks: NaN is an invalid argument.
public BitVecExpr getSignificandBV() { return new BitVecExpr(getContext(), Native.fpaGetNumeralSignificandBv(getContext().nCtx(), getNativeObject())); }
[ "static public int signalBit(float theValue) {\r\n\t\treturn floatToBits(theValue) & 0x80000000;\r\n\t}", "public String significandBits()\r\n {\r\n return impliedBit + \".\" + fractionBits;\r\n }", "public static Value makeAnyNumNotNaNInf() {\n return theNumNotNaNInf;\n }", "boolean ha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the user u has rated movie m, then it returns that rating; otherwise it will predict the rating based on the approach described above, and returns the predicted rating. The type of this method must be float.
public float ratingOf(int u, int m){ //if already there return the rating float rating = hm.get(u).get(m); if(rating != 0) return rating; //else predict it float userPoint = hm.get(u).get(0); ArrayList<Float> myPoints = new ArrayList<>(); //add each ...
[ "public double predict(Movie m, User u);", "public double predict(int userId, int movieId);", "public int predictRating(User theUser, Video theVideo) throws NullPointerException;", "public double guessRating(int userID, int movieID) {\n\t\tMovie movie = null;\n\t\tUser user = null;\n\t\tdouble avgRating = 0;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the height of the header
public final double getHeaderHeight() { return headerHeight; }
[ "public abstract int getOneDayHeaderHeight();", "float getSectionHeaderHeight(int section);", "public abstract int getMultiDayHeaderHeight();", "public float getHeaderAndDataHeight() {\n\t\treturn header == null ? 0 : header.getHeight() + rows.get(header == null ? 0 : 1).getHeight();\n\t}", "ibc.core.client...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Codificar_DCT_Bloco_MSB_PGM Ocultando a Mensagem PPM
public ImagemPPM DCT_PPM(Imagem img, String mensagem) { ImagemPPM imagem = (ImagemPPM) img; ImagemPPM novaImagem = imagem.clone(); // copia da imagem ImagemPPM A_linha = imagem.clone(); // copia da imagem int qtdBL = (int) imagem.getDimX() / 8; int qtdBC = (int) imagem.getDimY...
[ "private byte[] PPMfile() {\n StringBuilder Finald = new StringBuilder();\n Finald.append(\"P6\");\n Finald.append(\"\\n\");\n Finald.append(width);\n Finald.append(\" \");\n Finald.append(height);\n Finald.append(\"\\n\");\n Finald.append(255);\n Final...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'var192' field.
public com.dj.model.avro.LargeObjectAvro.Builder clearVar192() { var192 = null; fieldSetFlags()[193] = false; return this; }
[ "public com.dj.model.avro.LargeObjectAvro.Builder clearVar168() {\n var168 = null;\n fieldSetFlags()[169] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField192() {\n field192 = null;\n fieldSetFlags()[192] = false;\n return this;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
setCreditCardExpYY CreditCard Exp MMYY
public boolean setCreditCardExp(String mmyy) { if (MPaymentValidate.validateCreditCardExp(mmyy).length() != 0) { return false; } // String exp = MPaymentValidate.checkNumeric(mmyy); String mmStr = exp.substring(0, 2); String yyStr = exp.substring(2, 4); ...
[ "public void setCreditCardExpYY(int newCreditCardExpYY) {\n int CreditCardExpYY = newCreditCardExpYY;\n if (newCreditCardExpYY > 1999) {\n CreditCardExpYY = newCreditCardExpYY - 2000;\n }\n super.setCreditCardExpYY(CreditCardExpYY);\n }", "public boolean setCreditCardExp ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This constructor must be used by the module loader to load the connection. If used with a module manager without the presence of an AbstractMainManager it will not work, because the default module loader can not load an instance of AbstractMainManager. However when the module manager is retrieved from AbstractMainManag...
@ProvideModule public DBConnectionDynamic(MainManager mainManager, ConnectionConfig config) { this.manager = mainManager; this.config = config; }
[ "public ConnectionManager() {\r\n\t\tthis(DEFAULT_PORT, true, true);\r\n\t}", "public DefaultConnectionProvider() {\n loadProperties();\n }", "public ConnectionManager() {\n }", "public ConnectionConfig(){\r\n super();\r\n }", "@Override\n\tpublic void init() {\n\t\tif(usingLoginCrede...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the given element from the LocationNamedInsureds array. This is achieved by marking the element for removal.
@java.lang.Deprecated public void removeFromLocationNamedInsureds(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(LOCATIONNAMEDINSUREDS_PROP.get(), elementID); }
[ "public void removeFromLocationNamedInsureds(entity.LocationNamedInsured element) {\n __getInternalInterface().removeArrayElement(LOCATIONNAMEDINSUREDS_PROP.get(), element);\n }", "public void removeFromLocationNamedInsureds(entity.LocationNamedInsured element) {\n __getInternalInterface().removeArrayEle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert the specific gravity in the preferred unit
public static double prefGravUnit(double SG,String prefGravity ){ double brix,plato; if(prefGravity=="Brix"){ brix= ((((182.4601 * SG) -775.6821) * SG +1262.7794) * SG -669.5622); return brix ; } else if(prefGravity=="Plato"){ plato = (-1 * 616.868) + ...
[ "public double convertGravity(double gravity, int pixelPerMeter, int updateInterval) {\n return gravity * pixelPerMeter * ((double) updateInterval / 1000 * (double) updateInterval / 1000);\n }", "public void setGravity(double gravity)\r\n {\r\n this.gravity = gravity;\r\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checking Response Time logger.info("Checking Response Time");
@Test public void checkResponseTime() { long responsetime = response.getTime(); System.out.println("Response time is:" + responsetime); }
[ "public void recordResponseTime() {\n long responseTime = System.nanoTime() - responseTimeMetric;\n thePlayer.setResponseTime(responseTime);\n\n double responseTimeSec = responseTime / 1000000000.0;\n\n logger.info(\"Your response time was: \" \n + responseTimeSec + \" sec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set evaluation problem used in the run
public void setEvaluation(ContestEvaluation evaluation) { evaluation_ = evaluation; // Get evaluation properties Properties props = evaluation.getProperties(); // Get evaluation limit evaluations_limit_ = Integer.parseInt(props.getProperty("Evaluations")); // Property keys depend on specific evaluation...
[ "public void setQproblem(quantumproblem qproblem);", "public void setEvaluationStrategy(EvaluationStrategy eval);", "@Override\r\n public void resetEvaluation ()\r\n {\r\n evaluation = null;\r\n }", "void setTrainingEvaluator(TrainingEvaluator eval);", "public ProblemSolver(int inRunMode){\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tearDown() is run after a test case has finished. finishOpenedActivities() will finish all the activities that have been opened during the test execution.
@After public void tearDown() throws Exception { solo.finishOpenedActivities(); }
[ "@Override\n\tpublic void tearDown() throws Exception {\n\t\tsolo.finishOpenedActivities();\n\t}", "@Override\n protected void tearDown() throws Exception {\n solo.finishOpenedActivities();\n }", "@Override\n public void tearDown() throws Exception {\n solo.finishOpenedActivities();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the IRState that represents the current state of this object.
public IBusinessObject setStateObject(IRState state) throws OculusException;
[ "public void setItState(int value) {\n this.itState = value;\n }", "public void setaState(Integer aState) {\n this.aState = aState;\n }", "@Override\n public SimEntity setState(final State state) {\n this.state = state;\n return this;\n }", "public void setstate(int a){...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The following method asserts the position and dimension properties of the test ShapeFx object
@Test public void testPositionAndDim() { assertEquals(rectangle.getLayoutX(),160.0,0); assertEquals(rectangle.getLayoutY(), 144.0,0); assertEquals(rectangle.getWidth(), 400.0,0); assertEquals(rectangle.getHeight(), 300.0,0); }
[ "@Test\n\tpublic void testShapeContentData() {\n\t\tassertEquals(shapefx.getStartTime(), 0);\n\t\tassertEquals(shapefx.getEndTime(), 1000);\n\t\tassertNull(shapefx.getTargetLoc());\n\t}", "@Test\r\n\tpublic void testGetListOfShapesEnclosingGivenPoint() {\r\n\t\t\r\n\t\t// Create a first shape square\r\n\t\tPoint ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.
@Fluent Redis endHandler(@Nullable Handler<Void> endHandler);
[ "private void setEOF() {\r\n String logMessage = String.format(\"future=unknown , class=%1$s , event=EOF\", getClass().getName());\r\n Logger.getLogger().info(logMessage);\r\n \r\n _byteRingBuffer.setEOF();\r\n setIdle();\r\n }", "public boolean isEnd() {\n\t\t\treturn this =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the sectionsUrl property: The sectionsUrl property.
public MicrosoftGraphCopyNotebookModel withSectionsUrl(String sectionsUrl) { this.sectionsUrl = sectionsUrl; return this; }
[ "public String sectionsUrl() {\n return this.sectionsUrl;\n }", "@Override\n public void setSections(List<NavigationSectionDescriptor> sections) {\n mSections = sections;\n updateSections();\n }", "public String sectionGroupsUrl() {\n return this.sectionGroupsUrl;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draws the specified number of stars randomly on the game screen.
protected void drawStars(int numberOfStars) { g2d.setColor(Color.WHITE); for(int i=0; i<numberOfStars; i++){ int x = (int)(Math.random() * this.getWidth()); int y = (int)(Math.random() * this.getHeight()); g2d.drawLine(x, y, x, y); } }
[ "private void drawstars(Graphics g) {\n for(Stars next : game.getStars()) {\n drawEachStars(g, next);\n }\n }", "public static void mainDraw(Graphics star) {\n\n star.setColor(Color.BLACK);\n star.fillRect(0, 0, WIDTH, HEIGHT);\n for (int i = 0; i < 200; i++) {\n squareDr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepare the value just before it will be converted into the specified type. This method is called during expression evaluation, so if the value is actually an instance of a domain object or an identifier, this method can return the primary key instead of the instance itself. This allows to correctly evaluate expression...
Object prepareValueBeforeTypeConversion(Object value, PrimType type);
[ "protected abstract K getPrimaryKey(T value);", "@Override\r\n public Object createPrimaryKeyFromId(Object key, AbstractSession session) {\r\n // If the descriptor primary key is mapped through direct-to-field mappings,\r\n // then no elaborate conversion is required.\r\n // If key is comp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function searches the file given the filename in the server directory.
private void fileSearch(Socket clientSocket, String fileName, int serverId, int level) { try{ String filePath = serverDefaultPath; // Get the server's directory. filePath += serverId + "/" + fileName + "/"; // Retrieve the file. File lookupFile = new File(filePath); // Get the output...
[ "public void foundFile(File file);", "public static void searchFile() \n\t{\n\t\t//Variable Declaration\n\t\tString fileName;\n\t\tScanner obj = new Scanner(System.in);\n\n\t\t//Read file name from user\n\t\tSystem.out.println(\"Enter file name to searched:\");\n\t\tfileName= obj.nextLine();\n\t\t\n\t\t//Searchin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
removes a student from a course
public void removeStudentFromCourse(Course course, Student student){ String statement = REMOVE_STUDENT_FROM_COURSE; data.makeUpdateStatement(statement,new Object[]{(Object)course.getId(),(Object)student.getId()}); data.closeConnections(data.ps, data.conn); }
[ "public boolean remove(Student s){\n\n }", "public void removeCourse(String course);", "@DeleteMapping(\"/students/{student_id}/courses/{course_id}\")\n public void removeCourse(@PathVariable(value=\"student_id\") short student_id, @PathVariable(value=\"course_id\") short course_id) {\n Student stu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set dirty bit only when the argument matchs the priority cache System.out.print("Thread " + this.thread.toString() + ": diry bit set\n");
public void setDirtyBit(int priority){ if ((!dirtyBit) && ((priority == priorityCache) || (priority == priorityMinimum - 1))){ dirtyBit = true; if (waitQueue != null) if ((waitQueue.transferPriority) && (waitQueue.threadHoldingResource != null)) waitQueue.threadHoldingResource.setDirtyBit(priority)...
[ "void setMultithreaded (boolean flag);", "void setThreadPriorityBoost(int boost);", "protected void setModifiedFlags()\n\t{\n\t\tthis.flagsMod=(byte)0xffffffff;\n\t}", "private void forwardpropmarkRec(int compId, int thread) {int numOutputs = numOutputs(compId);\n\t\tint offset = outputOffset(compId);\n\t\tlo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the elementTypeArray. The ith value of elementTypeArrayParam gives the TypeExpr for the ith column in the array.
public TypeExpr[] getElementTypeExprArray() { return elementTypeExprArray; }
[ "public static ClassReference arrayFromElementType(ClassReference elementType) {\n\t\treturn new ClassReference(elementType.primitive, elementType.className, elementType.arrayDimension + 1);\n\t}", "public ArrayType getType() {\n\tif (this.arrayType == null) {\n\t // lazy init must be thread-safe for readers\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetches the starting time minutes of a specific shift
public int getStartingTimeMinutes() { return getStartingTime().getMinute(); }
[ "public int getStartMinute() {\n\treturn start.getMinute();\n }", "public String getShiftTime()\n\t{\n\t if(specialShift)\n\t return startTime;\n\n\t\tString[] truncStart = new String[2];\n\t\t\n\t\tif(startTime.contains(\"a\"))\n\t\t\ttruncStart = startTime.split(\"a\");\n\t\telse if(startTime.conta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the lambda value (rate) of the distribution.
public void setLambda(double lambda) { this.lambda = lambda; }
[ "public void setLambda(double lambda)\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(LAMBDA$0, 0);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use NEMSignedTx.newBuilder() to construct.
private NEMSignedTx(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private NEMSignTx(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}", "private SignTx(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}", "private EthereumSignTx(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field671' field.
public void setField671(java.lang.CharSequence value) { this.field671 = value; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField671(java.lang.CharSequence value) {\n validate(fields()[671], value);\n this.field671 = value;\n fieldSetFlags()[671] = true;\n return this; \n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField670(java....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a Layer on the server by a Java object and the destination corpus
public Layer createLayer(Layer layer, Corpus corpus) throws Exception { return new Layer(new Post("/corpus/" + corpus.getId() + "/layer", layer.toArgs()).execute()); }
[ "public Layer createLayer(Layer layer) throws Exception {\n if (layer.getIdCorpus().isEmpty()) {\n throw new CamomileClientException(\"The Layer doesn't have an id_corpus\");\n }\n return new Layer(new Post(\"/corpus/\" + layer.getIdCorpus() + \"/layer\", layer.toArgs()).execute());\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the message from the GUI resources that corresponds to the given key.
private static String msg(String messageKey) { return GUIResources.getMessage(messageKey); }
[ "MessageResources getMessageResources(String key);", "public String getMessage(String key){\r\n \t\treturn messages.get(key);\r\n \t}", "public String getMessage(String key) {\n return getMessage(key, true);\n }", "String getMessage(String inKey);", "protected String getResourceString (String key)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current task definition hashtable. The returned hashtable is "live" and so should not be modified.
public Hashtable getTaskDefinitions() { return ComponentHelper.getComponentHelper(this).getTaskDefinitions(); }
[ "public String getTaskDefinition() {\n return this.taskDefinition;\n }", "public HashMap<Integer, Task> getScheduledTask(){\n return tasks;\n }", "public List getTaskDefs() {\n return taskDefs;\n }", "public String getTaskDefKey() {\n return taskDefKey;\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the internal scenario index that is used for report links to scenario details.
public void setScenarioIndex(final int scenarioIndex) { this.scenarioIndex = scenarioIndex; }
[ "private void setIndex(int index){\n\t\tthis.index = index;\n\t}", "public void setIndex(int index) { this.index = index; }", "public void setIndex(Index index) {\r\n _index = index;\r\n }", "void setIndex(int index);", "public void setIndexTool(int index) {\r\n this.indexTool = index;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verifySettings Overrides method in LinkClass; error check myLinkMap settings.
@Override public void verifySettings() { }
[ "AccountSettings validateLinkSettings(AccountSettings accountSettings);", "@Test\n\t\t\tpublic void VerifyGlobalProgramMappingLink(){\n\t\t\t\tAssert.assertTrue(uiDocumentsImagingPageObjects.lnkDocumentMapping.isDisplayed(), \"Document Mapping Link is not displayed\");\n\t\t\t}", "private Boolean verifyRepoMain...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO make binders common to all controllers Parse Date fields in the default Angular format [ISO8601] ('yyyyMMddTHH:mm:ss.SSSZ')
@InitBinder protected void initBinder( WebDataBinder binder) throws ServletException { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); dateFormat.setLenient(false); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false)); }
[ "@InitBinder\r\n\tprotected void initBinder(WebDataBinder binder){\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n dateFormat.setLenient(false);\r\n binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false));\t\t\r\n\t}", "@InitBinder\n public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method allows get the story name
public String getStoryName(){ return storyNameLbl.getText(); }
[ "java.lang.String getStory();", "public String getStory() {\n return story;\n }", "public String getStoryName(String path) {\n try {\n File fXmlFile = new File(path);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of height method, of class BinaryTree.
@Test public void testHeight() { System.out.print("height"); BinaryTree<String> instance = new BinaryTree<>("Padre"); int expResult = 2; BinaryTree<String> aux_instance1 = new BinaryTree<>("Hijo1"); BinaryTree<String> aux_instance2 = new BinaryTree<>("Hijo2"); ...
[ "@Test\n public void testHeight() {\n String message = \"Tree node height was incorrectly calculated\";\n assertSame(message, 0, node6.height());\n assertSame(message, 1, node5.height());\n assertSame(message, 3, node2.height());\n assertSame(message, 2, node3.height());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets CollectionReader to use during processing.
public void setCollectionReader(BaseCollectionReader aCollectionReader) { collectionReader = aCollectionReader; if (collectionReader != null) { if (collectionReader.getProcessingResourceMetaData().getConfigurationParameterSettings() .getParameterValue("fetchSize") != null) { try { ...
[ "public void setReader(Object reader) {\n\t\tthis.reader = reader;\n\t\tthis.handleConfig(\"reader\", reader);\n\t}", "public void setReader ( DataReader reader ) {\r\n\t\tgetStateHelper().put(PropertyKeys.reader, reader);\r\n\t\thandleAttribute(\"reader\", reader);\r\n\t}", "public void selectCatalogReader (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets the room in the player class
private void setPlayerRoom(){ player.setRoom(currentRoom); }
[ "public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}", "public void setPlayerLoc(Room room){\n playerLoc = room;\n }", "void setRoom(int inRoom) {\n \t\tgraphics.setRoom(inRoom);\n \t}", "protected void setRoom() {\n\t\tfor(int x = 0; x < xSize; x++) {\n\t\t\tfor (int y = 0; y < ySize; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a tar.gz file from a list of input file/directories to the output file. The output file must have ".tar.gz" as the file extension.
public static void createTarGzFile(File[] inputFiles, File outputFile) throws IOException { Preconditions.checkArgument(outputFile.getName().endsWith(TAR_GZ_FILE_EXTENSION), "Output file: %s does not have '.tar.gz' file extension", outputFile); try (OutputStream fileOut = Files.newOutputStream(out...
[ "private void generateTarFile() throws IOException {\n File folder = new File(backupTempDirPath);\n File[] srcFiles = folder.listFiles();\n if (srcFiles == null) {\n log.debug(\"no backup file found under directory {}\", backupTempDirPath);\n return;\n }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the Algorithmic name of the codepoint
public String getAlgorithmName(int index, int codepoint) { String result = null; synchronized (m_utilStringBuffer_) { m_utilStringBuffer_.setLength(0); m_algorithm_[index].appendName(codepoint, m_utilStringBuffer_); result = m_utilStringBuffer_.toString(); ...
[ "java.lang.String getCodeNm();", "@Override\n public String getName() {\n return algoName;\n }", "public String algorithmName();", "java.lang.String getEcdsaCurveName();", "public abstract String algebraicName();", "protected abstract String getAlgorithmName();", "@Override\n\t\tpublic I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to get a pixel object for the given x and y location
public Pixel getPixel(int x, int y) { // create the pixel object for this picture and the given x and y location Pixel pixel = new Pixel(this,x,y); return pixel; }
[ "IPixel getPixel(int x, int y);", "public int getPixel(int x, int y);", "public Color getPixel(int x, int y);", "public int getPixel(int x, int y) {\r\n return bitmapPixels[bitmapWidth * y + x];\r\n }", "public abstract RGBPixel getPixelRgb(int x, int y);", "public Color getPixel(int x, int y){\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DisplayName.enUS: PostgreSQL Dependencies enUS: Setup the PostgreSQL dependencies for persistence and database integration.
public void partDependenciesDatabase() { // // <!-- PostgreSQL Database --> // <dependency> // <groupId>org.postgresql</groupId> // <artifactId>postgresql</artifactId> // <version>42.2.2.jre7</version> // </dependency> }
[ "private void setupDBs()\n {\n\t mSetupDBTask = new SetupDBTask(this);\n\t\tmSetupDBTask.execute((Void[])null);\n }", "private void setupDb(){\n try {\n openConnection();\n s.executeUpdate(\"CREATE TABLE IF NOT EXISTS LIB (NAME text UNIQUE , TYPE text, LANGUAGE text, INTRUSIV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Enhanced For Statement'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseEnhancedForStatement(EnhancedForStatement object) { return null; }
[ "public T caseForStatement(ForStatement object) {\n\t\treturn null;\n\t}", "ForStatement createForStatement();", "public T caseLoopExp(LoopExp object) {\n\t\treturn null;\n\t}", "public T caseStatement(Statement object)\n {\n return null;\n }", "public T caseLoopExpCS(LoopExpCS object) {\r\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end method getShipping() validateQty ( String p ) Displays a set of dialog boxes to prompt user for and validate a quantity of product p [either "Gizmos" or "Widgets"]. Validation includes checking integer batch sizes for each category, error detection, and an upper bound for Widgets. Returns a valid integer quantity.
public static int validateQty(String p) { int qty = 0; int group_size = 1; boolean valid = false; if (p.equals(prodLines[0])) group_size = GIZMO_PACK; else group_size = WIDGET_PACK; String groupErr = p+" must be ordered in packs of "+group_size; do { String qtyTXT = JOptionPane.showInputDia...
[ "public void setShip_qty(int ship_qty) {\n this.ship_qty = ship_qty;\n }", "private static int getQuantityWanted() {\n\t\t// TODO find out how many products user wants\n\t\tint quantityWanted = getInput(\"How many would you like to purchase?\");\n\t\twhile (quantityWanted < 0) { //Do not allow for negat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The date the author's approval is received.
public StrColumn getDateAuthorApproval() { return delegate.getColumn("date_author_approval", DelegatingStrColumn::new); }
[ "public java.util.Date getApprovalDate () {\n\t\treturn approvalDate;\n\t}", "public Date getApprovalDate() {\n return (Date)getAttributeInternal(APPROVALDATE);\n }", "public Date getAPPROVED_DATE()\r\n {\r\n\treturn APPROVED_DATE;\r\n }", "public StrColumn getPdbDateOfAuthorApproval() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
EFFECTS: saves wish list to WISH_LIST_FILE
protected static void saveWishList() { try { Writer writer = new Writer(new File(WISH_LIST_FILE)); for (Item item : myWishList.getArrayList()) { writer.write(item); } writer.close(); System.out.println("Wish list saved to file");...
[ "protected static void loadWishList() {\r\n try {\r\n List<Item> list = Reader.readWishList(new File(WISH_LIST_FILE));\r\n myWishList = new WishList();\r\n for (Item item : list) {\r\n myWishList.addItem(item);\r\n }\r\n } catch (IOException e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configures the initial INode in the DiskUnit to function as the root directory in the FileSystemManager
private static void configureRootINode(DiskUnit du) { VirtualDiskBlock vdb = new VirtualDiskBlock(du.getBlockSize()); du.read(1, vdb); Utils.copyIntToBlock(vdb, 0, 0); getFreeSpaceBlock(du); du.write(1, vdb); }
[ "public void setRootDir() {\n for(int i = 0; i < rootDir.length; i++){\n Character temp = (char) (65 + i);\n this.rootDir[i] = temp.toString() + \":\\\\\\\\\";\n }\n }", "public void customRootDir() {\n //Be careful with case when res is false which means dir is not v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }