query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Returns a Requestlist Object containing Requests of which borrower is equal to the Student Object passed as argument. All matches are removed as they are no longer needed both in the java model as well in the database. | @Override
public RequestList getRequestListAsBorrower(Student student)
{
RequestList requests = new RequestList();
for (int i = 0; i < requestList.size(); i++)
{
if (student.equals(requestList.getRequests().get(i).getBorrower())
&& (!(requestList.getRequests().get(i).get... | [
"@Override\n public RequestList getRequestListasOwner(Student student)\n {\n RequestList requests = new RequestList();\n for (int i = 0; i < requestList.size(); i++)\n {\n if (student.equals(requestList.getRequests().get(i).getLender())\n && (requestList.getRequests().get(i)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PartiturHandler__Group__0__Impl" $ANTLR start "rule__PartiturHandler__Group__1" InternalPartitur.g:893:1: rule__PartiturHandler__Group__1 : rule__PartiturHandler__Group__1__Impl rule__PartiturHandler__Group__2 ; | public final void rule__PartiturHandler__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalPartitur.g:897:1: ( rule__PartiturHandler__Group__1__Impl rule__PartiturHandler__Group__2 )
// InternalPartitur.g:898:2: rule__Partitur... | [
"public final void rule__PartiturHandler__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:870:1: ( rule__PartiturHandler__Group__0__Impl rule__PartiturHandler__Group__1 )\n // InternalPartitur.g:871:2: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the model automatically update parents of edges so that the edge is contained in the nearestcommonancestor of its terminals. | public boolean isMaintainEdgeParent() {
return maintainEdgeParent;
} | [
"public boolean isAutoMerge(){\n boolean childEdgeTargets = children.values().stream().anyMatch(x -> x.isEdgeTarget());\n return !childEdgeTargets;\n }",
"public boolean isParentConnected() {\n return parent != null;\n }",
"public boolean isParents() {\r\n\t\treturn parents.isSelected()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines if this command is from the FoundationFramework and represents a service. | public boolean isFoundationFrameworkServiceCommand()
{
return isFFServiceCommand;
} | [
"public boolean isFoundationFrameworkCommand()\n {\n return isFFCommand;\n }",
"public abstract boolean isServiceInstalled();",
"private static boolean isIntentServiceThread() {\n String threadName = Thread.currentThread().getName();\n return threadName != null && threadName.startsWit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks that the Android device Bluetooth is available and prompts to be turned on if off | private void checkBTState() {
if (btAdapter == null) {
Toast.makeText(getBaseContext(), "Device does not support bluetooth", Toast.LENGTH_SHORT).show();
} else {
if (btAdapter.isEnabled()) {
} else {
Intent enableBtIntent = new Intent(BluetoothAdapter... | [
"void checkBluetooth() {\n //Prompt user to turn on Bluetooth if Bluetooth is disabled\n if (!blueAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n\n try {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the sheet of the cells block. | public Sheet getSheet()
{
return ( cells != null & cells.length >= 1
& cells[0] != null & cells[0].length >= 1
& cells[0][0] != null
? cells[0][0].getSheet() : null );
} | [
"Sheet getSheet();",
"ISheet getSheet(int index);",
"public byte[] getWorksheet() {\n return worksheet;\n }",
"ISheet getSheet(String name);",
"public java.util.List<SheetDefinition> getSheets() {\n return sheets;\n }",
"public List<Cell> getCells() {\n return cells;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getDayOfWeekInMonth Get the week of month. | public int getWeekOfMonth()
{
return m_calendar.get(Calendar.WEEK_OF_MONTH);
} | [
"public int getDayOfWeek() {\n if (DateUtil.isValid(this)) {\n boolean isJanuaryOrFebruary = month == 1 || month == 2;\n if (isJanuaryOrFebruary) {\n month += 12;\n year--;\n }\n\n // compute day of week\n int index = (day +... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When true, a contextual quote from the data that triggered a finding is included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote]. This is not used for data profiling. bool include_quote = 4; | @java.lang.Override
public boolean getIncludeQuote() {
return includeQuote_;
} | [
"public boolean getIncludeQuote() {\n return includeQuote_;\n }",
"public boolean getIncludeQuote() {\n return includeQuote_;\n }",
"public Builder setIncludeQuote(boolean value) {\n\n includeQuote_ = value;\n bitField0_ |= 0x00000008;\n onChanged();\n return this;\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENFIRST:event_bresetActionPerformed TODO add your handling code here: | private void bresetActionPerformed(java.awt.event.ActionEvent evt) {
reset();
} | [
"private void btnResetActionPerformed(java.awt.event.ActionEvent evt) {\n reset(); \n }",
"private void resetBtn1ActionPerformed(java.awt.event.ActionEvent evt) {\n resetBtnActionPerformed();\n }",
"private void botonResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates control for TextController focusTXT | public TextController createFocus(ControllerCore genCode) {
focusTXT = new TextController("focus", getParentController(controlItemSCSCLC), genCode) {
@Override
public void initialize() {
setLinkedController(focus$1LBL);
setProperty("focus");
super.initialize();
}
@Override
public void creat... | [
"public TextController createContainerFocus(ControllerCore genCode) {\n\t\tcontainerFocusTXT = new TextController(\"containerFocus\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(containerFocus$1LBL);\n\t\t\t\tsetProperty(\"contai... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
HELPER EFFECTS: Returns the pokemon's weight held in the JSONObject | public String getWeight(JSONObject obj) {
return (String) obj.get("weight");
} | [
"public int getWeight() {\n\t\tint weight = 0;\n\t\tItem item = null;\n\t\tSet<Item> items = inventory.keySet();\n\t\tIterator<Item> itr = items.iterator();\n\t\twhile(itr.hasNext()) {\n\t\t\titem = itr.next();\n\t\t\tweight += item.getWeight() * inventory.get(item);\n\t\t}\n\t\treturn weight;\n\t}",
"public doub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the list of events | public void setEvents(ArrayList<String> e) {
this.events = e;
} | [
"void setEvents(ArrayList<Event> events);",
"public void setEvents(List<Event> events) {\n this.events = events;\n }",
"public void setEventList(List<EventSource> events) {\n this.eventList.reset(events);\n notifyEventListListeners();\n }",
"public void setEvents(List<TimelineEvent>... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a list of available servers, or null if we failed to parse the server list. | public List<String> getServerList() {
List<String> serverList = null;
if (serverTable != null) {
// Return a copy of the server list so that it cannot be modified by client code.
serverList = new ArrayList<String>(serverTable.keySet());
}
return serverList;
... | [
"public static List<String> getServerList() {\n List<String> serverList = null;\n byte[] response = null;\n\n final long queryStartTime = System.currentTimeMillis();\n int queryTries = 0;\n while ((response == null) && (queryTries < RETRIES)) {\n response = getInfo(getM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process the given success individual. | @Override
protected boolean processSuccess(final double[] individual,
final int generation) {
SuccessInfo f;
f = this.m_list.get(this.m_list.size() - 1);
f.m_successes++;
f.m_info.append(generation);
return false;
} | [
"private void success(Message original, int result) {\n\n // obtain new message using same 'what' from sender\n Message message = obtainMessage(original.what, Geotracer.OBJECTIVE_SUCCESS, result);\n message.setData(original.getData());\n\n // send response\n try {\n ori... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/// Not Scheduled on Scheduling Link | public boolean verifyNotScheduledOnScheduling() {
boolean status = new VerificationHelper(driver).isDisplayed(NotScheduled_Link_Scheduling);
return status;
} | [
"public void clickNotScheduledOnScheduling() {\r\n\t\tNotScheduled_Link_Scheduling.click();\t\t\r\n\t}",
"public abstract boolean isScheduled();",
"@Override\n\tpublic boolean isScheduled() {\n\t\treturn _announcement.isScheduled();\n\t}",
"@Override\n\tpublic boolean isScheduled() {\n\t\treturn _pathologyDat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
use_web_v2 bool user_web_v2 = 12; | public Builder setUserWebV2(boolean value) {
userWebV2_ = value;
onChanged();
return this;
} | [
"@java.lang.Override\n public boolean getUserWebV2() {\n return userWebV2_;\n }",
"boolean isSetWebEnv();",
"public void setPersonalProduction(){\n personalProduction = true;\n }",
"public boolean isWebSignupSupported()\n {\n return false;\n }",
"boolean getWechat();",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessor to set the number of iterations. | public void setIterations(int iter) {
iterations = iter;
} | [
"public void setIterations(int iter) {\n\t\tnumIterations = iter;\n\t}",
"public int getIterationCount() {\r\n\t\treturn iterationCount;\r\n\t}",
"public void setIterations(int iterations) {\n\n this.iterations = iterations;\n }",
"public int getNumOfIterations(){\n\t\treturn numOfIterations;\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Activity Final Node'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseActivityFinalNode(ActivityFinalNode object) {
return null;
} | [
"public T caseActivityNode(ActivityNode object) {\n\t\treturn null;\n\t}",
"public T caseFinalNode(FinalNode object) {\n\t\treturn null;\n\t}",
"public T caseFlowNode(FlowNode object) {\n\t\treturn null;\n\t}",
"public T caseActivity(Activity object) {\n\t\treturn null;\n\t}",
"public T caseExecutableNode(E... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Init the human mappings so you can represent this object in human language. | private void _initHumanMappings() {
if (null != humanMappings) {
return;
}
humanMappings = new Hashtable();
humanMappings.put(CRITERIA_ENGLISH_NAME, "Site name");
humanMappings.put(CRITERIA_SOURCE_DB, "Database source");
humanMappings.put(CRITERIA_SIZE,... | [
"static void init_mappings()\n {\n }",
"protected void init()\n\t{\n\t\tmap = new HashMap<Enum<?>, String>();\n\t\ttype = null;\n\t}",
"public Translator()\n {\n english = new DictionaryTree();\n french = new DictionaryTree();\n }",
"public Translator() {\n\t\tdictionary = new Dictio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "charSetValue" $ANTLR start "imports" /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:312:1: imports : ( importItem ( ws )? SEMI ( ws )? )+ ; | public final void imports() throws RecognitionException {
try { dbg.enterRule(getGrammarFileName(), "imports");
if ( getRuleLevel()==0 ) {dbg.commence();}
incRuleLevel();
dbg.location(312, 0);
try {
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:313:2: ( ( importItem ( ... | [
"public final void mIMPORT_SYM() throws RecognitionException {\n try {\n int _type = IMPORT_SYM;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Volumes/Mercurial/web-main/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1142:21: ( '@IMPORT' )\n // /Volumes/Mercurial/... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
merges local timestamp vector with tsVector timestamp vector taking the smallest timestamp for each node. After merging, local node will have the smallest timestamp for each node. | public synchronized void mergeMin(TimestampVector tsVector) {
} | [
"public void mergeMin(TimestampVector tsVector){\n\t\tfor (Enumeration<String> pids = timestampVector.keys(); pids.hasMoreElements();) {\n\t\t\tString pid = pids.nextElement();\n\t\t\tif (getLast(pid).compare(tsVector.getLast(pid)) > 0) {\n\t\t\t\ttimestampVector.put(pid, tsVector.getLast(pid));\n\t\t\t}\n\t\t}\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Standard constructor. The testObj is the object that the test sequence applies to. It should come in a state that is testable (i.e already initialized). | public TestSequence(Testable testObj) {
testSequence = new LinkedList<TestStep>();
baseCase = testObj;
fileName = baseCase.getClass().getName() + ".xml"; // SHOULD be the src/main/resources folder in the maven project...
// ALSO need to figure out how to make this work on Linux since that's a windo... | [
"public TestSequence() {\n }",
"public BeginTest() {\r\n super();\r\n }",
"public SwerveAutoTest() {\n // Initialize base classes.\n // All via self-construction.\n\n // Initialize class members.\n // All via self-construction.\n }",
"public CoroTest() { }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To Get the godownStockId from GodownStockDetails table | public Long getGodownStockId() {
return godownStockId;
} | [
"public void setGodownStockId(Long godownStockId) {\n this.godownStockId = godownStockId;\n }",
"public Long getStockId() {\n return stockId;\n }",
"public Stock getStockById(Long stockId);",
"public Integer getStockId() {\r\n\t\treturn stockId;\r\n\t}",
"public Integer getInStockDetailI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ProcessConfiguration__Group__8__Impl" $ANTLR start "rule__ProcessConfiguration__Group__9" InternalDsl.g:11909:1: rule__ProcessConfiguration__Group__9 : rule__ProcessConfiguration__Group__9__Impl rule__ProcessConfiguration__Group__10 ; | public final void rule__ProcessConfiguration__Group__9() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:11913:1: ( rule__ProcessConfiguration__Group__9__Impl rule__ProcessConfiguration__Group__10 )
// InternalDsl.g:11914:2: rule... | [
"public final void rule__ProcessConfiguration__Group__8() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:11886:1: ( rule__ProcessConfiguration__Group__8__Impl rule__ProcessConfiguration__Group__9 )\n // InternalDsl.g:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses formatted date value using the default format. | public static DateWrapper parse(String formattedValue) throws ParseException
{
try
{
return parse(DEFAULT_FORMAT_NAME, formattedValue);
}
catch (FormatNotFoundException e)
{
// should not happen, but..
throw new NullPointerException("Could not find default date format");
... | [
"@Override\n @VisibleForTesting\n protected Date parseDate(String date, String userPattern, String defaultPattern, Locale locale) {\n DateFormat format;\n String patternUsed = \"dd/MM/yyyy\";\n Locale localeUsed = locale;\n if (StringUtils.isNotEmpty(userPattern)) {\n patternUsed = userPattern;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ =================================== Override Methods ======================================================== Start all elevators as Thread, and then proceed to standby. | @Override
public void run() {
// put all elevators as a thread then start it
for (Elevator elevator : elevators)
new Thread(elevator).start();
// let this system standby for receiving task from each floor level
standby();
} | [
"public void startElevators(){\n\t\tfor(int liftNum =0;liftNum<NUM_OF_ELEVATORS;liftNum++){\n\t\t\tlift[liftNum].start();\n\t\t}\n\t}",
"private void standby() {\n while (true) {\n // Thread sleep control\n try {\n Thread.sleep(DELAY);\n } catch (Exception e)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get the objective text for a particular testID | public String getObjectiveText(String testID) {
return getComponentText(testID);
} | [
"public String getTestObjective() {\r\n\t\treturn testObjective;\r\n\t}",
"public String getTestObjective() {\r\n\t\t\treturn testObjective;\r\n\t\t}",
"public String getObjective() {\r\n\t\treturn objective;\r\n\t}",
"public String getPenaltyText() { return Penalty.getPenaltyTextFromID(penaltyID, myDbContext... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add the other statsAccumulator's data to this summary statsAccumulator. Note that it doesn't make sense for this statsAccumulator to be aggregating data at the same level as the other statsAccumulator. In other words, the result of: c1.summarizeWith(c2) is NOT the same as: cs = new StatsAccumulator(); cs.summarizeWith(... | public void summarizeWith(StatsAccumulator other) {
add(other.getMean());
} | [
"public void combineWith(StatsAccumulator other) {\n final double curMin = other.getMin();\n final double curMax = other.getMax();\n if (n == 0) {\n min = curMin;\n max = curMax;\n }\n else {\n if (curMin < min) {\n min = curMin;\n }\n if (curMax > max) {\n max ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The profitAndLost print a report of the profit and lost of the company. The profitAndLost print a report of the profit and lost of the company. | public void profitAndLost() {
System.out.printf("| Company %3s | %,10d | %,10d | $ %,8d | %,10d | %,10d | $ %,8d | %,10d |", companyType, totalSales, totalDeliverySales, (totalSales + totalDeliverySales), totalPurchases, totalDeliveryPurchases, (totalPurchases + totalDeliveryPurchases), (totalSales + totalDeliv... | [
"void ReportFinance() {\n\t\ttotalProfit = (this.income -(this.salary + this.inventoryTotalPricePurchase +this.incidentalCharges));\r\n\t\tSystem.out.println(\"=========================================================================================================================================\");\r\n\t\tSystem.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
auto generated Axis2 call back method for crearSeccion method override this method for handling normal response from crearSeccion operation | public void receiveResultcrearSeccion(
wtp.ServiceStub.CrearSeccionResponse result
) {
} | [
"private Long crearSeccion(String[] codigos, Long oidPais, String pais, Long oidMarca, Long oidCanal, String codMarca, String codCanal, Long oidZona, boolean activa, DTOUnidadAdministrativa dto, DTOUnidadAdmRegistro dtoR, Long iDProc, String typeProc)\n throws MareException {\n \n UtilidadesLog... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the type arguments on this type | public
void setTypeArguments(List<? extends AnnotatedTypeMirror> ts) {
typeArgs = Collections.unmodifiableList(new ArrayList<AnnotatedTypeMirror>(ts));
} | [
"public abstract JavaEntity setTypeArgs(List<TypeArgumentEntity> tparams);",
"void setArguments(String arguments);",
"public void setParameterTypes(List parameterTypes);",
"@Override\n public void setTemplateArgumentTypes(List<Type> argsTypes) {\n // System.out.println(\"ARRIVED AT TEMPLATE ARGS\");... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a metadata tuple as the first tuple and then pass through to the JDBCStream. | @Override
public Tuple read() throws IOException {
if (firstTuple) {
try {
Tuple tuple = new Tuple();
firstTuple = false;
ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) {
... | [
"public T getMetadataEntityFromTuple(ITupleReference tuple) throws MetadataException, IOException;",
"ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle);",
"public ITupleReference getTupleFromMetadataEntity(T metadataEntity) throws MetadataException, IOException;",
"public TupleStoreM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clone the Pawn so that the clone is a Pawn instance | @Override
public Piece clonePiece(){
Pawn other = new Pawn(player,x,y);
return other;
} | [
"public Piece clone() {\n return new Pawn(new Point(this.location.x, this.location.y),\n this.color, this.numMoves, this.enPassantOk);\n }",
"@Override\n public Game cloneGame(){\n GridGame clone = new pegsolitaire();\n clone.pieces = new LinkedList<Piece>();\n for... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a SceneGraphObject with default parameters. The default values are as follows: all read capability bits : set (true) all write capability bits : clear (false) all capabilityIsFrequent bits : set (true) isLive : false isCompiled : false user data : null name : null | public SceneGraphObject() {
createRetained();
} | [
"public VMDGraphScene () {\n this (VMDFactory.getOriginalScheme ());\n }",
"public SceneNode()\n\t{\n\t\tthis(UUID.randomUUID());\n\t}",
"public BasicKPartiteGraph() {\n\t\tthis(\"none\",UNLIMITED_PARTITIONS);\n\t}",
"public SceneNode(){\n }",
"protected SceneObject(final String name)\r\n\t{\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
as these tests use three data nodes, those watches will be across two of those nodes due to having two watcher shards, so that we can be sure that the count was merged | public void testWatcherUsageStatsTests() {
long watchCount = randomLongBetween(5, 20);
for (int i = 0; i < watchCount; i++) {
watcherClient().preparePutWatch("_id" + i).setSource(watchBuilder()
.trigger(schedule(cron("0/5 * * * * ? 2050")))
.input(simp... | [
"@Test\n public void testDoWorkWithDiffNumberOfStores() throws IOException {\n List<StatsSnapshot> storeSnapshots1 = new ArrayList<>();\n List<StatsSnapshot> storeSnapshots2 = new ArrayList<>();\n List<StatsSnapshot> storeSnapshots2Copy = new ArrayList<>();\n int seed = 1111;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a license in the server | public void deleteLicense(final String licenseId, final String user, final String password) throws GrapesCommunicationException, AuthenticationException{
final Client client = getClient(user, password);
final WebResource resource = client.resource(serverURL).path(RequestUtils.getLicensePath(licenseId));... | [
"@Override\n public void removeDSpaceLicense(Context context, Item item) throws SQLException, AuthorizeException,\n IOException\n {\n // get all bundles with name \"LICENSE\" (these are the DSpace license\n // bundles)\n List<Bundle> bunds = getBundles(item, \"LICENSE\");\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "items" attribute with a collection of Productvendor entities that are retrieved from Vendor?cap_first and returns the navigation outcome. | public String navigateProductvendorList() {
if (this.getSelected() != null) {
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("Productvendor_items", this.getSelected().getProductvendorList());
}
return "/productvendor/index";
} | [
"Collection<Item> getInventory();",
"@ApiModelProperty(value = \"The items that are setup to rebill\")\r\n public List<AutoOrderItem> getItems() {\r\n return items;\r\n }",
"public com.vsp.bl.product.dto.coverage.v002.ProductItem[] getProductItems() {\n return productItems;\n }",
"public void s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method called search(String[] str, String key) array contains string "Oct" | @Test
public void testLinearStringSearchExists() {
Assert.assertTrue(LinearSearch.search(str, "Oct"));
} | [
"static String stringSearch(String[] array) {\n\t\tSystem.out.println(\"search the string to an array\");\n\t\tString str = \"viji\";\n\t\tfor (int i = 0; i < array.length; i++)\n\t\t\tif (array[i] == str) {\n\t\t\t\tSystem.out.println(array[i]);\n\t\t\t}\n\t\treturn \"found\";\n\t}",
"String search(int key);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column mp_body.summary | public String getSummary() {
return summary;
} | [
"public java.lang.String getSummary()\n {\n return this._summary;\n }",
"@VTID(206)\r\n java.lang.String getSummary();",
"java.lang.String getSummary();",
"public String getSummary();",
"public String getSummary() {\n try {\n if (!show.isNull(\"summary\")) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the from keys. Relevant for a single rel merge only. In all other cases happens automatically. | public MergeFromRelationRequestContextBuilder fromKeys(RecordKeys keys) {
this.fromKeys = keys;
return self();
} | [
"private void mergeFromKeys(PyObject other, PyObject keys) {\n // Seasoned copy of PyDictionary.mergeFromKeys\n for (PyObject key : keys.asIterable()) {\n __setitem__(key, other.__getitem__(key));\n }\n }",
"public void setKeys(Keys keys)\r\n\t{\r\n\t\tthis.keys = keys;\r\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Open a loopback connection to local JMX server | private void openLoopbackConnection() throws IOException {
_server = ManagementFactory.getPlatformMBeanServer();
JMXServiceURL serviceUrl = new JMXServiceURL("service:jmx:rmi://");
_connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(serviceUrl, null, _server);
_connectorServer.start();
_servi... | [
"private void openServerConnection(String url) throws IOException {\n\t\t_serviceUrl = url;\n\n\t\tJMXServiceURL serviceUrl = new JMXServiceURL(_serviceUrl);\n\t\t_serverConnector = JMXConnectorFactory.connect(serviceUrl);\n\t\t_serviceConnection = _serverConnector.getMBeanServerConnection();\n\t}",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int32 oneof_2014 = 2014; | int getOneof2014(); | [
"int getOneof2013();",
"Integer getTHunYear();",
"int getOneof2012();",
"int getOneof1992();",
"int getOneof1990();",
"Integer getTenYear();",
"int getOneof2011();",
"int getOneof1995();",
"int getMinYear();",
"int getOneof1996();",
"int getOneof1980();",
"public int getOneof1992() {\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Kotlin version used, e.g. "1.1.32". optional string kotlin_support_version = 2; | boolean hasKotlinSupportVersion(); | [
"java.lang.String getKotlinSupportVersion();",
"String getSupportLibraryVersion();",
"com.google.protobuf.ByteString\n getKotlinSupportVersionBytes();",
"java.lang.String getAndroidKtxVersion();",
"@Nullable\n private String getKotlinPluginVersion() {\n Plugin plugin = project.getPlugins().fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ workflow_name( WID, WName) | public WorkflowName(String workflowID, String workflowname) {
super(NAME, NUMBER_OF_ARGUMENTS);
setArgument(0, workflowID);
setArgument(1, workflowname);
} | [
"public String getWorkflowName(){return workflowName;}",
"String getWorkflowName(GenericValue scheme, String issueType);",
"String getWorkflowName(Project project, String issueType);",
"public String getWorkflowName() {\n return workflowName;\n }",
"public List<String> getNameWorkflows();",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a leaf to the appropriate child of this junction. | private void addToJunctionChild(ZQuadTree<?> tree, Leaf<?> leaf) {
Node<?>[] children = (Node<?>[]) this.data;
// Determine which child node this leaf belongs to.
long destinationChild = ZQuad.getChildThatsAncestorOf(this.quad, leaf.quad);
// Get the child's scalar index from 0 to 3.
int i... | [
"public void add(ZQuadTree<?> tree, Leaf<?> leaf) {\n if (this.size < tree.splitThreshold) {\n // With fewer than the threshold elements we store them directly in\n // an array in the data field.\n Leaf<?>[] leaves;\n if (this.size == 0) {\n // If this is currently a single... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the user ID of this science app. | @Override
public long getUserId() {
return _scienceApp.getUserId();
} | [
"@Override\n\tpublic long getUserId() {\n\t\treturn _scienceAppManager.getUserId();\n\t}",
"public long getUserId() {\n return _app.getUserId();\n }",
"public String getUserId(){\n initializeSharedPrefs();\n return sharedPreferences.getString(Constants.PREFERENCE_USER_ID, \"\");\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column mem.MemShopID | public void setMemshopid(Integer memshopid) {
this.memshopid = memshopid;
} | [
"public Integer getMemshopid() {\r\n\t\treturn memshopid;\r\n\t}",
"public void setMemId(Integer memId) {\n this.memId = memId;\n }",
"public void setMemid(Integer memid) {\r\n\t\tthis.memid = memid;\r\n\t}",
"public void setShopId(Long shopId) {\n this.shopId = shopId;\n }",
"public voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Increases the buffer size | private void increaseBuffer(int increase)
{
size+=increase;
byte[] bytes=buffer.array();
buffer=ByteBuffer.allocate(size);
buffer.put(bytes);
} | [
"private void increaseSize() {\n // allocate new doubled sized buffer\n int[] newBuffer = new int[mBuffer.length * 2];\n // copy existing buffer\n System.arraycopy(mBuffer, 0, newBuffer, 0, mSize);\n // use new buffer\n mBuffer = newBuffer;\n }",
"void setBufferSize(in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a new polynomial function object with the specified characteristics | public Polynomial( double coefficients[] )
{
super( "Polynomial", coefficients, new String[coefficients.length] );
for ( int i = 0; i < parameter_names.length; i++ )
parameter_names[i] = "a"+i;
} | [
"Function polynomial();",
"public Polynomial()\r\n\t{\r\n\t\tdouble[] coeff = new double[1];\r\n\t\tcoeff[0] = 0;\r\n\t\tthis.coeffs = coeff;\r\n\t}",
"protected abstract Polynomial createNewAnswer(Polynomial polynomial);",
"Polynomial add(Polynomial polynomial);",
"public Polynomial(double[] coefficients) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
cancels scheduled message with the corresponding message ID and sends it to the head of the queue. | void deliverScheduledMessage(long messageId) throws ActiveMQException; | [
"public abstract void deleteScheduledMessage(long id);",
"@Test\n public void messagesScheduleMessageidDeleteTest() throws ApiException {\n String messageid = null;\n CancelledMessageResponse response = api.messagesScheduleMessageidDelete(messageid);\n // TODO: test validations\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates that the hub URL passed indicates the underlying Ballerina Hub (if started) and publish against a topic in the default Ballerina Hub's underlying broker. | public static Object validateAndPublishToInternalHub(BString hubUrl, BString topic,
BMap<BString, Object> content) {
Hub hubInstance = Hub.getInstance();
if (hubInstance.isStarted() && hubInstance.getPublishUrl().equals(hubUrl.getValue())) {
... | [
"@Test\n public void testPublishItem_Hub() {\n System.out.println(\"publishItem\");\n Hub item = null;\n MainWindow1 instance = new MainWindow1();\n instance.publishItem(item);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The tes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a Task object with given name. Other fields will have some dummy values. | Task generateTaskWithName(String name) throws Exception {
return new Task(
new Name(name)
);
} | [
"private Task generateTaskWithName(String name) throws Exception {\n return new Task(\n new Title(name),\n Optional.ofNullable(new Deadline(\"today\")),\n Optional.ofNullable(new Deadline(\"next wed 2359\")),\n false,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
shortcut for add(column, INC, value) | public UpdateValues inc(String column, Object value) {
return this.add(column, UpdateType.INC, value);
} | [
"void addColumn(int column);",
"void addRow(T value);",
"public void addColumn(SMTGridColumnIntfc column);",
"@SuppressWarnings(\"null\")\r\n\tpublic void addColumnValue(Column column, Object value)\r\n\t{\r\n\t\tint type = ZConstant.UNKNOWN;\r\n\t\tif(value == null)\r\n\t\t\ttype = ZConstant.NULL;\r\n\t\tels... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the number of days per month. | public void setDaysPerMonth(Number daysPerMonth)
{
if (daysPerMonth != null)
{
m_daysPerMonth = daysPerMonth;
}
} | [
"public void setNumberOfDays(int value) {\n this.numberOfDays = value;\n }",
"public void setNumberOfDays( Integer days )\n {\n numberOfDays.setValue( days );\n }",
"public void setDays(int n) {\n this.days = n;\n this.total = this.days * this.price;\n }",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replaces a HL7FieldComponent at a position with the provided HL7FieldComponent | public HL7FieldComponent setFieldComponent(int pos, HL7FieldComponent fieldcomp) {
fieldcomp.setParent(this);
HL7FieldComponent old = components.set(pos, fieldcomp);
old.setParent(null);
this.data = marshal();
setDirty();
return old;
} | [
"public void replaceField (int idx, Field newField) {\n if (m_field [idx].removeObserver (this)) {\n newField.addObserver (this);\n }\n m_field[idx] = newField;\n }",
"public HL7FieldComponent removeFieldComponent(int pos) {\n HL7FieldComponent f = components.remove(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the completion date of style. | public void setCompletionDateOfStyle(String completionDateOfStyle) {
this.completionDateOfStyle = completionDateOfStyle;
} | [
"public void setFgCompletionDate(Date value) {\n setAttributeInternal(FGCOMPLETIONDATE, value);\n }",
"void setEstimatedCompletionDate(Date p_estimatedCompletionDate);",
"public void setCompleteDate(Date completeDate) {\r\n this.completeDate = completeDate;\r\n }",
"@Override\n\tpublic void setC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes the specified JSON RPC result to the client. | public void writeResult(Object result); | [
"public void receiveResultregisterJSONStatement(\n de.ifgi.envision.eps.core.EPSManagerStub.RegisterJSONStatementResponse result\n ) {\n }",
"public interface JsonRpcResponseWriter {\n\t\n\t/**\n\t * Writes the specified JSON RPC result to the client.\n\t * @par... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 data2 = 3; | public int getData2() {
return data2_;
} | [
"public int getData2() {\n return data2_;\n }",
"IntegerData createIntegerData();",
"public int getData1() {\n return data1_;\n }",
"int getData2();",
"public int getData1() {\n return data1_;\n }",
"public int getData(){\r\n return data;\r\n }",
"int getInt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set "setList" variable, usually used internally. Used by the "Set Operations" button to determine what sets to use. | public void setSetList(List<String> sets) {
set1 = null;
set2 = null;
setsList = sets;
} | [
"@Override\n\tpublic void setListOfChangesets(List<String> changeSets) {\n\t\t\n\t\tthis.changeSets = changeSets;\n\t\t\n\t}",
"public void setSelect(List list) {\n select = list;\n }",
"private void setSelectedTargetListSets(List<TargetListSet> targetListSets) {\n if (targetListSets == null) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ad ogni selezione/deselezione imposto i bottoni come attivati/disattivati basandomi sul risultato dell' operazione di casting della tabella (chiamata e nel metodo in quanto fonte dell' evento) in un ListSelectionModel, dal quale poi controllo se ci siano righe selezionate | @Override
public void valueChanged(ListSelectionEvent e) {
if(!selectedTable.equals("GEN")) {
btnModifica.setEnabled(!((ListSelectionModel) e.getSource()).isSelectionEmpty());
btnRimuovi.setEnabled(!((ListSelectionModel) e.getSource()).isSelectionEmpty... | [
"@Override\n public void valueChanged(ListSelectionEvent e) {\n btnEliminaRichiesta.setEnabled(!((ListSelectionModel)e.getSource()).isSelectionEmpty());\n }",
"private void jTablePesquisaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTablePesquisaMouseClicked\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stress Test for the functionality of class JavaDependenciesEntryExtractor. | public void testJavaDependenciesEntryExtractor_Extract()
throws Exception {
StressTestHelper.start();
for (int i = 0; i < StressTestHelper.TIMES; i++) {
extractor.extract(TEST_BUILD_FILE);
}
StressTestHelper.printResult("testJavaDependenciesEntryExtractor_Ex... | [
"@Test\n public void testDependencyEvolutionOnJavaComplete() {\n Depinder depinder = new Depinder(\"D:\\\\Dev\\\\licenta\\\\thisIsIt\\\\depinder\\\\src\\\\test\\\\resources\\\\testFingerprints.json\");\n\n DepinderConfiguration.getInstance().setProperty(DepinderConstants.ROOT_FOLDER, ROOT_FOLDER);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns RXA25: "Administered Barcode Identifier" creates it if necessary | public CWE getRxa25_AdministeredBarcodeIdentifier() {
CWE retVal = this.getTypedField(25, 0);
return retVal;
} | [
"public CWE getAdministeredBarcodeIdentifier() { \r\n\t\tCWE retVal = this.getTypedField(25, 0);\r\n\t\treturn retVal;\r\n }",
"java.lang.String getBarcode();",
"String getBarCode();",
"public String getlbr_Barcode2();",
"private String getBarcodeId(String index) {\n if (StringUtils.isEmpty(index)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
calculates time in destination when it is midnight and noon at home | private static void calculateTime() {
System.out.print("What is the time difference, in hours, between your home and your destination? ");
int timeDifference = sc.nextInt();
int midnightDiff = (24 + timeDifference) % 24;
int middayDiff = (12 + timeDifference) % 24;
System.out.pri... | [
"public int getRideTime() {\r\n\r\n\t\treturn client_p.getManhattanDistanceTo(destination);\r\n\r\n\r\n\t}",
"public int getTimeInParkingLot( int exitHour )\n {\n return exitHour - arrivalHour + 1;\n }",
"@Override\n public int journeyTimeBetweenStops(Stop origin, Stop destination, boolean isRushH... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Queue a task to be handled at a future time, respecting rate limits. | public abstract void queue(@Nonnull LimiterPair task); | [
"@Override\n\tpublic void performTaskYourWay(int taskNum) {\n\t\t\n\t\trateLimiter.acquire();\n\t\ttaskExecutor.submit(() -> util.performOperation(taskNum));\n\t}",
"private void queueTask(Version theTask) {\n\tsynchronized(_taskQueue) {\n\t _taskQueue.add(theTask);\n\t}\n }",
"public void queueImmediatel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Revalidate working version with the right calendar. | public void upgradeToVersion29(OpProjectSession session) {
logger.info("Revalidating working versions with calendar settings on");
OpBroker broker = session.newBroker();
OpQuery query = broker.newQuery("from OpProjectPlan");
try {
Iterator result = broker.iterate(query);
... | [
"public void revalidate() {\n checkOwner();\n }",
"public void makeValidDate() {\n\t\tdouble jd = swe_julday(this.year, this.month, this.day, this.hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse the specs passed in to the constructor. | Collection<Spec> parse() throws SpecException {
for (String specString : testSpecStrings) {
if (specString.indexOf('#') >= 0) {
addMethod(specString);
} else {
Optional<Spec> spec = getOrCreateSpec(specString, specString);
if (spec.isPresent()) {
Spec s = spec.get();
... | [
"SpecParser(Iterable<String> testSpecStrings) {\n Preconditions.checkArgument(!Iterables.isEmpty(testSpecStrings));\n this.testSpecStrings = testSpecStrings;\n }",
"public void setSpecification(String specs) {\n specification = specs;\n }",
"public void parse()\n\t{\n\t\tclasses.addAll(parseInt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ should be called before using mines and Tiles and/or to reset the field. usually init() is the last call in the constructor | public void init() {
mines.putMines();
for (int i = 0; i < tiles.length; i++) {
tiles[i] = Tile.NEW;
}
blownUp = false;
} | [
"private MapArea() {\n initFields();\n }",
"void init() {\r\n this.resetDelay = 0;\r\n GameObjectCollection.init();\r\n this.gameHUD = new GameHUD();\r\n this.generateMap();\r\n this.gameHUD.init();\r\n this.setPreferredSize(new Dimension(this.mapWidth * 32, (this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Step succeeded and has print keyword | private boolean isPrint(final TestStepFinished event) {
return event.result.isOk(true) && !Arrays.asList(Result.Type.SKIPPED).contains(event.result.getStatus())
&& event.testStep instanceof PickleStepTestStep
&& ((PickleStepTestStep) event.testStep).getStepText().contains("print");
} | [
"private static void printSuccess () {\n System.out.println();\n System.out.println(\"Success!\");\n System.out.println();\n }",
"public void print(){\n System.out.println(\"Command complete\");\n }",
"private void doPrintAdvice(){\n\t\tcurrentStep = OPERATION_NAME+\": printing... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This interface is implemented by a mechanism specific instance of a GSS security context. A GSSContextSpi object can be thought of having 3 states: before initialization during initialization with its peer after it is established The context options can only be requested in state 1. In state 3, the per message operatio... | public interface GSSContextSpi {
public Provider getProvider();
// The specification for the following methods mirrors the
// specification of the same methods in the GSSContext interface, as
// defined in RFC 2853.
public void requestLifetime(int lifetime) throws GSSException;
public void r... | [
"public byte[] initSecContext(InputStream is, int mechTokenSize) throws GSSException;",
"public byte[] acceptSecContext(InputStream is, int mechTokenSize) throws GSSException;",
"private void doSpnegoSequence(AuthenticatedURL.Token token) throws IOException, AuthenticationException {\n try {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes a line to a file. | public static void writeToFile(String filename, String line) {
try {
FileWriter fw = new FileWriter(PATH + filename, true); //the true will append the new data
fw.write(line + "\n");//appends the string to the file
fw.close();
} catch (IOException ioe) {
S... | [
"public void writeLine(String line){\n\t\ttry{\n\t\t\tout.write(line);\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"File cannot be written too.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void write(String line) throws IOException {\r\n\t\tif (out == null) {\r\n\t\t\tout = new FileWriter(ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column te_role.roleLabel | public void setRolelabel(String rolelabel) {
this.rolelabel = rolelabel == null ? null : rolelabel.trim();
} | [
"public String getRolelabel() {\n return rolelabel;\n }",
"public void setRole(java.lang.String value) {\n this.role = value;\n }",
"void setRole(String role);",
"public void setRole(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), ROLE, value);\r\n\t}",
"public void s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: repairChain() This method repairs the chain. It checks the hashes of each block and ensures that any illegal hashes are recomputed. After this method is run, the chain will be valid. The routine does not modify any difficulty values. It computes new proof of work based on the difficulty specified in the Block. | public void repairChain() {
for (int i = 1; i < blockChain.size(); i++) {
Block previousBlock = blockChain.get(i - 1);
Block currentBlock = blockChain.get(i);
String previousProofOfWork = previousBlock.proofOfWork();
String hashTarget = new String(new char[previou... | [
"@Test\n public void testGeneratedChain() throws Exception {\n FullBlockTestGenerator generator = new FullBlockTestGenerator(AbstractFullPrunedBlockChainTest.PARAMS);\n RuleList blockList = generator.getBlocksToTest(false, false, null);\n store = createStore(AbstractFullPrunedBlockChainTest.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method for parsing specs as a generator would be presented at runtime (inline models resolved, flattened). | public static OpenAPI parseFlattenSpec(String specFilePath) {
OpenAPI openAPI = parseSpec(specFilePath);
InlineModelResolver inlineModelResolver = new InlineModelResolver();
inlineModelResolver.flatten(openAPI);
return openAPI;
} | [
"private static void generateApiSpec() {\n ClassName enumClass = ClassName.get(outputPackageName, \"ApiSpec\");\n TypeSpec.Builder apiSpec = TypeSpec.enumBuilder(enumClass).addModifiers(Modifier.PUBLIC);\n for (Map.Entry<String, APIRequestHandler> entry : APIServlet.getAPIRequestHandlers().entr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo que realiza el calculo del valor de X para los datos especificados en modeloCalculoIntegral | public ModeloCalculoIntegral calcularValorX(ModeloCalculoIntegral modeloCalculoIntegral)
{
modeloCalculoIntegral.setValorX(1.0);
modeloCalculoIntegral.setNumeroSegmentos(20);
modeloCalculoIntegral.setValorErrorAceptable(0.000001);
CalculoIntegral calculoIntegral = new CalculoIntegral... | [
"double recalculateValue();",
"@Override\r\n\tpublic double calcularValorEconomico() {\r\n\t\tvalorEconomico = (getMetrosEslora() * MULTI_VALOR_ECONOMICO) * getCarga();\r\n\t\treturn valorEconomico;\r\n\t}",
"@Override\n public double calculaSalario() \n {\n double resultado = valor_base - ((acumul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads all the sprite images with data from a text file then adds all sprites to the player. | private void addAllSprites(String heroName) throws IOException {
BufferedReader reader = new BufferedReader(
new FileReader("assets/config/characters/"+heroName+"Sprites.txt")
);
String line = reader.readLine();
String[] data;
BufferedImage[] sprites;
while (line != null) {
data = li... | [
"public static ArrayList<Sprite> loadSprites(String filename) {\n\t\tArrayList<Sprite> list = new ArrayList<>();\n\t\t\n\t\t// Open the file\n\t\ttry (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n\t\t\tString line;\n\t\t\t\n\t\t\t// Find the world size\n\t\t\tline = reader.readLine();\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XAndExpression__Group__0__Impl" $ANTLR start "rule__XAndExpression__Group__1" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4080:1: rule__XAndExpression__Group__1 : rule__XAndExpression__Group__1__Impl ; | public final void rule__XAndExpression__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4084:1: ( rule__XAndExpressi... | [
"public final void rule__XAndExpression__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4095:1: ( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the default number of fraction digits used with this currency. For example, the default number of fraction digits for the Euro is 2, while for the Japanese Yen it's 0. In the case of pseudocurrencies, such as IMF Special Drawing Rights, 1 is returned. | public int getDefaultFractionDigits() {
return javaCurrency.getDefaultFractionDigits();
} | [
"public int getFractionDigits() {\n return java.util.Currency.getInstance(name()).getDefaultFractionDigits();\n }",
"public int getDefaultFractionDigits() {\n return defaultFractionDigits;\n }",
"int getDefaultFractionCounter();",
"public int getMaximumFractionDigits() { throw new RuntimeE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
should not remove Emptys in OrSums, as they are importent here. | public void removeEmptys(){
List<EbnfElement> ebnfElementList;
List<EbnfElement> ebnfElementList1 = Arrays.<EbnfElement>asList(ebnfElemente);
ebnfElementList = new ArrayList<>(ebnfElementList1);
for(int i=0;i<ebnfElementList.size();i++){
if(ebnfElementList.get(i) instanceof E... | [
"public void testEmptyRemove() {\n List<Rule> rules = Rule.parseRules(\n \"-> (eg:i eg:prop eg:foo) .\" +\n \"(?X eg:prop ?V) -> (?X eg:prop2 ?V) .\" +\n \"(?X eg:prop eg:foo) noValue(?X eg:guard 'done') -> remove(0) (?X eg:guard 'done') .\" );\n GenericRul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Count of response messages in the response stream. uint64 response_message_count = 2; | long getResponseMessageCount(); | [
"public int responseCount() {\n synchronized (_responseIds) {\n return _responseIds.size();\n }\n }",
"public int getCount() {\n return this.responses.size();\n }",
"long getRequestMessageCount();",
"public int messageCount() {\n return messageCount;\n }",
"public s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The "lead Paragraph" field is the lead paragraph of the article. Generally this field is populated with the first two paragraphs from the article. | public java.util.List<java.lang.String> getLeadParagraphList() {
return this.leadParagraphList;
} | [
"public java.lang.String getOnlineLeadParagraph() {\n return this.onlineLeadParagraph;\n }",
"public NITFInfo setLeadParagraphList(java.util.List<java.lang.String> leadParagraphList) {\n this.leadParagraphList = leadParagraphList;\n return this;\n }",
"public NITFInfo setOnlineLeadParagraph(java.lang... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make the player quit the game | public void quitGame() {
quitGame = true;
} | [
"private void quitGame() {\n\t\tif (ge != null) {\r\n\t\t\tge.gameOver();\r\n\t\t}\r\n\t\tSystem.out.println(\"Thanks for playing!\");\r\n\t\tSystem.exit(1);\r\n\t}",
"public static void quitGame() {\n System.exit(0);\n }",
"public void quitGame() {\n\t\tactive = false;\n\t}",
"public void quit(){\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a map of realm to a map of circle of trust name to a set of Hosted Identity Providers. | public Map getRealmCotWithHostedIDPs()
throws AMConsoleException {
Map map = new HashMap();
Set realms = getRealms();
for (Iterator i = realms.iterator(); i.hasNext();) {
String realm = (String) i.next();
Set cots = getCircleOfTrusts(realm);
... | [
"private Map<String, List<String>> createProvisioningConfidentialPropsMap() throws IdentityProviderManagementException {\n\n Map<String, List<String>> metaProvisioningConfigMap = new HashMap<>();\n ProvisioningConnectorConfig[] metaProvisioningConfigs = getAllProvisioningConnectors();\n if (met... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Example 5: Execute a runnable if all list entries are true | public static void run(Runnable run, List<Boolean> bools) {
if (bools.stream().allMatch(b -> b == true)) // Check if all booleans are true
run.run(); // Ran if the above condition is met
} | [
"void notifyTrue() {\n for (int i = 0; i < isTrue.size(); i++) {\n try {\n isTrue.get(i).run();\n } catch (Exception e) {\n log.error(\"Can't execute {} because {}!\", isTrue.get(i), e);\n }\n }\n }",
"@Override\n public <T> boolea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bidirectional manytoone association to CalidadDetalleEspecietallaCajonBanda | @OneToMany(mappedBy="calidadEspecietallaCajonBanda")
public List<CalidadDetalleEspecietallaCajonBanda> getCalidadDetalleEspecietallaCajonBandas() {
return this.calidadDetalleEspecietallaCajonBandas;
} | [
"@ManyToOne\r\n\t@JoinColumn(name=\"idcocinaaperturacierredetalle\")\r\n\tpublic CocinaAperturaCierreDetalle getCocinaAperturaCierreDetalle() {\r\n\t\treturn this.cocinaAperturaCierreDetalle;\r\n\t}",
"@ManyToOne\r\n\t@JoinColumn(name=\"idcajondetallebarcodescarga\")\r\n\tpublic CajonDetalleBarcoDescarga getCajon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JvmWildcardTypeReference__Group__2__Impl" $ANTLR start "rule__JvmUpperBound__Group__0" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:14516:1: rule__JvmUpperBound__Group__0 : rule__JvmUpperBound__Group__0__Impl rule__JvmUpper... | public final void rule__JvmUpperBound__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:14520:1: ( rule__JvmUpperBoun... | [
"public final void ruleJvmUpperBound() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1938:2: ( ( ( rule__JvmUpperB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value related to the column: final_status | public void setFinalStatus (java.lang.String finalStatus) {
this.finalStatus = finalStatus;
} | [
"public void setStatusval(int value) {\n this.statusval = value;\n }",
"public java.lang.String getFinalStatus () {\n\t\treturn finalStatus;\n\t}",
"public void setStatus(String newStatus){\n\n //assigns the value of newStatus to the status field\n this.status = newStatus;\n }",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Only the owner can stop a game round | @Callable
public static void stopGame() {
Blockchain.require(Blockchain.getCaller().equals(owner));
Blockchain.require(isGameOnGoing);
requireNoValue();
isGameOnGoing = false;
BettingEvents.gameStopped();
} | [
"public void stopGame() {\r\n\t\tcanRun = false;\r\n\t}",
"public long stopGame();",
"void stopGame() {\n leader.disconnect();\n opponent.disconnect();\n }",
"@Override\n public void stopGame() {\n ((MultiplayerHostController) Main.game).stopGame();\n super.stopGame();\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if the user chose the daily double question, they are the only user that can buzz into the question and get to wager up to 500 points that they can either win or lose depeding if they get the answer right or not. | private void checkDailyDouble(int questionIndex, int playerIndex){
if(questionIndex == dailyDouble){
lblMessages.setText("You got the daily double! You are the only player that is allowed to buzz in at this time.");
if(playerIndex == 0){
canBuzz2=false;
... | [
"public void advice() {\n if(DaysOfPerishedItem >=7)\n System.out.println(\"it is perished, don't buy it.\");\n else\n System.out.println(\"it is fresh, enjoy it!\");\n }",
"public void askAll() throws StringIsEqualToTheAnswerThrownButNotAcceptedException {\n\t\tScanner myScan = new Sc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use ListApiKeysRequest.newBuilder() to construct. | private ListApiKeysRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"ApiKeys listKeys();",
"private ListApiKeysResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"java.util.List<yandex.cloud.api.iam.v1.ApiKeyOuterClass.ApiKey> \n getApiKeysList();",
"java.util.List<? extends yandex.cloud.api.iam.v1.ApiKeyOuterClass.Api... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform the transition from one image to another All subclasses must over ride this. This only does an instant switch from one to the other Args: imgPanel Panel the images are drawn into ImageA Current Image on the screen ImageB Image to transition to time Number of seconds to take to do this transition | public void DrawImageTransition(JPanel imgPanel, BufferedImage ImageA, BufferedImage ImageB, double time)
{
// Get all the graphics objects
Graphics gPan = imgPanel.getGraphics();
Graphics gA = ImageA.getGraphics();
// Default just copy ImageB into ImageA then copy to screen
gA.drawImage(ImageB, 0, 0, ... | [
"private void imageSwitch()\n {\n if (startTime == 0)\n {\n Greenfoot.playSound(countdownSound);\n setImage(numberThree);\n }\n else if (startTime == 50)\n {\n setImage(numberTwo);\n }\n else if (startTime == 95)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
\u2193 Returns current Energy held by Player | public int getEnergy() {
return energyCollected;
} | [
"public double getEnergy() { return energy; }",
"@Override\n public double getEnergyLevel() {\n return energy;\n }",
"public double getEnergy() {\n\t\treturn holder.getStored(side);\n\t}",
"int getEnergy();",
"public int getTotalEnergy() {\n return totalEnergyCollected;\n }",
"int getEner... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PropertyVisitor is an interface for use with user defined properties when you know the name of the property but not its type. | public interface PropertyVisitor {
/** Handle the case of a void property type. */
void visit();
/** Handle the case of a String property type. */
void visit(String value);
/** Handle the case of an Object property type. */
void visit(Object value);
/** Handle the case of a Saveable property... | [
"boolean visit(Property p);",
"public static MemberExpression property(Expression expression, String name) { throw Extensions.todo(); }",
"public static MemberExpression property(Expression expression, Class type, String name) { throw Extensions.todo(); }",
"public Property(String name) {\n this.name = nam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates an object from KeyRef class | public static KeyRef getKeyRefObject(String keyRefString)
{
return new KeyRef(keyRefString);
} | [
"KeyDescriptor createKeyDescriptor();",
"T create(K key);",
"public KeyValue() {}",
"public Key(final Class<?> classe) {\n this(classe.getName());\n valueClass = classe;\n }",
"public KeyRefImpl(SchemaModelImpl model, org.w3c.dom.Element el) {\n super(model, el);\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return name, WN white knight, BN black knight | public String getName() {
return isWhite() ? "WN" : "BN";
} | [
"public String checkWinner(){\n //check reds\n for(Node n : redNodes.keySet()){\n if(count(n, \"up\", redNodes) >= 4 || count(n, \"down\", redNodes) >= 4 ||\n count(n, \"left\", redNodes) >= 4 || count(n, \"right\", redNodes) >= 4 ||\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A list of fee components associated with the service fee. | public FeeComponentList getFeeList() {
return feeList;
} | [
"public List<FeeComponent> getFeeList() {\r\n if (feeList==null) {\r\n feeList = new ArrayList<FeeComponent>();\r\n }\r\n return feeList;\r\n }",
"public void setFeeList(List<FeeComponent> feeList) {\r\n this.feeList = feeList;\r\n }",
"public List<FeeComponent> getR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use SCLootMapPkEnd.newBuilder() to construct. | private SCLootMapPkEnd(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | [
"private CSLootMapPkEnd(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCLootMapSingleEnd(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = build... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds person to PersonMap | private void addPerson(Person person) {
people.put(person.getPersonID(), person);
allPeople.add(person);
} | [
"public void addPerson(Person person) { this.people.add(person); }",
"public void addPerson(Person person) {\n people.put(person.getPassword(), person);\n System.out.println(person.getName());\n System.out.println(\"Person added!\");\n }",
"private void addPerson(Person p, HashMap<Intege... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Adam Puchalski Apr 19, 2012 Dear God... so late.... refactor! read all planets on the page, determine the HomePlanet, update home, create the rest. 4/4? check if it is relevant | private void updateThePlanetsInfo(Kingdom k, TagNode root) {
String planetCount = toStringFirstChild(evaluateXPath(root,
OverviewTabXPaths.planetCountXPath));
Object[] planets = evaluateXPath(root, OverviewTabXPaths.planetsXPath);
// setting dumy planet name.....
for (Object o : planets) {
TagNode t = (T... | [
"public void processPlanet(XElement planet) {\r\n\t\tPlanet p = new Planet();\r\n\t\tp.id = planet.get(\"id\");\r\n\t\tp.name = planet.get(\"name\");\r\n\t\tString nameLabel = planet.get(\"label\");\r\n\t\tif (nameLabel != null) {\r\n\t\t\tp.name = labels.get(nameLabel); \r\n\t\t}\r\n\t\tp.owner = players.get(plane... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
1971. Find if Path Exists in Graph There is a bidirectional graph with n vertices, where each vertex is labeled from 0 to n 1 (inclusive). The edges in the graph are represented as a 2D integer array edges, where each edges[i] = [ui, vi] denotes a bidirectional edge between vertex ui and vertex vi. Every vertex pair is... | public interface PathExistsInGraph {
boolean validPath(int n, int[][] edges, int start, int end);
default Map<Integer, Set<Integer>> prepareGraph(final int n, final int[][] edges) {
Map<Integer, Set<Integer>> graph = new HashMap<>();
for (int i = 0; i < n; i++) {
graph.put(i, new H... | [
"private boolean pathExists(@NotNull DefaultDirectedGraph<String, DefaultEdge> g,\n @NotNull ModuleIdentifier src,\n @NotNull ModuleIdentifier dest) {\n if (!g.containsVertex(src.getFile().getAbsolutePath())) {\n return false;\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface for a structured, online learning algorithm. | public interface OnlineStructuredAlgorithm extends StructuredAlgorithm {
/**
* Strategy to update the learning rate.
*
* @author eraldof
*
*/
public enum LearnRateUpdateStrategy {
/**
* No update, i.e., constant learning rate.
*/
NONE,
/**
* The learning rate is equal to n/t, where n is t... | [
"public interface LearningAlgorithm {\n\t/**\n\t * Learns a model from the given {@link TraceDataset}\n\t */\n\tProbabilisticAutomata learnModel(TraceDataset dataset) throws LearningAlgorithmException;\n\n\t/**\n\t * An exception that indicates a problem during model learning.\n\t */\n\tpublic static class Learning... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |