query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
deletes the item in page and at position | public void deleteItem(int pageIndex, int itemIndex); | [
"private void deleteItem(int position){\n deleteItem(dataset.get(position),position);\n }",
"public boolean deleteItem(int index);",
"private void deleteItem() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentItemUri != null) {\n // Call the ContentResol... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
notify all registered tutors | public void notifyTutors(Map message); | [
"void notifyWatchers();",
"public interface TutorManager {\n\t/**\n\t * add tutor to manager\n\t * @param t\n\t */\n\tpublic void addTutor(Tutor t);\n\t\n\t/**\n\t * remove tutor from manager\n\t * @param t\n\t */\n\tpublic void removeTutor(Tutor t);\n\t\n\t/**\n\t * get list of tutors \n\t * @param t\n\t */\n\tp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if a given string is a valid tag name. | public static boolean isValidTagName(String test) throws IllegalValueException {
if (test.isEmpty()) {
return true;
}
return test.matches(TAG_VALIDATION_REGEX);
} | [
"private boolean checkTag(String tag) {\n if (tag.length() < 1) {\n return false;\n }\n char c = tag.charAt(0);\n if (!(c >= 'a' && c <= 'z')) {\n return false;\n }\n for (int i = 1; i < tag.length(); ++i) {\n c = tag.charAt(i);\n if (!(c >= 'a' && c <= 'z' || c >= '0' && c <= ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method read the dataset serialized in AVRO on HDFS and return an RDD of sensorRecords | public JavaRDD<SensorRecord> sampleAvroRead(JavaSparkContext sc, String hdfsAddress, Integer house_id) {
// prepare SparkSession and set the compression codec
SparkSession sparkSession = new SparkSession(sc.sc());
sparkSession.conf().set("spark.sql.avro.compression.codec", "snappy");
... | [
"public JavaRDD<SensorRecord> sampleRead(JavaSparkContext sc, Integer house_id) {\n\n // retrieving data\n // all data\n JavaRDD<String> data;\n if (house_id == -1) {\n data = sc.textFile(getClass().getClassLoader().getResource(\"d14_filtered.csv\").getPath());\n } else... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If this animation is creating a filmstrip and if the current frame has already been created, then the image of that frame is returned. Otherwise, null is returned. | public BufferedImage getFilmstripFrameImage() {
if (filmstrip != null && filmstrip.getFrameCount() > frameNumber)
return filmstrip.getFrame(frameNumber);
else
return null;
} | [
"BufferedImage getCurrentFilmstripFrame() {\n\t\tif (filmstrip != null && frameNumber >= 0 && frameNumber < filmstrip.getFrameCount())\n\t\t\treturn filmstrip.getFrame(frameNumber);\n\t\telse\n\t\t\treturn null;\n\t}",
"public BufferedImage getDrawable(){\n\t\tif(this.isOilContamination()){\n\t\t\treturn this.myF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field459' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField459() {
field459 = null;
fieldSetFlags()[459] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n return this;\n }",
"private void clearFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A simple program demonstrating the use of this class. This program prints a comma separated list of its arguments, where special characters in each argument are escaped prior to printing. | public static void main(@NotNull final String[] args) {
System.out.println("Arguments are: " + Separate.by(λ -> "\"" + esc(λ) + "\"", args, ", "));
} | [
"private void quoteline(String[] args) {\r\n\t\tStringBuilder buf = new StringBuilder();\r\n\t\tif (args.length>0) buf.append(q(args[0]));\r\n\t\tint k = 1;\r\n\t\twhile(k < args.length) buf.append(delim).append(q(args[k++]));\r\n\t\tout.println(buf.toString());\r\n\t}",
"public static void main( String... args )... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check is user marked that the current territory has iron. | boolean hasIronSelected(); | [
"private boolean checkGreedyIronCurtain() {\r\n return (myself.health < 30 || enTotal.get(0) >= 8 || opponent.isIronCurtainActive || this.myTotal.get(0) < this.enTotal.get(0));\r\n }",
"public boolean isInWater ( ) {\n\t\t// TODO: backwards compatibility required\n\t\treturn invokeSafe ( \"isInWater\" )... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An interface that represents a Dealer. A dealer have at least one deck, but can also have several decks. | public interface IDealer {
/**
* @return the top card of the Deck(s).
*/
public ICard popCard();
/**
* Creates a new full and shuffled deck for the dealer.
* @author mattiashenriksson
*/
public void newDeck();
} | [
"public Dealer() {\n dealerHand = new Deck();\n }",
"public Dealer getDealer() {\r\n\t\treturn dealer;\r\n\t}",
"public Deck getDeck();",
"public void setDealer(Dealer dealer) {\r\n\t\tthis.dealer = dealer;\r\n\t}",
"public Deck getDeck(){\n\t\treturn deck;\n\t}",
"public void addDealerCard() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Switch to window handle | public static void switchToWindowHandle1(WebDriver driver, String wndHandle) {
driver.switchTo().window(wndHandle);
} | [
"public void SwitchToWindow(String handle)\n\t{\n\t}",
"void switchToNewWindow();",
"public void switchToDefaultWindow() {\n\n\t}",
"public void switchToNewWindow() {\n log(\"Switches to new window\");\n String actualWindow = getDriver().getWindowHandle();\n Set<String> windows = getDrive... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the flatmate that made the request | public void setFlatmate(Flatmate flatmate) {
this.flatmate = flatmate;
} | [
"private void setFarmerIdToRequestAttribute() {\n\n\t\tif (!StringUtil.isEmpty(getFarmerId())) {\n\t\t\trequest.getSession().setAttribute(\"farmerId\", getFarmerId());\n\t\t} else if (!StringUtil.isEmpty(request.getSession().getAttribute(\"farmerId\"))) {\n\t\t\trequest.getSession().setAttribute(\"farmerId\", reque... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows the miss rate. | public double getMissRate() {
return taskCount > 0 ? (double) missCount / (double) taskCount : 0D;
} | [
"public double getMissRate() {\r\n\t\tdouble missRate = 0;\r\n\t\tmissRate = 1 - getHitRate(); // gives the missRate based on hitRate.\r\n\r\n\t\treturn missRate;\r\n\t}",
"public static void f_show_bad_rates(int[][] rates_matrix){\n int total_bad_rates = 0;\r\n for (int i=0; i<rates_matrix.length; ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of idPromocion | public BigDecimal getIdPromocionOficio() {
return idPromocionOficio;
} | [
"public Integer getPromId() {\n return promId;\n }",
"public Number getPromoProdukId() {\n return (Number) getAttributeInternal(PROMOPRODUKID);\n }",
"public Number getPromoProdukId() {\n return (Number)getAttributeInternal(PROMOPRODUKID);\n }",
"public Promocion obtenerPromocion... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for property exposureCloseAmount. | public long getExposureCloseAmount() {
return exposureCloseAmount;
} | [
"public long getExposureAmount() {\n\t\treturn exposureAmount;\n\t}",
"public java.lang.Float getClose() {\n return close;\n }",
"public double getClosePrice() {\r\n return close;\r\n }",
"public double getClose() {\n return close;\n }",
"public void setExposureCloseAmount(long exposureClo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Marks the leaf "majorabate" with operation "delete". | public void markMajorAbateDelete() throws JNCException {
markLeafDelete("majorAbate");
} | [
"public void markMajorActionDelete() throws JNCException {\n markLeafDelete(\"majorAction\");\n }",
"public void markMinorAbateDelete() throws JNCException {\n markLeafDelete(\"minorAbate\");\n }",
"public void markMajorOnsetDelete() throws JNCException {\n markLeafDelete(\"majorOnset... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Reads different files according to the difficulty passed in, parsed the words in the chosen file into wordsList, and shuffles the words in the list. | private void getWordsList(final States.difficulty diff) {
String file;
if (diff == States.difficulty.EASY) {
file = "4words.txt";
} else if (diff == States.difficulty.MEDIUM) {
file = "5words.txt";
} else {
file = "6words.txt";
}
// read entire file as string, parsed into array by new li... | [
"private void loadWords() throws Exception {\n wordsAndClues = new ArrayList<ArrayList<String>>();\n String line = \"\";\n String delimiter = \",\";\n InputStream fis = this.language.seedFile;\n BufferedReader br = null;\n try {\n br = new BufferedReader(new Inpu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column payment_transaction.partner_email | public void setPartnerEmail(String partnerEmail) {
this.partnerEmail = partnerEmail == null ? null : partnerEmail.trim();
} | [
"public String getPartnerEmail() {\n return partnerEmail;\n }",
"public void setPartner(String partner) {\n this.partner = partner;\n }",
"void setSentByEmail(long saleId) throws SQLException;",
"public void setPartner(String partner) {\n this.partner = partner == null ? null : part... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last gdf tender sub fpp reg details in the ordered set where scheduleNumber = &63; and tenderReferenceNumber = &63; and gdfGenericCode = &63;. | public static GDFTenderSubFPPRegDetails
fetchByGDFTenderBySNUTRNUAndGenCode_Last(
long scheduleNumber, String tenderReferenceNumber,
String gdfGenericCode,
OrderByComparator<GDFTenderSubFPPRegDetails> orderByComparator) {
return getPersistence().fetchByGDFTenderBySNUTRNUAndGenCode_Last(
scheduleNumber,... | [
"public static GDFTenderSubFPPRegDetails\n\t\tfetchByGDFTenderBySNUAndTRNUGenCodeFID_Last(\n\t\t\tlong scheduleNumber, long userId, String tenderReferenceNumber,\n\t\t\tString gdfGenericCode, long fppRegistrationId,\n\t\t\tOrderByComparator<GDFTenderSubFPPRegDetails> orderByComparator) {\n\n\t\treturn getPersistenc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find the pole from which an object came from | public int poleFrom( GameObj obj )
{
// iterate through the array to find out which "pole" the obj is on
// e.g., arr[0] is pole number one
for ( int i = 0; i < poles.length; i++ )
{
for ( int j = 0; j < disks.length; j++ )
{
// Is it the object searched for?
... | [
"abstract int findFirstIndex(Copiable obj);",
"public Object getObjectAtLocation(Point p);",
"int getOtherObjPosX();",
"private int getPosition(GeometricalObject object) {\n\t\tint position = -1;\n\t\tfor (int i = 0; i < objects.size(); i++) {\n\t\t\tif (object.equals(objects.get(i))){\n\t\t\t\tposition = i;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the String getComments() method test. | @Test
@org.junit.Ignore
public void testGetComments_1()
throws Exception {
Project fixture = new Project();
fixture.setWorkloadNames("");
fixture.setName("");
fixture.setScriptDriver(ScriptDriver.SilkPerformer);
fixture.setWorkloads(new LinkedList());
fixt... | [
"@Test\n public void testGetComments() {\n System.out.println(\"getComments\");\n ProductTweets instance = null;\n ArrayList<String> expResult = null;\n ArrayList<String> result = instance.getComments();\n assertEquals(expResult, result);\n // TODO review the generated t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column member_profile.mobile_code | public String getMobileCode() {
return mobileCode;
} | [
"java.lang.String getCandidateMobile();",
"public int getMobileCountryCode()\n {\n return this.mobileCountryCode;\n }",
"public String getMobile_phone() {\r\n return (String) get(\"mobile_phone\");\r\n }",
"public String getUserMobile() {\n return userMobile;\n }",
"public S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a direction, width, and two points (start and end) generate the path squares for the entire path | private void createPath(Direction d, int width, Point p1, Point p2) {
// Determine how far away from the center the corners are
int sideOneOffset = 0; // Top or Left depending on path direction
int sideTwoOffset = 0; // Bot or Right depending on path direction
// If the width is odd, balance the offsets
if (w... | [
"public Path tri (Point p1, int width){\n Point p2 = null, p3 = null;\n\n if (dr == Direction.NORTH) {\n p1.x = p1.x-width/2;\n p1.y = p1.y+width/2-13;\n p2 = new Point(p1.x + width, p1.y);\n p3 = new Point(p1.x + (width / 2), p1.y - width);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define o atributo codTipoPessoaBeneficiario | public void setCodTipoPessoaBeneficiario(String codTipoPessoaBeneficiario) {
this.codTipoPessoaBeneficiario = codTipoPessoaBeneficiario;
} | [
"public void setTipoIdBeneficiario(Character tipoIdBeneficiario) {\n this.tipoIdBeneficiario = tipoIdBeneficiario;\n }",
"public String getCodiceFiscaleBeneficiario() {\r\n\t\t\treturn CodFB;\r\n\t\t}",
"public void setCodiceFiscaleBeneficiario(String CodiceFiscaleBeneficiario) {\r\n\t\t\tthis.CodFB =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of patientName attribue | public void setPatientName(String patientName){
this.patientName = patientName;
} | [
"public void setPatientName(String patientName)\n {\n this.patientName = patientName;\n }",
"public void setPatientName(java.lang.String patientName) {\n this.patientName = patientName;\n }",
"public void setPatientID(java.lang.String patientID)\n {\n synchronized (monit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor of AbstractPredication instances given a simple primary key. | public AbstractPredication(java.lang.Long predicationId)
{
this.setPredicationId(predicationId);
} | [
"public AbstractPredication()\n {\n }",
"public PrimaryKey(final int pk) {\n\t\tthis(Integer.valueOf(pk));\n\t}",
"public DatasetParameterPK() {\n }",
"public BomPK() {\n }",
"public RoleParticipationEntityPK() {\n //default constructor \n }",
"public RelationPredicate(){}",
"public P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy OSGi metadata to where Eclipse PDE expects it, but adjust the BundleClassPath so Eclipse can find any embedded jars or directories in the unpacked bundle contents under the temporary directory | private void refactorForEclipse( File bundleFile )
{
// temporary location in the output folder
String tempPath = "target/pax-eclipse";
boolean refactorManifest = false;
// make relative to the provisioning POM
File baseDir = executedProject.getBasedir();
File unpack... | [
"private void addEmbeddedEntriesToEclipseClassPath( String bundleLocation, String bundleClassPath )\n {\n String[] classPath = bundleClassPath.split( \",\" );\n File basedir = executedProject.getBasedir();\n\n try\n {\n File classPathFile = new File( basedir, \".classpath\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool target_forum_id_null = 1005; | boolean getTargetForumIdNull(); | [
"boolean getForumIdNull();",
"public boolean getTargetForumIdNull() {\n return targetForumIdNull_;\n }",
"public boolean getTargetForumIdNull() {\n return targetForumIdNull_;\n }",
"public boolean getForumIdNull() {\n return forumIdNull_;\n }",
"public boolean getForumIdNull() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generates a random id out of big and small letters | public String randomID() {
Random generator = new Random();
StringBuilder randomStringBuilder = new StringBuilder();
int length = 16;
char tempChar;
for (int i = 0; i < length / 2; i++) {
tempChar = (char) (generator.nextInt(90 - 65) + 65);
randomStringBui... | [
"private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a position blank on the grid 9 X 9. | private int[] getPositionBlank(int[] cell, int i) {
int[] resCell = null;
for (int j = 0; j < SIZESUDOKU; j++) {
if (grid[i][j] == 0) {
cell[0] = i;
cell[1] = j;
resCell = cell;
}
}
return resCell;
} | [
"public void findBlank () {\n // blank position\n for (int r = 0; r < rows; r++) {\n for (int c = 0; c < columns; c++) {\n if (this.currentState[r][c] == blank) {\n setBlankCoordinates(new int[]{r, c});\n }\n }\n }\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the nodeOrderFrom the Parser | public ArrayList<String> getNodeOrder(){
return nodeOrder;
} | [
"public BigDecimal getNODE_ORDER() {\r\n return NODE_ORDER;\r\n }",
"public Integer getPositionOrder() {\n return positionOrder;\n }",
"public int getPosition_order()\n\t\t{\n\t\t\treturn m_position_order;\n\t\t}",
"public final int getOrder()\n {\n return annotation.order();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to connect the EC Part with cad Object during SaveAs operation This method will use the connection JPO used in EBOM Synchronization. | protected void connectPartWithCADObject(Context context, String partID, String busObjectID) throws MCADException {
try {
if (partID != null && !"".equals(partID) && !"null".equals(partID)) {
BusinessObject busObject = new BusinessObject(busObjectID);
busObject.open(c... | [
"private void connect() {\n disconnect();\n if (mAccount != null) {\n orderConnector = new OrderConnector(this, mAccount, null);\n orderConnector.connect();\n mInventoryConnector = new InventoryConnector(this, mAccount, null);\n mInventoryConnector.connect()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check runtime env for /.dockerenv | public static boolean inDockerEnv() {
return DOCKER_ENV_FLAG_FILE.isFile();
} | [
"public void verifyEnvironment()\n {\n String[] envVars = {\"AZURE_KEY\", \"AZURE_ACCOUNT\", \"AZURE_CONTAINER\", \"DRUID_CLOUD_PATH\"};\n for (String val : envVars) {\n String envValue = System.getenv(val);\n if (envValue == null) {\n LOG.error(\"%s was not set\", val);\n LOG.error(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, reading the ResultSet on a perrow basis with a RowCallbackHandler. | void query(String sql, Map<String, ?> paramMap, RowCallbackHandler rch) throws DataAccessException; | [
"void query(String sql, RowCallbackHandler rch) throws DataAccessException;",
"public abstract void executePrepared(String sql, Object... args) throws IOException;",
"<T> T executeNativeQueryAndInteractWithRawResultSet(\n String sql,\n NativeQueryHandler<T> nativeQueryHandler,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column dlNoticePerson.bz3 | public void setBz3(String bz3) {
this.bz3 = bz3;
} | [
"public void setLBR_DirectDebitNotice (String LBR_DirectDebitNotice);",
"public void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);",
"public void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);",
"public void setAprperson3(String aprperson3) {\r\n this.aprperson3 = aprpe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when a specific patient list is selected from the list widget | public void onPatientListSelected(String eventName, iWidget widget, EventObject event) {
WindowViewer w = widget.getAppContext().getWindowViewer();
iContainer fv = (iContainer) w.getViewer("patientSelectionForm");
String list = widget.getSelectionDataAsString();
clearPreview();
aGroup... | [
"public void patientSelected(){\n\n\t\teditPatientButton.setDisable(false);\n\t}",
"private void techJListValueChanged(javax.swing.event.ListSelectionEvent evt) {\n }",
"public void onPersonListChanged();",
"public void onListCategoriesAction(String eventName, iWidget widget, EventObject event) {\n Pati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get a list of songId of songs on the playlist | public List<Integer> getPlaylistSongIdsList() {
return playlistSongIdsList;
} | [
"public List<Integer> getSongIds(int list_ID) {\n Session session = getSession();\n Query query = session.createQuery(\"Select S.id From Song S WHERE S.playlist.playlist_id = :playlist_id\");\n query.setParameter(\"playlist_id\", list_ID);\n List<Integer> songs = query.list();\n s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DELETE /basicservices/:id : delete the "id" basicService. | @DeleteMapping("/basic-services/{id}")
@Timed
public ResponseEntity<Void> deleteBasicService(@PathVariable Long id) {
log.debug("REST request to delete BasicService : {}", id);
basicServiceService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_... | [
"@DELETE\n @Path(\"services/{serviceId}\")\n @Produces(\"application/json\")\n @Consumes(\"text/plain\")\n String deleteService(@PathParam(\"serviceId\") @NotNull String serviceId) throws Exception;",
"@DeleteMapping(\"/web-services/{id}\")\n @Timed\n public ResponseEntity<Void> deleteWebService... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get category as String array | public String[] getCategoryNames(); | [
"public String[] categories() {\n return CATEGORY_ARRAY.clone();\n }",
"public static String[] allCategoriesToStrings() {\n //first create a temporary list of all categories\n ArrayList<Category> tempCat = new ArrayList<Category>();\n for (Category c : mainCategories) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find by id of persistence class | public T findById(ID id) {
logger.debug("FindById called by: " + persistenceClass.getSimpleName() + ", mit id: " + id);
return getEntityManager().find(persistenceClass, id);
} | [
"public Object findById(Class entityClass, Long id);",
"protected abstract EntityType findById(Class<?> entityClass, EntityId id);",
"public T findById(final ID id);",
"public static <T> T find(Class<T> clazz, String id) {\n if (id == null) {\n return null;\n }\n Key k = KeyFactory.stringToKey(i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads all the bootstrap schemas into the registries in preparation for loading them into the schema partition. | private void initializeSchemas() throws MojoFailureException
{
// -------------------------------------------------------------------
// load the bootstrap schemas to pre-load into the partition
// -------------------------------------------------------------------
// always i... | [
"protected void loadSchemas() {\n try {\n //Populate the RM schema table first\n validModels.clear();\n topLevelSchemasByPublisher.clear();\n schemaInclusionMap.clear();\n candidateSchemas.clear();\n\n if (!allSchemas.isEmpty()) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to get the content of the file as string without unicode. | public synchronized String getContentWithoutUnicode() throws IOException {
String output = null;
if(this.file != null) {
FileInputStream is = new FileInputStream(this.file);
if(is != null) {
int data;
while ((data = is.read()) > 0) {
if (data < 0x80) {
output += (char) data;
}
}
... | [
"public String getFileAsString(String path) {\n try {\n InputStream fileStream = getFileAsStream(path);\n String result = IOUtils.toString(fileStream, StandardCharsets.UTF_8);\n fileStream.close();\n return result;\n }\n catch(IOException e) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__DistributedEventUpdate__Group_1__6" $ANTLR start "rule__DistributedEventUpdate__Group_1__6__Impl" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6629:1: rule__DistributedEventUpdate__Group_1__6__Impl : ( ( rule__DistributedEventUpdate__Group_1_6__0 ) ) ; | public final void rule__DistributedEventUpdate__Group_1__6__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6633:1: ( ( ( rule__DistributedEventUpdate_... | [
"public final void rule__DistributedEventUpdate__Group_0_6__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6400:1: ( rule__DistributedEventUpd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column PMSMARKETDET.BRANCH | public void setBRANCH(BigDecimal BRANCH) {
this.BRANCH = BRANCH;
} | [
"public void setBRANCH_CODE(BigDecimal BRANCH_CODE)\r\n {\r\n\tthis.BRANCH_CODE = BRANCH_CODE;\r\n }",
"public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }",
"public void setAMEND_BANK_BRANCH(String AMEND_BANK_BRANCH) {\r\n this.AMEND_BANK_BRANCH... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
El cliente envia una ip y el servidor la resulve enviandole la url | public void resolverIP() {
//Buscar el el hash
byte buffer[] = buscarURL(recibirIPs()).getBytes();
try {
// Instanciamos el envío
this.envio = new DatagramPacket(buffer, buffer.length,
InetAddress.getLocalHost(), 8080);
// Enviamos la petició... | [
"public OCSPCliente(String servidorURL)\r\n {\r\n this.servidorURL = servidorURL;\r\n }",
"private String getUrlConexion (){ \r\n String urlConexion = \"\"; \r\n urlConexion = jdbc+url+\":\"+port+\"/bd_rotiseria\"; \r\n return urlConexion;\r\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the navigational encoding for a given window Similiar to createPortletURL above | String createNavigationalEncoding(PortletWindow window, PortletMode mode, WindowState state); | [
"String createNavigationalEncoding(PortletWindow window, Map<String, String[]> parameters, PortletMode mode, WindowState state, URLType urlType);",
"String createNavigationalEncoding(PortletWindow window, Map<String, String[]> parameters, PortletMode mode, WindowState state, boolean action);",
"String createNav... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A representation of the model object 'Role Mixin'. | public interface RoleMixin extends AntiRigidMixinClass {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model ordered="false"
* annotation="http://www.eclipse.org/ocl/examples/OCL body='Mediation.allInstances()->any( m | m.mediated() = self )'"
* @generated
*/
Mediation mediation(... | [
"CodeableConcept getRole();",
"@Override\n public String toString() {\n return \"Role[\" + \"roleId=\" + roleId + \", rolePost=\" + rolePost + \", rolePay=\" + rolePay + \",userSet=\" + userSet + \"]\";\n }",
"@Override\n public String toString(){\n return role;\n }",
"public String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends the pcode to emit a label definition. | public static void emitLabelDefinition(StringBuilder pCode, String caseName){
pCode.append("<");
pCode.append(caseName);
pCode.append(">\n");
} | [
"public abstract Code addLabel(String label);",
"public void writeLabel(String label)\n\t{\n\t\tthis.asmFile.println(\"(\"+this.functionName+\"$\"+label+\")\");\n\t}",
"@Override\n\tpublic void codegen(CLEmitter output, String label, JLabelStatement jLabelStatement) {\n\t\tString outLabel = output.createLabel()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To show the panel(hide the keyboard automatically if the keyboard is showing) with nonlayoutconflict. | public static void showPanel(final View panelLayout) {
final Activity activity = (Activity) panelLayout.getContext();
panelLayout.setVisibility(View.VISIBLE);
if (activity.getCurrentFocus() != null) {
KeyboardUtil.hideKeyboard(activity.getCurrentFocus());
}
} | [
"public void showKeyboard(){\n\t\tInputMethodManager inputMethodManager = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tinputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);\n\t}",
"public void showPanel() {\n\t\tslidingPanel.heightProperty().re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check the Cell is accessible or not. | public abstract boolean isTerrainAccessiable(final Cell cell); | [
"@Test\n public void testIsCellAvailable() {\n Grid grid = new Grid(2, 2);\n assertTrue(grid.isCellsAvailable());\n ArrayList<Cell> cells = grid.getAvailableCells();\n assertTrue(grid.isCellAvailable(cells.get(0)));\n }",
"public boolean isCellVisible(Object cell) {\r\n \t\tretur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The stage of the Search service update allowing to modify the number of partitions used. | interface WithPartitionCount {
/**
* Specifies the Partitions count of the Search service.
* @param count the partitions count; Partitions allow for scaling of document counts as well as faster data ingestion by spanning your index over multiple Azure Search Units (applies to Standard tiers only)
... | [
"interface WithReplicaCount {\n /**\n * Specifies the replicas count of the Search service.\n *\n * @param count the replicas count; replicas distribute workloads across the service. You need 2 or more to support high availability (applies to Basic and Standard tiers only)\n * @return t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the instance name of the running web application. Initially tried to call the servet spec to get the servet context, but we need this before the first request is issued, and on the version of JBoss we were using this returned a "" without a servlet context. So, Charlie wrote this routine to determine this by examin... | public String getInstanceName(){
// in exploded WAR deployment (i.e. development) the path will be something like:
// /home/ctoohey/project/webapp/mac.war/WEB-INF/web.xml, in a regular WAR deployment,
// JBoss explodes the WAR into a temporary directory
// (../server/SERVER_NAME/tmp/...) and th... | [
"public static String getCurrentServletName() {\n return servletName.get();\n }",
"protected String getApplication() {\n Class[] classes = getClassContext();\n\n for (int i = 0; i < classes.length; i++) {\n if (classes[i].getClassLoader() instanceof AppClassLoader) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Does some post processing on the catalog to ensure that the "wellknown" styles are always around. | void initializeStyles( Catalog catalog ) {
if ( catalog.getStyleByName( StyleInfo.DEFAULT_POINT ) == null ) {
initializeStyle( catalog, StyleInfo.DEFAULT_POINT, "default_point.sld" );
}
if ( catalog.getStyleByName( StyleInfo.DEFAULT_LINE ) == null ) {
initializeStyle... | [
"abstract protected void setDefaultStyles();",
"public void ensureCorrectVisualStyle() {\r\n\t\tresultPanel.ensureCorrectVisualStyle();\r\n\t}",
"void onStyleModify() {\n\t\tif (mergedStyleSheet != null) {\n\t\t\tmergedStyleSheet = null;\n\t\t\tsheets.setNeedsUpdate(true);\n\t\t} else if (sheets != null) {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a document with provided id in the URL Return HTTP status of 200 OK and empty body if deleted. Refer to exceptionHandler(s) for status codes to be returned if any error. | @RequestMapping(
value="/{id}",
method={RequestMethod.DELETE})
public void deleteDoc (
@PathVariable String id)
throws DocumentNotFoundException {
serviceDoc.deleteDocument(id);
} | [
"@DeleteMapping(\"/documents/{docId}\")\r\n\tpublic ResponseEntity<String> delete(@PathVariable(\"docId\") String docId) {\r\n\t\tif(!this.documentHandler.isDocumentExisting(docId)) {\r\n\t\t\treturn new ResponseEntity<String>(HttpStatus.NOT_FOUND);\r\n\t\t}\r\n\t\tthis.documentHandler.deleteDocumentById(docId);\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scrolls down the page to the bottom button for currency change | public static void scrollDown() {
WebElement bottomButton = Browser.driver.findElement(CHANGE_CURRENCY_BOTTOM_BUTTON);
JavascriptExecutor jse = (JavascriptExecutor)Browser.driver;
jse.executeScript("arguments[0].scrollIntoView(true)", bottomButton);
} | [
"public static void changeCurrencyFromBottom() {\n click(CHANGE_CURRENCY_BOTTOM_BUTTON);\n }",
"public void scrollToBottom () {\n\t\t// Update the scroll panel\n\t\tthis.update ();\n\t\t// Scroll to the bottom of the panel, based on the content panel height\n\t\tthis.verticalScrollBar.setValue ( this.co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string bbgSymbol = 111; | com.google.protobuf.ByteString
getBbgSymbolBytes(); | [
"String getBbgSymbol();",
"public Builder setBbgSymbol(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n bbgSymbol_ = value;\n onChanged();\n return this;\n }",
"boolean hasBbgSymbol();",
"public Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the complainttype value for this Complaint. | public String getComplainttype() {
return complainttype;
} | [
"public String getType() {\r\n RemoteCustomFieldValue[] customValues = this.issue.getCustomFieldValues();\r\n for (RemoteCustomFieldValue rcf : customValues) {\r\n if (rcf.getCustomfieldId().trim().toLowerCase().equals(\r\n ConfigUtils.getIssueTrackingConfig().getBugTypeF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of createCountMatrixEstimatorSliding method, of class MarkovModelFactory. | @Test
public void testCreateCountMatrixEstimatorSliding_IIntArray_int()
{
} | [
"@Test\n public void testCreateCountMatrixEstimatorSliding_Iterable_int()\n {\n }",
"@Test\n public void testCreateCountMatrixEstimatorStepping_IIntArray_int()\n {\n }",
"@Test\n public void testCreateCountMatrixEstimatorStepping_Iterable_int()\n {\n }",
"@Test\n public void test... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of terms where groupId = &63; and termId = &63;. | public static int countByG_T(long groupId, long termId) {
return getPersistence().countByG_T(groupId, termId);
} | [
"public static int filterCountByG_T(long groupId, long termId) {\n\t\treturn getPersistence().filterCountByG_T(groupId, termId);\n\t}",
"int getNumberOfTerms();",
"public int getTermCount(String term) {\r\n if (MODEL.containsKey(term)) {\r\n int termCount = MODEL.get(term).count;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to insert a key in the Trie | public void insert(String key) {
if (key == null) // Null keys are not allowed
{
System.out.println("Null Key can not be Inserted!");
return;
}
key = key.toLowerCase(); // Keys are stored in lowercase
TrieNode currentNode = this.root;
int index = 0; // to store character index
// Iterate the Trie w... | [
"abstract TrieNode insert(String key, int k);",
"public void insert(String key) { \n int level; \n int length = key.length(); \n int index; // to get the char position in children array\n \n // used for traversing the trie\n TrieNode temp = root; \n \n for (le... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Resets the game variables and game board (call initBoard). Does NOT change the random number generator instance. | public void resetGame(){
initBoard(ROWS, COLS, rand);
} | [
"public void resetSimulation() {\n\t\tthis.board = new boolean[BOARD_WIDTH][BOARD_HEIGHT];\n\t\tMain.setGen(this.generation = 0);\n\t\tdraw();\n\t}",
"protected void resetGame() {\r\n\t\tmyGameModel.resetBoard();\r\n\t\tupdateBoard();\r\n\t}",
"private void resetGame()\n\t{\n\t\t//Attempt to clear the value of ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor to instantiate a new DataDiscretizer object. | public DataDiscretizer() throws Exception {
discretizeData();
} | [
"public DvnDataList() {\r\n super();\r\n }",
"public MRRDataProcessor()\n\t{\n\t\t\n\t}",
"public Duke(String dataFilePath) {\n storage = new Storage(dataFilePath);\n parser = new Parser();\n createTaskList();\n }",
"public Dataset()\n {\n this(new HashSet<Descrip... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accesseur au numero du tour | public int getNumeroTour() {
return numeroTour;
} | [
"public void passeTourSuivant(){\r\n \t\tthis.tourEnCours++;\r\n \t}",
"int obtenerNumeroMovimiento();",
"public void incrementarTurno() {\n this.turnoActual++;\r\n }",
"public void tour() {\n System.out.println(\"-- Tour #\" + ++tour); // incrémenter le compteur de tours\n LinkedLis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine whether a newly computed delta shall be recorded as new. This default implementation always returns true; subclasses may override as appropriate (for instance, returning false if the two resource descriptions are structurally identical). | protected boolean recordDeltaAsNew(final Delta newDelta) {
return true;
} | [
"public boolean isDeltaValid() {\n \t\tif (fState == RECEIVING_INPUTS) {\n \t\t\tif (hasExpectedChanges()) {\n \t\t\t\tfail(\"Verifier has not yet been given a resource delta\");\n \t\t\t} else {\n \t\t\t\tfState = DELTA_VERIFIED;\n \t\t\t}\n \t\t}\n \t\tif (fState == DELTA_VERIFIED) {\n \t\t\tfinishVerification();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the index of a node using its name. | public int indexOf(String name) {
for (Node n : nodes)
if (n.getName().equals(name))
return (n.getId());
return (-1);
} | [
"public int GetNodeIndexByName(String name) {\n\t\tint numNodes = m_nodes.size();\n for (int nodeIndex = 0; nodeIndex < numNodes; ++nodeIndex)\n {\n if (m_nodes.get(nodeIndex).m_name.equals(name))\n {\n return nodeIndex;\n }\n }\n return -1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns first row span cell so it could be used as a template for next cells. | public TableCellParsingElement getFirstRowSpanCell(int rowNum, int cellNum) {
TableCellParsingElement result = null;
Integer key = new Integer(rowNum);
ArrayList<TableCellParsingElement> values = this.rowSpanCells.get(key);
for (TableCellParsingElement cell : values) {
if (cell.getRowSpanCellNumbe... | [
"@Override\n\tpublic Cell firstCell() {\n\t\treturn this.selectCell();\n\t}",
"public CellPanel getFirstCell() {\n\t\treturn cells.get(0);\n\t}",
"String getRowspan();",
"public int getFirstRow() {\n return startRow;\n }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints the Member table to standard out | public static void printMemberTable() throws MemberException {
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
conn = DBConfiguration.getConnection();
stmt = conn.prepareStatement(
Configuration.SQL_06,
ResultSet.TYPE_FORWARD_ONLY,
... | [
"public static void printMemberTable() throws MemberException {\n\n Connection conn = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n try {\n conn = DBConfiguration.getConnection();\n stmt = conn.prepareStatement(\n Configuration.SQL_01,\n ResultSet.TYPE_FORWA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new IdMapping RecordBuilder. | public static no.ruter.events.avro.tps.IdMapping.Builder newBuilder() {
return new no.ruter.events.avro.tps.IdMapping.Builder();
} | [
"public static no.ruter.events.avro.tps.IdMapping.Builder newBuilder(no.ruter.events.avro.tps.IdMapping.Builder other) {\n return new no.ruter.events.avro.tps.IdMapping.Builder(other);\n }",
"public static no.ruter.events.avro.tps.IdMapping.Builder newBuilder(no.ruter.events.avro.tps.IdMapping other) {\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create Game, GameView, two Players, PlayOneGame, then play one game firstPlayerName, secondPlayerName: "human" or "cs310.Backtrack", or ... For simple lineorientedUIonly case: useController=false, useGUI=false. This case uses PlayOneGame for playing the game. (Study this first.) To run a GUI like TictactoeGUI, specify ... | static void playGame(String gameName, String firstPlayerName,
String secondPlayerName, boolean useController, boolean useGUI)
throws GameException {
// create the Game
Game game = GameFactory.create(gameName);
// create the view, which receives notifications of moves
// from the game and displays the ne... | [
"public void startGame(){\n player1.setTurn(true);\n player2.setTurn(false);\n PLAYER1NAME = player1.getUserName();\n PLAYER2NAME = player2.getUserName();\n currentPlayer = player1;\n log.writeGameLogDB(\"Uno Game between Player 1: \" + PLAYER1NAME + \" and Player 2: \" + P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets the input from the client and sorts the list and sends it back to client | @Override
public int[] sort_list(int[] list_input, int size) throws RemoteException {
for(int i = 0; i < size; i++)
{
/**
* Insertion sort logic
*/
int key = list_input[i];
int j = i-1;
while (j>=0 && list_input[j] ... | [
"@Override\n public void execute() {\n itemList.sort_names();\n }",
"public interface Sorter extends Remote {\r\n\r\n public List<String> sort(List<String> list) throws RemoteException;\r\n\r\n public List<String> reverseSort(List<String> list) throws RemoteException;\r\n\r\n}",
"public static ArrayLis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inserts and returns a new empty value (as xml) as the ith "ExternalOrderLine" element | org.datacontract.schemas._2004._07.cdiscount_service_marketplace_api_external_contract_data_order.ExternalOrderLine insertNewExternalOrderLine(int i); | [
"org.datacontract.schemas._2004._07.cdiscount_service_marketplace_api_external_contract_data_order.ExternalOrderLine addNewExternalOrderLine();",
"org.datacontract.schemas._2004._07.cdiscount_service_marketplace_api_external_contract_data_order.ArrayOfExternalOrderLine addNewOrderLineList();",
"org.apache.xmlbe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Expression_list__ExpreAssignment_1_1" $ANTLR start "rule__Name__Name_IDAssignment_1" ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/srcgen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:6040:1: rule__Name__Name_IDAssignment_1 : ( RULE_I... | public final void rule__Name__Name_IDAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/I... | [
"public final void rule__Name__Nam_IDAssignment_2_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the reliabilityLevel value. | public String reliabilityLevel() {
return this.reliabilityLevel;
} | [
"ReliabilityLevel reliabilityLevel();",
"public String getRiskLevel() {\n return riskLevel;\n }",
"public com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel getLevel() {\n if (valueCase_ == 2) {\n com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel result =\n co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the list of outgoing sequence flow for this activity. If the boolean 'checkConditions' is true, conditions on the sequence flow will be evaluated. | protected List<Transition> findOutgoingSequenceFlow(ExecutionImpl execution, boolean checkConditions) {
ActivityImpl activity = execution.getActivity();
// evaluate the conditions and find the transitions that should be forked
List<Transition> forkingTransitions = new ArrayList<Transition>();
List<Trans... | [
"private static boolean allOutHaveConditions (ArrayList<Element> outgoingFlows, Model model) {\n\n for (Element flow : outgoingFlows) {\n if (!model.hasCondition(flow)) {\n return false;\n }\n }\n return true;\n }",
"List<STransitionDefinition> getOutgo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a GameViewer object | public GameViewer()
{
initialize();
} | [
"public GameView() {\n initComponents();\n gameView(30, 30);\n }",
"private void createGame()\n {\n \tif(gameMode.equals(\"classic\"))\n \t\tgame = new GameModeClassic(this);\n \telse\n \t\tgame = new GameModeTimed(this);\n \t\n \tgame.setBounds(0, 0, FRAME_WIDTH, FRAME_HEIGH... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check for required fields alas, we cannot check 'tuple_id' because it's a primitive and you chose the nonbeans generator. | public void validate() throws org.apache.thrift.TException {
if (key_column_name == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'key_column_name' was not present! Struct: " + toString());
}
if (key_column_type == null) {
throw new org.apache.thrift.protocol.TP... | [
"private void fillMandatoryFields() {\n\n }",
"void checkEmptyFields();",
"private boolean checkFields() {\n for (Field field : this.getFields()) {\n if (field.isRequired() && field.getValue().trim().length() == 0) {\n throw new IllegalArgumentException(\"Must fill all required... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the real connection that this wraps. | public Connection getRealConnection() {
return realConnection;
} | [
"Connection get();",
"public Socket getConnection() {\n return connection;\n }",
"public NetConnection getConnection() {\n return connection;\n }",
"protected mondrian.olap.Connection getConnection() {\r\n return monConnection;\r\n }",
"public WarpConnection getConnection() {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EArtifactTypeBody__Group_1_0__1" $ANTLR start "rule__EArtifactTypeBody__Group_1_0__1__Impl" InternalAADMParser.g:7198:1: rule__EArtifactTypeBody__Group_1_0__1__Impl : ( ( rule__EArtifactTypeBody__SuperTypeAssignment_1_0_1 ) ) ; | public final void rule__EArtifactTypeBody__Group_1_0__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAADMParser.g:7202:1: ( ( ( rule__EArtifactTypeBody__SuperTypeAssignment_1_0_1 ) ) )
// InternalAADMParser.g:7203:1: ( ( rul... | [
"public final void rule__EArtifactTypeBody__Group_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:7245:1: ( rule__EArtifactTypeBody__Group_1_1__1__Impl )\n // InternalAADMParser.g:7246:2: rule__EArtifac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "gen_if" /run/media/abhi/0cc7e6ad008e43cdb47df3ed6f127f92/home/abhi/dacapo9.12bachsrc (2)/benchmarks/bms/jython/build/grammar/Python.g:1688:1: gen_if[List gens, List ifs] : IF test[expr_contextType.Load] ( gen_iter[gens, ifs] )? ; | public final PythonParser.gen_if_return gen_if(List gens, List ifs) throws RecognitionException {
PythonParser.gen_if_return retval = new PythonParser.gen_if_return();
retval.start = input.LT(1);
PythonTree root_0 = null;
Token IF309=null;
PythonParser.test_return test310 = nul... | [
"public final PythonParser.list_if_return list_if(List gens, List ifs) throws RecognitionException {\n PythonParser.list_if_return retval = new PythonParser.list_if_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token IF299=null;\n PythonParser.test_retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/This loads all students in the students.txt file and stores each StudentDetails object in the ALL_Students ArrayList | private static boolean loadStudents() throws IOException{
BufferedReader reader = new BufferedReader(new FileReader(STUDENTS_FILE));
boolean error_loading = false; //stores whether there was an error loading a student
String line = reader.readLine(); //read the properties of each student in the students.txt f... | [
"private void readStudent() throws IOException {\n FileReader fd = new FileReader(\"/Users/dawitgebremichael/hcc/javaII/src/main/java/domain/student.txt\");\n BufferedReader br = new BufferedReader(fd);\n String line = br.readLine(); //This read the first line\n\n Student student; //vari... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Carl Borillo, Justin Miller, Chaz Arvizu, Jereme Howell, Yoosuf Batliwala December 7, 2020 Purpose: This class represents a Subject, that has references to Observers and notifies them Inputs: An object of type Observer Output: | public interface Subject {
/**
* @param o - an Observer that gets registered to the Subject
*/
void registerObserver(Observer o);
/**
* @param o - an Observer that gets removed from the Subject
*/
void removeObserver(Observer o);
/**
* Notifies all the Observers bound to ... | [
"public interface Subject {\n /**\n * Registers the observer that observes a subject, typically to the subject's list of observers\n * \n * @param observer - who observes a subject\n */\n public void registerObserver(Observer observer);\n\n /**\n * Removes the observer from a subject's list of observer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the retract class. | public Retract(NewspaperManager papers, ArticleManager arts)
{
articleRetractions = new HashMap<String,Article>();
newspaperRetractions = new HashMap<String,Newspaper>();
init(papers,arts);
this.nman = papers;
this.aman = arts;
} | [
"public Retrait() {\n\t\tsuper();\n\t}",
"private Restaurant() {}",
"private TweetRiver() { }",
"public void connect_Retract(BOOL newIV) throws FBRManagementException {\n Retract = newIV;\n MovingStatus.connectIVNoException(\"Retract\",Retract);\n }",
"public void connect_Retrac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Rotate left centered at Node curr | private void rotateLeft(Node curr, boolean colorChangeNeeded) {
Node parent = curr.parent;
curr.parent = parent.parent;
if(parent.parent != null) {
if(parent.parent.right == parent) {
parent.parent.right = curr;
} else {
parent.parent.left = curr;
... | [
"VizTreeNode leftRotate(VizTreeNode x)\n {\n VizTreeNode y = x.right;\n VizTreeNode T2 = y.left;\n\n // Perform rotation\n y.left = x;\n x.right = T2;\n\n // Update heights\n x.height = max(getHeight(x.left), getHeight(x.right)) + 1;\n y.height = max(getHe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Matrix inverse or pseudoinverse | public Matrix inverse () {
return solve(identity(m,m));
} | [
"public Matrix inverse();",
"public Matrix pseudoInverse();",
"public Matrix inverse(){\r\n \tint n = this.nrow;\r\n \tif(n!=this.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble[] col = new double[n];\r\n \tdouble[] xvec = new double[n];\r\n \tM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new EvaluationShrinker. | public EvaluationShrinker(PartialEvaluator partialEvaluator,
boolean runPartialEvaluator,
InstructionVisitor extraDeletedInstructionVisitor,
InstructionVisitor extraAddedInstructionVisitor)
{
this(new Inst... | [
"public EvaluationShrinker()\n {\n this(new PartialEvaluator(), true, null, null);\n }",
"public EvaluationShrinker(InstructionUsageMarker instructionUsageMarker,\n boolean runInstructionUsageMarker,\n InstructionVisitor ext... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This saves how many Settings are in a Class. This can't be changed. | public static boolean setNumberOfSettings(String classname, int settings)
{
if (info.containsKey(classname))
{
if (info.get(classname).settings != 0)
{
LOG.warning(bundle.getString("NumberOfSettingsAlreadySet"));
return false;
}
... | [
"private void _updateCount(int classType) {\n int subClass, superClass;\n\n instances_[classType].count++;\n subClass = classType;\n while ( (superClass = CLASS_INFO[subClass][INDEX_SUPER]) != CS_C_NULL) {\n instances_[superClass].count++;\n subClass = superClass;\n }\n }",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the graph link from the graph, potentially swapping it in from the file vector backing. Notice that the underlying implementation is smart enough to only lock the data stream when it is actually necessary. | @SubL(source = "cycl/sbhl/sbhl-graphs.lisp", position = 7123)
public static final SubLObject get_sbhl_graph_link_from_graph(SubLObject node, SubLObject graph, SubLObject v_cache) {
{
final SubLThread thread = SubLProcess.currentSubLThread();
{
SubLObject result = NIL;
{
SubL... | [
"public DeadlockGraph getDeadlockGraph() {\n internalLock.lock();\n try {\n // TODO\n DeadlockGraph graphCopy = graph.copyOutgoingEdges();\n return graphCopy;\n } finally {\n internalLock.unlock();\n }\n }",
"Graph getGraph(String name) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a FieldValueMatcher.Builder corresponding to the given field. | protected static FieldValueMatcher.Builder createFvm(int field) {
return FieldValueMatcher.newBuilder().setField(field);
} | [
"public static org.hamcrest.Matcher<quickfix.FieldMap> hasFieldThat(int field, org.hamcrest.Matcher<java.lang.String> matcher) {\n return org.kot.tool.quickfix.HasField.hasFieldThat(field, matcher);\n }",
"public static TreeNode makeField(Field field) {\n return new FieldNode(field);\n }",
"public SortB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the item publicacao with the primary key from the database. Also notifies the appropriate model listeners. | @Override
public ItemPublicacao remove(long itemPublicacaoId)
throws NoSuchItemPublicacaoException {
return remove((Serializable)itemPublicacaoId);
} | [
"@Override\n\tpublic ItemPublicacao remove(Serializable primaryKey)\n\t\tthrows NoSuchItemPublicacaoException {\n\t\tSession session = null;\n\n\t\ttry {\n\t\t\tsession = openSession();\n\n\t\t\tItemPublicacao itemPublicacao = (ItemPublicacao)session.get(ItemPublicacaoImpl.class,\n\t\t\t\t\tprimaryKey);\n\n\t\t\tif... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resets Polygon with its origin at x, y and its size to be its width and height | public void resetPoly() {
this.hitbox.reset();
this.hitbox.addPoint(x, y);
this.hitbox.addPoint(x, y + height);
this.hitbox.addPoint(x + width, y + height);
this.hitbox.addPoint(x + width, y);
} | [
"private void rebuildPolygon() {\n //recalculate new center\n float borderNeeded = mPolygonShapeSpec.hasBorder() ? mPolygonShapeSpec.getBorderWidth() : 0;\n float shadowNeeded = mPolygonShapeSpec.hasShadow() ? mPolygonShapeSpec.getShadowRadius() : 0;\n mPolygonShapeSpec.setCenterX(mPolyg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a packet containing authentication data | public PacketSendAuthentication(OutputStream os, String username, String password) throws IOException {
super(os);
this.password = password;
this.username = username;
buildPacket();
} | [
"private AuthPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"com.tshang.peipei.protocol.protobuf.ByteString getAuth();",
"protected void buildPacket() throws IOException {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\t\n\t\t// write pack... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Os Artifact Query All'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseOsArtifactQueryAll(OsArtifactQueryAll object) {
return null;
} | [
"public T caseOsArtifactQuery(OsArtifactQuery object) {\n return null;\n }",
"public T caseOsArtifactQueryStatement(OsArtifactQueryStatement object) {\n return null;\n }",
"public T caseOsArtifactQueryByPredicate(OsArtifactQueryByPredicate object) {\n return null;\n }",
"public T caseOsQu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the icon offset for X as dp | public IconicsDrawable iconOffsetXDp(int iconOffsetXDp) {
return iconOffsetXPx(Utils.convertDpToPx(mContext, iconOffsetXDp));
} | [
"private int getIconPosn() {\n int x = (this.getWidth() - _standardIcon.getIconWidth()) / 2;\n return x;\n }",
"public IconicsDrawable iconOffsetXPx(int iconOffsetX) {\n this.mIconOffsetX = iconOffsetX;\n return this;\n }",
"public int getXCenter() {\n return x + image.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns value stored in rainfall for this reading | public double getRainfall() {
return this.rainfall;
} | [
"public double rainfall() {\n\t\tdouble total = 0;\n\t\tdouble accumulator = 0;\n\t\tfor (Double c : this.rainfallReadings) {\n\t\t\tif (c == -999) {\n\t\t\t\treturn total / accumulator;\n\t\t\t} else if (c >= 0) {\n\t\t\t\ttotal += c;\n\t\t\t\taccumulator++;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public final i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the name of the first page to display. | public void setFirstPage(String firstPage)
{
_firstPage = firstPage;
} | [
"public void setPageFirst()\n {\n setActivePage(1);\n }",
"public void firstPage() {\n log.info(\"firstPage\");\n pagingSearch(0);\n paging.setFirstPage(numDisplay);\n }",
"public void setFirstPage(int firstPage) {\n\t\tthis.firstPage = firstPage;\n\t}",
"public void setP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find Symbol Table Record in the Constants Table | public SymbolTableRecord lookupConstantRecord(SymbolTableRecord record) {
return lookup(record, constants);
} | [
"Optional<SymbolTableRecord> lookup(String lexeme);",
"public static SymbolTable getSymbolTable()\n\t{\n\t\treturn symbolTable;\n\t}",
"public AbstractSymbol<T> lookup(String s) {\n AbstractSymbol<T> sym = null;\n return this.tbl.get(s);\n }",
"public Sym\nsearch(String pName,int symkind)\n{ ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This creates and fixes a bad table with regions that has startkey == endkey | @Test (timeout=180000)
public void testDegenerateRegions() throws Exception {
TableName table = TableName.valueOf("tableDegenerateRegions");
try {
setupTable(table);
assertNoErrors(doFsck(conf,false));
assertEquals(ROWKEYS.length, countRows());
// Now let's mess it up, by adding a reg... | [
"@Test (timeout=180000)\n public void testDupeRegion() throws Exception {\n TableName table =\n TableName.valueOf(\"tableDupeRegion\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, by a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the current device this user is logged in to. DO NOT call this in client/UI code; this is handled at a higher level. | public void updateDevice(Device currentDevice)
{
this.currentDevice = currentDevice;
} | [
"private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }",
"public void updateDevice(ConnectDevice device);",
"Device updateDevice(Integer id, String name, String authenticationKey, Device device);",
"private... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to show people list in Fragment | private void showPeopleList() {
// If we do not have network, show an error
if(! NetworkUtils.isOnline(getActivity())) {
Log.i(m_fragmentName, "showPeopleList() - Cannot show people's list because Network is Not Available");
final String title = getStringFromResources(R.string.error);
final String mess... | [
"public void showFriends(){\n Member member = session.getMember();\n ArrayList<String> friendList = memberController.retrieveFriendList(session.getMember().getUsername());\n\n System.out.println(\"My Friends: \");\n\n int index = 1;\n for (String friendName : friendList){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the WirelessMedium to busy, making sure another thread cannot access this method while doing so | public synchronized void setBusy()
{
isBusy = true;
} | [
"public WirelessMedium()\n\t{\n\t\tisBusy = false;\n\t}",
"void setBusy();",
"public synchronized void makeBusy(){\n isBusy = true;\n }",
"public void busy() {\n mIsIdle = false;\n }",
"public void setBusy(boolean busy) {\n mBusy = busy;\n }",
"public static synchronized void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for Activeflag, using the alias name Activeflag. | public String getActiveflag() {
return (String)getAttributeInternal(ACTIVEFLAG);
} | [
"public String getActiveFlag() {\n return (String) getAttributeInternal(ACTIVEFLAG);\n }",
"public Byte getActiveflag() {\n return activeflag;\n }",
"public Boolean getActiveflag() {\n return activeflag;\n }",
"public String getFlag() {\n return (String) getAttributeIntern... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |