query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Get the certificate information. This operation can be used to get the information about a certificate. | public ApiResponse<CertificateInfoDTO> apisApiIdClientCertificatesAliasGetWithHttpInfo(String alias, String apiId) throws ApiException {
com.squareup.okhttp.Call call = apisApiIdClientCertificatesAliasGetValidateBeforeCall(alias, apiId, null, null);
Type localVarReturnType = new TypeToken<CertificateInf... | [
"@ServiceMethod(returns = ReturnType.SINGLE)\n public CertificateInner get(String resourceGroupName, String accountName, String certificateName) {\n return getWithResponse(resourceGroupName, accountName, certificateName, Context.NONE).getValue();\n }",
"public X509Certificate getCertificate()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inserta un Map de CensoPlantaciones dentro de la base de datos | public void InsertAll(Socio unSocio, Map unMap){
Iterator it = unMap.values().iterator();
while (it.hasNext()){
this.Insert(unSocio,(CensoPlantacion)it.next());
}
} | [
"void insertParametrosActividadMensaje(Map map);",
"public void insertAtencionesMasivasConsultoraVenta(Map criteria);",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This code prints the sequence from the given number to 10 without using loops if (n > 10) break; | public String recursive1To10(int number, int index){
arr[index] = number;
//recursive calls itself until it reaches 10
if (number < 10){
recursive1To10(number+1, index+1);
}
else{
System.out.println(Arrays.toString(arr));
}
return Arrays.to... | [
"public void printN(int n) {\n\t if (n<=10)\n\t\t System.out.println(n);\n\t printN(n+1);\n }",
"static void numbers(){\n int count=1;\n while(count<=10) {\n System.out.println(count);\n count = count + 1;\n }\n }",
"@SuppressWarnings(\"unused\")\n publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | private CPSbreak getresult(CPSbreak cp, String diffselected, String smaselected, String ppselected, String s1selected,
String s2selected, String s3selected, String s4selected, String r1selected, String r2selected,
String r3selected, String r4selected) {
if (smaselected.equals("true") && cp.isBreak... | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a matrix to base (identity) values. The matrix is set as follows: [1][0][0] [0][1][0] [0][0][1] | public static void setIdentityMatrix( double matrix[] ) {
for( int i=0; i<MATRIX_SIZE; i++ )
matrix[i] = ( 0 != (i & 3) ? 0D : 1D );
} | [
"public void initIdentity()\r\n {\r\n matrix[0] [0] = 1; matrix[0] [1] = 0; matrix[0] [2] = 0; matrix[0] [3] = 0;\r\n matrix[1] [0] = 0; matrix[1] [1] = 1; matrix[1] [2] = 0; matrix[1] [3] = 0;\r\n matrix[2] [0] = 0; matrix[2] [1] = 0; matrix[2] [2] = 1; matrix[2] [3] = 0;\r\n matrix[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets true if the column is primary key | public void setPrimaryKey(boolean isPrimaryKey) {
this.isPrimaryKey = isPrimaryKey;
} | [
"boolean isPrimaryKeyColumn();",
"public void setAsPrimaryKey()\n {\n unique = true;\n notNull = true;\n if(hasDefault) {\n throw new IllegalArgumentException(\"A primary key column cannot have a default value\");\n }\n }",
"public boolean isPrimaryKey() {\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by yuri_ on 02/03/2018. | public interface MainPresenter {
void onCreate();
void changeToOnlineStatus();
void changeToOfflineStatus();
void onDestroy();
void onEventMainThread(MainEvent event);
void startWaitingTravel();
void stopWaitingTravel();
void startInTravelStatus();
void uploadCompletedTravelStatus(... | [
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n public int utilite() {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.img_registerBack:
AppManager.getAppManager().finishActivity(WorkHistoryActivity.this);
break;
default:
break;
}
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getFullDuplex This method sets the NetworkPort.fullDuplex property value. This property is described as follows: Boolean that indicates that the port is operating in full duplex mode. | public void setFullDuplex(boolean fullDuplex) {
this.fullDuplex = fullDuplex;
} | [
"public int getDuplex() {\n return duplex_;\n }",
"public void setCheckDuplex(java.lang.Boolean checkDuplex) {\r\n this.checkDuplex = checkDuplex;\r\n }",
"public boolean hasDuplex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public String getDuplex() {\n/* 541 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
member function to calculate cube root | public double Cuberoot(double arg1){
return Math.cbrt(arg1);
} | [
"@Test\n\tpublic void TestSqureRoot()\n\t{\n\t\tUtility util=new Utility();\n\t\t\n\t\tdouble result=util.SqurerootNewtonMethod(4);\n\t\tassertEquals(2, result,1);\n\t\t\n\t\t result=util.SqurerootNewtonMethod(36);\n\t\tassertEquals(6, result,1);\n\t\t\n\t\tresult=util.SqurerootNewtonMethod(5);\n\t\tassertEquals(2.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Bad Testability because of AuthState.jsonDeserialize (uses URI.parse internally) | private AuthState readAuthState() {
SharedPreferences authPreferences = authHandlerActivity.getAuthPreferences();
String stateString = authPreferences.getString(ApplicationConfig.getAuthStateSharedPreferencesKey(), null);
if (stateString != null) {
try {
return AuthSt... | [
"@Override\n public AssetURI unmarshal(String uri) throws Exception {\n AssetURI assetURI = new AssetURI(uri);\n if (uri != null) {\n String moduleName = assetURI.getModuleName();\n String rawPath = assetURI.getRawPath();\n assetURI = new AssetURI(moduleName, r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves transparent image of specified dimension. | public static BufferedImage getBlankImage(int width, int height) {
GraphicsEnvironment e = GraphicsEnvironment
.getLocalGraphicsEnvironment();
GraphicsDevice d = e.getDefaultScreenDevice();
GraphicsConfiguration c = d.getDefaultConfiguration();
BufferedImage compatibleImage = c.createCompatibleImage(wi... | [
"public static Image getTransparent() {\n final WritableImage writeableImage = new WritableImage(1, 1);\n final PixelWriter pixelWriter = writeableImage.getPixelWriter();\n\n final Color transparentColor = new Color(0, 0, 0, 0);\n pixelWriter.setColor(0, 0, transparentColor);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the tutorial object which contains getters and setters to determine if tutorial events are completed. | public Tutorial getTutorial() {
return tutorial;
} | [
"public boolean tutorialWasPlayed()\n\t{\n\t\treturn tutorialPlayed;\n\t}",
"public List<Tutorial> getTutorials() {\n return tutorials;\n }",
"public boolean hasTutorialDone(OfflinePlayer p) { return cfg.getBoolean(p.getUniqueId().toString() + \".tutorial\"); }",
"public int getTutorialIndex()\n\t{\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays the ENTER_LOYALTY_ID screen. | public void arrive(BusIfc bus) {
/*
* no parameter check is required here. we already checked with the
* paramter. This should always show if we have not captured the
* loyalty/email at the start or startandend.
*/
POSUIManagerIfc ui;
ui = (POSUIManagerIfc) bus.getManager(UIManagerIfc.TYPE)... | [
"public void display() \n\t{ \n\t\tSystem.out.println(\"Name: \"+name+ \" \" +\"Id = \"+id+ \" \" +\"Company Name:\"+ \" \" +companyName); \n\t}",
"public void displayEmployeeMenu()\r\n\t{\r\n\t\t/* ask the user to select one of the following options\r\n\t\t * by typing a corresponding number to the option they\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void run() {
xAccel.setText("Accel X: " + mAccelData[0]);
yAccel.setText("Accel Y: " + mAccelData[1]);
zAccel.setText("Accel Z: " + mAccelData[2]);
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Basic compare method. If another comparison criteria are needed, define own comparator. Default Compare priority: testno talking mote reporting mote txpower distance mid | public int compareTo(RSSI2DistInternalBuffer other) {
final int BEFORE = -1;
final int EQUAL = 0;
final int AFTER = 1;
if (other == null) return -1;
if (getClass() != other.getClass()) return -1;
//this optimization is usually worthwhile, and can
//always be add... | [
"@Override\r\n\t\t\tpublic int compare(Term t1, Term t2) {\n\t\t\t\treturn new Double(t2.score).compareTo(new Double(t1.score));\t\t\t\t\t \r\n\t\t\t}",
"@Test public void compare() {\n Outfielder test1 = new Outfielder(\"34\", \"Bo Jackson\", \n \"RF\", 1.5, .450, .9);\n Outfielder test2 = new ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves an object for enumerating the element declarations. | public final Enumeration elementDeclarations()
{
return elementdecls == null ? EnumWrapper.emptyEnumeration : elementdecls.elements();
} | [
"public synchronized Enumeration elements() {\n return getEnumeration(VALUES);\n }",
"private Iterator getElementNames() {\r\n if (isEmpty()) {\r\n return EmptyIterator.getInstance();\r\n } else {\r\n return getElementNameList().iterator();\r\n }\r\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts the thread for adding enemies. | @Override
public void run() {
for (int enemyType = numEnemyWave.length; enemyType > 0; enemyType--) {
for (int j = 0; j < numEnemyWave[enemyType - 1]; j++) {
// Only allow one thread to access the enemies list
synchronized (this) {
... | [
"public void spawnEnemy()\n {\n enemy = new Enemy(wall); // instantiate enemy object\n enemies.add(enemy);\n System.out.println(\"----Enemy Spawned----\");\n System.out.println(\"Number of enemies: \" + enemies.size());\n lastSpawnTime = TimeUtils.nanoTime();\n }",
"privat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public int updateStatus(String status, Long call_id) {
return repository.updateStatus(status, call_id);
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
google authenticator verified or not | public void setIsGoogleAuthenticatorVerified(Boolean isGoogleAuthenticatorVerified) {
this.isGoogleAuthenticatorVerified = isGoogleAuthenticatorVerified;
} | [
"void authenticateGoogleUser(AuthCredential googleAuthCredential) {\n authenticateGoogleUserLiveData = authRepository.firebaseSignInWithGoogle(googleAuthCredential);\n }",
"boolean isAuthRequired();",
"boolean hasAuthProto();",
"public static boolean IsAtGoogleLogin() \n\t{\n\n\t\tif(Driver.Instance... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the data format by its name. If the name does not exist, then it does not add it. | public void setDataFormat(String dataFormatName)
{
String dataFormat = DATA_FORMAT.valueOf(dataFormatName.toLowerCase()).name();
if(!dataFormat.isEmpty()){
additionalProperties.put("format", dataFormat);
}
} | [
"public void setFormatData(String formatData) {\n this.formatData = formatData;\n }",
"public void setNameformat(java.lang.String nameformat) {\r\n this.nameformat = nameformat;\r\n }",
"public void setFormat(java.lang.String param){\r\n \r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if list is non empty, cursor in front of element | void moveFront(){
if(length > 0){
cursor = front;
index = 0;
}
} | [
"void moveFront() {\n if ( !(length()>0) ) { throw new RuntimeException(\"List Error: moveFront() called on empty List\"); }\n if(length() > 0) {\n cursor = front;\n index = 0;\n }\n }",
"void moveFront(){\n if (this.isEmpty()){\n throw new RuntimeException(\"List Error: moveFront() ca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
order by line numbers | public static Map<String, LineGroup> arrange(LineGroup... groups) {
Arrays.sort(groups, (o1, o2) -> o2.getLines().size() - o1.getLines().size());
// check whether there are original groups that are fully included
for(int i = 0; i < groups.length - 1; ++i) {
LineGroup bigGroup = grou... | [
"public void sortContent() {\n\t\tArrayList<String> allLines = storeInArrayList();\n\t\tCollections.sort(allLines);\n\t\tclearLines();\n\t\tfor (String line: allLines) {\n\t\t\taddLine(line);\n\t\t}\n\t}",
"@Override\r\n\tpublic ISubProcess getLineSorter() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(Pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test configured client with no password | @Test(expected = MojoExecutionException.class)
public void noPassword() throws Exception {
TestMojo mojo = new TestMojo();
mojo.createClient(null, null, "b", null, null, null, null);
} | [
"@Test\n public void testLogin() {\n System.out.println(\"login\");\n Client c = new Client();\n c.connect(\"0676\");\n c.login(\"123456\", \"1234\");\n }",
"@Test\n public void testDontTryToAuthenticateEndlessly() throws Exception {\n int port = this.localServer.getSer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for Row. The row of the cell. Always an integer between 0 and 4, inclusive. | @JsonGetter("row")
public Integer getRow() {
return this.row;
} | [
"@ApiModelProperty(value = \"The row of the cell. Always an integer between 0 and 4, inclusive.\")\n public Integer getRow() {\n return row;\n }",
"public final int getRow() {\r\n return row;\r\n }",
"public int getRow() {\n return (row);\n }",
"public int getRow()\n {\n return ro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string title = 7; | private void setTitle(
String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
} | [
"public static String getTitle(){return title;}",
"public void setTitle(String title)\r\n {\r\n this.title=title;\r\n }",
"public String getTitle() { return _title; }",
"default String title() { return \"\"; }",
"public java.lang.String getTitle( ) ;",
"public void setTitle(String value)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column t_order.region_id | public void setRegionId(String regionId) {
this.regionId = regionId == null ? null : regionId.trim();
} | [
"public void setRegion_id(int region_id){\r\n this.region_id = this.region_id;\r\n }",
"public void setRegionId(int val) {\n regionId = val;\n }",
"public void setIdRegion(String idRegion);",
"public void setRegionId(java.math.BigDecimal regionId)\n {\n synchronized (monitor())\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.middleware.proto.GetCartItems getCartItems = 7; | public middleware.proto.RequestOuterClass.GetCartItems getGetCartItems() {
if (getCartItemsBuilder_ == null) {
if (operationCase_ == 7) {
return (middleware.proto.RequestOuterClass.GetCartItems) operation_;
}
return middleware.proto.RequestOuterClass.GetCartItems.getDef... | [
"CartProto.ItemOrBuilder getItemOrBuilder();",
"private void myCart(){\n }",
"public interface ICartService {\n ServerResponse add(Integer userId, Integer productId, Integer count, HttpServletRequest request, HttpServletResponse response);\n ServerResponse update(Integer userId, Integer productId, Inte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helps in downloading the state and city details and populating the spinner | private void loadStateCityDetails() {
final List<Sehir> sehirList = new ArrayList<>();
JsonArrayRequest jsArrayRequest = new JsonArrayRequest
(Request.Method.GET, cities_url, null, new Response.Listener<JSONArray>() {
@Override
public void onRes... | [
"public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n\n if (pos>0) {\n stateListCursor.moveToPosition(pos - 1);\n String stateId = stateListCursor.getString(stateListCursor.getColumnIndex(DBAdapter.STATE_ID));\n St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the totalCreditAmount property. | public void setTotalCreditAmount(int value) {
this.totalCreditAmount = value;
} | [
"public void setTotalAmount(java.math.BigDecimal totalAmount) {\r\n this.totalAmount = totalAmount;\r\n }",
"public void setTotalAmount(int totalAmount) {\n\t\tthis.totalAmount = totalAmount;\n\t}",
"public void setTotalCostCash(Float totalCostCash) {\n this.totalCostCash = totalCostCash;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
opinion CRUD functions function to add an opinion | @Override
public void addOpinion(final Opinion opinion, Privilege privilege) throws Exception {
if (privilege != Privilege.CUSTOMER) //check that only the customer can add an opinion
throw new Exception("ERROR: you aren't privileged to add an opinion");
Book book = findBookByID(opinion.g... | [
"void saveUserAction(Recommendation recommendation);",
"public interface OnOpinionCreateListener {\n void onOpinionCreate(Opine opinion);\n }",
"@PostMapping(\"/add/\")\n\tpublic Expense add(@RequestBody Expense proj) {\n\t\tSystem.out.println(proj);\n\t\trepo.save(proj);\n\t\tlog.info(\"Added Expense... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the user clicks ok. | @FXML
private void handleOk() {
if (isInputValid()) {
wertpapier.setName(nameField.getText());
wertpapier.setIsin(isinField.getText());
wertpapier.setPreis(Double.parseDouble(preisField.getText()));
wertpapier.setTicker(tickerField.getText());
okC... | [
"protected void okButtonPressed(){\n\t\tdispose();\r\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tokAction(e);\r\n\t\t\t}",
"private void OKDialogClicked(DialogInterface dialogInterface, int which) {}",
"public abstract boolean onOkClicked(Context context , String input);",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ / / / / / / | public void setTimestamp(String paramString, Timestamp paramTimestamp, Calendar paramCalendar)
/* */ throws SQLException
/* */ {
/* 6367 */ String str = paramString.intern();
/* 6368 */ String[] arrayOfString = this.osql.getParameterList();
/* 6369 */ int i = 0;
/* 6370 */ int j = Math.m... | [
"private void calculatePaths() {\n\n\n }",
"public static void main (String arg[]){\n\tSystem.out.println(\" ( ) ( ( \"); \n\n\tSystem.out.println(\" ( )\\\\ ) ( /( ( )\\\\ ) ( )\\\\ ) \");\n\t\n\tSystem.out.println(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
herr_t H5PTis_valid( hid_t table_id) H5PTis_valid returns a nonnegative value if table_id corresponds to an open packet table, and returns a negative value otherwise. | public static native int H5PTis_valid(final int table_id); | [
"public boolean validateTable(String tableid) {\n\t\tMap<String, String> map = new HashMap<String, String>();\r\n\t\tmap.put(\"id\", tableid);\r\n\t\tif(dao.select(map).get(0).getStatus()==0)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}",
"boolean hasTableKeyId();",
"@Override\n p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a CGSDriveException with specified message. | public CGSException(String msg) {
super(msg);
} | [
"public CommException(String message) {\r\n\t\tsuper(message);\r\n\t}",
"public FileSendingException(String message) {\n super(message);\n }",
"public FileOrganizerException(String message){\n\t\tsuper(message);\n\t\t\n\t}",
"public PSAssetServiceException(String message)\n {\n sup... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Method to save book to the database | public static int save(Books ob) {
int status = 0;
try {
Connection con = DBOperations.getConnection(); /* Opening connection */
PreparedStatement ps = con.prepareStatement(
"insert into books(title,author,price) values (?,?,?)"); /* Database insert state... | [
"public void save()\r\n\t{\r\n\t\tif (persistentState.getProperty(\"bookId\") != null) {\r\n\t\t\tupdateBookInDatabase();\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\tinsertNewBook();\r\n\t\t}\r\n\t}",
"public void SaveBook() {\n\t\tif (new_Book){\n\t\t\tDB.InsertUpdate(\"Books\", \n\t\t\t\tnew_Book,\n\t\t\t\tnew Field<Long... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Put agent cleanup operations here | protected void takeDown() {
// Printout a dismissal message
System.out.println("Buyer-agent "+ getAID().getName()+" terminating.");
} | [
"public void agent_cleanup() {\n\t\tlastAction = null;\n\t\tlastObservation = null;\n\t\tvalueFunction = null;\n\t}",
"public void cleanup() {\n queryManager.cleanup();\n generalMonitor.cleanup();\n dataManager.cleanup();\n hub.cleanup();\n archiver.cleanup();\n if (logge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Returns the color of the sprite. | public Color getColor() {
return color;
} | [
"public int getColor()\r\n\t{\r\n\t\treturn color;\r\n\t}",
"public Color getColor()\n {\n switch(id)\n {\n case ID_RUBBER:\n {\n return new Color(160, 130, 40);\n }\n case ID_IRON:\n {\n return new Color(120, 55... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the array is sorted Returns boolean | public boolean Sorted(){
int prec=0;
for (int value=0;value<resArray.length;value++){
if (value<prec){
return false;
}
prec=value;
}
return true;
} | [
"private static boolean isSorted(int[] a) {\n \n }",
"public boolean isSorted() {\n\t\tint len=length();\n\t\tfor (int i=1; i<len; i++) {\n\t\t\tif (get(i-1)>get(i)) return false;\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean isSorted(int[] arr) {\n int prev = arr[0];\n for (int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify that there are animal records to read from | public void createAnimalRecord(Animal animalRecord) throws
AnimalDataException {
verifyAnimalList();
// Make sure that the Animal Record being created does not already exit
Animal checkedAnimal = getAnimalById(
animalRecord.getId());
// T... | [
"boolean hasNrecords();",
"@Test\n\tpublic final void getNotFoundMedications() {\n\t\tfinal List<String> meds = new ArrayList<String>();\n\t\tmeds.add(\"BENZOCAINE\");\n\t\tmeds.add(\"ABILIFY\");\n\t\tmeds.add(\"Ibuprofen\");\n\t\tmeds.add(\"notfound\");\n\n\t\tfinal List<String> actual = DAO.findAll();\n\t\tasse... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method from stack overflow that counts words | public static int countTextWords(String input) {
if (input == null || input.isEmpty()) {
return 0;
}
String[] words = input.split("\\s+");
return words.length;
} | [
"public int getTotalWords();",
"long totalWords();",
"public int getFrequency(String word);",
"public WordCount() {\n text= \"I am i am today today i \"; \n StringTokenizer st= new StringTokenizer(text);\n while(st.hasMoreTokens()){\n if(map.containsKey(st.toString())){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If statement was implemented here to check browser type specified with parameter | @Before
public void setUp() {
switch (browserType) {
case "chrome":
ChromeDriverManager.getInstance().setup();
driver = new ChromeDriver(); break;
case "firefox":
FirefoxDriverManager.getInstance().setup();
driver = new ... | [
"private static BrowserVersion determineBrowserVersion()\n {\n final BrowserVersion browserVersion;\n final String browserType = XltProperties.getInstance().getProperty(\"com.xceptance.xlt.browser\", \"FF\").toUpperCase();\n\n if (browserType.equals(\"IE\"))\n {\n browserVe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public View getView(int position, View convertView, ViewGroup parent) {
return null;
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
given a graph, this function extracts all metapaths of a given type, unusable | public static void generateMetaPathsOfLengthMaster(String relation, String outfile, String kb1, String kb2, int length) throws Exception
{
BufferedWriter bw = new BufferedWriter(new FileWriter(outfile));
ReadSubgraph rr = new ReadSubgraph();
AdjList a = rr.readKB(new BufferedReader(new FileReader(kb1)));
AdjLi... | [
"private Map<String, GraphQLType> getAdditionalTypes(XtextGraph xtextGraph, Map<String, GraphQLType> visited) {\n\n XtextToGraphQLJavaVisitor localVisitor = XtextToGraphQLJavaVisitor.newBuilder().graphqlObjectTypes(visited).build();\n\n return xtextGraph.getTypes().values().stream()\n .filter(type -> !... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'History'. | History createHistory(); | [
"public static History getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new History();\n\t\t}\n\t\treturn instance;\n\t}",
"public NoteHistory() {\n history = new ArrayList<Note>();\n }",
"public HistorySO() {}",
"public History getHistory() {\n return history;\n }",
"public Sear... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
deletes the current node If no right child use deleteNoRight, if no left use deleteNoLeft else move contents of next to current and delete next / Deletes current when no right child / Parent adopts left child | private Position deleteNoRight(Position position) {
if (super.rightChild(position) == null) {
BTNode parent = (BTNode) super.parent(position);
BTNode node = (BTNode) position;
BTNode child = (BTNode) super.leftChild(position);
if (parent != null && parent.getLeft() == node)
parent.setLeft(child);
i... | [
"public void delete() {\n\n //swap the first and last element\n swap(1, currentElementIndex - 1);\n currentElementIndex--; //mark the num as deleted by moving the pointer down\n\n //if only root, left & right children left\n if (currentElementIndex > 3) {\n //check thei... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method is called when the user terminates the loop by using "continueLooping=false". | protected void onTerminate(){
continueLooping = true;
System.out.println("(CheckAll) terminated. Execution time = " + ((System.nanoTime()-timeIni)/1000000000d) + ";");
//TODO: final statements
} | [
"public void stopLoop() {\n \n }",
"public boolean continueLoop();",
"public void stopLooping()\n\t{\n\t\tstop();\n\t\tisLooping = false;\n\t\timPosition = 0;\n\t}",
"protected void continueLoop() {\n jumpTo(beginLoop);\n }",
"@Override\n\tpublic void quitting() {\n\t}",
"public void d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets Troops according to Name | List<Troop> getAllByName(String name); | [
"private ArrayList<Toppings> getToppings() {\r\n toppingList.clear();\r\n if(chkPep.isSelected()){\r\n Toppings pepperoni = Toppings.PEPPERONI;\r\n toppingList.add(pepperoni);\r\n }\r\n if(chkMush.isSelected()){\r\n Toppings mushroom = Toppings.MUSHROOM;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method gets the Lobby based on the server name | public Lobby getLobby(String name) {
for (Lobby lobby : lobbies) {
if (lobby.getName().equalsIgnoreCase(name))
return lobby;
}
return null;
} | [
"public Lobby getLobby(Player player)\n\t{\n\t\tfor(Lobby l : lobbys)\n\t\t{\n\t\t\tfor(Player p : l.getPlayers())\n\t\t\t{\n\t\t\t\tif(p.equals(player))\n\t\t\t\t{\n\t\t\t\t\treturn l;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public LobbyInfo getLobbyInfo() {\n return lobbyInfo.getInfoForUser(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Date Time T'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseDateTimeT(DateTimeT object) {
return null;
} | [
"public T caseObjectWithTimeLine(ObjectWithTimeLine object) {\r\n\t\treturn null;\r\n\t}",
"public T caseTestDate(TestDate object)\n {\n return null;\n }",
"public T visitToDateTime(ToDateTime elm, C context) {\n return null;\n }",
"public T caseQueryLogicalTimeType(QueryLogicalTimeType object)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called when the order button is clicked. | public void submitOrder(View view) {
EditText nameText = (EditText) findViewById(R.id.name_text_view);
String name = nameText.getText().toString();
CheckBox whippedCreamCheckBox = (CheckBox) findViewById(R.id.whipped_cream_checkbox);
Boolean hasWhippedCreamChecked = whippedCreamCheckB... | [
"public void orderButtonPressed(View v) {\n if (!vh.priceText.getText().toString().isEmpty() && !vh.usernameEditText.getText().toString().isEmpty()) {\n\n // Gather album info to iterate sale\n Intent mIntent = getIntent();\n int key = mIntent.getIntExtra(\"key\", 0);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/DeviceManager deviceManager = new DeviceManager(); String generatedDeviceId = IMonitorUtil.commandId(queue, Constants.DEVICE_ID); String gateWayId = this.actionModel.getDevice().getGateWay().getMacId(); String commandParam = this.actionModel.getDevice().getCommandParam(); Device device = deviceManager.updateCommadPara... | @Override
public String executeSuccessResults(Queue<KeyValuePair> queue) {
long commandParam;
DeviceManager deviceManager = new DeviceManager();
String generatedDeviceId = IMonitorUtil.commandId(queue, Constants.DEVICE_ID);
String gateWayId = this.actionModel.getDevice().getGateWay().getMacId();
Device devi... | [
"public Map<String, Object> callMeterCommand() {\n Map<String,Object> result = new HashMap<String,Object>();\n String cmdResult = \"Execution Fail\";\n \n try {\n if (callNullBypass(true)) {\n log.debug(\"[NI:MBB_Action] [command=\"+bypassDevice.getCommand()+\"] Sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the JsonArray of players | public static JsonObject getListOfChampionsGameData(JsonObject game){
JsonArray players = game.getAsJsonArray(fellowPlayersId);
Iterator<JsonElement> itr = players.iterator();
Map<String, JsonArray> teams = new HashMap<String, JsonArray>();
while(itr.hasNext()){
//Get a play... | [
"private JSONArray playersToJsonArray(ArrayList<Player> players) {\n Gson gson = new Gson();\n JSONArray playersjsonarray = new JSONArray();\n for (Player p: players) {\n String playerstring = gson.toJson(p);\n JSONObject player = new JSONObject(playerstring);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets contacts from disk to arrayList | public void getContactsFromDisk() {
} | [
"private void getContactList() {\n\n ContentResolver cr = getContentResolver();\n Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null, null);\n\n if ((cur != null ? cur.getCount() : 0) > 0) {\n while (cur != null && cur.moveToNext()) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks if n >= k, if not there is not a kth element to remove removes kth least recently added element from the queue by counting back k times from the last element (n) | public Item remove(int k){
if(q[n-k] == null){throw new NoSuchElementException("item does not exist");}
Item item = q[n-k];
q[n-k] = null;
n--;
if (n >0 && n == q.length /4){resize(q.length/2);}
return item;
} | [
"public int removeElement(int k)//remove element located at k\r\n\t{\r\n\t\tint elem;\r\n\t\tNode temp = first;\r\n\t\tif(size == 0 || k > size || 0 > k)\r\n\t\t\treturn -1; //if list is empty of k is out of bounds, return -1.\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(k == 0)//remove first\r\n\t\t\t{\r\n\t\t\t\telem = first... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removing the associate details. | @Override
public boolean removeAssociate(int associateId) throws PayrollServicesDownException {
try {
return daoServices.deleteAssociate(associateId);
} catch (SQLException e) {
throw new PayrollServicesDownException("PayrollServices are down, try again later", e);
}
} | [
"public void removeFromDetails(entity.DataGenInfoDetail element);",
"@Override\n\t\t\tpublic void remove() {\n\t\t\t\treturn;\n\t\t\t}",
"public void remove() {\n\t\t\r\n\t}",
"public void remove() {\n ms.remove();\n }",
"@Override\r\n public void remove() {\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use TracesData.newBuilder() to construct. | private TracesData(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"public Traccion() {\r\n\t\t\tsuper();\r\n\t\t}",
"public static mx.baz.avro.model.liabilities.TransactionCaptacionData.Builder newBuilder() {\n return new mx.baz.avro.model.liabilities.TransactionCaptacionData.Builder();\n }",
"public ContactTracer(List<Trace> traces) {\n this();\n if (traces... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
esta anotacion es para que utilice lo inverso del mappings de arriba | @InheritInverseConfiguration
//ignoramos variables que no usamos
@Mappings({
@Mapping(target = "compra" ,ignore = true),
@Mapping(target = "producto" ,ignore = true),
@Mapping(target = "id.idCompra" ,ignore = true)
})
ComprasProducto toComprasProducto(PurchaseItem pur... | [
"private void mapAttributes() {\n \r\n }",
"AtlasMappings read();",
"private void associateType2Mappings(){\n\t\t\n\n\t\t//TREAT GIVEN MAPPINGS\n\n\t\tint num_original_class_mappings=0;\n\t\tint num_original_dprop_mappings=0;\n\t\tint num_original_oprop_mappings=0;\n\t\tint num_original_instance_mapping... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return fighter finger offset | public int getFighterOffset()
{
int value = preferences.getInteger(FIGHTER_OFFSET_KEY, FIGHTER_OFFSET_DEFAULT);
return value;
} | [
"private int getGoalOffset() {\n\t\treturn (int) (Math.pow(-1, state.getDirection() + 1) * GOAL_OFFSET);\n\t}",
"public static int offset_dst() {\n return (72 / 8);\n }",
"public int Offset(){\n return FitToScreen.returnViewWidth(getPercent(R.dimen.Offset));\n }",
"public static int offset... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This constructor will adjust the grid spacings along strike and down dip to exactly fill the surface (not cut off ends), leaving the grid spacings just less then the originals. | protected EvenlyGriddedSurfFromSimpleFaultData(FaultTrace faultTrace,
double aveDip, double upperSeismogenicDepth,
double lowerSeismogenicDepth, double maxGridSpacingAlong,
double maxGridSpacingDown) throws FaultException {
double length = faultTrace.getTraceLength();
... | [
"public Grid() {\n\tint bcount = 0;\n\tint icount = 0;\n\tint acount = 0;\n\tfor (int y = 0; y < Globals.SIDE_LENGTH; y++) {\n\t for (int x = 0; x < Globals.SIDE_LENGTH; x++) {\n\t\tall[acount] = new int[]{x, y};\n\t\tacount++;\n\t\tif (x == Globals.SIDE_LENGTH-1 || x == 0 || y == Globals.SIDE_LENGTH-1 || y == 0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
All and Example of Composition | public static void main(String[] args) {
// an example of creating new class and using new variable in parameter
Dimensions dimensions = new Dimensions(20, 20, 5);
Case theCase = new Case("220B", "Dell", "2400", dimensions);
// ex of creating new class within parameter
Monitor theMonitor = new Monitor("2... | [
"public static interface Composition {\n\n\t\tpublic abstract String getExternalId();\n\n\t\tpublic abstract String getName();\n\n\t\tpublic abstract String getUrl();\n\n\t\tpublic abstract String getImageUrl();\n\n\t\tpublic abstract String getBio();\n\t}",
"public ComposedOf () \r\n {\r\n }",
"public in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/methode qui permet l ajout d un nouveau livre | public int AjouterLivre(Livremodel livre)
{
try
{
PreparedStatement ps = connec.connect().prepareStatement("INSERT INTO livres (titre,isbn,dat,nom,categorie,quantite) VALUES(?,?,?,?,?,?)");
String titr = livre.getTitre();
String isb = livre.getIsbn();
String date = livre.getDateEdit();
String no... | [
"public void criarLivro() {\r\n\r\n\t\t\tLivro novo = new Livro();\r\n\r\n\t\t\tnovo.setNome(this.livro.getNome());\r\n\t\t\tnovo.setId(this.livro.getId());\r\n\t\t\tnovo.setAutor(this.livro.getAutor());\r\n\r\n\t\t\tboolean achou = false;\r\n\t\t\t\r\n\t\t\tthis.listaLivros = this.livroDAO.listarTodos();\r\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Represents the prototype for this class. You can use the prototype to add properties or methods to all instances of a Function. | @Property Object getPrototype(); | [
"public interface Function {\n}",
"JavaFunctionDef getFunction();",
"public STFunction(String symbol, Classif primClassIf, SubClassif returnType, SubClassif definedBy, int numArgs, ArrayList<SubClassif> types, Builtin exe)\n {\n super(symbol, primClassIf);\n this.returnType = returnType;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
write your code here | public static void main(String[] args) {
Scanner in = new Scanner(new BufferedInputStream(System.in));
while (in.hasNext()) {
MyList list = new MyList();
int n = in.nextInt();
for (int i = 0; i < n; i++) {
String cmd = in.next();
switch... | [
"void stuffForYouToDo() {\n\t\t// Write your code here...\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\r\n\t\t\t\tvoid eval() {\r\n\r\n\t\t\t\t\t// YOUR CODE IN THIS SPACE\r\n\t\t\t\t}",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n\tpublic void dosomethiing3() {\n\n\t}",
"@Override\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes value into dest at offset | private static void intToBytes(int value, byte[] dest, int offset) {
dest[offset] = (byte) ((value >> 24) & 0xFF);
dest[offset+1] = (byte) ((value >> 16) & 0xFF);
dest[offset+2] = (byte) ((value >> 8) & 0xFF);
dest[offset+3] = (byte) (value & 0xFF);
} | [
"public void writeValue(OutputStream dest, Object value);",
"public abstract void writeByte(int offset,int value) throws MemoryAccessException;",
"public void setDest(int dest);",
"public int write(String dest, byte[] message) {\n\t\tthrow new java.lang.UnsupportedOperationException(\"Not supported.\");\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor that takes in an initialized array | public SortedList(int a[]) {
arr = Arrays.copyOf(a, a.length);
quicksort(0, arr.length-1);// guarantees that the list is always sorted, no matter the order we add elements
// i assume the intended implementation was something along the lines of repeatedly calling insert()
//but this implementation i... | [
"public Array()\n {\n // initialise instance variables\n }",
"public GenericArray() {\n this(10);\n }",
"public Array() {\n }",
"public MyArray(int ... array){\n this.array = new int[array.length];\n System.arraycopy(array, 0, this.array, 0, array.length);\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .bean.DctnBrokenCD brokencd = 1; | public Builder setBrokencd(
int index, com.centling.protobuf.RepairCodeProto.DctnBrokenCD value) {
copyOnWrite();
instance.setBrokencd(index, value);
return this;
} | [
"private void setCd() {\n\n\t}",
"public void setNumberOfMissingPdus(short pNumberOfMissingPdus)\n{ numberOfMissingPdus = pNumberOfMissingPdus;\n}",
"void mo12159d(C0967d dVar) throws RemoteException;",
"public String getCard_no()\n/* */ {\n/* 223 */ return this.card_no;\n/* */ }",
"@Test(ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void insertCourse(Course courses) {
coursesMapper.insertCourse(courses);
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string parent = 6; | java.lang.String getParent(); | [
"String getParentid();",
"java.lang.String getParentID();",
"public String parentToString();",
"public int getParent();",
"java.lang.String getParent(int index);",
"int parent(int index){\r\n return (index - 1) / 2;\r\n }",
"public void setParent(int parentword)\n {\n _parentword = p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional double edgeDistance = 5; | public Builder clearEdgeDistance() {
edgeDistance_ = 0D;
onChanged();
return this;
} | [
"public void addEdgeDistance( Object distance )\n {\n distCount++;\n edgeDistances[distCount] = distance;\n }",
"public abstract float distanceToEdge(Vector3f point);",
"int getEdgeConnectivity();",
"public float getEdge();",
"ZEdge edge();",
"public double getEdgeWeight(WeightedEdge e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .tophap.mapbox_gl.Expression arguments = 2; | public com.tophap.mapbox_gl.proto.Expressions.ExpressionOrBuilder getArgumentsOrBuilder(
int index) {
if (argumentsBuilder_ == null) {
return arguments_.get(index); } else {
return argumentsBuilder_.getMessageOrBuilder(index);
}
} | [
"@Test\n public void testExtractObjectArguments_5args() {\n System.out.println(\"extractObjectArguments_5args\");\n\n GenericSpatialBoxPropertyFunction instance = new WithinBoxPF();\n\n Node predicate = NodeFactory.createURI(SpatialExtension.WITHIN_BOX_PROP);\n\n //Geometry and Envelo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Commit'. | Commit createCommit(); | [
"ICommit getCommit(@NotNull String commitHash);",
"VCSCommit getCommit(String version);",
"public Commit()\n\t{\n\t\tparentID=-1;\n\t\tcommitNum=0;\n\t\tcommitMsg=\"initial commit\";\n\t\ttrackedFiles= new HashMap<String, String>();\n\n\t\tDate derp= new Date();\n\t\tSimpleDateFormat formatter= new SimpleDateFo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Intent mapIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:37.423156,122.084917?q=37.423156,122.084917(Label+Name)")); | @Override
public void onClick(View v) {
String uriBegin = "geo:" + "47.531605" + "," + "21.627312";
String query = "47.531605" + "," + "21.627312" + "(DeviceId"
+ ")";
String encodedQuery = Uri.encode(query);
String uriString = uriBegin + "?q=" + encodedQuery + "&z=16";
Uri uri = Uri.pars... | [
"public void mapa(View view){\n String GEO_URI = \"geo:0,0?q=\" + destino_nome + \" - Brasil\";\n Uri uri = Uri.parse(GEO_URI);\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(intent);\n }",
"@Override\n public void onClick(View ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set date format for this calendar | void setDateFormat(String dateFormat); | [
"public void setDateformat(java.lang.String dateformat) {\n this.dateformat = dateformat;\n }",
"protected void setDateFormat(DateFormat df) {\n dateFormat = df;\n }",
"private void setDate() {\r\n\t\tdate.setText(dateFormat.format(new Date()));\r\n\t}",
"public GsonBuilder setDateFormat(S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This a copy constructor for the Condition class and creates a copy of the specified condition object enclosed in parenthesis. This condition arguement becomes the left condition in a condition container, allowing for nested AND/OR operators in the WHERE clauses of your queries. | public Condition(Condition condition) {
this.mCondition = condition;
} | [
"public Condition clone(){\r\n Condition c = new Condition(this.valor1,this.tipo, this.nombre);\r\n c.valor2 = this.valor2;\r\n return c;\r\n }",
"public Query addCondition(Condition aCondition)\n{\n // Handle if current condition isn't set\n if(getCondition()==null)\n setCond... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface all AppDbObjects must implement. In multitenant applications the interface must be subclassed. | public interface ContextDependable {
/**
* Gets the database application context this object belongs to.
*
* @return the context
*/
public ContextDb getContextDb();
/**
* Sets this object's database application context.
*
* @param contextDb
*/
public void setContextDb(ContextD... | [
"public interface DBObjects {\n\n\t/**\n\t * All table names used in the Application goes here.\n\t */\n\tString TABLE_ADMIN_CONFIG = \"admin_config\";\n\tString TABLE_CUSTOMER_DETAILS = \"customer_details\";\n\tString TABLE_CUSTOMER_SUBSCRIPTION = \"customer_subscription\";\n\tString TABLE_USER_DETAILS = \"user_de... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write code here that turns the phrase above into concrete actions throw new cucumber.api.PendingException(); | @When("user click the image")
public void user_click_the_image() {
driver.findElement(By.xpath("/html/body/main/div/div/form/fieldset/div/div[9]/div/div/img")).click();
} | [
"@Given(\"^user enter the choice$\")\r\npublic void user_enter_the_choice() throws Throwable {\n throw new PendingException();\r\n}",
"@Then(\"the user shall see the courses {string}\")\npublic void the_user_shall_see_the_courses(String string) {\n throw new cucumber.api.PendingException();\n}",
"@Given(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle a "select shapeChild" action without arguments. | public static void selectShapeChild() {
Cgm target = Maud.getModel().getTarget();
SelectedShape shape = target.getShape();
int numChildren = shape.countChildren();
if (numChildren == 1) {
shape.selectFirstChild();
} else if (numChildren > 1) {
List<... | [
"protected abstract void handleSelect (Context context);",
"private void selOnChild( ){\n \n String curFilter, curTag;\n \n Filter filter = new Filter();\n \n mFilterPos = CUR_CHILD;\n\n curTag = mLocationStep . getTag();\n curFilter = mLocationStep . getFilter();\n \n filter.pars... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Put all the mock creations in one place. To be called from setup() | private void makeMockServices() {
mMockContext = mock(Context.class);
mMockCarPropertyService = mock(CarPropertyService.class);
mMockCarUxRService = mock(CarUxRestrictionsManagerService.class);
mMockPerUserCarServiceHelper = mock(PerUserCarServiceHelper.class);
mMockPerUserCarSer... | [
"@Before\n public void prepareMocks() throws Exception {\n NutDaoBuilderFactory.getInstance().addBuilderClass(MockStoreDaoBuilder.class.getName());\n NutDaoBuilderFactory.getInstance().addBuilderClass(MockDaoBuilder.class.getName());\n EngineBuilderFactory.getInstance().addBuilderClass(MockE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End of variables declaration//GENEND:variables | public void actionPerformed(ActionEvent ae) {
if(ae.getSource() == helpButton) {
new HelpFrame(app,this);
} else if(ae.getSource() == goDirectlyButton) {
//setVisible(false);
new IMatView(app);
}
} | [
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initVariable() {\n\t\n\t}",
"public void mo17751g() {\n }",
"public void mo1857d() {\n }",
"public static void Q22()\r\n\t{\r\n\t}",
"public void mo28221a() {\n }",
"public void mo3914b() {\n }",
"protecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
mapChainStream(); reduceStream(); intStreamLimit(); peekAndReduceSeries(); sumOfFirstNNumbers(10); reduceOperators(); | public static void main(final String[] args) {
} | [
"@Test\n public void reductionTest() {\n\n List<Integer> integers = Arrays.asList(1, 2, 3);\n\n // where 23 is the start value\n // iteration | element | function | result\n // 1° | 1 | 23 + 1 | 24\n // 2° | 2 | 24 + 2 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper function to generate the dice faces for each type of die | private void generate_DiceFace(int limit){
// Generate the random number to set dice ImageView faces accordingly
Random randomNumberGenerator = new Random();
int number = randomNumberGenerator.nextInt(limit);
// Set the dice ImageView faces accordingly
if(mDice_type.equals("D20... | [
"private void initDice(int[] faces) {\n for (int i = 0; i < dice.length; i++) {\n if (faces != null)\n dice[i] = new Die(faces[i]);\n else dice[i] = new Die();\n }\n }",
"public int rollDie(int faces)\n {\n return generator.nextInt(faces) + 1;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ currently fails, but i think that is because it needs a better command to click on specific listviews items | @MediumTest
public void testSendMessage(){
//sets up activity monitor
Instrumentation.ActivityMonitor receiverAM=
getInstrumentation().addMonitor(PlaceInfo.class.getName(),null, false);
//validate receiver is starting
TouchUtils.clickView(this, mMainActivityListView)... | [
"void onItemClicked(IListItem listItem);",
"@Override\n\tpublic void onListItemClick(int pos, long id) {\n\t}",
"@Override\n\tpublic void ClickList6() {\n\t\t\n\t}",
"public void listClick() {\n }",
"public void onListItemClick(ListView listView, View itemView , int position , long id)\n {\n S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Responds to the user depositing or withdrawing funds from the bank account. Updates the bank account information and GUI based on the button pressed, and saves the new information to "accountInfo.txt". | public void actionPerformed(ActionEvent event){
if (event.getActionCommand().equals("deposit")){
double amount = Double.parseDouble(gui.getAmount());
account.deposit(amount);
} else if (event.getActionCommand().equals("withdraw")){
double amount = Double.parseDouble(g... | [
"@FXML\n\tvoid deposit(ActionEvent event) {\n\t\tif (wdFirstName.getText().trim().equals(\"\") || wdLastName.getText().trim().equals(\"\")) {\n\t\t\ttextArea.appendText(\"Please enter a first name and last name! \\n\");\n\t\t\treturn;\n\t\t}\n\t\tString fname = wdFirstName.getText();\n\t\tString lname = wdLastName.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an instance of Job which will sort and then copy the input strings to the output array. | CopySortJob(Object[] bind, int bstart, int bend, int count,
CharSequence[] output, int offset, int depth) {
this.bind = bind;
this.bstart = bstart;
this.bend = bend;
this.count = count;
this.output = output;
this.offset = offset;
... | [
"public static void main(String[] args) {\n\t\tint [] dead = {2,1,2,1,3};\r\n\t\tint [] profit = {100,19,27,25,15};\r\n\t\tint n = dead.length;\r\n\t\t\r\n\t\tjob[] j = new job[n];\r\n\t\t\r\n\t\tfor(int i=0 ; i<n ; i++) {\r\n\t\t\tj[i] = new job((char)('a'+i),dead[i],profit[i]);\r\n\t\t}\r\n\t\t\r\n\t\tArrays.sort... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
auto generated Axis2 call back method for editarProducto method override this method for handling normal response from editarProducto operation | public void receiveResulteditarProducto(
productsw.EditarProductoResponse result
) {
} | [
"@Override\r\n\tpublic void modificarProducto(Producto productoAModificar) {\n\t\t\r\n\t}",
"@RequestMapping(value = \"/operadorproduccion/{id}\", method = RequestMethod.PUT)\n \t @PreAuthorize(\"hasRole('OPERADORPRODUCCIONUPDATE')\") \n\t public ResponseEntity<Operadorproduccion> actualizarOperadorproduccion(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo di controllo che verifica che l'user, oggetto di tipo User, sia maggiorenne. Pertanto confronta la data di nascita, di tipo LocalDate, con la data attuale, LocalDate.now(), affinche\' sia maggiore o uguale a 18 anni. | public boolean checkIf18(LocalDate birthDate){
LocalDate now = LocalDate.now();
int age = Period.between(birthDate,now).getYears();
return age >= 18;
} | [
"@Test\n void getCreationDateTimeSuccess() {\n assertNotNull(user.getCreationDateTime());\n assertEquals(LocalDateTime.of(2020, 1, 1, 1, 1), user.getCreationDateTime());\n }",
"public User(String dni, String apellido, String nombre, Date fechaNac, boolean estado, Mascota mascota) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
`status: Not Mapped` coredatatypereference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier generalinfo: Reference to an update service call | public String getTechnologyStandardsSpecificationUpdateActionTaskReference() {
return technologyStandardsSpecificationUpdateActionTaskReference;
} | [
"void requestUpdate() throws Exception;",
"protected abstract void update() throws TypeModeError, ParseException;",
"public void updateIncidentData() throws InvalidBboxException, InvalidWGS84CoordinateException {\n\n // Get current timestamp\n Tim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/\ |toArray| \ int argb | public static int[] toArray(BufferedImage bufferedImage)
{
DataBuffer buffer = bufferedImage.getRaster().getDataBuffer();
return ((DataBufferInt)buffer).getData();
} | [
"public abstract void toArray(int[] array);",
"@Override\n\t<A> A[] toArray(A[] a);",
"@Override\n\tObject[] toArray();",
"@Override\n\tpublic <T> T[] toArray(T[] arg0) {\n\t\treturn list.toArray(arg0);\n\t}",
"@Test\n public void testConvertToArray() {\n int[][] array = {{1, 0, 4, 7}, {4, 10}, {1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table usernoticestate | int insert(UserNoticeState record); | [
"@Select({\n \"select\",\n \"userId, email, nickName, realName, displayName, password, mobile, city, registerTime, \",\n \"activeTime, status, forbidStatus, securityLevel, weiboUId, weiboAccessToken, \",\n \"qqUId, qqAccessToken, registerChannelId\",\n \"from user_info\",\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the text passed using the default pattern and the Locale specific patterns as parsing options. This method uses the DateUtils.parseDate method from Apache. | @Override
public void setAsText(String text) throws IllegalArgumentException {
setValue(converter.getCalendarFromText(text));
} | [
"@Override\n public Date parse(String source, ParsePosition pos) {\n if (source.length() > DATE_PATTERN.length() && !isLenient()) {\n pos.setErrorIndex(DATE_PATTERN.length());\n return null;\n }\n\n try {\n final int year = Integer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
inflar o menu. isso adiciona itens a action bar, se presente | @Override
public boolean onCreateOptionsMenu (Menu menu){
getMenuInflater().inflate(R.menu.menu_twitter, menu);
return true;
} | [
"private void actIdiomaMenu() {\n //botones del menu\n if (menuItems != null) {\n MenuItem itemAcercaDe = menuItems.findItem(R.id.action_acercade);\n MenuItem itemConfig = menuItems.findItem(R.id.action_settings);\n MenuItem itemExportar = menuItems.findItem(R.id.actio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End of variables declaration//GENEND:variables | private void aw() {
jTextField1.addActionListener(new Handler());
} | [
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initVariable() {\n\t\n\t}",
"public void mo17751g() {\n }",
"public void mo1857d() {\n }",
"public static void Q22()\r\n\t{\r\n\t}",
"public void mo28221a() {\n }",
"public void mo3914b() {\n }",
"protecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.advanced_layout);
app = (App) getApplication();
// app.Say(getString(R.string.AdvancedWarning).toLowerCase());
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
} | [
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this is just a preliminary RouteMiles calculation. It is updated in distFromMyPlace2WP to display in the turnbyturn list when we are between waypoints. That method should use RouteMiles in its distance to WayPoint for the RouteMiles preference. We need RouteMiles (or the distance between RoutePoints) for thinning and t... | private void calcMergedRouteMiles() {
GPXRoutePoint tempRP;
for (int i = 0; i < mergedRoute.size() - 1; i++) {
tempRP = mergedRoute.get(i + 1);
tempRP.distFromPrevWP = distBetweenLatLonPoints(tempRP.lat,
tempRP.lon, mergedRoute.get(i).lat, mergedRoute.get(i).lon);
tempRP.setRouteMiles(mergedRoute.get(... | [
"private void calculateDistance() {\n double distanceInMeters = routeLine.getLengthInMeters(); \n \n // Update the display.\n // Convert to miles, and then format to two decimal places.\n double distanceInMiles = distanceInMeters * MILES_PER_METER;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies the length of sample results queue used to asynchronously send the information to backend. When the queue reaches this limit, then the test plan execution will be affected since sample results will get blocked until there is space in the queue, affecting the general execution of the test plan and in consequen... | protected void setQueueSize(int queueSize) {
this.queueSize = queueSize;
} | [
"public void setRQLimit(int limit_) {\n receiverQueue.setSizeLimit(limit_);\n }",
"@Config(\"thrift.max-queued-requests\")\n public ThriftServerConfig setMaxQueuedRequests(Integer maxQueuedRequests) {\n this.maxQueuedRequests = Optional.fromNullable(maxQueuedRequests);\n return this;\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a new collision observer. | public void addCollisionObserver(CollisionObserver observer) {
if (observer != null) {
observers.add(observer);
}
} | [
"@Override\n public void addObserver(Observer o) {\n battleObservers.add(o);\n }",
"void add(OBSERVER_TYPE observer);",
"void addObserver(GameObserverInterface observer);",
"public void addActorObserver (ActorObserver observer)\n {\n _actorObservers.add(observer);\n }",
"public voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
User clicked ok button | public void onClick(DialogInterface dialog, int id) {
mPatientDB.DeletePatient(mCurrPatient);
RegisterNewPatient.this.onBackPressed();
} | [
"public abstract boolean onOkClicked(Context context , String input);",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tokAction(e);\r\n\t\t\t}",
"protected void okPressed() {\r\n\r\n name = wFrameworkCombo.getItem(wFrameworkCombo.getSelectionIndex());\r\n importRuntimeLibraries ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
discard a card to the hand of player | public Card discard(int indexCard)
{
return this.hand.getHandPlayer().remove(indexCard);
} | [
"private void discard() {\n System.out.println(\"Player.doAction : DISCARD\");\n System.out.println(\"Player.doAction : carteSelected : \" + this.cardSelected.getName());\n // On défausse la carte \n this.deck.removeCard(this.cardSelected);\n // Le joueur gagne 3 p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |