query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Checks if tile at x, y contains an item. | public boolean containsItem(int x, int y) {
return tileMap[x][y].hasItem();
} | [
"private boolean hasTileAt(int x, int y) {\n\t\tfor (Component c : getComponents()) {\n\t\t\tif (gbl.getConstraints(c).gridx == x)\n\t\t\t\tif (gbl.getConstraints(c).gridy == y)\n\t\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean tileAvailable(int x, int y) {\r\n if (tileOnBoard(x, y))\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Get the default value for the Managed ConnectionFactory class | private String getManagedConnectionFactoryClassDefault (Collection<TeiidPropertyDefinition> propDefns) {
String resultValue = null;
for(TeiidPropertyDefinition pDefn : propDefns) {
if(pDefn.getName().equalsIgnoreCase(Template.CONN_FACTORY_CLASS_KEY)) {
resultValue=(String)pDe... | [
"public String getConnectionFactory(){\n\t\treturn connectionFactory;\n\t}",
"private static Connection getDefaultInitConnection(final Context c) throws SQLException {\n try {\n final DataSource initDs =\n (DataSource) c.lookup(GlobalConfigurationEngineBean.DEFAULT_DS_INIT)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return the number of the EditPoint hit when getObjectAtEditPoint was called the last time. | int getEditPointNum() {
return editPoint.num;
} | [
"public final int getPointCnt()\n {\n return this.count;\n }",
"public long getItHitCount() {\n return itHitCount;\n }",
"public int getCurrentHitPoints() {\n\t\treturn currentHitPoints;\n\t}",
"long getHitCount();",
"public int getEditClickCount() {\r\n \t\treturn graph.getEditClickCou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Se obtiene el valor de gestorMensajeria | @ManyToOne
@JoinColumn(name = "id_gestor_mensajeria", unique = false, nullable = true, insertable = true, updatable = true)
public GestorMensajeria getGestorMensajeria() {
return gestorMensajeria;
} | [
"public void setGestorMensajeria(GestorMensajeria gestorMensajeria) {\r\n\t\tthis.gestorMensajeria = gestorMensajeria;\r\n\t}",
"public int obtenerNotaMinima(){\n int calificacionBaja = calificaciones[0][0];\n \n //itera a traves de las filas del arreglo calificaciones\n for (int[] cal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the WFMS_Position_Audit with the primary key. | @Override
public WFMS_Position_Audit getWFMS_Position_Audit(String paId)
throws PortalException {
return wfms_Position_AuditPersistence.findByPrimaryKey(paId);
} | [
"@Override\n\tpublic WFMS_Position_Audit createWFMS_Position_Audit(String paId) {\n\t\treturn wfms_Position_AuditPersistence.create(paId);\n\t}",
"public WFMS_Position_AuditPersistence getWFMS_Position_AuditPersistence() {\n\t\treturn wfms_Position_AuditPersistence;\n\t}",
"public WFMS_Position_AuditLocalServic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Midi Var'. | MidiVar createMidiVar(); | [
"JzMidiVar createJzMidiVar();",
"AbstractMidiVarNote createAbstractMidiVarNote();",
"MidiVarFCStopSong createMidiVarFCStopSong();",
"public Var asVar() ;",
"MidiVar90NoteOn createMidiVar90NoteOn();",
"MidiVarF2SngPosition createMidiVarF2SngPosition();",
"MidiVarFAStartSong createMidiVarFAStartSong();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Match enquiry date admission enquiry list with database | public Object[] ListEnquiryAdmissionEnquiry() throws SQLException, IOException, InterruptedException {
// Filter using filters
ActionClass actionClass = new ActionClass(this.driver1, extentTest);
// actionClass.clickOnObject(this.ClickOnFrontOffice);
Thread.sleep(5000);
actionClass... | [
"public Renquiry[] findWhereEnquiryDateEquals(Date enquiryDate) throws RenquiryDaoException;",
"public void setInquirydate(Date inquirydate) {\n this.inquirydate = inquirydate;\n }",
"public int searchIndex(String date) {\n int index = -1;\n\n for(int i = 0; i < userAppointments.size(); i++) {\n if (u... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds StudyGroup based on ID | Optional<StudyGroup> findById(Long id); | [
"Group getGroupById(String id);",
"private Group findById(int id){\n assert(inputGroupList.size() > 0);\n for(Group group : inputGroupList){\n if(group.getNumber() == id)\n return group;\n }\n return null;\n }",
"Group getGroupByID(int id) throws Exceptio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads the original timetable and split each service in Company Name Departure Time Arrival Time | private void getOriginalTimeTable (FileReader fileReader) {
BufferedReader bufferedReader = null;
String line = null;
try {
bufferedReader = new BufferedReader (fileReader);
int noOfEnteries = 0;
while ((line = bufferedReader.readLine ()) != null) {
noOfEnteries++;
if (noOfEnter... | [
"private void checkTimeTableOfServices () {\n\n\t\tif (jaiBusServiceList != null && jaiBusServiceList.size () > 0 && veeruBusServiceList != null\n\t\t\t\t&& veeruBusServiceList.size () > 0) {\n\n\t\t\tObject jaiBusService[] = jaiBusServiceList.toArray ();\n\n\t\t\tObject veeruBusService[] = veeruBusServiceList.toAr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
copy the ico file to the installation folder | private void createDesktopIcon(String linkName) {
File icoFile = new File(pladipusFolder, "pladipus.ico");
try (OutputStream out = new FileOutputStream(icoFile); InputStream in = getClass().getClassLoader().getResourceAsStream("images/pladipus.ico")) {
if (in != null) {
IO... | [
"private void copyIcon( final Direction direction )\n {\n File dest = getIconLocation();\n if ( !dest.exists() || !dest.isDirectory() )\n {\n MessageDialog.openInformation( null, \"Icon location problem\",\n \"Please make sure that the node icon location i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
i stands for index of str string, j stands for index in dest string. At the beginning of each loop process, j is the new position of dest taht should be compared. | public static boolean kmp(String str, String dest) {
for (int i = 0, j = 0; i < str.length(); i++) {
while (j > 0 && str.charAt(i) != dest.charAt(j))
// This loop is to get a matching character recursively. Another
// stop condition is when particial match value meets end.
j = next[j - 1];// As i in st... | [
"private int compare(int i, int j) {\n int result = 0;\n int k = 0;\n\n // Keep comparing each character in the string\n while (k < length && result == 0) {\n int iChar = charAt(i, k);\n int jChar = charAt(j, k);\n if (iChar < jChar) {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface for an XPath parser wrapper. | public interface XPathModel {
String DO_XSD_MARSHAL = "doMarshal";
String DO_XSD_UN_MARSHAL = "doUnMarshal";
/** XPath function names that are not considered part of the core. with no prefixes/NS */
String[] VALID_FUNCTION_NAMES = {
"unparsed-entity-uri", "system-property",
"string-literal", ... | [
"public interface XPathFactory\r\n{\r\n /**\r\n * Creates an XPath object.\r\n * @param expression the XPath expression\r\n * @return the expression as an object\r\n * @throws Exception if syntax or other general problems occur in creating the XPath object\r\n */\r\n Object createXPath( St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
edits the Boolean preference value | public static void editPrefBool(String name, boolean value, Context c) {
SharedPreferences prefs = c.getSharedPreferences(HCConstants.PREF_NAME,
Context.MODE_PRIVATE);
prefs.edit().putBoolean(name, value).commit();
} | [
"public void setValue(boolean booleanValue);",
"void setBoolean(boolean value);",
"void setBoolean(boolean val);",
"public void setBooleanPrefValue(String key, boolean value) {\n SharedPreferences pref = mContext.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n SharedPreferences.E... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pull data from the database to complete the LocalWord, may overwrite come of current data. | public boolean pull() {
// Pull the word ID
int remoteWID = -1;
remoteWID = MyConnection.getInstance().checkForWord(romanization, language, meaning);
if (remoteWID < 0) {
return false;
}
wid = remoteWID;
// Pull from the word table.
... | [
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"private void loadRandomWord() {\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the cell editor on the given composite. The cell editor is created by instantiating the cell editor type passed into this DirectEditManager's constuctor. | protected CellEditor createCellEditorOn(Composite composite) {
String propertyPath = getPropertyPath();
NodePathLookupResult lookupResult = ModelUtils.readProperty(getInstance(), propertyPath, false);
if (lookupResult.status == null) {
IPropertyDescriptor[] propertyDescriptors = lookupResult.properties.get... | [
"protected CellEditor createCellEditorOn(Composite composite) {\n try {\n Constructor constructor = editorType\n .getConstructor(new Class[] { Composite.class });\n return (CellEditor) constructor\n .newInstance(new Object[] { composite });\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var63' field. | public java.lang.CharSequence getVar63() {
return var63;
} | [
"public java.lang.CharSequence getVar63() {\n return var63;\n }",
"public void setVar63(java.lang.CharSequence value) {\n this.var63 = value;\n }",
"public java.lang.Integer getVar64() {\n return var64;\n }",
"public java.lang.Integer getVar64() {\n return var64;\n }",
"public com.dj.mod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a history with aggregated attachments. | public History create(DocumentContext context, String... attachments) {
History history = create(context);
AttachmentService attachmentService = JRegisPlatform.getInstance(AttachmentService.class);
attachmentService.create(history, attachments);
return history;
} | [
"void saveActivityHistForAddEntity(Record inputRecord);",
"protected abstract void createHistoryEvents();",
"@Override\n BodyfatHistory create(BodyfatHistory bodyfatHistory) throws ServiceException;",
"private void addToHistory() {\n this.history.add(this.model.makeCopy());\n this.future = new Stack<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows a blocking message box with YES and NO buttons. The callback is invoked with the user answer as parameter. | public abstract void showConfirmationBox(String message, Consumer<Boolean> resultCallback); | [
"private void formTrueAnswerMsg() {\n\t\tUIUtils.showAutoClosableMsgDialog(\"<html><font color=green>Ответ верный</font></html>\", 1000);\n\t}",
"public abstract void showMessageBox(String message, Runnable callback);",
"public boolean displayPrompt(String msg);",
"public abstract void showInputBox(String mes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Forwards destroy operations from expiration action to AsyncEventQueue. By default the expiration destroy events are not added to AEQ, by setting this attribute to true adds destroy event to AEQ. | AsyncEventQueueFactory setForwardExpirationDestroy(boolean forward); | [
"@Override\n public void onDestroyActionMode(ActionMode mode) {\n }",
"public void notifyDestroyed();",
"public void destroy() throws ActionLifecycleException;",
"void onContinuityAnchorDestroyed(Object anchor);",
"public static void generateEventsByDestroyEntryOperation() throws Excep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that checks whether a game deck of 40 cards is consistent, that is, it contains all the cards needed to play the game. | public static boolean isDeckConsistent(ArrayList<Card> cards) {
boolean result = true;
loop:
for (Card.SUIT suit : Card.SUIT.values()) {
for (Card.VALUE value : Card.VALUE.values()) {
result = cards.contains(new Card(suit, value));
if (!result) {
... | [
"@Test\n\tpublic void testAllCards() {\n\t\tDeck deck = new Deck();\n\t\tArrayList<Card> cards = new ArrayList<Card>(Arrays.asList(deck.getDeck()));\n\t\tboolean isCardThere = true;\n\t\tfor(int i = 3; i >= 0; i--)\n\t\t\tfor(int j = 13; j > 0; j--)\n\t\t\t\tif(!cards.contains(new Card(j, i)) )\n\t\t\t\t{\n\t\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getUser method, of class DataBaseHandler. | @Test
public void testGetUser_String() {
System.out.println("getUser");
String userName = "";
DataBaseHandler instance = new DataBaseHandler();
User expResult = null;
User result = instance.getUser(userName);
assertEquals(expResult, result);
// TODO review the... | [
"@Test\n public void testGetUser_int() {\n System.out.println(\"getUser\");\n int userId = 0;\n DataBaseHandler instance = new DataBaseHandler();\n User expResult = null;\n User result = instance.getUser(userId);\n assertEquals(expResult, result);\n // TODO review... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
draw the loading percentages and states | public void drawLoadPercentage(GL10 gl)
{
gl.glPushMatrix();
gl.glTranslatef(0f,0f, 0.0f);
//String load_per_str = Integer.toString(load_percentage);
//drawTextLine(gl,monitor.debug_status);
gl.glPopMatrix();
//print the load status
gl.glPushMatrix();
gl.gl... | [
"private void showLoadProgress() {\n long currentTimeStamp = TimeUtils.nanoTime();\n if (currentTimeStamp - startTime > TimeUtils.millisToNanos(5)) {\n startTime = currentTimeStamp;\n progress = progress + 1;\n }\n\n float progressBarWidth = ((float) TickTackBummGam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get app property Returns the key and value of an app&x27;s property. [Permissions](permissions) required: Only a Connect app whose key matches &x60;addonKey&x60; can make this request. 200 Returned if the request is successful. 400 Returned if the property key is longer than 127 characters. 401 Returned if the authenti... | public EntityProperty addonPropertiesResourceGetAddonPropertyGet(String addonKey, String propertyKey) throws RestClientException {
Object postBody = null;
// verify the required parameter 'addonKey' is set
if (addonKey == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQU... | [
"public ApplicationProperty getProperty(String key);",
"public Mono<EntityProperty> addonPropertiesResourceGetAddonPropertyGet(String addonKey, String propertyKey) throws RestClientException {\n Object postBody = null;\n // verify the required parameter 'addonKey' is set\n if (addonKey == nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
One method call should smoothly move the tank one quadrant according to given direction. | void move(int direction)
{
int step = 1;
int covered = 0;
if ((direction==1 && tankY==0) || (direction==2 && tankY >= 512) || (direction==3 && tankX == 0) || (direction==1 && tankX >=512)){
System.out.println("Illegal move "+ direction);
return;
}
turn... | [
"public void move(Direction direction);",
"protected void move(Direction direction)\n\t{\n \t// Ensure the Drone is allowed to move\n \tif (!GameManager.getMoveAllowed()) {\n \t\tSystem.out.println(\"Illegal move! It's not the Drone's turn to move!\");\n \t\tSystem.exit(0);\n \t}\n \t// Ensure t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creation of a new Produces link based on a supplied AbstractResource and default tag value. | public Produces( AbstractResource resource )
{
this( resource, "" );
} | [
"public Produces( AbstractResource resource, String tag ) \r\n {\r\n\t super.resource_state = resource;\r\n\t super.tag = tag;\r\n }",
"protected abstract R createNewResource(Link self);",
"Link createLink();",
"SimpleLink createSimpleLink();",
"public interface LinkGenerator {\n\n String ATTRIBU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Similar to GCard(rank,suit), except that it places the card GObject at coordinates (x,y) | public GCardImage(int rank, int suit, double x, double y) {
this(rank, suit);
this.setLocation(x,y);
} | [
"Card(int suit, int rank)\r\n {\r\n this.rank = rank;\r\n this.suit = suit;\r\n }",
"public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }",
"public Card(int suit, int rank)\n\t{\n\t\tthis.suit = suit;\n\t\tthis.rank = rank;\n\t}",
"Card(in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check whether there are any intersections or short distances between pipes. It returns false if there are no intersections. True if intersections have been found. | private void arePipesIntersectingEachOther() {
double p_distance;
msg("Checking whether two pipes are intersecting with each other.");
for (int i = 0; i < pipecenters.size(); i++) {
for (int j = i + 1; j < pipecenters.size(); j++) {
p_distance = Math.sqrt(Math.pow(pipecenters.get(i)[0] - pipe... | [
"public boolean checkIntersection() {\n\t\ttemp2.addAll(ss.getShapeState().keySet());\n\t\tint j = 0;\n\t\tfor (int i = 0; i < temp2.size(); i++) {\n\n\t\t\tfor (int k = i; k < temp2.size() - 1; k++) {\n\t\t\t\tj = k + 1;\n\n\t\t\t\tif (j >= temp2.size()) {\n\t\t\t\t\treturn intersectStatusCheck;\n\t\t\t\t}\n\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get agent license ID | public static String getAgentLicenseId(Record record){
return record.getStringValue(CONTRACT_ID);
} | [
"public String getLicenseId() {\n return licenseId;\n }",
"int getAgentId();",
"public int getLicenseNumber() {\n\n return licenseNumber;\n }",
"public String getAgentId(String uuid);",
"public java.lang.String getAgentId()\n {\n synchronized (monitor())\n {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of CacheTest | public CacheTest() {
} | [
"Cache createCache();",
"@Test\n public void needCacheTest() {\n // TODO: test needCache\n }",
"T initialize(T cacheFactory);",
"public TestManager() {\n }",
"private FixtureCache() {\n\t}",
"public abstract void testCacheConfiguration();",
"@Test(timeout=300000)\n public void test09() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get the next workout | private void getNextWorkout(){
mCurrentWorkout += 1;
mCurrentData += 1;
if (mCurrentData > 1) {
mTxtTitle.setText("(" + mCurrentWorkout + "/" + mWorkoutNames.size() + ") " +
mWorkoutNames.get(mCurrentData - 1));
mIsPlay = true;
... | [
"public ActionItemWork getNextStep() {\n return nextStep;\n }",
"private ActionItemWork getNextCurrentItem(ActionItemWorkList actionPlanSteps) {\n ActionItemWork itemWork = null;\n Iterator i = actionPlanSteps.iterator();\n //Get to this step\n while (i.hasNext()) {\n itemWork = (ActionItemWo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function is called periodically during operator control | public void teleopPeriodic() {
while (isOperatorControl() && isEnabled()) {
debug();
smartDashboardVariables();
//driver control functions
driverControl();
//state machine
terrainStates();
//this function always comes last
//armSlack();
... | [
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n// if (oi.driveStick.getRawButton(4)) {\n// System.out.println(\"Left Encoder Distance: \" + RobotMap.leftDriveEncoder.getDistance());\n// System.out.println(\"RightEncoder Distance: \" + RobotMap.rightDriveEncoder... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new study therapy type. | private StudyTherapyType(final int code, final String studyTherapyType, String coppaName) {
this.code = code;
this.studyTherapyType = studyTherapyType;
this.coppaName = coppaName;
register(this);
} | [
"HarvestType createHarvestType();",
"ConceptsType createConceptsType();",
"ConceptType createConceptType();",
"Type createType();",
"SimpleType createSimpleType();",
"TT createTT();",
"TIAssignment createTIAssignment();",
"public CAPType()\r\n\t{\r\n\t}",
"DetailsType createDetailsType();",
"priva... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field155' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField155() {
field155 = null;
fieldSetFlags()[155] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField158() {\n field158 = null;\n fieldSetFlags()[158] = false;\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the number of peers that connections have been created for thus far. | public int getConnectedPeers() {
return connectionPool.getConnected();
} | [
"int getPeerCount();",
"public int getPeerCount() {\n return sinkNode.getClientCount() + sinkNode.getServletCount();\n }",
"int getActivePeersCount();",
"protected int numPeers() {\n\t\treturn peers.size();\n\t}",
"int getConnectionsCount();",
"private int getNumPeers() {\n String[] pee... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start Unipoint Notification Service | private void StartUnipointNotificationService(Intent intent) {
Intent b = new Intent(Unipoint_ServiceActivity.SERVICEACTION);
if (Unipoint_ServiceActivity.bDEBUG)
Log.v(TAG, "Call Service function ");
context.startService(b);
} | [
"public void startNotificationService(){\n Intent intent = new Intent(this, NotificationService.class);\n startService(intent);\n\n }",
"private void startTrackerService() {\n // start service so that it keeps running after unbind\n Intent intent = new Intent(this, TrackerService.cl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$FF: renamed from: a (java.io.ObjectOutputStream) void | private void method_157(ObjectOutputStream var1) {
var1.defaultWriteObject();
var1.writeObject(this.a());
} | [
"private void method_277(ObjectOutputStream var1) {\n var1.defaultWriteObject();\n var1.writeObject(this.a);\n }",
"private void method_979(ObjectOutputStream var1) {\n var1.defaultWriteObject();\n var1.writeObject(this.a);\n }",
"void serialize(Object obj, OutputStream stream) throws IO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XRelationType__Group__3" $ANTLR start "rule__XRelationType__Group__3__Impl" ../org.eclipse.osee.framework.core.dsl.ui/srcgen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:5844:1: rule__XRelationType__Group__3__Impl : ( ( rule__XRelationType__Group_3__0 )? ) ; | public final void rule__XRelationType__Group__3__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:5848:1: ( ( ... | [
"public final void rule__XRelationType__Group_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:6384... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method could not be decompiled. Original Bytecode: 1: getfield it/unimi/dsi/fastutil/objects/AbstractReferenceBigList$ReferenceSubList$1.last:J 4: ldc2_w 1 7: lcmp 8: ifne 19 11: new Ljava/lang/IllegalStateException; 14: dup 15: invokespecial java/lang/IllegalStateException.:()V 18: athrow 19: aload_0 / this 20: g... | public void set(final K k) {
// This method could not be decompiled.
//
// Original Bytecode:
//
// 1: getfield it/unimi/dsi/fastutil/objects/AbstractReferenceBigList$ReferenceSubList$1.last:J
... | [
"public Long2ObjectMap.FastEntrySet<V> long2ObjectEntrySet() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 3: dup \n // 4: aload_0 /* this */\n // 5: aconst_null \n // 6: invokespecia... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Formats a given amount into a currency string. | public static String formatCurrency(Double amount) {
NumberFormat fmt = NumberFormat.getCurrencyInstance();
return fmt.format(amount);
} | [
"public static String formatCurrency( double amt ) {\n return formatCurrency( amt, 2 );\n }",
"private String currencyFormat(BigDecimal amount) {\n return NumberFormat.getCurrencyInstance(getLocalCurrency().getLocale()).format(amount);\n }",
"public static String formatCurrency(Double amount, Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleVariable" $ANTLR start "ruleVariable" ../ac.soton.xtext.machineDsl/srcgen/ac/soton/xtext/parser/antlr/internal/InternalMachineDsl.g:464:1: ruleVariable returns [EObject current=null] : ( () ( (lv_name_1_0= ruleEString ) ) (otherlv_2= '>' ( (lv_comment_3_0= ruleEString ) ) )? ) ; | public final EObject ruleVariable() throws RecognitionException {
EObject current = null;
Token otherlv_2=null;
AntlrDatatypeRuleToken lv_name_1_0 = null;
AntlrDatatypeRuleToken lv_comment_3_0 = null;
enterRule();
try {
// ../ac.soton.xtext.... | [
"public final EObject entryRuleVariable() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleVariable = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2240:2: (iv_ruleVariable= rule... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new Resource not found exception. | public ResourceNotFoundException(final String message, final Object resourceIdentifier) {
super(message);
this.resourceIdentifier = resourceIdentifier;
} | [
"public ResourceNotFoundException(final Object resourceIdentifier) {\n super();\n this.resourceIdentifier = resourceIdentifier;\n }",
"public ObjectNotFoundException() {\r\n super(\"ObjectNotFound Exception\");\r\n }",
"public UnknownResourceException() {\n\tsuper();\n }",
"public Reso... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads "CLIENT_IMPL" from config file. Returns the class that defines what object is providing the service to objects using this client service in "online" mode, i.e. connected to an app server. If null, this clientservice is not considered when determining app online status. | protected Class getOnlineService () throws ClassNotFoundException {
String className = config.getString("CLIENT_IMPL");
Class serviceClass = Class.forName(className);
return serviceClass;
} | [
"public ServerInfo clientInterface()\n {\n return client_stub;\n }",
"public Class<ServiceConfig> getConfigurationClass();",
"public String getCLIENT_TYPE() {\r\n return CLIENT_TYPE;\r\n }",
"private void setImpl () {\n Object obj = getConfigManager().getObject(\"SERVER_IMPL\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The class to set on elements when selected. JavaScript Info: | public void setSelectedClass(String value) {
getPolymerElement().setSelectedClass(value);
} | [
"public Class getSelectedClass() {\n return this.selectedClass;\n }",
"public String getSelectedClass() {\n return getPolymerElement().getSelectedClass();\n }",
"public void setSelectedClass( final Class value ) {\n final Class oldValue = this.selectedClass;\n if ( oldValue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return entity.getKB().getRelationships().stream() .filter( r > r.getTypeName().equals(name) && r.getLeft().equals(entity)) .map( r > r.getRight() ) .collect(Collectors.toSet()); | public static Set<Entity> outgoingTo(Entity entity, String relationshipName) {
return entity.outgoing(relationshipName).stream()
.map(Relationship::getRight)
.collect(Collectors.toSet());
// return from(entity.outgoing(relationshipName)).transform(Relationship::getRight);
} | [
"default Collection<Token> getRelationshipTypes() {\n\t\treturn getAllTokens().stream().filter(token -> token.type() == Token.Type.RELATIONSHIP_TYPE)\n\t\t\t.collect(Collectors.toUnmodifiableSet());\n\t}",
"private static Iterable<Relationship> allPathNodeRelationships(Path path, List<BioTypes> bioTypes) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The AreaInfo stores information about spaces. Add the spaces except zerowidth spaces to the TextArea. | private void addSpaces() {
for (int i = areaInfo.startIndex; i < areaInfo.breakIndex; i++) {
char spaceChar = foText.charAt(i);
if (!CharUtilities.isZeroWidthSpace(spaceChar)) {
textArea.addSpace(spaceChar, 0, CharUtilities.isAdjustableSpace(spaceChar));
... | [
"private void createTextArea() {\n if (context.getIPDAdjust() == 0.0) {\n textArea = new TextArea();\n } else {\n textArea = new TextArea(width.getStretch(), width.getShrink(),\n adjust);\n }\n }",
"private void setUpText... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if successfully sets the replacement bulb type. | public boolean setReplacementBulbType(String theReplacementBulbType) {
if (!checkBulb(theReplacementBulbType)) {
return false;
}
myReplacementBulbType = theReplacementBulbType;
return true;
} | [
"public boolean setCurrentBulbType(String theCurrentBulbType) {\n\t\tif (!checkBulb(theCurrentBulbType)) {\n\t\t\treturn false;\n\t\t}\n\t\tmyCurrentBulbType = theCurrentBulbType;\n\t\treturn true;\n\t}",
"public String getReplacementBulbType() {\n\t\treturn myReplacementBulbType;\n\t}",
"private boolean checkB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the number of PDSN IP Flow updates messages that failed per RNC. | public void setNumPDSNIPFlowUpdatesMsgFailed(Long numPDSNIPFlowUpdatesMsgFailed) {
this.numPDSNIPFlowUpdatesMsgFailed = numPDSNIPFlowUpdatesMsgFailed;
} | [
"void setConnectionFailedRepetition(int value);",
"public void setFailedCount(int failedCount)\n {\n this.failedCount = failedCount;\n }",
"void setNumberOfRetries(Integer numberOfRetries);",
"public void setFailedCount(Integer failedCount) {\n this.failedCount = failedCount;\n }",
"v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to calculate Gear in which bike is running based on speed | @Override
public void currentGear(double speed) {
this.speed = speed;
if(speed>0&& speed<5)
{
gears = 1;
System.out.println("The speed of the bike is "+speed);
System.out.println("The current gear of bike is " +gears );
}
else if(speed>=5 && speed<10)
{
gears = 2;
System.out.println("The spe... | [
"public double calculateGreen() {\n double timeToAccelerate = theSpeedLimit / accelToSpeed; //time to accelerate form 0\n double displacementDuringAccel = ((theSpeedLimit * theSpeedLimit) / (2 * accelToSpeed)); //disp traveled during acceleration\n double displacementOfAllCarsInFront= (+gapBetw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return analog tab window content as image | public Image getAnalogTabContentAsImage() {
return this.analogTabItem.getContentAsImage();
} | [
"TabImage createTabImage();",
"public void copyTabContentAsImage() {\r\n\t\tImage graphicsImage = null;\r\n\t\tint tabSelectionIndex = this.displayTab.getSelectionIndex();\r\n\t\tif (tabSelectionIndex == 0) {\r\n\t\t\tgraphicsImage = this.graphicsTabItem.getContentAsImage();\r\n\t\t}\r\n\t\telse if (DataExplorer.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
//////////////////////////////////////////////////////// Returns true if instances of the given class is known to be immutable; false if we don't know. | public static boolean isImmutable(@SuppressWarnings("rawtypes") Class t) {
// 按使用频繁程度判断
return t == String.class
|| t == Integer.class || t == Long.class
|| t == Boolean.class || t == Short.class
|| t == Byte.class || t == Character.class
|| t == Float.class || t == Double.class
|| t.isPrimitive... | [
"boolean isImmutable();",
"public boolean isImmutable() {\n return _immutable;\n }",
"public boolean isImmutable() {\n\t\treturn this.immutable;\n\t}",
"public static boolean isImmutable(Object obj) {\n\t\treturn isImmutable(obj.getClass());\n\t}",
"boolean isReflectiveClassCopier() ;",
"boolean isMut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__MethodDefinition__QualifiedTypeSpecAssignment_1" $ANTLR start "rule__MethodDefinition__PointerSpecificationAssignment_2" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:9256:1: rule__MethodDefinition__PointerSpecific... | public final void rule__MethodDefinition__PointerSpecificationAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/Internal... | [
"public final void rule__MethodDefinition__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
prints the layout with players tiles as index values for ease of control | private void printBoard() {
for (int j=Board.getSize()-1; j >= 0; j--) {
for (int i=0; i < Board.getSize(); i++) {
// make sure indexes get printed for my pieces
if (board.layout[i][j] == player) {
//System.out.print(" "+ getPieceIndex(i,j)+ " ");... | [
"private void printTiles() {\n for(int i = 0; i < tiles.length; i++) {\n System.out.println(i + \": \" + tiles[i]);\n }\n }",
"static void BoardDisplay(){\n //print tableau avec indexes\n\n //index x\n System.out.print(\" \");\n for(int i =0; i < dimension... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method for selecting the correct priority circle color. P1 = red, P2 = orange, P3 = yellow | private int getPriorityColor(int priority) {
int priorityColor = 0;
switch (priority) {
case 1:
priorityColor = ContextCompat.getColor(mContext, R.color.materialRed);
break;
case 2:
priorityColor = ContextCompat.getColor(mContext, ... | [
"private CurrencyColor getSpawnpointColor(int r, int c) {\n if (r == 0){\n return CurrencyColor.RED;\n } else if (c == 0){\n return CurrencyColor.BLUE;\n } else return CurrencyColor.YELLOW;\n }",
"private int getPriorityColor(int priority) {\n int priorityColor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the next and previous log page button states | private void setLogPageButtons(){
previousLogPageButton.setDisable(currentLogPage < 1 || localDevice.numberLogPages() < 2);
nextLogPageButton.setDisable(currentLogPage >= localDevice.numberLogPages() -1 || localDevice.numberLogPages() < 2);
int page_display_num = currentLogPage + 1;
logP... | [
"@Override\n\tpublic void setStates(){\n\t\tleftButton.visible = booklet.pageNumber > 0;\n\t\trightButton.visible = booklet.pageNumber + 1 < totalPages;\n\t\t\n\t\t//Check the mouse to see if it updated and we need to change pages.\n\t\tint wheelMovement = InterfaceInput.getTrackedMouseWheel();\n\t\tif(wheelMovemen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses an XML file and returns a DOM document. If validating is true, the contents is validated against the DTD specified in the file. got this code from javaalminac | public static Document parse_XML_file( String filename, boolean validating ) throws SAXException, ParserConfigurationException, IOException
{
return parse_XML_file( new File( filename ), validating );
} | [
"public static Document parseXml(String filename, boolean validating)\n throws IOException, ParserConfigurationException, SAXException\n {\n return parseXML(new FileInputStream(filename), validating);\n }",
"public static Document parse_XML_file( File file, boolean validating ) throws SAXExcep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Merges updates to working dir and commits. | public void merge() throws Exception
{
Git git = getGit();
MergeCommand merge = git.merge();
ObjectId remoteOriginMaster = getRepo().resolve("refs/remotes/origin/master");
merge.include(remoteOriginMaster);
MergeResult result = merge.call();
System.out.println("Merge Result: " + result.getMergeS... | [
"@Override\n public void updateRepoImpl(RepoContext ctx) throws IntegrationConflictException, IOException {\n MergeTip mergeTip = args.mergeTip;\n if (args.rw.isMergedInto(mergeTip.getCurrentTip(), toMerge)\n && !args.subscriptionGraph.hasSubscription(args.destBranch)) {\n mergeTip.move... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the DSCP field of the IKE packets. Differentiated services code point (DSCP) is a 6bit field in the IP header that is used for packet classification and prioritization. The DSCP field is encoded in the 6 higher order bits of the Type of Service (ToS) in IPv4 header, or the traffic class (TC) field in IPv6 header. ... | @SystemApi
@NonNull
public Builder setDscp(@IntRange(from = DSCP_MIN, to = DSCP_MAX) int dscp) {
if (dscp < DSCP_MIN || dscp > DSCP_MAX) {
throw new IllegalArgumentException("Invalid DSCP value");
}
mDscp = dscp;
return this;
} | [
"public void setDSCP(int dSCP) {\r\n\t\tthis.DSCP = dSCP;\r\n\t}",
"Builder setIpDscp(byte dscpValue);",
"public void setSipDscp(int dscp);",
"void setSipDscp(int dscp);",
"@SystemApi\n @IntRange(from = DSCP_MIN, to = DSCP_MAX)\n public int getDscp() {\n return mDscp;\n }",
"public void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the nearest node to a given point. More specifically, finds the node whose center point is nearest to the given point. (If more than one such node exists, the one with lowest zorder is returned.) | protected DisplayNode findNearestNode(Point p) {
Component[] components = getComponents();
double distance, leastDistance = Double.POSITIVE_INFINITY;
int index = -1;
for (int i = 0; i < components.length; i++) {
if (components[i] instanceof DisplayNode) {
Di... | [
"public Point2D nearest(Point2D point) {\n if (point == null) {\n throw new IllegalArgumentException(\"The point to search for cannot be null.\");\n }\n\n if (rootNode == null) {\n return null;\n }\n\n return getBestFromChampion(point, rootNode, rootNode, Dou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Corr_spec__Viewpoint1Alternatives_4_0" $ANTLR start "rule__Corr_spec__Viewpoint2Alternatives_9_0" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:4088:1: rule__Corr_spec__Viewpoint2Alternatives_9_0 : ( ( 'enterprise' ) | ( 'information' ) | ... | public final void rule__Corr_spec__Viewpoint2Alternatives_9_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:4092:1: ( ( 'enterprise' ... | [
"public final void rule__Corr_spec__Viewpoint1Alternatives_4_0() 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:4042:1: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Ensure Exprs Rule'. | EnsureExprsRule createEnsureExprsRule(); | [
"ExprRule createExprRule();",
"RequireExprsRule createRequireExprsRule();",
"E1Rule createE1Rule();",
"E13Rule createE13Rule();",
"AssignmentRule createAssignmentRule();",
"Expr createExpr();",
"ExprListRule createExprListRule();",
"E11Rule createE11Rule();",
"E2Rule createE2Rule();",
"E4Rule crea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove threads from pool. | void removeThreads(int num) {
System.err.print("TP <" + poolname + ">: Removing " + num + " threads from pool, ");
synchronized (this) {
for (int i = 0; (i < num) && (numThreads() > minThreads); i++) {
Thread t = (Thread) threads.firstElement();
stopThread(t);
}
}
System.err.println("size " + numT... | [
"private void cleanup()\n\t{\n\t\tIterator<Thread> rIterator = aThreadMap.keySet().iterator();\n\n\t\twhile (rIterator.hasNext())\n\t\t{\n\t\t\tThread rThread = rIterator.next();\n\n\t\t\tif (!rThread.isAlive())\n\t\t\t{\n\t\t\t\trIterator.remove();\n\t\t\t}\n\t\t}\n\t}",
"void unsetPoolRaces();",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the rule name from an audit event source name. | public static String getName( String eventSrcName )
{
if ( eventSrcName == null )
{
return null;
}
if ( eventSrcName.endsWith( "Check" ) )
{
eventSrcName = eventSrcName.substring( 0, eventSrcName.length() - 5 );
}
return eventSrcName.... | [
"public static String getName( AuditEvent event )\n {\n return getName( event.getSourceName() );\n }",
"public String getRule ( String ruleName ) {\n\t\treturn rules.get(ruleName) != null ? rules.get(ruleName).asString() : null;\n\t}",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XSwitchExpression__Alternatives_2" $ANTLR start "rule__XExpressionInsideBlock__Alternatives" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:3000:1: rule__XExpressionInsideBlock__Alternatives : ( ( ruleXVariableDeclaration ) | ( ruleXExpressi... | public final void rule__XExpressionInsideBlock__Alternatives() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:3004:1: ( ( ruleXVariableDeclara... | [
"public final void rule__XExpressionInsideBlock__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3146:1: ( ( ru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the company ID of this announcement. | @Override
public void setCompanyId(long companyId) {
_announcement.setCompanyId(companyId);
} | [
"@Override\n public void setCompanyId(long companyId);",
"public void setCompanyId(long value) {\n this.companyId = value;\n }",
"public void setCompanyId(String value) {\n setAttributeInternal(COMPANYID, value);\n }",
"@Override\n public void setCompanyId(long companyId) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets value as the attribute value for Attribute15. | public void setAttribute15(String value) {
setAttributeInternal(ATTRIBUTE15, value);
} | [
"public void setAttribute15(String value)\n {\n setAttributeInternal(ATTRIBUTE15, value);\n }",
"public void setAttr15(String attr15) {\n this.attr15 = attr15;\n }",
"public void setExtAttribute15(String value) {\n setAttributeInternal(EXTATTRIBUTE15, value);\n }",
"public void setAtt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the due first bill. | public void setDueFirstBill(final double dueFirstBill) {
this.dueFirstBill = dueFirstBill;
} | [
"public double getDueFirstBill() {\n\t\treturn dueFirstBill;\n\t}",
"public void setDueDate(Date due)\n {\n if (this.rented)\n this.due = due;\n }",
"public void setFirstFee(BigDecimal firstFee) {\n this.firstFee = firstFee;\n }",
"public void setUnpaid() {\n //make th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get module list of certain user | @Override
public List<Module> getModulesByUserId(String userId) {
return sessionTemplate.selectList(NAMESPACE + ".getModulesByUserId", userId);
} | [
"List<JModuleInfo> queryListByUserId(long userId);",
"public List<Module> getModulesByUserId(String id)\n {\n User u = userDAO.get(id);\n requireResult(u, \"User not found\");\n \n List<Module> m = u.getModules();\n if (m.isEmpty() == true)\n {\n throw new N... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of equals method, of class Book. | @Test
public void testEquals3() {
System.out.println("equals");
Book book1 = new Book("Candide", "Toto", 5.00f);
Book book2 = new Book("L'Optimisme", "Toto", 5.00f);
boolean result = book1.equals(book2);
assertFalse(result);
} | [
"@Test\n public void testEquals1() {\n System.out.println(\"equals\");\n\n Book book = new Book(\"Candide\", \"Toto\", 5.00f);\n boolean result = book.equals(book);\n \n assertTrue(result);\n }",
"@Test\n public void testEquals2() {\n System.out.println(\"equals\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns line number of given field in given class. | public int getFieldLineNumber (
String url,
final String className,
final String fieldName
) {
final DataObject dataObject = getDataObject (url);
if (dataObject == null) return -1;
return getFieldLineNumber(dataObject.getPrimaryFile(), className, fieldName);
... | [
"public static int fieldOffset(SSAProgram prog, SSAClass cl, String field) {\n if(cl == null)\n return -1;\n SSAClass cur_class = cl;\n SSAField cur_Field = cur_class.getField(field);\n int offset = 0;\n while(cur_class != null){\n //Field is in current field... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates whether or not this Font object's style is ITALIC. | public boolean isItalic() {
return (style & ITALIC) != 0;
} | [
"public boolean isItalic() {\n Boolean flag = this.italic;\n return flag != null && flag;\n }",
"public boolean isIsFontItalic() {\n return isFontItalic;\n }",
"public boolean isItalic()\r\n\t{\r\n\t\t// return true if Italic checkbox is selected, false if not\r\n\t\treturn italicChec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all tiles surrounding Tile t | public Tile[] getTilesSurrounding(Tile t){
int x = t.getX();
int y = t.getY();
return new Tile[] {tiles[x-1][y-1], tiles[x][y-1], tiles[x+1][y-1], tiles[x-1][y], tiles[x+1][y], tiles[x-1][y+1], tiles[x][y+1], tiles[x+1][y+1]};
} | [
"private Set<Tile> getNeighbors(Tile t) {\n\n Set<Tile> set= new HashSet<Tile>();\n\n Point p= t.getPosition();\n\n for (int x= p.x - 1; x <= p.x + 1; x++) {\n for (int y= p.y - 1; y <= p.y + 1; y++) {\n if (x == p.x && y == p.y) continue;\n if (x < 0 || y < 0) continue;\n if (x >... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
given env is default and prof1.one exists in env properties | @Test
public void testCanGetFromProfileWhenProfileSetAsEnv() {
setEnvironment(DEFAULT_ENVIRONMENT);
// when an existing profile is set
// and prof1.one also exists with a different value
environmentVariables.set("CONFIG_ENV_PROFILE", "prof1");
// then value from profile property takes precedence
Assert.ass... | [
"@Test\n\tpublic void testCanGetFromProfileWhenMultipleEnvs() {\n\t\tsetEnvironment(\"test,test-env\");\n\t\t// and test env is set as base with property set in prof2 profile\n\t\tsetProfile(\"prof2\");\n\t\t// then value from profile takes precedence\n\t\tAssert.assertEquals(\"test.prof2.value\", EnvConfig.get(\"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a random integer in the range [0,values1]. | public static int randomInt(int values) {
return _random.nextInt(values);
} | [
"private int generateValue() {\r\n\t\tint minimum = controller.getOptions().minimumValue;\r\n\t\tint maximum = controller.getOptions().maximumValue;\r\n\t\treturn minimum + (int) (Math.random() * (maximum - minimum));\r\n\t}",
"public int getRandom() {\r\n\t\tint first = (int) (Math.random() * ((num1 - 1) + 1) + ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs before each test is run. Initializes a new database manager, connection, flight, DAO, and addflight form. | @BeforeEach
public void setup() {
DatabaseManager databaseManager = new DatabaseManager();
this.testFlight = new Flight("test_id", "test_name",
"test_source", "test_depart", "test_date",
"test_deptime", "test_arrtime", "test_flightcharge");
this.con = databaseManager.... | [
"public void setUp()\n throws Exception\n {\n //\n // Create our test targets.\n this.setDatabaseManager(\n new DatabaseManagerMockDelegate()\n ) ;\n this.setAccountManager(\n new PolicyManagerMockDelegate()\n ) ;\n this.se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Actualiza la tabla de operadores. | private void actualizarVentanaOperadores() throws SQLException {
Sistema.getControladorVentanaOperadores().actualizarTablaOperadores("SELECT * FROM operador WHERE activo=TRUE ORDER BY id ASC;");
} | [
"public void atualizarTabela() {\n\t\tJTAlocar.setModel(modelAlocar = new TableModelAlocar(ManipulacaoXml.getInstace().todasAlocacoes()));\n\t}",
"public void atualizarTabela(){\r\n\t\tmodeloTabela.setRowCount(0);\r\n\t\tgerarClientes();\r\n\t}",
"private void actualizarTabla() {\r\n\t\t//reseteo oblist aux, q ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
In the beginning each project, this is the first thing we must do. Go to mvnrepository.com and download these dependencies In the pom.xml: create dependencies tag and paste these dependencies io.github.bonigarcia webdrivermanager 4.1.0 org.seleniumhq.selenium seleniumjava 3.141.59 | public static void main(String[] args) {
//call webdriver manager
//which is coming from io.github.conigarcia
WebDriverManager.chromedriver().setup(); //first step
//then we need to cretae chrome driver object
ChromeDriver driver = new ChromeDriver(); //This is the inst... | [
"@Before\n\tpublic void setUp() {\n\n\t\tString browserProperty = \"\";\n\t\tBoolean headless = false;\n\n\t\ttry {\n\t\t\tbrowserProperty = System.getProperty(\"browserWebDriver\");\n\n\t\t\t// run headless: clean test -DbrowserWebDriver=firefox -Dheadless=true\n\t\t\tif (System.getProperty(\"headless\").equals(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate parse server config. If No error returns null, otherwise returns error message. | private String checkForParseConfigError(ParseServerConfig config) {
if (config.appId.equals("")) {
return getString(R.string.error_app_id_missing);
}
if (config.serverUrl.equals("")) {
return getString(R.string.error_server_url_missing);
}
if (!config.serv... | [
"Server validate( Server server ) throws Exception;",
"boolean validate()\n {\n boolean ipV = mServerString.equals(\"\");\n boolean portV = mPortString.equals(\"\");\n\n // Port\n try {\n Integer port = Integer.parseInt(mPortString);\n portV = !(port < 1000 || ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines if there is a type converter available in the specified context and attempts to use it to convert the supplied value to the specified type. Throws an exception if conversion is not possible. | public static <T> T convert(EvaluationContext context, Object value, Class<T> targetType)
throws EvaluationException {
// TODO remove this function over time and use the one it delegates to
return convertTypedValue(context,new TypedValue(value,TypeDescriptor.forObject(value)),targetType);
} | [
"@Deprecated\n public static void setTypeConverter(Map context, TypeConverter converter) {\n // no-op\n }",
"public static void setTypeConverter(Map context, TypeConverter converter)\n {\n context.put(OgnlContext.TYPE_CONVERTER_CONTEXT_KEY, converter);\n }",
"@SuppressWarnings(\"unchec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CM11551 Set the item code. | public void setItemCode(String arg)
{
wItemCode = arg;
} | [
"public void setItemCode(String arg)\n\t{\n\t\tsetValue(ITEMCODE, arg);\n\t}",
"public void setItemCode(String itemCode) {\n this.itemCode = itemCode;\n }",
"public void setItemCode(Long itemCode) {\n\t\tthis.itemCode = itemCode;\n\t}",
"public void setItemCode(String itemCode) {\r\n this.itemCode ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
2 pydev editors should never have the same title, so, this method will make sure that this won't happen. | private boolean initializeTitle(
final PyEdit pyEdit,
IEditorInput input,
final IPath pathFromInput,
String lastSegment,
String initHandling,
String djangoModulesHandling) {
List<IEditorReference> editorReferences = getCurrentEditorReferences();
if(editorReferences == null){
//... | [
"@Override\n protected void updateTitle()\n {\n String frameName =\n SWTStringUtil.insertEllipsis(frame.getName(),\n StringUtil.NO_FRONT,\n SWTStringUtil.DEFAULT_FONT);\n\n view.setWindowTitle(modification... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.dstore.values.BooleanValue check_byte_length_for_strings = 5; | private com.google.protobuf.SingleFieldBuilderV3<
io.dstore.values.BooleanValue, io.dstore.values.BooleanValue.Builder, io.dstore.values.BooleanValueOrBuilder>
getCheckByteLengthForStringsFieldBuilder() {
if (checkByteLengthForStringsBuilder_ == null) {
checkByteLengthForStringsBu... | [
"io.dstore.values.BooleanValue getCheckByteLengthForStrings();",
"io.dstore.values.BooleanValueOrBuilder getCheckByteLengthForStringsOrBuilder();",
"public io.dstore.values.BooleanValue getCheckByteLengthForStrings() {\n return checkByteLengthForStrings_ == null ? io.dstore.values.BooleanValue.getDefaultIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method returns a JSONObject with the difference in inbound/outbound traffic between the latest two probes String hostId; float cpuUser; // cpu percentage consumed by the user's app float cpuSys; // cpu percentage consumed by the operating system float cpuIdle; // cpu percentage consumed in idle mode int usedMemory... | public JSONObject getProcessedHostData (String localControllerName, Measurement m, Measurement prevM) {
if (m == null) {
return null;
} else {
List<ProbeValue> currentProbeValue = m.getValues();
List<ProbeValue> previousProbeValue = null;
... | [
"private void getCpuInfo() {\n\t\ttry {\n\t\t\tRandomAccessFile reader = new RandomAccessFile(\"/proc/stat\", \"r\");\n\t\t\tString load = reader.readLine();\n\n\t\t\tString[] toks = load.split(\" \");\n\n\t\t\tlong idle1 = Long.parseLong(toks[5]);\n\t\t\tlong cpu1 = Long.parseLong(toks[2]) + Long.parseLong(toks[3]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column r_industry_generate_history.modifier_date | public void setModifierDate(Date modifierDate) {
this.modifierDate = modifierDate;
} | [
"public Date getModifierDate() {\n return modifierDate;\n }",
"public void setMODIFIED_DATE(Date MODIFIED_DATE) {\r\n this.MODIFIED_DATE = MODIFIED_DATE;\r\n }",
"void setModificationDate(long date);",
"public void setDateRecruitment(Date dateRecruitment);",
"public void setModificationD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EMaxLength__ValAssignment_1" $ANTLR start "rule__EMinLength__ValAssignment_1" InternalAADMParser.g:26707:1: rule__EMinLength__ValAssignment_1 : ( ruleEAlphaNumericValue ) ; | public final void rule__EMinLength__ValAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAADMParser.g:26711:1: ( ( ruleEAlphaNumericValue ) )
// InternalAADMParser.g:26712:2: ( ruleEAlphaNumericValue )
{
... | [
"public final void rule__EMaxLength__ValAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:26696:1: ( ( ruleEAlphaNumericValue ) )\n // InternalAADMParser.g:26697:2: ( ruleEAlphaNumericValue )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method appends an XML file to another XML file. | public void appendXML(String orgFile, String appendFile)
throws XMLException
{
try
{
XMLAppend.appendXML(new File(orgFile), new File(appendFile));
}
catch (Exception ex)
{
Logger.warn("[XMLServiceHandler.appendXML]", "Cannot Append "
+appendFile+" to "+orgFile+" : ... | [
"public static void mergeXml(File temp) {\n\n try {\n DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = domFactory.newDocumentBuilder();\n Document doc = builder.parse(new File(\"src/main/resources/xml/scores.xml\"));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify CE Participant Resource Center page title | public void verifyCEParticipantResourceCenter(String participantresourcepagetitle) {
assertByPageTitle(participantresourcepagetitle);
} | [
"@Test(priority = 1, enabled = true, description = \"Verify Page Title\")\n\tpublic void verifyPageTitle()throws Exception {\n\t\tSoftAssert softAssert = new SoftAssert();\n\t\ttry{\n\t\t\tCreditAppPage.navigateToCreditAppPage(webPage, softAssert);\n\n\t\t}catch(Throwable e){\n\t\t\tsoftAssert.fail(e.getLocalizedMe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Divides all elements in a map by a scalar. | public static <A> Map<A, Double> divide(Map<A, Double> map, double value)
{
Map<A, Double> out = new LinkedHashMap<A, Double>();
for (Entry<A, Double> entry : map.entrySet())
{
out.put(entry.getKey(), entry.getValue() / value);
}
return out;
} | [
"default DiscreteDoubleMap2D dividedBy(double value) {\r\n\t\treturn pushForward(d -> d / value);\r\n\t}",
"@Override\n\tpublic void\n\tscalarDiv( double value )\n\t{\n\t\tdata[0] /= value;\n\t\tdata[1] /= value;\n\t\tdata[2] /= value;\n\t}",
"public static <A> Map<A, Double> divide(Map<A, Double> map1, Map<A, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A main method that: 1. Reads a file containing edges (supplied as a commandline parameter); 2. Forms the graph; 3. Repeatedly prompts for two vertices and runs the shortest path algorithm. The data file is a sequence of lines of the format source destination and weight | public static void main( String [ ] args )
{
Graph g = new Graph( );
try
{
//String filePath = System.getProperty("user.dir") + "/"+ args[0];
FileReader fin = new FileReader( args[0]);
Scanner graphFile = new Scanner( fin );
// Read the ... | [
"public static void main( String [ ] args )\n {\n Graph g = new Graph( );\n try\n {\n FileReader fin = new FileReader( args[0] );\t\t// read the file from argument\n Scanner graphFile = new Scanner( fin );\n \n // Read the edges and insert\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to get the FKCopy attribute for the ClassifyEvent | public long getFKCopy()
{
return getData("FKCopy").getlong();
} | [
"public long\tgetOldFKCopy()\r\n\t{\r\n\treturn getData(\"FKCopy\").getPreviouslong();\r\n\t}",
"public Number getDssNotifIdFk() {\r\n return (Number) getAttributeInternal(DSSNOTIFIDFK);\r\n }",
"public long\tgetPKClassifyEvent() \r\n{\r\n\treturn getData(\"PKClassifyEvent\").getlong();\r\n}",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the executor used by the factory. | Executor getExecutor(); | [
"public Executor getExecutor() {\n return executor;\n }",
"public abstract java.util.concurrent.Executor getExecutor();",
"@NonNull\n public Executor getExecutor() {\n return mExecutor;\n }",
"protected EventExecutorFactory getExecutorFactory() {\n\t\treturn executorFactory;\n\t}",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub String sql = "select top 1 c.Order_Number as order_id,c.stats as order_state,c.BID as book_id,c.WinnerID as user_id,c.Retention_Price as book_price,c.Retention_Time as order_time ,c.Payment_Time as pay_time , c.ThbTitle as book_name,c.author as book_author,case when d.pic_name is null the... | @Override
public Map<String, Object> getOrderDetail(String order_id) throws Exception {
Map<String, Object> orderData = new HashMap<String, Object>();
String orderSQL = "select top 1 * from [order] where order_number='" + order_id + "'";
orderData = this.sqljdbcTemplate.queryForMap(orderSQL);
Map<Stri... | [
"@Override\r\n\tpublic List<Map<String, Object>> getOrders(Map<String, Object> attrMap)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tString userID = attrMap.get(\"user_id\").toString();\r\n\t\tList<Map<String, Object>> orderData = new ArrayList<Map<String, Object>>();\r\n\t\tString orderSQL = \"select order_Number as o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the value of the database column TB_MARGIN_OP_REQ.FCM_ID | public Long getFcmId() {
return fcmId;
} | [
"public BigDecimal getFmpoMId() {\r\n return (BigDecimal) getAttributeInternal(FMPOMID);\r\n }",
"public BigDecimal getFmdocstsId() {\r\n return (BigDecimal) getAttributeInternal(FMDOCSTSID);\r\n }",
"public String getCODFID() {\n return fieldCODFID.getString();\n }",
"public Lon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replaces the text between two indices with the specified string. | public void replaceText(int startIndex, int endIndex, String s); | [
"public void replace(int start, int end, String fragment) throws TextLineIndexOutOfBoundsException;",
"public static String replaceByIndexes(String string, int replaceStart, int replaceEnd, String replacement) {\n return new StringBuilder(string.substring(0, replaceStart)).append(replacement)\n .appen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints detailed descriptions of all invoices within a group of invoices. | public static void printDetailed(LinkList<Invoice> invoiceList) {
System.out.println("Invoice Details:");
for (Invoice invoice : invoiceList) {
// Initializing vars
double invoiceSubTotal = 0;
double invoiceDiscounts = 0;
double invoiceTaxes = 0;
double invoiceTotal = 0;
// Prints Header
S... | [
"public void printInvoice() {\n\t\tfor(int i = 1;i<=this.size;i++) {\n\t\t\tSystem.out.println(this.getInvoice(i).toString());\n\t\t}\n\t}",
"public void printInvoices() {\n\t\tthis.accounts = Account.accounts();\n\t\tSystem.out.println(accounts);\n\t\t//ArrayList<Invoice> sortedInvoices = new ArrayList<Invoice>(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The showDetailsDialog method prompts the ViewDetails JDialog Only if the keywords JList has a selection, and the selected element in the JList is a Message object. | private void showDetailsDialog() {
// If the keywords JList has a selection.
if (!this.lstKeywords.isSelectionEmpty()) {
// Checks whether the selected JList value is a Message object.
if (this.lstKeywords.getSelectedValue() instanceof Message) {
new ViewDetails(t... | [
"public void actionPerformed(ActionEvent e) {\n showDetailsDialog();\n }",
"public ListSelectorDialog(Frame parentFrame, JList userList) {\n\n super(parentFrame, Messages.getInstance().getString(\"ListSelectorDialog_Text\"), ModalityType.DOCUMENT_MODAL);\n m_List = userList;\n m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is to get all ACS related parameters. | public HashMap<String, String> getAcsFilterParams() throws Exception {
try {
HashMap<String, String> fltParams = new HashMap<String, String>();
String exprAcsParm = Messages.exprAcsParam;
XPath xpath = XPathFactory.newInstance().newXPath();
NodeList params = (Node... | [
"@GetMapping(\"/config-parameters\")\n @Timed\n public List<ConfigParameter> getAllConfigParameters() {\n log.debug(\"REST request to get all ConfigParameters\");\n return configParameterRepository.findAll();\n }",
"CatalogSearchParameters getParameters();",
"public PA getParameters();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given that a CUSTOMER1 is saved and flushed, a CUSTOMER2 is returned | @Test
public void whenAddingCustomerItShouldReturnTheSavedCustomer() {
given(repository.saveAndFlush(CUSTOMER1)).willReturn(CUSTOMER2);
// When adding a CUSTOMER1
assertThat(controller.addCustomer(CUSTOMER1))
// Then it should return the CUSTOMER2
.isSameAs(CUSTOMER2);
} | [
"@Transactional\r\n\t@Override\r\n\tpublic Customer createAccount(Customer customer)\r\n\t{\n\t\trepo.save(customer);\r\n//\t\t//repo.commitTransaction();\r\n//\t\t\r\n//\t\t\r\n\t\t\t//repo.startTransaction();\r\n\t\ttrans=new Transactions(customer.getMobileNo(),\"CREATE ACCOUNT\",customer.getWallet().getBalance()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a temporary checkpoint file. | static UfsJournalFile createTmpCheckpointFile(URI location) {
return new UfsJournalFile(location, UfsJournal.UNKNOWN_SEQUENCE_NUMBER,
UfsJournal.UNKNOWN_SEQUENCE_NUMBER, false);
} | [
"protected File createTmpFile() {\n final long rand = (new Random(System.currentTimeMillis())).nextLong();\n File file = new File(\"jpcoverage\" + rand + \".tmp\");\n return file;\n }",
"public static File createTempFile() throws IOException {\n\t\treturn File.createTempFile(\"byteseek\", ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
giveCards distributes the 52 cards in FDeck to u1 and u2 evenly 26 and 26 | public void giveCards(Deck FDeck, userHand u1, userHand u2)
{
while(!FDeck.isEmpty())
{
u1.addCard(FDeck.giveCard());
u2.addCard(FDeck.giveCard());
}
} | [
"private void distributeCards()\n {\n ArrayList<Card> remainingCards = new ArrayList();\n //i am shuffling all the cards twice just to make sure cards are well shuffled\n Collections.shuffle(locations);\n Collections.shuffle(suspects);\n Collections.shuffle(weapons);\n \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
OneToMany unidireccional con join table > Cascade ALL Persist y Update > presetar atencion a los comentarios del test Para el par de entidades 5 de deshabilita el cache | @Test
public void oneToManyPersistAndUpdateJoinTable() {
Address5 address = new Address5("18 de julio", "Montevideo", "90210", "Uruguay");
Address5 address1 = new Address5("Br Artigas", "Montevideo", "90210", "Uruguay");
Address5 address2 = new Address5("Ramon anador", "Montevideo", "90210", "Uruguay");
List<... | [
"@Test\n\tpublic void oneToManyPersistAndUpdateJoinColumn() {\n\t\tAddress6 address = new Address6(\"18 de julio\", \"Montevideo\", \"90210\", \"Uruguay\");\n\t\tAddress6 address1 = new Address6(\"Br Artigas\", \"Montevideo\", \"90210\", \"Uruguay\");\n\t\tAddress6 address2 = new Address6(\"Ramon anador\", \"Montev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |