query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Return a DigestedData object from a tagged object. | public static DigestedData getInstance(
ASN1TaggedObject ato,
boolean isExplicit)
{
return getInstance(ASN1Sequence.getInstance(ato, isExplicit));
} | [
"public interface ITaggedDataFactory\n{\n\t/** \n\t Get data for a specific tag value.\n\t \n\t @param tag The tag ID to find.\n\t @param data The data to search.\n\t @param offset The offset to begin extracting data from.\n\t @param count The number of bytes to extract.\n\t @return The located <see cref=\"ITaggedD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the console area if available, null otherwise | public Console getConsole() {
if (previewEditor != null) {
return previewEditor.getConsole();
}
return null;
} | [
"public static Console getConsole() { \n return getConsole(null);\n }",
"public Console getConsole(String name)\n {\n WeakReference ref;\n\n /* Throw a NullPointerException if name is null. */\n name.getClass();\n\n ref = (WeakReference)consoles.get(name);\n if(ref!=null)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Valid range check when reading HostSecurityAttachmentPoint config from storage. Valid vlans are 14095. Macs must be at most 6 bytes. | @Test
public void
testHostSecurityAttachmentPointVlanMacRange() throws Exception {
HostSecurityAttachmentPointRow apRow;
EnumSet<DeviceField> keyFields =
EnumSet.of(IDeviceService.DeviceField.VLAN,
IDeviceService.DeviceField.MAC);
// vla... | [
"@Test\n public void testHostSecurityIpAddressVlanMacRange() throws Exception {\n HostSecurityIpAddressRow ipRow;\n EnumSet<DeviceField> keyFields =\n EnumSet.of(IDeviceService.DeviceField.VLAN,\n IDeviceService.DeviceField.MAC);\n // vlan 0: invalid.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the ItemCollectionMetrics property for this object. | public java.util.Map<String,java.util.List<ItemCollectionMetrics>> getItemCollectionMetrics() {
return itemCollectionMetrics;
} | [
"public String getReturnItemCollectionMetrics() {\n return this.returnItemCollectionMetrics;\n }",
"public final Hashtable<String, Metric> getCollection() {\r\n\t\treturn metricsCollection;\r\n\t}",
"public void setItemCollectionMetrics(java.util.Map<String,java.util.List<ItemCollectionMetrics>> itemC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DB Constructors. Create a database with the specified number of pages where the page size is the default page size. | public void openDB( String fname, int num_pgs)
throws IOException,
InvalidPageNumberException,
FileIOException,
DiskMgrException {
name = new String(fname);
num_pages = (num_pgs > 2) ? num_pgs : 2;
File DBfile = new File(name);
DBfile.delete();
// Creaat a random... | [
"public void setNumDBPages(int num)\n throws IOException\t\n {\n Convert.setIntValue (num, NUM_DB_PAGE, data);\n }",
"long createDatabase(long actor, String nameToDisplay, long proteinDBType, long sizeInBytes, boolean bPublic, boolean bReversed, ExperimentCategory category);",
"public static synch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This returns a string representation of our test containing all the details. | public String toString() {
return "Name: " + sampleTest + "type: " + type + events.toString();
} | [
"@Test\n public void testToString() {\n System.out.println(\"toString\");\n VicePresident instance = new VicePresident(\"Federation\", \"Hakan\", \"Uyanik\", 201505, 421.612, 1965);\n String expResult = (\"Hakan\" + \" \" + \"Uyanik\" + \"\\n\"\n + \"ID: \" + 201505 + \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unmodifiable view of an organizer | public interface ReadOnlyOrganizer {
/**
* Returns an unmodifiable view of the tasks list.
* This list will not contain any duplicate tasks.
*/
ObservableList<Task> getTaskList();
/**
* Returns an unmodifiable view of the current user's task list.
* This list will not contain any ... | [
"public String getOrganiser() {\n return organiser;\n }",
"public Organism getOrganism();",
"public IListOrganiser getOrganiser() {\n\t\treturn organiser;\n\t}",
"public String getOrgan() {\n\t\treturn this.organ;\n\t}",
"public String getOrganiserName() {\n return organiserName;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Commit and make it observable the obs state | private void commitObsStateChanges(){
//log("committing obs state changed:");
ArtifactObsProperty[] changed = obsPropertyMap.getPropsChanged();
ArtifactObsProperty[] added = obsPropertyMap.getPropsAdded();
ArtifactObsProperty[] removed = obsPropertyMap.getPropsRemoved();
try {... | [
"private void commitObsStateChangesAndSignal(AgentId target, Tuple signal){\n //log(\"committing obs state changed:\");\n ArtifactObsProperty[] changed = obsPropertyMap.getPropsChanged();\n ArtifactObsProperty[] added = obsPropertyMap.getPropsAdded();\n ArtifactObsProperty[] removed = ob... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Records the search engine type after the user chooses a different search engine. | public static boolean recordSearchEngineTypeAfterChoice() {
if (!isSearchEnginePossiblyDifferent()) return false;
@SearchEngineType
int previousSearchEngineType = getPreviousSearchEngineType();
@SearchEngineType
int currentSearchEngineType = getDefaultSearchEngineType();
... | [
"public static void recordSearchEngineTypeBeforeChoice() {\n @SearchEngineType\n int currentSearchEngineType = getDefaultSearchEngineType();\n RecordHistogram.recordEnumeratedHistogram(\n \"Android.SearchEngineChoice.SearchEngineBeforeChoicePrompt\",\n currentSearc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the given legacy alternate bouncer to null if it's the current alternate bouncer. Else, does nothing. Only used if modern alternate bouncer is NOT enabled. | public void removeLegacyAlternateBouncer(
@NonNull LegacyAlternateBouncer alternateBouncerLegacy) {
if (!mIsModernAlternateBouncerEnabled) {
if (Objects.equals(mAlternateBouncerInteractor.getLegacyAlternateBouncer(),
alternateBouncerLegacy)) {
mAlterna... | [
"public void setLegacyAlternateBouncer(@NonNull LegacyAlternateBouncer alternateBouncerLegacy) {\n if (!mIsModernAlternateBouncerEnabled) {\n if (!Objects.equals(mAlternateBouncerInteractor.getLegacyAlternateBouncer(),\n alternateBouncerLegacy)) {\n mAlternateBoun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int64 apikey_op_id = 1; | public long getApikeyOpId() {
return apikeyOpId_;
} | [
"long getApikeyOpId();",
"public long getApikeyOpId() {\n return apikeyOpId_;\n }",
"boolean hasApikeyOpId();",
"public Builder setApikeyOpId(long value) {\n bitField0_ |= 0x00000001;\n apikeyOpId_ = value;\n onChanged();\n return this;\n }",
"com.google.protobuf.Str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Emit the 3rd letter in the greek alphabet Gamma | public static void main(String[] args) {
Observable.from(DataGenerator.generateGreekAlphabet())
.elementAt(2)
.subscribe((letter) -> {
System.out.println(letter);
});
System.out.println();
// Emit the 50th letter in th... | [
"public String toString(){\r\n return Character.toLowerCase(this.getColor().charAt(0)) + \"K\";\r\n }",
"public String getIso3Char();",
"private String getLetter(BoggleBoard board, int i, int j) {\r\n char c = board.getLetter(i, j);\r\n if (c == 'Q') return \"QU\";\r\n else return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Store a received video call. | public abstract void addReceivedVideo(Video video) throws UnsuportedOperationException; | [
"@Override\n public void onVideoTrackAdded(Call call) {\n mAcceptVideo = true;\n }",
"private void setVideo(){\n /* if(detailsBean==null){\n showToast(\"没有获取到信息\");\n return;\n }\n UserManager.getInstance().setDetailsBean(detailsBean);\n up... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
That method find the row when reading a board from a file. | public void findRow(String fileName) {
try {
int counter = 0;
FileInputStream file = new FileInputStream(fileName);
Scanner sc = new Scanner(file);
while(sc.hasNextLine())
{
sc.nextLine();
counter++;//returns the line that was skipped
}
sc.close(); //closes t... | [
"public int locateRow(String val, int col);",
"private int getRowFor(File file) {\r\n\r\n\t\t// FIXME: Is there a better way to find the row of the specified\r\n\t\t// file???\r\n\t\t// We must do a linear search because the files will usually (always?)\r\n\t\t// not be listed in alphabetical order (i.e., folder... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns how many ships are not destroyed | static int shipsUp()
{
int up = 5;
for (int i = 0; i < shipsDestroyed.length; i++)
{
if (shipsDestroyed[i])
up--;
}
return up;
} | [
"public int getShipsAlive() {\n return this.numberOfShips;\n }",
"public int getNumNotHit()\n {\n return shipCoordinates.size() - hitCoordinates.size();\n }",
"public int getNumberShips();",
"public int getNumberOfShips() {\r\n\t\treturn numberOfShips;\r\n\t}",
"public static Integer ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Should return a list of champs that user plays that is greater than 6 | public List<String> getM7() {
ChampionMasteries masteries = summoner.getChampionMasteries();
List<ChampionMastery> good = masteries.filter((ChampionMastery mastery) -> {
assert mastery != null;
return mastery.getLevel() == 7;
});
return good.stream().map((Ch... | [
"private List<Card> chooseMulligan() {\n return this.b.getPlayer(this.b.getLocalteam()).getHand().stream()\n .filter(c -> c.finalStats.get(Stat.COST) > 3 && c.finalStats.get(Stat.SPELLBOOSTABLE) == 0)\n .collect(Collectors.toList());\n }",
"public ArrayList<Player> getPlaye... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stops the timer used for the periodic display function | private static void stopDisplayTimer() {
displayTimer.stop();
} | [
"public void stop() {timer.stop();}",
"void stop() {\n timer.stop();\n }",
"public void stop(){\n\t\ttimer.stop();\n\t}",
"public void stopTime()\n {\n timeAction.stopAction();\n realtime = false;\n currentTimeField.setTextBackground(Color.BLACK);\n currentTimeField.setTe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
calculates g^x mod n | int CalcKey(int g, int x, int n)
{
int rtn = 1;
for(int i = 0; i < x; i++)
rtn = (rtn * g) % n;
return rtn;
} | [
"private static int modExp(int a, int b, int n) {\n\n // get a char array of the bits in b\n char[] k = (Integer.toBinaryString(b)).toCharArray();\n\n // initialize variables\n int c = 0, f = 1;\n // loop over every bit in k\n for (int i = 0; i < k.length; i ++) {\n\n // for every bit, i.e. i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .ChatWithServer.Req chat_with_server_req = 3; | ChatWithServer.Req getChatWithServerReq(); | [
"ChatRecord.Req getChatRecordReq();",
"private void setChatWithServerReq(ChatWithServer.Req value) {\n if (value == null) {\n throw new NullPointerException();\n }\n req_ = value;\n reqCase_ = 3;\n }",
"public ChatWithServer.Req getChatWithServerReq() {\n if (reqCase_ == 3) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Access the entire set of values stored in the Structured Artifact | public Map getValues()
{
return m_structuredArtifact;
} | [
"public Object getValue(String name)\n\t\t{\n\t\t\tString[] names = name.split(ResourcesMetadata.DOT);\n\t\t\tObject rv = m_structuredArtifact;\n\t\t\tif(rv != null && (rv instanceof Map) && ((Map) rv).isEmpty())\n\t\t\t{\n\t\t\t\trv = null;\n\t\t\t}\n\t\t\tfor(int i = 1; rv != null && i < names.length; i++)\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Crear nuevo CuestionarioCovid19 en la base de datos | public void crearCuestionarioCovid19(CuestionarioCovid19 partcaso) throws Exception {
ContentValues cv = CuestionarioCovid19Helper.crearCuestionarioCovid19ContentValues(partcaso);
mDb.insertOrThrow(Covid19DBConstants.COVID_CUESTIONARIO_TABLE, null, cv);
} | [
"public void crearParticipanteCovid19(ParticipanteCovid19 partcaso) throws Exception {\n\t\tContentValues cv = ParticipanteCovid19Helper.crearParticipanteCovid19ContentValues(partcaso);\n\t\tmDb.insertOrThrow(Covid19DBConstants.PARTICIPANTE_COVID_TABLE, null, cv);\n\t}",
"public void crearDatosAislamientoVisitaCa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the iconID property. | public int getIconID() {
return iconID;
} | [
"public String getIconId(){\n\t\treturn iconId;\n\t}",
"public Integer getIconId() {\n return iconId;\n }",
"public int getIconId() {\n return iconId_;\n }",
"public int getIcon() {\n return Forecast.getIconId(icon);\n }",
"public void setIconID(int value) {\n this.iconID ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method updates keyword records to Keywords table. | @Transactional(propagation = Propagation.REQUIRED)
public void updateKeyword(Serpkeywords objKeyword) {
getHibernateTemplate().update(objKeyword);
} | [
"public void AddKeywords()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query; \n\t\t\t\n\t\t\tfor(int i = 0; i < keywords.size(); i++)\n\t\t\t{\n\t\t\t\tString keyword = keywords.get(i); \n\t\t\t\t\n\t\t\t\tint kid = GetKIDFromWord(keyword); \n\t\t\t\t\n\t\t\t\t//word is not already i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Original signature : int ftrScanGetScanParameters(void, unsigned long, void) native declaration : line 460 | int ftrScanGetScanParameters(Pointer ftrHandle, NativeLong dwParamCode, Pointer pOutBuffer); | [
"int ftrScanGetDeviceInfo(Pointer ftrHandle, FTRSCAN_DEVICE_INFO pDeviceInfo);",
"int ftrScanGetFrame(Pointer ftrHandle, Pointer pBuffer, FTRSCAN_FRAME_PARAMETERS pFrameParameters);",
"Pointer ftrScanOpenDevice();",
"int ftrScanGetOptions(Pointer ftrHandle, NativeLongByReference lpdwFlags);",
"int ftrScanGe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generateExplicitAttributeMethodDeclarations: 1 attribute:BasisCurve, base type: entity IfcCurve | public boolean testBasiscurve(EIfctrimmedcurve type) throws SdaiException; | [
"protected void addBasisCurvePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_IfcOffsetCurve2D_BasisCurve_feature\"),\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a new byte node to the system. The path is specified by the parameter name. | public void addByte(String name, byte... value) {
if (value == null) {
addNode(name, DNHelper.BYTE, -1, value);
} else {
addNode(name, DNHelper.BYTE, value.length, value);
}
} | [
"public Tree add(byte value) {\r\n\t\treturn addObjectInternal(value);\r\n\t}",
"void addNode(String name);",
"public Tree put(String path, byte value) {\r\n\t\treturn putObjectInternal(path, value, false);\r\n\t}",
"public void addNode(String node);",
"public void addKB(String name) {\n addKB(name, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove a book from the stock | public void removeBook(Book book) {
if (this.stock.size() > 0) {
this.stock.remove(book);
}
} | [
"private void removeBook() {\n InventoryBook bookToDelete = tableViewInventory.getSelectionModel().getSelectedItem();\n if (bookToDelete != null) {\n handler.deleteBook(bookToDelete);\n updateBookList();\n }\n }",
"public void removeBook(String isbn);",
"boolean rem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes the hook and provides arguments, dependencies, and a ScrapeSpecification to ScrapeInstance map | void execute(@NotNull DIContainer dependencies, @NotNull String[] args,
@NotNull Map<ScrapeSpecification, ScrapeInstance> scraper) throws Exception; | [
"public interface Scraper {\n /**\n * Specify fields which will be generating when scraping.\n */\n FieldDef[] fields();\n /**\n * Scrape whatever necessary from given url and feed results to {@code scraperOutput::yield}.\n */\n void scrapeUrl(String url, ScraperBase.LoggerForScraper log... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PieChart__Group__11__Impl" $ANTLR start "rule__PieChart__Group__12" InternalMyDsl.g:8861:1: rule__PieChart__Group__12 : rule__PieChart__Group__12__Impl rule__PieChart__Group__13 ; | public final void rule__PieChart__Group__12() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:8865:1: ( rule__PieChart__Group__12__Impl rule__PieChart__Group__13 )
// InternalMyDsl.g:8866:2: rule__PieChart__Group__12__Impl rule... | [
"public final void rule__PieChart__Group__12__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:8877:1: ( ( ( rule__PieChart__Group_12__0 )* ) )\n // InternalMyDsl.g:8878:1: ( ( rule__PieChart__Group_12__0 )* )\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
metodo para calcular el importe de todos los productos de una factura | public double calcularImporte() {
int cantidad;
double precio;
double total = 0;
for (int i = 0; i < articulosFactura.size(); i++) {
cantidad = articulosFactura.get(i).getCantidad();
precio = articulosFactura.get(i).getPrecio();
total = ... | [
"private void calcularImportesDeFactura(){\r\n\t\t\r\n\t\tFacxp analisis=this;\r\n\t\t\r\n\t\t/*\r\n\t\tCantidadMonetaria importef=new CantidadMonetaria(analisis.getIMPORTEF(),analisis.getTipoDeMoneda());\r\n\t\tCantidadMonetaria totalf=new CantidadMonetaria(analisis.getTOTALF(),analisis.getTipoDeMoneda());\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method displays the given quantity value on the screen. | private void displayQuantity(int number) {
TextView quantityTextView = (TextView) findViewById(
R.id.quantity_text_view);
quantityTextView.setText("" + number);
} | [
"public void displayQuantity(int quantity) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(String.valueOf(quantity));\n }",
"private void displayQuantity(int quantity) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper function for building bitmap indexes for integerencoded dimensions. Called by IncrementalIndexAdapter as it iterates through its sequence of rows. Given a row value array from a Row key, with the current row number indicated by "rowNum", set the index for "rowNum" in the bitmap index for each value that appears ... | void fillBitmapsFromUnsortedEncodedKeyComponent(
EncodedKeyComponentType key,
int rowNum,
MutableBitmap[] bitmapIndexes,
BitmapFactory factory
); | [
"void BuildItemIndices();",
"protected void buildIndex() {\r\n \t\t\r\n \t\trootIndex.clear();\r\n \t\tfor(Entry<Key, ICell> entry: data.entrySet()) {\r\n \t\t\tIDimensionElement elm = entry.getKey().getDimensionElement(0);\r\n \t\t\tIDimensionElement e = elm;\r\n \t\t\t// do not build a cache for the root elemen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'AB' field. | public java.lang.Double getAB() {
return AB;
} | [
"public String getAbb() {\n return (String) getAttributeInternal(ABB);\n }",
"public java.lang.Double getAB() {\n return AB;\n }",
"java.lang.String getAbn();",
"public String getB() {\n return b;\n }",
"public String getBAA001() {\n return BAA001;\n }",
"public String ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the gamma property. | public double getGamma() {
return gamma;
} | [
"public float getGamma() {\n\t\treturn gamma;\n\t}",
"public float getGamma();",
"double getGamma();",
"public void setGamma(float gamma);",
"public double getLightAbsorptionCoefficient(){\n return gamma;\n }",
"public FloatColumn getCellGamma() {\n return delegate.getColumn(\"cell_gamma\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a line,offset pair into an x,y (pixel) point relative to the upper left corner (0,0) of the text area. | public Point offsetToXY(int line, int offset, Point retVal)
{
if(!displayManager.isLineVisible(line))
return null;
int screenLine = chunkCache.getScreenLineOfOffset(line,offset);
if(screenLine == -1)
return null;
FontMetrics fm = painter.getFontMetrics();
retVal.y = screenLine * fm.getHeigh... | [
"public Point offsetToXY(int line, int offset)\r\n\t{\r\n\t\treturn offsetToXY(line,offset,new Point());\r\n\t}",
"private int convertLocation(int x, int y) {\n\tchar[] text = _pa.getText().toCharArray();\n\tint c = 0;\n\tint curX = 0;\n\tint curY = 0;\n\n\ttry {\n\t while (curX != x || curY != y) {\n\t\tif (t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field665' field. | public void setField665(java.lang.CharSequence value) {
this.field665 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField665(java.lang.CharSequence value) {\n validate(fields()[665], value);\n this.field665 = value;\n fieldSetFlags()[665] = true;\n return this; \n }",
"public void setField667(java.lang.CharSequence value) {\n this.field667 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column list.title_key | public String getTitle_key() {
return title_key;
} | [
"public List getTitle()\r\n {\r\n return get(getTitleId());\r\n }",
"String getTitle_id();",
"public java.lang.String getTitle() {\n\t\treturn getValue(org.jooq.examples.mysql.sakila.tables.FilmList.FILM_LIST.TITLE);\n\t}",
"protected String getKeyColumn()\n \t{\n \t\treturn p_keyColumn;\n \t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets i'th member of team to be the specified agent | public void setAgent(int i, Agent a) { scenario.team.agents.set(i, a); } | [
"public void setTeam(int i){\n\t\tteam = i;\n\t}",
"public void setAgent(IAgent agent);",
"public void setAgent(Integer agent) {\r\n this.agent = agent;\r\n }",
"public void setAgentArray(int i, org.biocatalogue.x2009.xml.rest.Agent agent)\r\n {\r\n synchronized (monitor())\r\n {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the (optional) IDE Structure parameter. If none is set an instance is prepared with defaults for a bilevel image. | public IDEStructureParameter needIDEStructureParameter() {
if (this.ideStructureParameter == null) {
setIDEStructureParameter(new IDEStructureParameter());
}
return getIDEStructureParameter();
} | [
"public IDEStructureParameter getIDEStructureParameter() {\n return this.ideStructureParameter;\n }",
"public void setIDEStructureParameter(IDEStructureParameter parameter) {\n this.ideStructureParameter = parameter;\n }",
"public Parameter getParameter() {\n FlaggedOption result = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
EXTENSION method for finding hidden facets per class | public List<Resource> hiddenFacets(Set<?> forClasses) {
Vector<Resource> out = new Vector<Resource>();
if (this._facets.hasDefaultSet()) {
for (Iterator<Facet> fi = this._facets.getDefaultSet().hideIterator(); fi.hasNext(); ) {
out.add(fi.next().getIdentifier());
}
}
if (null != forClasses) {
for ... | [
"public Hashtable getFacets() {\n }",
"protected HashMap<Class<? extends TransformClassifier>, Boolean> getVisibleClassifiers() {\n if (visibleClassifiers == null) getClassifiers(); //Init visible classifiers\n return visibleClassifiers;\n }",
"public abstract Collection<FeedProvider> getVis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the the StoredProcedureInfo based on the fully qualified procedure name | IStoredProcedureInfo getStoredProcedureInfoForProcedure(String fullyQualifiedProcedureName) throws Exception; | [
"SqlProcedureEngine getProcedureEngine(String name);",
"public String getProcedureName()\n {\n return procedureName;\n }",
"io.dstore.values.StringValueOrBuilder getProcedureNameOrBuilder();",
"public String getProcedureName() {\r\n return procedureName;\r\n }",
"public String getProc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add the selected role to the user. | private void onAddRole() {
roleProxy.addRoleToUser(user, selectedRole);
} | [
"void addRoleToUser(int userID,int roleID);",
"public void addRole( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), ROLE, value);\r\n\t}",
"public void addRole(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), ROLE, value);\r\n\t}",
"void ad... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a number of the most recent challenges | public static List<Challenge> getMostRecentChallenges(int number) {
String sql = "select * " +
"from challenges ORDER BY challenge_id DESC LIMIT " + number + ";";
RawSql rawSql = RawSqlBuilder.unparsed(sql)
.columnMapping("challenge_id", "challengeId")
.columnMapping("challenger_username", "challengerUsern... | [
"public int getRecentCompares() {\n return this.recentCompares;\n }",
"long getNumberOfComparisons();",
"public int getNextIdeaNum() {\n int max = 0;\n String query = \"select max( ideaNumber ) from ideas\";\n DBQueryHandler dbQue = new DBQueryHandler();\n try {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Private method that maintains min/max values against new incoming amounts | private void setMinMax(double amt) {
min = (min > 0) && (min <= amt) ? min : amt;
max = amt >= max ? amt : max;
} | [
"public void updateMinMax( ) {\r\n if( (data == null) || (data.size() < 1) ) {\r\n min = 0.0;\r\n max = 0.0;\r\n return;\r\n }\r\n\r\n min = data.get( 0 );\r\n max = data.get( 0 );\r\n\r\n for( int i = 1; i < data.size(); i++ ) {\r\n if(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the String group ID tag for this recommendation. Recommendations in the same group are ranked by the Home Screen together, and the sort order within a group is respected. This can be useful if the application has different sources for recommendations, like "trending", "subscriptions", and "new music" categories fo... | public void setGroup(@Nullable String groupTag) {
mGroup = groupTag;
} | [
"public void setGroup(String groupID) {\n _groupID = nullIfEmpty(groupID);;\n }",
"public void setGroupID(int groupID) {\n this.groupID = groupID;\n }",
"public void setGROUP_ID(String GROUP_ID) {\r\n this.GROUP_ID = GROUP_ID == null ? null : GROUP_ID.trim();\r\n }",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "encounter" element | public void unsetEncounter()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(ENCOUNTER$24, 0);
}
} | [
"void unsetEncounter();",
"public org.mhealth.open.data.avro.SObservation.Builder clearEncounter() {\n encounter = null;\n fieldSetFlags()[3] = false;\n return this;\n }",
"public void unsetEmbl()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_or... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AUXILIARY METHODS identify all bids that have expired from the retrieved bid requests data and close down each of the expired bid | private ArrayList<BidRequest> closeDownExpiredBids(ArrayList<BidRequest> retrievedBidRequests) {
ArrayList<BidRequest> expiredBidRequests = new ArrayList<>();
// need to check for those bids that have already expired, but are still stored as ALIVE in ur system
// this situation is normal becaus... | [
"public synchronized void closeAuction(){\n \tstatus = \"closed\";\n\n \ttry{\n \t\tif(last_bidder == null){\n \t\t\towner.getMessage(\"\\n Your Auction Item: \"+ ID +\", \"+ item_name +\" has closed with no bids \\n\");\n \t\t}\n \t\telse{\n \t\t\towner.getMessage(\"\\n Your Auction Item: \"+ ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is this status code to be considered as an error? | boolean isError(int statusCode); | [
"public static boolean isStatusError(int code) {\n return code < STATUS_OK || code >= FIRST_ERROR_STATUS;\n }",
"protected abstract boolean isExpectedResponseCode(int httpStatus);",
"public boolean isApiError() {\n return this.getCode() != null && this.getCode() > 0;\n }",
"public boolean isServ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column student.stu_age | public void setStuAge(Integer stuAge) {
this.stuAge = stuAge;
} | [
"public void testSetAge() {\n System.out.println(\"setAge\");\n int age = 0;\n Student instance = null;\n instance.setAge(age);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public void s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Let Exp'. | <C, PM> LetExp<C, PM> createLetExp(); | [
"LetExp createLetExp();",
"LetExpression createLetExpression();",
"LetExpressionVariableDeclaration createLetExpressionVariableDeclaration();",
"LExp createLExp();",
"LetExpressionVariableDeclarationPart createLetExpressionVariableDeclarationPart();",
"public Let getLet(){\n return let;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns local backup Zip file name | @NonNull
public static String getBackupZipFileName() {
return ZipFileUtils.getZipFileName(LOCAL_BACKUP_DB_FILE_NAME);
} | [
"java.lang.String getBackupName();",
"public static String getZipFile() {\n File file = new File(getZipBaseDir(), System.currentTimeMillis() + \".zip\");\n try {\n boolean ignore = file.createNewFile();\n } catch (IOException ignore) {\n\n }\n return file.getAbsoluteP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A callback which returns a value of type T. TODO: remove this when we're on Java 8, in favor of java.util.function.Supplier. | public interface Supplier<T> {
T get();
} | [
"Supplier<Number> getSupplier();",
"private static <E> Value<E> of(Supplier<E> valueSupplier) {\n return new Value<>(valueSupplier.get());\n }",
"@JSFunctor\n @FunctionalInterface\n public interface FullfilledValueCallback<T extends Any, R extends Any> extends JSObject {\n\t\t/**\n\t\t *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enables the GPS provider if it is not enabled yet. | private void enableGPS() {
if (mGPSEnabled)
return;
LocationManager locationManager = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE);
if (locationManager != null) {
try {
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
locationManager.requestLocationUpdates(... | [
"public void turnGPSOn() {\n try {\n String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n\n if (!provider.contains(\"gps\")) { //if gps is disabled\n final Intent poke = new Intent();\n poke.setCla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method gets the Shape object in the model with the given name. | Shape getShape(String name); | [
"Shape getShape();",
"public Shape getShape() {\n if (model == null) {\n return null;\n }\n\n // check to see if we already made this one.\n Object retval = shapeCache.get(model);\n\n // if not, make it and store a copy in the cache..\n if (retval == null) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
manager.isAlive() is not called from synchronized context so we must check again to prevent the case where the manager has remmoved the element after the thread has verified manager.isAlive() | private boolean isStillAlive(WorldView world, Element element) {
return world.getManager().isAlive(element);
} | [
"private synchronized void performHouseKeeping() {\r\n\t\tSet<Map.Entry<Integer,QueueManager>> eS = queueManagers.entrySet();\r\n\t\tfor( Iterator<Map.Entry<Integer,QueueManager>> i = eS.iterator(); i.hasNext(); ) {\r\n\t\t\tMap.Entry<Integer,QueueManager> qMME = i.next();\r\n\t\t\tQueueManager qM = qMME.getValue()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an iterator over the points in this table. The points are returned in ascending order. This is a sparse iterator, that is, it iterates over all cells that the table contains whether or not there is a value in that cell or not. | public Iterator pointIterator() {
return new Iterator() {
private int min_x = getMinX();
private int min_y = getMinY();
private int max_x = getMaxX();
private int max_y = getMaxY();
private int x = min_x;
private int y... | [
"public Iterator valueIterator() {\n return new Iterator() {\n private int min_x = getMinX();\n private int min_y = getMinY();\n private int max_x = getMaxX();\n private int max_y = getMaxY();\n private int x = min_x;\n p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the num of connections. | public int getNumOfConnections() {
return numOfConnections;
} | [
"int getConnectionsCount();",
"public int nConnections() {\n\t\treturn _connections.size();\n\t}",
"public int getCountOpenConnections() { return connectionCount.get(); }",
"public int getTotalConnections();",
"public int getNumConnects() {\n\t\treturn numConnects;\n\t}",
"public static int getConnectionC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Guarantee Statement'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseGuaranteeStatement(GuaranteeStatement object) {
return null;
} | [
"AGCLGuarantee getGuarantee();",
"public T caseMedicationStatement(MedicationStatement object) {\n\t\treturn null;\n\t}",
"public T casePrecondition(Precondition object)\n {\n return null;\n }",
"public T caseLemmaStatement(LemmaStatement object) {\n\t\treturn null;\n\t}",
"public T caseAgreement(Agree... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse virtual path which is in format /groupId/projectId/datasetId/directory into the 4 component values | FilePathInfo parseVirtualPath(String path); | [
"String createVirtualPath(Long groupId, Long projectId, Long datasetId, String directory);",
"private void parseUrlsPaths(String localPath) {\n String[] pathArray = localPath.split(\"/\");\n // Geometry_305_v6_fb_coupe_frontlightbulb1_a001.b3d.dflr\n this.fileName = pathArray[path... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An optional interface for plugins. If a plugin implements this interface then it can receive the reminaing attributes and directives given in its clause as well as the reporter to use. | public interface Plugin {
/**
* Give the plugin the remaining properties.
*
* When a plugin is declared, the clause can contain extra properties.
* All the properties and directives are given to the plugin to use.
*
* @param map attributes and directives for this plugin's clause
... | [
"public interface AnalysisPluginInterface {\n\n\t/**\n\t * The framework will call this method to get the title of this analysis\n\t * plugin.\n\t * \n\t * @return The title.\n\t */\n\tString getTitle();\n\n\t/**\n\t * The framework will call this method to get the description of this\n\t * analysis plugin.\n\t * \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Processes the input stream against a rule set using the given input encoding. | public void processFile(InputStream fileContents, String encoding, RuleSets ruleSets, RuleContext ctx)
throws PMDException {
try {
processFile(new InputStreamReader(fileContents, encoding), ruleSets, ctx);
} catch (UnsupportedEncodingException uee) {
throw new PMDException("Unsupported encoding ex... | [
"public void parse(InputStream in, String charset) throws IOException,SAXException,UnsupportedEncodingException {\n\t\tWritableLineReader reader = new WritableLineReader(in, charset);\n\t\tthis.parse(reader);\n\t}",
"public void processFile(InputStream fileContents, String encoding, RuleSet ruleSet, RuleContext c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a shader program from more shaders | private static int createProgram(int[] shaderIds){
int shaderProgramId = glCreateProgram();
for(int shader: shaderIds){
if(shader != -1){
glAttachShader(shaderProgramId, shader);
}
}
glLinkProgram(shaderProgramId);
int[] linkResult = {0};... | [
"void create(Shader shader);",
"ShaderProgram(String vertPath, String fragPath){\n programID = glCreateProgram();\n String vertSource = \"attribute vec3 vertexPosition;\\n\" +\n \"void main(){\\n\" +\n \" gl_Position = gl_ModelViewProjectionMatrix * vec4(vertexPositi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "state" element | public void unsetState()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(STATE$16, 0);
}
} | [
"void unsetState();",
"public void clearState();",
"public void unsetState()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(STATE$14);\r\n }\r\n }",
"public void unsetState()\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs maintenance on a virtual machine in a VM scale set. | @ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginPerformMaintenance(
String resourceGroupName, String vmScaleSetName, String instanceId, Context context); | [
"@ServiceMethod(returns = ReturnType.SINGLE)\n void performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId);",
"@ServiceMethod(returns = ReturnType.SINGLE)\n void performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId, Context context);",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .alluxio.proto.journal.CompletePartitionEntry complete_partition = 21; | public alluxio.proto.journal.KeyValue.CompletePartitionEntryOrBuilder getCompletePartitionOrBuilder() {
return completePartition_;
} | [
"alluxio.proto.journal.KeyValue.CompletePartitionEntryOrBuilder getCompletePartitionOrBuilder();",
"alluxio.proto.journal.KeyValue.CompletePartitionEntry getCompletePartition();",
"public alluxio.proto.journal.KeyValue.CompletePartitionEntryOrBuilder getCompletePartitionOrBuilder() {\n if (completePartit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the primary key of this configuracion perfilador. | public void setPrimaryKey(long primaryKey) {
_configuracionPerfilador.setPrimaryKey(primaryKey);
} | [
"@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_workFlowConfig.setPrimaryKey(primaryKey);\n\t}",
"public void setPrimaryKey(long primaryKey) {\n\t\t_settings.setPrimaryKey(primaryKey);\n\t}",
"@Override\n\tpublic void setPrimaryKey(java.lang.String primaryKey) {\n\t\t_bancheAppoggio.setPrimaryK... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the resource locator that will be used to fetch messages for this validator's diagnostics. | @Override
public ResourceLocator getResourceLocator() {
// TODO
// Specialize this to return a resource locator for messages specific to this validator.
// Ensure that you remove @generated or mark it @generated NOT
return super.getResourceLocator();
} | [
"@Override\n\tpublic ResourceLocator getResourceLocator() {\n\t\t// TODO\n\t\t// Specialize this to return a resource locator for messages specific to this validator.\n\t\t// Ensure that you remove @generated or mark it @generated NOT\n\t\treturn super.getResourceLocator();\n\t}",
"public ResourceLocator getResou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Access method for legacyResident. | public String getLegacyResident() {
return legacyResident;
} | [
"public void setLegacyResident(String aLegacyResident) {\n legacyResident = aLegacyResident;\n }",
"public String getLegacyId() {\n return this.legacy_id;\n }",
"public String getLegacyResident1995() {\n return legacyResident1995;\n }",
"public String getResident() {\n return re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method deletes ebay item from specific search | public void deleteItemFromSearch(EbayItem item, Search search) {
searchRepository.deleteItemFromSearch(item.getId(), search.getId());
} | [
"public void deleteItemFromSearchAll(EbayItem item) {\r\n\t\tUser user = userService.getLoggedUser();\r\n\t\tsearchRepository.deleteItemFromSearchAll(item.getId(), user.getId());\r\n\t}",
"public void deleteItemFromSearchBySeller(EbaySeller seller, Search search) {\r\n\t\t//todo test\r\n\t\tsearchRepository.delet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the ratio for a given sequence within the supplied cluster. In case the sequence is not found in the cluster 0 is returned. | private float getSequenceRatio(String sequence, ICluster cluster) {
for (SequenceCount sequenceCount : cluster.getSequenceCounts()) {
if (sequenceCount.getSequence().equals(sequence)) {
return (float) sequenceCount.getCount() / (float) cluster.getSpecCount();
}
}
... | [
"private int calculatePsmAssessment(float ratio, int clusterSize) {\n if (ratio < minSequenceRatio)\n return 1;\n\n if (clusterSize < minClusterSize)\n return 2;\n\n return 3;\n }",
"public double calculateRatio() {\n \tdouble ratioCalc = new Double(0);\n \tif(t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update views with new task | private void updateViews() {
List<Task> list = null;
DBHelper db = new DBHelper();
try {
list = db.getTaskList(this, Task.COLUMN_ID, taskID);
} catch (SQLException e) {
// TODO Auto-generated catch block
Log.e("Could not get Single Task", "Bam", e);
}
task = list.get(0);
int prioPos = 0;
fo... | [
"public void updateTask(Task task);",
"void showTodoViewToEdit(Task task);",
"public void updateTask(View view) {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String path;\n String updatedRoom = roomSpinner.getSelectedItem().toString();\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by Elf on 30.04.2016. Interface for items refresh | public interface Refreshable {
void refreshItem(int position);
} | [
"public abstract void refreshItem();",
"abstract protected T refreshItem(String itemPath);",
"private void refreshItem() {\n\t\tboundSwagForm.getField(\"isFetchOnly\").setValue(true);\r\n\t\tboundSwagForm.saveData(new DSCallback() {\r\n\t\t\t//reselect selected tile (call to saveData de-selects it)\r\n\t\t\tpub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns all the unique elements (of a given field) in an array of records | public static String[] uniqueElements(int field, Record[] r){
Stack<String> unique = new Stack<String>(); //stack which will hold the elements
Record[] copy = r; //input array is copied
Record.heapSort(r, field); //array is then sorted according to field argument
for(int i... | [
"List getUniqueFieldValues(String recordField)\r\n throws Exception;",
"private List<String> rmDupInfo(List<String> fields) {\n Set<String> seen = new HashSet<>();\n List<String> uniqueNonEmptyFields = new ArrayList<>();\n for (String i : fields) {\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an array containing the elements in the given set. | public int [] getElements(int setNum); | [
"private int[] getArray(Set<Integer> set) {\n int n = set.size();\n int[] array = new int[n];\n\n Iterator<Integer> iterator = set.iterator();\n int i = 0;\n while (iterator.hasNext()) {\n array[i] = iterator.next();\n i++;\n }\n return array;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return the dot product between the 10 and 0 vectors | public double dot_0_10() {
return x_10 * x_0 + y_10 * y_0;
} | [
"public double dot(Vector v);",
"public double dotProduct(Coordinates vectorA, Coordinates vectorB);",
"public double dot(Vec vthat);",
"private static Double dot(Vector<Double> first, Vector<Double> second){\n Double result = 0.0;\n for (int i=0; i< first.size(); i++){\n result += fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
takes any compressed array and scans the first portion to get the pattern and then creates a new array adding the pattern wherever a 1 is found but then copying the rest. | public int[] decompressArray(int[] row){
int i=0;
int sCount=0;
while(row[i]!= -1){
sCount++;
i++;
}
int[] pattern = new int[sCount];
for(int j=0; j<pattern.length; j++){
pattern[j] = row[j];
}
i++;
... | [
"public int[] compressArray(int[] row, int[] pattern, int reduction){\r\n\r\n int[] temp = new int[row.length-reduction];\r\n\r\n for(int i=0; i<pattern.length; i++) {\r\n temp[i] = pattern[i];\r\n }\r\n\r\n temp[pattern.length] = -1;\r\n\r\n int i=0;\r\n int n=p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .WordRequestType type = 1; | public Builder setType(com.satoshilabs.trezor.lib.protobuf.TrezorType.WordRequestType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value.getNumber();
onChanged();
return this;
} | [
"com.satoshilabs.trezor.lib.protobuf.TrezorType.WordRequestType getType();",
"public com.satoshilabs.trezor.lib.protobuf.TrezorType.WordRequestType getType() {\n\t\t\tcom.satoshilabs.trezor.lib.protobuf.TrezorType.WordRequestType result = com.satoshilabs.trezor.lib.protobuf.TrezorType.WordRequestType.valueOf(type... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PeukerDouglas Creates an indicator grid (1,0) of upward curved grid cells according to the Peuker and Douglas algorithm. | public static ExecResult PeukerDouglas(@NotBlank String Input_Elevation_Grid, Double Center_Smoothing_Weight,
Double Side_Smoothing_Weight, Double Diagonal_Smoothing_Weight,
String Output_Stream_Source_Grid, String inputDir, String ou... | [
"private static int pluses(String [] grid)\n {\n //New grid without numbers.\n String [] newGrid = Arrays.copyOfRange(grid, 2, grid.length);\n \n int height = Integer.parseInt(grid[0]);\n int width = Integer.parseInt(grid[1]);\n\n\n char [] [] newCharGrid = new cha... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method adds payment into DB and connect user with periodicals and periodicals with payment | @Override
public int create(Payment entity) {
try(PreparedStatement ps = connection.prepareStatement(Requests.INSERT_PAYMENT, Statement.RETURN_GENERATED_KEYS);
PreparedStatement psPayPeriodical = connection.prepareStatement(Requests.INSERT_PERIODICAL_PAYMENT);
PreparedStatement psUse... | [
"public void createNewPayment() {\n// Prepare parameters\n String[] params = {this.isPaid.toString(), this.paymentMethod, Double.toString(this.totalPrice)};\n\n\n// SQL string query\n String query = \"INSERT INTO payment (isPaid, payment_method, total_price) VALUES (?, ?, ?);\";\n\n// ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field947' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField947(java.lang.CharSequence value) {
validate(fields()[947], value);
this.field947 = value;
fieldSetFlags()[947] = true;
return this;
} | [
"public void setField947(java.lang.CharSequence value) {\n this.field947 = value;\n }",
"public void setField945(java.lang.CharSequence value) {\n this.field945 = value;\n }",
"public void setField946(java.lang.CharSequence value) {\n this.field946 = value;\n }",
"public void setField687(java.lang... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.protocol.CdmaStationInfo cdma = 2; | public protocol.Message.CdmaStationInfo getCdma() {
if (cdmaBuilder_ == null) {
return cdma_ == null ? protocol.Message.CdmaStationInfo.getDefaultInstance() : cdma_;
} else {
return cdmaBuilder_.getMessage();
}
} | [
"protocol.Message.CdmaStationInfo getCdma();",
"protocol.Message.CdmaStationInfoOrBuilder getCdmaOrBuilder();",
"public protocol.Message.CdmaStationInfoOrBuilder getCdmaOrBuilder() {\n return getCdma();\n }",
"public protocol.Message.CdmaStationInfo getCdma() {\n return cdma_ == null ? protocol.M... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Added for BUG 17910026 Get unique identifier using Search request. Added this method to fix the Unique ID issue | public String getUniqueIdentifier(String logonname) {
String retUid = null;
try {
SearchRequest searchReq = new SearchRequest();
searchReq.setSearchBase(SAPUSER);
// specify the attributes to return
searchReq.addAttribute("id");
// specify the filter
FilterTerm ft = new FilterTerm();
ft.setOpe... | [
"private final String generateSearchId() {\n return UUID.randomUUID().toString().replace(\"-\", \"\").substring(0,8);\n }",
"public String getIdentifier(){\n return searchId == null ? null : Long.toString(searchId);\n }",
"int getSearchId();",
"public String getUniqueIdentifier(){\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method calculates the distances between all stations from the input ArrayLists, and returns them as a double matrix. Element at position (i,j) in the output matrix corresponds to the distance between departureStation index i and arrivalStation index j. | public double[][] distancesUsedStation(ArrayList<Station> departureStations, ArrayList<Station> arrivalStations) {
double[][] distancesMatrix = new double[departureStations.size()][arrivalStations.size()];
for (int i = 0; i < departureStations.size(); i++) {
for (int j = 0; j < arrivalStations.size(); j++) {
... | [
"public double[] distanceToArrival(ArrayList<Station> arrivalStations) {\n\t\tdouble[] distances = new double[arrivalStations.size()];\n\t\tfor (int i = 0; i < arrivalStations.size(); i++) {\n\t\t\tdistances[i] = this.arrival.distanceTo(arrivalStations.get(i).getLocation()) ;\n\t\t}\n\t\treturn distances;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all rows from the T_POLICY_BASE table that match the criteria 'MPNAME = :mpname'. | @Transactional
public List<TPolicyBase> findWhereMpnameEquals(String mpname) throws TPolicyBaseDaoException
{
try {
return jdbcTemplate.query("SELECT MPID, PTVID, MPNAME, CATEGORY, DESCRIPTION FROM " + getTableName() + " WHERE MPNAME = ? ORDER BY MPNAME", this,mpname);
}
catch (Exception e) {
throw new TP... | [
"@Transactional\n\tpublic List<TPolicyBase> findWhereMpidEquals(long mpid) throws TPolicyBaseDaoException\n\t{\n\t\ttry {\n\t\t\treturn jdbcTemplate.query(\"SELECT MPID, PTVID, MPNAME, CATEGORY, DESCRIPTION FROM \" + getTableName() + \" WHERE MPID = ? ORDER BY MPID\", this,mpid);\n\t\t}\n\t\tcatch (Exception e) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add takes O(1) time, find() takes O(n) time Add the number to an internal data structure. | public void add(int number) {
//map.put(number, map.getOrDefault(number, 0) + 1);
if (map.containsKey(number)) {
map.put(number, map.get(number) + 1);
} else {
map.put(number, 1);
}
} | [
"public void add(int number) {\n if(map.containsKey(number)) map.put(number, map.get(number) + 1);\n else {\n map.put(number, 1);\n list.add(number);\n }\n }",
"private void addMoney(int hashValue, int num) {\n Integer numberOfMoney = regist... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Valid mount IDs must comply with the hostname restrictions. That is, they must only contain az, AZ, 09 and '.' or ''. They must not start with a number, dot or a hyphen and must not end with a dot or hyphen. | public static boolean isValidMountID(final String id) {
if (id == null || id.isEmpty()) {
return false;
}
if (id.startsWith("knime.") || !MOUNTID_PATTERN.matcher(id).find()) { //$NON-NLS-1$
return false;
}
try {
// this is the way we build URIs... | [
"private boolean hostnameIsValid( String hostname ){\n\t\treturn Pattern.matches(\"[-.0-9a-zA-Z]+\", hostname);\n\t}",
"public void \n validateHostIDs() \n throws IllegalConfigException\n {\n TreeMap<String,BigInteger> hostIDs = getHostIDs();\n if(hostIDs == null) \n throw new IllegalConfigExcepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check user already logged in your application using twitter Login flag is fetched from Shared Preferences | private boolean isTwitterLoggedInAlready() {
// return twitter login status from Shared Preferences
return mSharedPreferences.getBoolean(PREF_KEY_TWITTER_LOGIN, false);
} | [
"@Override\n public boolean isTwitterLoggedInAlready() {\n // return twitter login status from Shared Preferences\n return mSharedPreferences.getBoolean(PREF_KEY_TWITTER_LOGIN, false);\n }",
"private void loginToTwitter() {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPol... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return offer by student from the offer repository | @Transactional
public Offer getOfferByStudentAndIsActive(Student student) {
Offer offer = offerRepository.findOfferByStudentAndIsActiveTrue(student);
if (offer == null) {
throw new NullPointerException(
"Error: Student " + student.getStudentId() + " does not have an active offer!");
}
return offer;
} | [
"@Transactional\n\tpublic List<Offer> getOfferByStudent(Student student) {\n\t\tList<Offer> offer = offerRepository.findOfferByStudent(student);\n\t\tif (offer == null) {\n\t\t\tthrow new NullPointerException(\n\t\t\t\t\t\"Error: Student \" + student.getStudentId() + \" does not have an offer!\");\n\t\t}\n\t\tretu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the status by user name of this person. | @Override
public void setStatusByUserName(java.lang.String statusByUserName) {
_person.setStatusByUserName(statusByUserName);
} | [
"@Override\n\tpublic void setStatusByUserName(String statusByUserName);",
"void setStatus(final UserStatus status);",
"@Override\n\tpublic void setStatusByUserName(java.lang.String statusByUserName) {\n\t\t_pathologyData.setStatusByUserName(statusByUserName);\n\t}",
"public void setUserStatus(java.lang.String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
requestInfo GET /index.jsp?query=dfdfdf HTTP/1.1 Accept: image/gif, image/xxbitmap, image/jpeg, image/pjpeg, application/xshockwaveflash, application/QVOD, application/QVOD, AcceptLanguage: zhcn AcceptEncoding: gzip, deflate UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CIBA; TheWorld) Host: localh... | public static String handle(Request req) {
ServletRequest request = new ServletRequest();
// String url = req.getUrl();
// String[] strs = url.split("\\?");
// request.setUri(strs[0]);
// if(strs.length > 1){
// request.setQueryString(strs[1]);
// }
StringBuilder sb = new StringBuilder();
sb.appe... | [
"HttpGet getRequest(HttpServletRequest request, String address) throws IOException;",
"public void processRequest(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n String url = req.getParameter(Constants.ORIGURL);\n log.info(String.format(\"Processing Shorten... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method isValidRecord Gets the errorcode for the latitude instance variable | public int getLatitudeError() {
return latitudeError;
} | [
"public static int validate(double latitude, double longitude) {\n if (Numbers.isReal(latitude) && Numbers.isReal(longitude)) {\n final double latitude_abs = Math.abs(latitude);\n final double longitude_abs = Math.abs(longitude);\n if (latitude_abs < 0.1 && longitude_abs < 0.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'field165' field has been set | public boolean hasField165() {
return fieldSetFlags()[165];
} | [
"public boolean hasField145() {\n return fieldSetFlags()[145];\n }",
"public boolean hasField158() {\n return fieldSetFlags()[158];\n }",
"public boolean hasField146() {\n return fieldSetFlags()[146];\n }",
"public boolean hasField943() {\n return fieldSetFlags()[943];\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for the "FeatureInstalled5" variable. | public void setFeatureInstalled5(String x) throws SnmpStatusException; | [
"public void setFeatureInstalled6(String x) throws SnmpStatusException;",
"public void setFeatureInstalled7(String x) throws SnmpStatusException;",
"public void setFeatureInstalled4(String x) throws SnmpStatusException;",
"public void setFeatureInstalled1(String x) throws SnmpStatusException;",
"public void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an ordered range of all the products where userId = &63; and status = &63;. Useful when paginating results. Returns a maximum of end start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtilALL_... | public java.util.List<Product> findByU_S(
long userId, int status, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator<Product>
orderByComparator); | [
"public java.util.List<Product> findByG_U_S(\n\t\tlong groupId, long userId, int status, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Product>\n\t\t\torderByComparator);",
"public java.util.List<Product> filterFindByG_U_S(\n\t\tlong groupId, long userId, int status, int start, int end... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SHIP FUNCTIONS get all the ships in the system | public List<Ship> getAllShips() {return allShips; } | [
"public AbstractShip[] getShips() {\n return ships;\n }",
"public Ship[] getShips() {\n return ships;\n }",
"private List<SpaceShips> getSpaceShips() {\n API api = new API();\n\n List<SpaceShips> totalSpaceShips = new ArrayList<SpaceShips>();\n Gson gson = new Gson();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to set whether to move a node when its export name moves. | public static void setMoveNodeWithExport(boolean on) { cacheMoveNodeWithExport.setBoolean(on); } | [
"public static boolean isMoveNodeWithExport() { return cacheMoveNodeWithExport.getBoolean(); }",
"public abstract boolean isMove(E node);",
"abstract protected void moveNode (DefaultMutableTreeNode node, DefaultMutableTreeNode destination);",
"public void setMoved(boolean b)\r\n {\r\n moved = b;\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the logout action for the catalog is "Go to URL", this will return the URL provided. If the logout action for the catalog is "Go to Template", this will return the Id (instanceId) of the template. | public String getLogoutDestination() {return entry.getEntryFieldValue(FIELD_LOGOUT_DESTINATION);} | [
"public String getDefaultLogoutUrl() {\n // If the default logout url has not been calculated yet\n if (defaultLogoutUrl == null) {\n // If the catalog has a URL default logout destination\n if (\"Go to URL\".equals(getLogoutAction())) {\n // Redirect to the defaul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets image link of the food item Preconditions: None Postconditions: The FoodItemData object will be updated to have the supplied image link | @Override
public void setImageLink(String imageLink) {
this.imageLink = imageLink;
} | [
"public maestro.payloads.FlyerFeaturedItem.Builder setItemImageUrl(CharSequence value) {\n validate(fields()[8], value);\n this.item_image_url = value;\n fieldSetFlags()[8] = true;\n return this;\n }",
"public void setItemImageUrl(CharSequence value) {\n this.item_image_url = value;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lists the paths of the children of an instance. | @GET
@Path( "/all-children" + OPTIONAL_INSTANCE_PATH )
@Produces( MediaType.APPLICATION_JSON )
List<Instance> listAllChildrenInstances( @PathParam("name") String applicationName, @PathParam("instancePath") String instancePath ); | [
"@GET\n\t@Path( \"/children\" + OPTIONAL_INSTANCE_PATH )\n\t@Produces( MediaType.APPLICATION_JSON )\n\tList<Instance> listChildrenInstances( @PathParam(\"name\") String applicationName, @PathParam(\"instancePath\") String instancePath );",
"public List getChildren() {\n\t\tLinkedList childrenPaths = new LinkedLis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the period in which this course finishes. (For 1 period courses, this will be the same period as the starting period, for 2 period courses it will be starting period + 1 and so on...) | public int getFinishingPeriod() {
return this.period + this.getAmountOfPeriods() - 1;
} | [
"long getPeriod();",
"public int getGoalendPeriod() {\r\n return goalendPeriod;\r\n }",
"long getStepPeriod();",
"public TsPeriod getEnd() {\r\n return new TsPeriod(m_freq, m_beg + m_c);\r\n }",
"public int getHowManyInPeriod();",
"int getRunPeriod();",
"public long period() throws T... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |