query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
function to handle save button presses | public void save(View view) {
textView_logs.setText("Preparing to save data and send to server...\n");
// check there is recorded data
if (!checkBox_dataRecorded.isChecked()) {
textView_logs.append("Please gather data from patient before saving to server.\n");
}
// sa... | [
"@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tsave();\n\t\t\t\t\t}",
"public void savePressed() {\n Command command = CommandFactory.save();\n ObserverEvent observerEvent = new ObserverEvent(command);\n eventHub.addEvent(observerEvent, Channel.COMMUNICATION_C... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find the index of the column | public Object getValue(Object element, String property) {
int columnIndex = page.getColumnNames().indexOf(property);
Object result = null;
Field field = (Field) element;
switch (columnIndex) {
case 0:
result = field.getName();
break;
// case 1:
// result = new Boolean(field.isN());
// break;
// ... | [
"Integer getColumnIndex();",
"int GetIndex(String columnName);",
"public byte getColumnPosition(final Column column){\n if(column==null)return -1;\n for(byte i=0; i<columns.length; i++){\n if(columns[i].getName().equals(column.getName()))return i;\n }\n return -1;\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the one word size. It is depend on the target machine architecture. | int wordSize(){
// return(MachineParam.SIZEOF_INT*8);
return(env.ioRoot.machineParam.evaluateSize(Type.KIND_INT)*8);
} | [
"long longSize();",
"public int getSize() {\n return getInt16(2);\n }",
"public final int ccGetMappingWordSize(){\n return C_COMMAND_DATA_BYTESIZE;\n }",
"@Override\n int getElementSize()\n {\n return isVariableLengthType() ? HDFHelper.getMachineWordSize() : 1;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiate driver, wait and path for chrome browser jar file | @Test
public void seleniumTest() throws IOException, InterruptedException {
dataDriven d = new dataDriven();
ArrayList navigate = d.getData("Navigate");
System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") + "/src/chromedriver");
WebDriver driver = new ChromeDriver();
WebDriverWait w... | [
"private static WebDriver initChromeDriver() {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverPath\n\t\t\t\t\t+ \"chromedriver.exe\");\n\t\t\tWebDriver driver = new ChromeDriver();\n\t\t\treturn driver;\n\t\t}",
"public void initWebDriver(String driverPath) throws InterruptedException {\n\t\t\tSyste... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads code out of a file. | public String load(File f) throws IOException{
FileReader fr = null;
StringBuilder sb = new StringBuilder();
try {
fr = new FileReader(f);
for(int i = fr.read(); i != -1; i = fr.read()){
sb.append((char) i);
}
} catch (FileNotFoundException e) {
logger.log(Level.WARNING, "Could not find file " +... | [
"public void load(File source);",
"public ByteCodeLoader(String file) throws IOException {\n\n this.byteSource = new BufferedReader(new FileReader(file));\n }",
"public void load(File file) throws FileNotFoundException;",
"void load(String file);",
"public void load(){\n CommandParser parse... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Do the stuff when Edit button clicked | protected void onEditButtonClicked(){
Customer cs = null;
for (Object object : content.getSelectedRows()) {
cs = (Customer) object;
}
if(cs == null) {
return;
}
CustomerFromCreator form = new CustomerFromCreator();
form.createForm(cs, pres... | [
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnEditClick();\n\t\t\t}",
"@Override\n\tpublic void editClick(int id) {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tedit ();\n\t\t\t}",
"public void editButtonPressed()\r\n {\r\n firstNameTF.setEditabl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | [
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home\n Intent intent = new Intent(this, MainMenuCard.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks for /.svn and subfiles like /.svn/some/file | public static boolean isAdminFile(File file) {
String path = file.getAbsolutePath().replace(File.separatorChar, '/');
String adminDir = "/" + SVNAdminDirectoryLocator.getAdminDirectoryName();
return path.lastIndexOf(adminDir + "/") > 0 || path.endsWith(adminDir);
} | [
"private boolean isVersionControlSystemFile(String filePath) {\n return filePath.contains(\".svn\")\n || filePath.contains(\".git\")\n || filePath.contains(File.separator.concat(\"CVS\").concat(\n File.separator));\n }",
"public boolean checkoutf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a property by its name | public FDADeviceProperty getProperty(String propertyName){
for(FDADeviceProperty property : this.deviceProperties){
if(property.getPropertyName().equals(propertyName)){
return property;
}
}
return null;
} | [
"public IProperty getProperty( String name );",
"public Object getProperty(String name) {\r\n return properties.getProperty( name ) ; }",
"public Object getProperty(String name) {\r\n return _properties.get(name);\r\n }",
"@Override\n\tpublic Object getProperty(String name) {\n\t\treturn properties... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public int getCount() {
return m_NewsList.size();
} | [
"@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"
]
]
}
} |
Levanta nuestro servicio web REST | public static void main(String[] args) {
SpringApplication.run(EmployeeRest.class, args);
} | [
"@GET\n @Path(\"todososlivros\")\n @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})\n public Response allLivros(){\n List<Livro> lista = this.service.AllLivros();\n GenericEntity<List<Livro>> entity = new GenericEntity<List<Livro>>(lista) {\n };\n return Respon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the JxtaServerSocket object | public JxtaServerSocket(PeerGroup group, PipeAdvertisement pipeadv, int backlog) throws IOException {
this(group, pipeadv, backlog, 60000);
} | [
"agentHolder(ServerSocket s) { // constructor class.\n\t\tsock = s;}",
"public SocketServer(SocketServerConfig config)\n {\n config_ = config;\n listeners_ = new ISocketServerListener[0];\n }",
"public GingerJavaSocketServer()\n\t{\n\t}",
"@Override\n\tpublic ServerSocket newServerSocket(P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an array of RGBs in the color map. The number of colors requested must be exactly 64, or else an IllegalArgumentException is thrown. | public RGB[] getRGBs(final int numColors) {
if (numColors != 64) {
ServiceProvider.getLoggingService().getLogger(getClass()).warn(
"The class background colormap only supports 64 colors. Returning 64 colors.");
}
RGB[] rgbs = new RGB[64];
for (int i = 0; i < 64; i++) {
rgbs[64 - i ... | [
"public int[] getColorArray() {\r\n \treturn colors;\r\n }",
"public static Color[][] getMap()\n {\n return map.getRGB();\n }",
"private ColorInt[] createColorArray() {\r\n\t\tColorInt c[]= new ColorInt[topography.getValues().length];\r\n\t\tfloat value;\r\n\t\tint index= 0;\r\n\t\tfloat h= 0;\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setLastName method, of class AbstractUser. | @Test
public void testSetLastName() {
this.administrator.setLastName("ln_adm");
this.teacher.setLastName("ln_tea");
this.student.setLastName("ln_stu");
boolean result = this.administrator.getLastName().equals("ln_adm")
&& this.teacher.getLastName().equals("ln_tea")
... | [
"public void testSetLastname() {\r\n System.out.println(\"setLastname\");\r\n \r\n String lastname = \"\";\r\n com.abbt.timesheet.entities.User instance = new com.abbt.timesheet.entities.User();\r\n \r\n instance.setLastname(lastname);\r\n \r\n // TODO review ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get an instance of the specified Dataset. | <T extends Dataset> T getDataset(String name) throws DatasetInstantiationException; | [
"public static Dataset createDataset() { return connectDataset(Location.mem()) ; }",
"@Beta\n @Override\n public final <T> DataSetManager<T> getDataset(Id.Namespace namespace, String datasetInstanceName) throws Exception {\n //TODO: Expose namespaces later. Hardcoding to default right now.\n Id.DatasetIns... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: a | private void m150605a(int i) {
if (4 > this.f123945f) {
long[] jArr = this.f123940a;
T[] tArr = this.f123941b;
m150609b(C48763a.f123929a.mo123527a(4, this.f123946g));
if (!m150610b()) {
m150607a(jArr, tArr);
}
}
} | [
"public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }",
"interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }",
"public interface ans {\n /* renamed from: a */\n void mo1174a();\n}",
"public interface C24712af {\n /* renamed from... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Matisse.from(AddProduct.this) .choose(MimeType.allOf()) .countable(true) .maxSelectable(1) .gridExpectedSize(getResources().getDimensionPixelSize(R.dimen.grid_expected_size)) .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) .thumbnailScale(0.85f) .imageEngine(new GlideEngine()) .forResult(REQUEST_CODE_... | @Override
public void onClick(View view) {
if (mSelected != null) {
mSelected.clear();
}
new PickerBuilder(AddProduct.this, PickerBuilder.SELECT_FROM_GALLERY)
.setOnImageReceivedListener(new PickerBuilder.onImageRece... | [
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n try {\n if(requestCode==GET_FROM_GALLERY && resultCode == Activity.RESULT_OK) {\n Uri selectedImage = data.getData();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an Service instance using the specified parameters. Capability Level: 0 | public Service createService(
String name
) throws JAXRException{
InternationalString is = createInternationalString(name);
return createService(is);
} | [
"public abstract JamService createService(JamServiceParams params) throws IOException;",
"Service newService();",
"public abstract JamServiceParams createServiceParams();",
"ServiceCharacteristic createServiceCharacteristic();",
"Deploy_service createDeploy_service();",
"private Service createService(Clas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method for updating Client through REST API Updates a client's info through a REST API | @RequestMapping(value="/api/clients/clientinfo/{id}",method=RequestMethod.PUT)
public ResponseEntity<Clients> updateClient(@PathVariable("id") int id,@RequestBody Clients client){
Clients currentClient = null;
//gets Client info. returns NOT_FOUND error if no Client exists
try{
... | [
"void update(Client client) throws ApplicationException;",
"public void update(Client client);",
"JsonObject editClient(JsonObject client);",
"@ApiOperation(value=\"Edit client by Id\", notes=\"Operacion Put\", tags=\"listar\", response= Client.class)\n\t@PutMapping(\"/{id}\")\n\tpublic ResponseEntity<Client>... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method stops the timer /packagelocal | void stopTimer(){
synchronized (object){
resetTimer();
while (countDownLatch.getCount() > 0)
countDownLatch.countDown();
}
} | [
"private final void stop() {\n\t\tNotifierJNI.cancelNotifierAlarm(m_notifier.get());\n\t\ttimer.stop();\n\t\tm_isRunning = false;\n\t}",
"public void stop() {\n stop(60000);\n }",
"public void stopTime() {\n reset();\n }",
"public void stop()\r\n {\r\n if ( running )\r\n {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the edit mode for the view | protected void setEditing(boolean editing) {
// Show / hide the add and done buttons
Button add = (Button) findViewById(R.id.add_button);
Button done = (Button) findViewById(R.id.done_button);
if(editing) {
Actions.RECIPE_EDIT.showNotifications();
if(adapter.getCount() >= 2) {
Actions.RECIPE_INGREDIEN... | [
"public void editMode(){\n setAvailableGrades(this.examinationService.getAvailableGrades());\n setAvailableDivisions(this.examinationService.getAvailableDivisions());\n setAvailableModules(this.examinationService.getAllModules());\n setEditMode(true);\n }",
"public boolean isEditMod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the four methods that follow move a block, a certain number of spaces in a certain direction. | public void traverseUpNode(RushHourBlock block, int spaces) {
nullifyBlock(block);
block.setY(block.getY() - spaces);
moveBlock(block);
} | [
"@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB)\n public void move() {//Move function for changing the blocks coordinates according to the direction\n\n if (newDir == UP) {//Checking for up gesture\n slideUp(destination);\n\n }\n //Repeat the first block\n else if (newDi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check that the constraint is satified in a configuration. | boolean isSatisfied(Configuration cfg); | [
"public abstract boolean verifyConfigurations(Configuration conf);",
"public void checkConfig() {\n\t\tBoofMiscOps.checkTrue(branchFactor > 0, \"branchFactor needs to be set\");\n\t\tBoofMiscOps.checkTrue(maximumLevel > 0, \"maximumLevels needs to be set\");\n\t}",
"boolean isIsConstraintProblem();",
"private... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end of SharedSettings::trimAndAppendFileSeparatorIfMissing SharedSettings::deleteFileIfOverSizeLimit If file pFilename is larger than pLimit, the file is deleted. | private void deleteFileIfOverSizeLimit(String pFilename, int pLimit)
{
//delete the logging file if it has become too large
Path p1 = Paths.get(pFilename);
try {
if (Files.size(p1) > pLimit){
Files.delete(p1);
}
}
catch(NoSuchFileException nsfe){
//do nothing i... | [
"public void deleteMaxChunkNo(String fileId) {\n this.highestChunks.remove(fileId);\n saveToDirectory();\n }",
"@Test\n public void test_999_deleteHugeFiles() throws IOException {\n testAccountForCleanup = testAccount;\n deleteHugeFile();\n ContractTestUtils.NanoTimer time... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This StudentRegisterService interface has two implementations, used to test for Qualifier annotation. | @Component
interface StudentRegisterService {
} | [
"public interface IStudentService {\n\n void regStu(Student stu);\n}",
"@Override\n public Student studentRegister(Student student) {\n try{\n //插入数据,返回自增主键id\n int id = studentDao.insertStudent(student);\n// System.out.println(\"*****************************\");\n// ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bridging method to bridge the two different class. | public Display doCmd(String input) {
assert input != null;
String cmd = input;
String parameters = "";
if (input.indexOf(Variable.SPACE) > 0) {
cmd = input.substring(0, input.indexOf(Variable.SPACE));
parameters = input.substring(input.indexOf(Variable.SPACE));
parameters = parameters.trim();
}... | [
"private void createBridgeMethod(BcelWorld world, NewMethodTypeMunger munger, ResolvedMember unMangledInterMethod,\n \t\t\tLazyClassGen clazz, Type[] paramTypes, ResolvedMember theBridgeMethod) {\n \t\tInstructionList body;\n \t\tInstructionFactory fact;\n \t\tint pos = 0;\n \n \t\tLazyMethodGen bridgeMethod = make... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Intent intent = new Intent(this, DisplayMessageActivity.class); | public void sendMessage(View view) {
userName = (EditText) findViewById(R.id.userName);
userMessage = (EditText) findViewById(R.id.userMessage);
String name = userName.getText().toString();
String message = userMessage.getText().toString();
/* Send HTTP POST Request */
... | [
"public void displayListActivity(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n intent.putExtra(EXTRA_MESSAGE, \"STUFF WILL GO HERE\");\n startActivity(intent);\n }",
"public void chatAction(){\n Intent i = new Intent(getApplicationContext(), ChatAc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column nj_repay_offline_line.id | public void setId(String id) {
this.id = id;
} | [
"public void setbld_mtom_item_line_ID (int bld_mtom_item_line_ID)\n\t{\n\t\tif (bld_mtom_item_line_ID < 1) \n\t\t\tset_ValueNoCheck (COLUMNNAME_bld_mtom_item_line_ID, null);\n\t\telse \n\t\t\tset_ValueNoCheck (COLUMNNAME_bld_mtom_item_line_ID, Integer.valueOf(bld_mtom_item_line_ID));\n\t}",
"public void setLineId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor that requires all attributes | public Cv(Student student, String format, String fileurl, String filename, String jobCat, Set<Job> jobs) {
this.student = student;
this.format = format;
this.fileurl = fileurl;
this.filename = filename;
this.jobCat = jobCat;
this.jobs = jobs;
} | [
"private Attributes() {}",
"public MakesAttributes() {\n }",
"public RequestParams() {\n\t}",
"protected AttributeFactory() {\n\n }",
"public UmoComponentParameters() {\r\n \r\n }",
"private LocationAttributes() {\n // Nothing\n }",
"public FeastProperties() {}",
"private Chi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the consumer that should be called whenever the inventory is clicked in. | public void setOnBottomClick(@Nullable Consumer<InventoryClickEvent> onBottomClick) {
this.onBottomClick = onBottomClick;
} | [
"public Button(Consumer<InventoryClickEvent> inventoryClickEventConsumer) {\n super(inventoryClickEventConsumer);\n }",
"public void onConsume(ItemStack is, ArenaPlayer consume) {\r\n\r\n\t}",
"@EventHandler\n public void onClick(InventoryClickEvent event){\n if(BukkitUtilities.compareInvent... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column PARTY_NETHELP.PNAME | public void setPname(String pname) {
this.pname = pname == null ? null : pname.trim();
} | [
"public void setPartyName(java.lang.String param) {\r\n\t\tlocalPartyNameTracker = param != null;\r\n\r\n\t\tthis.localPartyName = param;\r\n\r\n\t}",
"public void setPartyName(String name) {\n\t\tparty = name;\n\t}",
"public ProductBuilder setName(String pName) {\r\n \r\n this.na... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MinPairs specifies that this field must have the specified number of KVs at a minimum optional uint64 min_pairs = 1; | @java.lang.Override
public long getMinPairs() {
return minPairs_;
} | [
"private int minKeys() {\n\t\t\treturn keys.length / 2;\n\t\t}",
"public static void pairsSmallSets(String[] args) {\n\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint[] numbers = new int[n];\n\t\tint k = s.nextInt();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = s.nextInt();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets up the place holder fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_report, container, false);
return rootView;
} | [
"protected void setupFragment() {\n\n int courseCode = getIntent().getIntExtra(Constants.KEY_COURSE_ID, -1);\n int moduleCode = getIntent().getIntExtra(Constants.KEY_MODULE_ID, -1);\n int toolCode = getIntent().getIntExtra(Constants.KEY_TOOL_ID, -1);\n ContentsFragment fragment = Content... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Execute the onMessageReceivedCallback with the data passed. In case the callback is not present, cache the data; | public static void executeOnMessageReceivedCallback(JSONObject data) {
if (onMessageReceivedCallback != null) {
Log.d(TAG, "Sending message to client");
onMessageReceivedCallback.success(data);
} else {
Log.d(TAG, "No callback function - caching the data for later retrieval.");
cachedDat... | [
"@Override\r\n\tpublic void onGetData(Object data) {\n\t\thandler.sendMessage(handler.obtainMessage(1, data));\r\n\t}",
"private void messageArrivedAction(Bundle data) {\n\t\tif (callback != null) {\n\t\t\tString messageId = data\n\t\t\t\t\t.getString(MqttServiceConstants.CALLBACK_MESSAGE_ID);\n\t\t\tString desti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a random element from the set. | public int getRandom() {
return list.get(new Random().nextInt(size));
} | [
"private static <T> T randomElementFromSet(Set<T> set) {\n Random r = new Random();\n int rand = r.nextInt(set.size());\n Iterator<T> iter = set.iterator();\n for (int i = 0; i < rand; i++) {\n iter.next();\n }\n return iter.next();\n }",
"public Item getRan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get applied profiles for specified Job Id | @GetMapping("/getProfilesByJobId/{jobId}")
public ResponseEntity<?> getProfilesByJobId(@PathVariable("jobId") String jobId){
logger.info("===>Begin Execution of getProfilesByJobId===>");
ResponseEntity<?> results = null;
List<Profile> profiles = null;
try {
if(jobId != null) {
profiles = resou... | [
"public List findAppliedEmployeeProfiles(long id) {\n\t\treturn this.opportunityDao.findAppliedEmployeeProfiles(id);\r\n\t}",
"public java.util.List<WorkloadProfile> getProfiles() {\n return profiles;\n }",
"@Transactional(propagation=Propagation.REQUIRED,readOnly = true)\r\n\tpublic List<JobAttribute... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ access modifiers changed from: private | public void FetchStateWiseData() {
this.activity.ShowDialog(this);
Volley.newRequestQueue(this).add(new JsonObjectRequest(0, "https://api.covid19india.org/data.json", (JSONObject) null, new Response.Listener<JSONObject>() {
public void onResponse(JSONObject response) {
try {
... | [
"@Override\n }",
"protected void method_5557() {}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n public void publicando() {\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"private InternalReflect() {\n\t\t\t// do nothing\n\t\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public List<Map<String, Object>> selectBoardMasterList(Map<String, Object> paramMap) throws Exception {
return commonMapper.selectBoardMasterList(paramMap);
} | [
"@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"
]
]
}
} |
TODO Shows prime numbers in interval 1..1000 | public static void main(String[] args) {
System.out.print("Простые числа от 1 до 1000: ");
for (int i = 1; i < 1000; i++){
if (IsPrime(i)){
System.out.print(i + " ; ");
}
}
} | [
"public static void main(String[] args) {\n int[] primes = new int[168];\n // Since all prime numbers are odd except 2, we take them out of the \"loop\"\n primes[0]= 2;\n // Initialize count of prime numbers\n int counter = 1;\n // Loop from number 3 till 999, as 1000 is ev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a long value | long getLong(int index) throws JSONInvalidValueTypeException; | [
"Long longValue();",
"public long longValue() {\n\t\treturn (long)internalValue;\n\t}",
"public long getAsLong() {\n return value;\n }",
"long getValue243();",
"long getValue123();",
"long getValue111();",
"public long getLongValue () throws IllegalStateException;",
"public long longValue() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column shopping_order_item.product_model_id | public void setProductModelId(Long productModelId) {
this.productModelId = productModelId;
} | [
"public Product setProduct(ProductModel productModel){\n\t \tProduct product= new Product();\n\t \tif(productModel.getId()>0){\n\t \t\t\n\t \t\tproduct.setId(productModel.getId());\n\t \t}\n\t \n\t \tproduct.setAvailable(productModel.getAvailable());\n\t \tproduct.setCategory(this.categoryServi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove second element from list and confirm previousIndex() reset to 0 (pointing to first element). | @Test
public void testRemoveWithTwoNextRemovePreviousIndex() throws Exception {
ListIterator<CvParam> it = cvList.listIterator();
it.next();
it.next();
it.remove();
assertEquals(0, it.previousIndex());
} | [
"@Override\npublic void remove() {\n if (previousPosition != null) {\n // if we are at the second element set it as the first element\n if (previousPosition == first) {\n first = position;\n } else // else remove last returned element by changing the chain\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ID eines Elementes im "AnwendungsBaum" "NULL", falls "SuccessorApplicationPartTreeID" ein "Wurzel"Element ist (also immer im Fall "&64;GetRootApplicationParts = 1" und evtl. falls "&64;IDsInOneID = 2" ist) .dstore.values.IntegerValue application_part_tree_id = 10008; | public boolean hasApplicationPartTreeId() {
return applicationPartTreeIdBuilder_ != null || applicationPartTreeId_ != null;
} | [
"public Long getPartition_()\n{\nreturn getInputDataItemId(\"partition_\");\n}",
"public String getPartID() {\n\t\treturn partID;\n\t}",
"public int getPartValue() {\n return part_;\n }",
"public void setAD_Workbench_ID (int AD_Workbench_ID)\n{\nset_ValueNoCheck (\"AD_Workbench_ID\", new Integer(AD_Wo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test serde with xcontent | public void testFromXContent() throws IOException {
CorrelationQueryBuilder correlationQueryBuilder = new CorrelationQueryBuilder(FIELD_NAME, QUERY_VECTOR, K);
XContentBuilder builder = XContentFactory.jsonBuilder();
builder.startObject();
builder.startObject(correlationQueryBuilder.fiel... | [
"@POST\n @Consumes(MediaType.APPLICATION_JSON)\n public void putXml(Factura content) {\n System.out.println(content);\n }",
"XStream getXStream();",
"@Test\n public void testGetAsXml() throws Exception {\n }",
"protected byte[] serialize(Serializable x) {\n\t\tByteArrayOutputStream bout ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
main method this method puts the final number into numerical order | public static int finalHandOrder (String die1, String die2, String die3, String die4, String die5)
{
ArrayList <String> diceValues = new ArrayList <String> ();
String orderedString;//The ordered number in a string
int index = 0;
int orderedNum;
//recreating ArrayLis... | [
"private static void excliurNum() {\n\t\t\n\t}",
"public static void main (String[] args){\n Scanner in= new Scanner(System.in);\n int n=in.nextInt();\n int m=n%10;\n int reverse=0;\n \n while(n>0)\n {\n reverse=reverse*10+n%10;\n n=n/10;\n }\n int r1=reverse%... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Requests a single permission. | private void showRequestPermissionDialog(Activity activity, String permission, int resultCode) {
ActivityCompat.requestPermissions(activity, new String[]{permission}, resultCode);
} | [
"CommandPermission permission();",
"IPermission findPermissionById(String permissionId);",
"Result getPermission(User user);",
"public void requestPermissions(int requestCode) {\n }",
"public abstract PermissionInfo getPermissionInfo(String paramString, int paramInt) throws NameNotFoundException;",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the Swissprot id of this chains . | public void setSwissprotId(String sp_id){
swissprot_id = sp_id ;
} | [
"public void setID (int sID);",
"public void setID(int n){\n ID = n;\n }",
"private void setStudentID() {\n id++;\n this.studentID = yearNumber + \"\" + id;\n }",
"public void testSetID() {\n\t\t//se comprueba dentro de GetID()\n\t}",
"public void setID(String newID);",
"private void s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method add a new client, that connect to the server, to the queue of clients waiting for a new Game. | public void addToQueue(Integer client){
playersQueue.addPlayer(client);
} | [
"public void addClient (Client client){\n clientsQueue.add(0, client);\n }",
"public void addClient(Client c) {\n\t\tclientsQueue.add(c);\n\t}",
"public void addClient(Client newClient) {\n\t\tsynchronized (clients) {\n\t\t\tclients.add(newClient);\n\t\t\tclients.notify();\n\t\t\tLOGGER.info(\"Client ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make sure the user has a last location registered. | private void createUserBlips(User u){
Log.i("DebugParentsDash", u.getName() + ", " + u.getLastGpsLocation().toString());
if(u.getLastGpsLocation().getLat() != null && u.getLastGpsLocation().getLng() != null && u.getLastGpsLocation().getTimestamp() != null) {
LatLng lastLocation = new LatLn... | [
"private void getUserLocation() {\n if (mFusedProviderClient != null) {\n mFusedProviderClient.getLastLocation().addOnCompleteListener(new OnCompleteListener<Location>() {\n @Override\n public void onComplete(Task<Location> task) {\n Location locati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For a String template, we will use the ownerTemplate as templateName for its parsed events | private void parse(
final IEngineConfiguration configuration,
final String ownerTemplate, final String template, final Set<String> templateSelectors,
final ITemplateResource resource,
final int lineOffset, final int colOffset,
final TemplateMode templateMode,
... | [
"protected String processInnerTemplate(final String template, final Map input)\n {\n String result = null;\n \n if (template != null)\n {\n \n StringTemplate t_strInnerTemplate =\n new StringTemplate(template, AngleBracketTemplateLexer.cla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to determine check if the player is pushing a block onto an enemy unit. | public boolean checkEnemyBlocks(World world, float x,
float y, int direction) {
// Loops over enemy objects and checks if they exist after a block
// If so, return true.
for (Enemy enemy: world.enemies) {
if (enemy != null) {
if (direction == enemy.UP) {
if (worl... | [
"public abstract boolean isPushableFrom(Position posPlayer);",
"private boolean isPlayerInBlock(int mapBlockX, int mapBlockY) {\n\t\tIntegerPosition playerBlock = getPlayerCurrentBlock();\n\t\treturn playerBlock.x == mapBlockX && playerBlock.y == mapBlockY;\n\t}",
"public static boolean isBlockPlacedByPlayer(Bl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "seq" element | public gov.nih.nlm.ncbi.www.PCRPrimerDocument.PCRPrimer.Seq getSeq()
{
synchronized (monitor())
{
check_orphaned();
gov.nih.nlm.ncbi.www.PCRPrimerDocument.PCRPrimer.Seq target = null;
target = (gov.nih.nlm.ncbi.www.PCRPrimerDocument.P... | [
"public java.lang.Integer getSeq () {\n\t\treturn seq;\n\t}",
"public java.lang.String getSequence() {\r\n return sequence;\r\n }",
"public int getSequence() {\n\t\treturn seq;\n\t}",
"ExplicitGroup getSequence();",
"public int getSeq() {\n return seq;\n }",
"public Sequence getSequenc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Just launch a new intent and clear the activities in the stack. | @Override
public void onClick(View v) {
Intent intent = new Intent(getBaseContext(), MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
} | [
"@Override\n\tprotected void onNewIntent(Intent intent) {\n\t\tsuper.onNewIntent(intent);\n\t\tif ((Intent.FLAG_ACTIVITY_CLEAR_TOP & intent.getFlags()) != 0) { \n\t\t\tthis.finish(); \n\t\t} \n\t}",
"private void reloadActivityFlags()\n {\n Intent intent = new Intent(getApplicationContext(),\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test for help already done in PetTrackerParserTest | @Test
public void parseCommand_unknownCommand_throwsParseException() {
assertThrows(ParseException.class, MESSAGE_UNKNOWN_COMMAND, () -> parser.parseCommand("unknownCommand"));
} | [
"@Test\n\tpublic void testParseRiver() {\n\n\t}",
"@Test\n public void parseAccPoK(){\n }",
"@Test\n\n\tpublic void testParseable() {\n\n\t}",
"@Test\n public void testParse() throws Exception {\n //TODO: Test goes here...\n }",
"@Test\n public void parseCoinSpend(){\n }",
"@Test\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional bytes attach_data = 20; | com.google.protobuf.ByteString getAttachData(); | [
"void addAttachment(byte[] bytes, String fileName, String description);",
"void setAttachmentContent(AttachmentReference attachmentReference, byte[] attachmentData) throws Exception;",
"public void setAttachment(byte[] value) {\n this.attachment = value;\n }",
"public LinkedHashMap appendDataToAttac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/////////////////////////////// USER RELATED ///////////////////////////////// Status: Finished, maybe some additional methods here and there / PARAMETERS: N/A RETURN VALUE: User PURPOSE: Accessor which returns the user that is currently logged in | public User getUserLoggedIn() {
return userLoggedIn;
} | [
"public Optional<User> findCurrentLoggedInUser() {\n return userDAO.findCurrentLoggedInUser();\n }",
"public User getCurrentUser() {\n return loginController.getCurrentUser();\n }",
"public User getCurrentUser()\r\n\t{\r\n\t\treturn currentUser;\r\n\t}",
"private User getUser() {\n\t\tUser... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public int getCount() {
return mData.length();
} | [
"@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"
]
]
}
} |
Resets the taxonesvo field. | public void resetTaxonesvo(); | [
"public com.diviso.graeshoppe.payment.avro.Payment.Builder clearTax() {\n tax = null;\n fieldSetFlags()[8] = false;\n return this;\n }",
"public void resetTipoNavegacion();",
"private void reset() {\n\t\t\tString clear = \" \";\n\t\t\ttfItem.clear(); \n\t\t\ttfPrice.clear();\n\t\t\ttfQuantity.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Dependency injection component for production clientside dependencies. | @Component(modules = {
DraftTowerClientTestSafeModule.class,
DraftTowerClientLiveModule.class,
})
@Singleton
public interface DraftTowerClientComponent {
MainPageWidget mainPageWidget();
EagerSingletons injectEager();
} | [
"private DI(){}",
"@GithubApplicationScope\n@Component(modules = {GithubServiceModule.class, PicassoModule.class})\npublic interface GithubApplicationComponent {\n Picasso getPicasso();\n GithubService getGithubService();\n}",
"@Singleton\n@Component(modules = {\n RestApiModule.class,\n Pres... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns photo with this filename | public Photo getPhoto(String filename){
if(user.albumlist.isEmpty()){
System.out.println("Photo "+filename+" does not exist");
return null;
}
for(Entry<String, Album> entry: user.albumlist.entrySet()){
for(Entry<String, Photo> entry1: entry.getValue().photolist.entrySet()){
if(entry1.getValue().fi... | [
"String getThumbnailFile();",
"String getImageFilePath();",
"public Image getImage() {\r\n\t\ttry {\r\n\t\t\treturn new Image(new FileInputStream(photoPath));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String getImage() {\r\n\t\treturn file;\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Venta venta = service.registrar(ven); | @PostMapping
public ResponseEntity<Integer> registrar(@RequestBody VentaDTO venDTO) {
int rpta = service.registrarTransaccional(venDTO);
// URI location = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}").buildAndExpand(venta.getIdVenta()).toUri();
// return ResponseEntity.created(location).build()... | [
"public void registrarVenta(){\n //Complete\n fruta.registrarVenta(PORCION_FRUTA);\n almidon.registrarVenta(PORCION_ALMIDON);\n grano.registrarVenta(PORCION_GRANO);\n proteina.registrarVenta(PORCION_PROTEINA); \n }",
"public void registrarVenta(Venta unaVenta) {\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
citeste parametrul command din form | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String command = request.getParameter("command");
if(command == null){
System.out.println("No command specified.");
}
switch (command){
case "LO... | [
"protected void processCommand(ActionEvent e) {\n\t\tif(e.getCommand().getCommandName().equals(\"Lưu\")){\r\n\t\t\tString Name = hovaten.getText();\r\n\t\t\tString Sdt = sdt.getText();\r\n\t\t\tString Email = email.getText();\r\n\t\t\tString Diachi = diachi.getText();\r\n\t\t\t\r\n\t\t\tData.data= Name;\r\n\t\t\tDa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log statement to monitor dockets load performance. | private long logTimeTakenToLoadDocketsThroughWrapperAPI(DocketsList docketsList, List<Docket> badDocketsList, long parseEndTime) {
long loadEndTime = System.currentTimeMillis();
int docketsListSize = 0;
int badDockListSize = 0;
if (docketsList != null && docketsList.getDocketList() != null && docketsList.getDoc... | [
"protected void logStatistics() {\n\t\tif (this.sleepTime > 0L && log.isDebugEnabled()) {\n\t\t\tfinal Object[] args = { new Long(this.recordKeeper.getQueriesPerSecond()) };\n\t\t\tlog.debug(Messages.getCompoundString(\"CacheDecorator.query_rate\", args)); //$NON-NLS-1$\n\t\t}\n\n\t\t// Print the efficiency report\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
processing a ask MKT order | public void processingAskMKT(Order ord){
//get orderid,userid,ask price,remainder
Map<Integer, Map<String,Object>> bidMap = this.getDaoManager().getOrderBookDAO().getOrderBookBidBySymbol(ord.getSymbol());
int askRemainder = ord.getQty();
for(Map<String,Object> record: bidMap.values()) {... | [
"public static void main(String[] args) {\n\t\tString[] tenQueries = {\"causes of stress\", \"weight loss\", \"aids in africa\", \"waterborne diseases in africa\",\r\n\t\t\t\t\"obesity in children\", \"diabetes\", \"hair loss or baldness\", \"english as a second language\",\r\n\t\t\t\t\"playing guitar\", \"playsta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the myapp with the primary key or throws a NoSuchMyappException if it could not be found. | public Myapp findByPrimaryKey(long myappId) throws NoSuchMyappException; | [
"public Application getApplication(String name) throws ApplicationNotFoundException;",
"@Override\n\t\tpublic Application getApplicationById(int applicationId) {\n\t\t\tOptional<Application> opt = appRepo.findById(applicationId);\n\t\t\tif(!opt.isPresent()) {\n\t\t\t\tthrow new ApplicationNotFoundException(\"Appl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if collision is true, combat must commence | public void combat(){
System.out.println("init combat");
isCollision = true;
} | [
"public abstract boolean collide(Entity collision);",
"@Override\r\n\tpublic void collision(int x, int y, GameObject obj) {\n\t\t\r\n\t}",
"public void collision() {\n \t\n \t// location as the project but does not play it.\n \tfor (int i = 0; i < mines.size(); i++) {\n\t\t\tmine = (Mines) mines.elemen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set eRDF object property | public String setProperty(String name, String value); | [
"public void setProperty(String property) {\n \r\n }",
"abstract public void set(String property, String value);",
"@Override\n\tpublic void setSpecificProperty(Object property) {\n\n\t}",
"public void setObjectURI(String newURI) {\n\tupdateNodeTextValue(ATTR_OBJECT_URI, newURI);\n }",
"@Overri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void contextDestroyed(ServletContextEvent arg0) {
} | [
"@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"
]
]
}
} |
Contract for deciding whether fields should be read and/or write intercepted. | public interface FieldFilter {
/**
* Should the given field be read intercepted?
*
* @param desc
* @param name
* @return true if the given field should be read intercepted; otherwise
* false.
*/
boolean handleRead(String desc, String name);
/**
* Should the given field be write intercept... | [
"protected void processReadOnly() {\r\n MetadataAnnotation readOnly = getAnnotation(ReadOnly.class);\r\n \r\n if (m_readOnly != null || readOnly != null) {\r\n if (getDescriptor().isInheritanceSubclass()) {\r\n // Ignore read only if specified on an inheritance subclas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for testing or w/e | public synchronized List<String> getAllWordsWFakes(){
List<String> allWords= new ArrayList<String>();
for (Map.Entry<Character, CharacterNodeWithContext> pair: wordsMap.entrySet()){
getWords(allWords, "", wordsMap.get(pair.getValue()), false);
}
// for (Character c: startChars){//TODO replace w map.getKeySet... | [
"private static void EX5() {\n\t\t\r\n\t}",
"private void testing() {\n\t}",
"protected void method_5557() {}",
"private void doTest() {\r\n\r\n\t}",
"public void testIfWon();",
"@Override\r\n\tpublic boolean trocar() {\n\t\treturn false;\r\n\t}",
"public void bulletproof();",
"private void performChe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Dakar, Senegal. If Google Play services is not installed on the device, the user will be prompted to insta... | @Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
/* Add a marker
LatLng Dakar = new LatLng(14.7167, -17.4677);
LatLng Thies = new LatLng(14.791, -16.9359);
mMap.addMarker(new MarkerOptions().position(Dakar).title("Marker in Dakar"));
mMap.ad... | [
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set function for _ave | public void setAverage(double average) { _ave = average;} | [
"public void setAveraging( int averaging );",
"public final static void avevar(final float[] data, floatR ave, floatR var) {\n\tint n = data.length-1;\n\tint j;\n\tfloat s;\n\n\tave.value=(var.value=0);\n\tfor (j=1;j<=n;j++) ave.value += data[j];\n\tave.value /= n;\n\tfor (j=1;j<=n;j++) {\n\t\ts=data[j]-ave.value... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads an XML document from an XML literal and creates a HopObject out of it | public Object readFromString(String str) throws RuntimeException {
return readFromString(str, null);
} | [
"public abstract Object xMLToObject(String xml);",
"Document loadXML(InputStream stream) throws IOException, SAXException;",
"public static Stocks unmarshalXmlToObjectOtherWay() {\n\n Stocks stocksObject = null;\n try {\n //get xmlInstance\n InputStream xmlResourceAsString = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function should be called when the algorithm finished abnormally (ie is stopped by the user). | public void cleanup(){
//Do some cleanup.
sets.consolidateActivePoints();
sets.addConvexHullPointsToActivePoints();
sets.activePoints.get(0).removeDuplicates();
sets.activePoints.get(0).color = originalColor;
sets.pairedPoints.clear();
sets.sweeper = null;
sets.numbering = sets.fading = false;
} | [
"protected void finished() {\n \t\t\t// do nothing by default\n \t\t}",
"public void done() {\n\t\tendTime = System.currentTimeMillis();\n\t\tlastChangedIndex = -1;\n\t\tpointIndex = -1;\n\t\tisSortingInProgress = false;\n\t\tsortedProperly = true;\n\t\tclearRegion();\n\t\tfor(int i = 0; i < arr.length; i++) {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a pipe advertisement | public static Advertisement getHeartbeat () {
PeerGroupID groupId = PeerGroupID.defaultNetPeerGroupID;
AdvertisementFactory.registerAdvertisementInstance(
JxtaHeartbeat.getAdvertisementType(),
new JxtaHeartbeat.Instantiator());
JxtaHeartbeat heartbeat = new JxtaHe... | [
"PipeWrapper createPipe() {\n PipeWrapper pipeWrapper = null;\n try {\n JxtaBiDiPipe aPipe = new JxtaBiDiPipe();\n aPipe.setReliable(true);\n pipeWrapper = new PipeWrapper(\"created_pipe\", PipeWrapper.SENDER_PIPE, this.getReplicateToInstanceName(), aPipe);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles the HTTP POST method. | @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | [
"@Override\n\tpublic void handlePost(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\n\n\n }",
"@Override\n public void post(String path) {\n \n }",
"@Override\r\n\tpub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
clients interested in VES Collector configuration changes can call the registerForChanges method so as to be notified when configuration changes are made | void registerForChanges(VESCollectorConfigChangeListener o); | [
"public void configChanged(ConfigurationActionEvent e) {\n if (debug.messageEnabled()) {\n debug.message(\"FAMSTSConfiguration: configChanged\");\n }\n setValues();\n }",
"public void publishConfigurationChange(Config config);",
"private void addChangeListeners() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setup uniforms and begin new render context | public void begin(Camera camera, RenderContext context, LevelEnv env) {
this.camera = camera;
this.context = context;
this.env = env;
if (isValid()) {
shader.begin();
context.begin();
bindGlobalUniforms(camera, context, env);
afterBegin();
}
} | [
"private void initShader() {\n mShaderProgram = loadProgram(VERTEX_SHADER, FRAGMENT_SHADER);\n // Get the attribute locations\n attribPosition = GLES20.glGetAttribLocation(mShaderProgram, \"a_position\");\n attribTexCoord = GLES20.glGetAttribLocation(mShaderProgram, \"a_texCoord\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets an ini value. | public void setIni(String name, String value)
{
if ("off".equalsIgnoreCase(value))
value = "";
setIni(name, new StringValueImpl(value));
} | [
"public Builder setDataIni(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n dataIni_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic void setInifile(Inifile ini) {\r\n\t\tthi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allow the implementation of the singleton pattern | public static synchronized Toaster getInstance()
{
if (TOASTER_INSTANCE == null)
{
TOASTER_INSTANCE = new Toaster();
}
return TOASTER_INSTANCE;
} | [
"private SingletonDesignDemo(){}",
"public Singleton() {\n super();\n }",
"private Singleton() {\r\n\r\n }",
"private Singleton() {\r\n }",
"@Override\r\n public boolean isSingleton() {\n return false;\r\n }",
"private ThreadSafeSingletonUsingStaticMethod() {}",
"public stat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .CDOTAUserMsg_ParticleManager.UpdateParticleEnt update_particle_ent = 12; | public skadistats.clarity.wire.common.proto.DotaUserMessages.CDOTAUserMsg_ParticleManager.UpdateParticleEnt getUpdateParticleEnt() {
return updateParticleEnt_;
} | [
"public float getParticleOffset(){return offset;}",
"public void updatePosition(Particle particle) {\n //Since new position is ALWAYS calculated after calculating new velocity, it is okay to just add old position to the current velocity (as velocity would have already been updated).\n for (int i=0; ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Execute user event: e13152 | protected void GXStart( )
{
e13152 ();
if (returnInSub) return;
} | [
"void onDesiredEventProcessed() {\n }",
"@Override\r\n\tpublic void onEvent(Object e) {\n\t}",
"@DISPID(111) //= 0x6f. The runtime will prefer the VTID if present\r\n @VTID(12)\r\n vba.Events events();",
"public final void mo100857c() {\n C31441e eVar = new C31441e();\n eVar.mo128205a().mo1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Crea un livello con i parametri scelti. | public Level(int num, boolean repetitions, boolean uppercase) {
this.num = num < 1 ? 1:(num > limit? limit: num);
this.repetitions = repetitions;
this.uppercase = uppercase;
} | [
"PARAMETROS (String parametro) { \r\n\t this.parametro = parametro;\r\n\t }",
"private LinkedList<Parametros> generarLista(String[] listaParametricas) {\r\n LinkedList<Parametros> lista = new LinkedList<Parametros>();\r\n for (String llave : listaParametricas) {\r\n System.out.println(\"llave... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to write persistent data to file for customers | public static void writeToFile(ArrayList<Customer> customers) {
try
{
// create Bufferedwriter instance with a FileWriter
// the flag set to 'false' tells it to override a file if file exists
BufferedWriter out = new BufferedWriter(new FileWriter("Customer.txt", false));
for(int i =0; i< customers... | [
"static void saveCustomer() {\n\t\tfileController.writeCustomersToFile(manager.getCustomers());\n\t}",
"public void saveCustomerToFile () {\n\t\ttry \n\t\t\t{\n\t\t\t\tCustomerInfo c = null;\n\t\t\t\tString line, line2 , reverseLoginName , reversePinCode ;\n\t\t\t\tFileWriter fw = new FileWriter(\"account.txt\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleXNumberLiteral" $ANTLR start "entryRuleXTypeLiteral" InternalSARL.g:2616:1: entryRuleXTypeLiteral : ruleXTypeLiteral EOF ; | public final void entryRuleXTypeLiteral() throws RecognitionException {
try {
// InternalSARL.g:2617:1: ( ruleXTypeLiteral EOF )
// InternalSARL.g:2618:1: ruleXTypeLiteral EOF
{
if (! isBacktracking() ) {
before(grammarAccess.getXTypeLiteralRule());... | [
"public final EObject entryRuleXTypeLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXTypeLiteral = null;\n\n\n try {\n // ../hsh.swa.ocl/src-gen/hsh/swa/ocl/parser/antlr/internal/InternalOCL.g:4924:2: (iv_ruleXTypeLiteral= ruleXTypeLiteral EOF )\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test Rename Table With PreparedStatement. | public void testRenameWithPreparedStatement() throws SQLException {
Statement s = createStatement();
s.executeUpdate("create table t3(c31 int not null primary key)");
s.executeUpdate("insert into t3 values 31");
s.executeUpdate("insert into t3 values 32");
s.executeUpdate("insert... | [
"@Override\n\tpublic String visitStmtRenameTable(GramaticaSQLParser.StmtRenameTableContext ctx) \n\t{\n\t\treturn super.visitStmtRenameTable(ctx);\n\t}",
"@Override\n\tpublic String visitRenameTable(GramaticaSQLParser.RenameTableContext ctx)\n\t{\n\t\treturn super.visitRenameTable(ctx);\n\t}",
"public void test... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method that will add the station feature type customizing it for the desired GML version. | protected void addStationFeatureType(String namespacePrefix, String gmlPrefix, String stationsFeatureType, String stationsMappingsName, String stationsMappingsPath, String measurementsMappingsName, String measurementsMappingsPath, Map<String, String> parameters) {
// create root directory
File g... | [
"FeatureType(String name) { this.name = name; }",
"public void setType(FeatureType type);",
"public String getFeatureType() {\n\t\treturn featureType;\n\t}",
"public FeatureType getFeatureType();",
"public void addFeatures(FeatureType feature) {\n\t\tfeatures.add(feature);\n\t}",
"public String getFeature... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implemented to support onPreferenceChangeListener to look for preference changes specifically on this button. | public boolean onPreferenceChange(Preference preference, Object newValue) {
int operatorIndex = findIndexOfValue((String) newValue);
mOperatorInfo = mOperatorInfoList.get(operatorIndex);
if (DBG) logd("selected network: " + getNetworkTitle(mOperatorInfo));
Message msg = mHandler.obtain... | [
"@Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n return true;\n }",
"@Override\n public boolean onPreferenceChange(Preference preference, Object o) {\n return true;\n }",
"@Override\n\tpublic boolean onPreferenceChange(P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new Element at the given Point. | private void createElement(Point point) {
// Offset for avoiding intersecting modules.
Point offset = new Point();
Rectangle rect = null;
if (selectedModule.getModule() == null || selectedModule.getModule().getRectangle() == null) {
rect = new Rectangle(GATE_SIZE);
} ... | [
"public Point(Point point){\n\t\tthis(point.x, point.y);\n\t}",
"MyElement createMyElement();",
"public Point(){\n\t\tthis(0, 0);\n\t}",
"private Element createPointElem(String lat, String lon, String alt) throws Exception {\r\n\r\n \tElement pointElem = kmlDoc.createElementNS(KML_NS, KML_PRE + \":\" + POI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub Album a= new Album(); BUSQUEDA COMPLETA | public static void getJamendoInfo(String nameArtist) {
String path ="<http://dbtune.org/jamendo/artist/";
String mbid= getArtistId(nameArtist);
path=path+mbid+">";
String serviceEndpoint="http://dbtune.org/jamendo/sparql";
//busquedaCompleta(ruta,serviceEndpoint);
//BUSQUEDA DE UNA QUERY-->wikilink... | [
"public void addAlbum(Album a) {\n\t\tif(!albums.contains(a))\n\t\t\talbums.add(a);\n\t}",
"@Override\n\tpublic void criarAlbum(String nomeAlbum) {\n\t\t\n\t}",
"public final String getAlbum(){\r\n return this.album;\r\n }",
"public void setAlbum(Album album) {\n currentAlbum = album;\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a reader for URL url. Return null if (1) url is null or (2) its protocol is not http or https. | private static BufferedReader getReader(URL url) throws IOException {
if (url == null) return null;
String p= url.getProtocol();
if (!(p.equals("http") || p.equals("https"))) return null;
InputStream is= url.openStream();
InputStreamReader isr= new InputStreamReader(is);
... | [
"InputStream openReader(String s) {\n System.err.println(\"Fetcher: trying url \" + s);\n try {\n URL url = new URL(s);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n return url.openStream();\n } catch (IOException e) {\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this private method helps us retrieve the index of a site in the grid as represented in the WeightedQuickUnion object | private int getIndex(int i, int j) {
return ((i-1)*N + j);
} | [
"private int siteIndex(int i, int j) {\n checkBounds(i, j);\n int x = j;\n int y = i;\n return (y - 1) * gridLength + x;\n }",
"public int siteNumber(){\r\n return siteArray.size();\r\n }",
"public int getSite() {\r\n return site;\r\n }",
"private int getSite... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: a | public C15015c mo46614a(X509TrustManager x509TrustManager) {
try {
Class cls = Class.forName("android.net.http.X509TrustManagerExtensions");
return new C15003a(cls.getConstructor(new Class[]{X509TrustManager.class}).newInstance(new Object[]{x509TrustManager}), cls.getMethod("checkServerT... | [
"public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }",
"interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }",
"public interface ans {\n /* renamed from: a */\n void mo1174a();\n}",
"public interface C24712af {\n /* renamed from... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the tercerApellidoSolicitante value for this DtoDatosCaratula. | public void setTercerApellidoSolicitante(java.lang.String tercerApellidoSolicitante) {
this.tercerApellidoSolicitante = tercerApellidoSolicitante;
} | [
"public void setDetalleSolicitudCompra(DetalleSolicitudCompra detalleSolicitudCompra)\r\n/* 479: */ {\r\n/* 480:582 */ this.detalleSolicitudCompra = detalleSolicitudCompra;\r\n/* 481: */ }",
"public void setApellidoPaterno(java.lang.String apellidoPaterno)\n {\n synchronized (monit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
only the error codes must be compared | public void testJsonRpc2ErrorEqualityFalse() {
JSONRPC2Error err1 = new JSONRPC2Error(100, "ABC");
JSONRPC2Error err2 = new JSONRPC2Error(101, "ABC");
assertFalse(err1.equals(err2));
} | [
"boolean hasErrcode();",
"public abstract int errorCode();",
"private static void checkResponseCode(int code, HttpRequestHelper.Response response) {\n if (response.getCode() != code) {\n error(String.format(\"Expected HTTP code %d, got code %d.\\n\\n%s\", code,\n response.ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: d | public final void accept(com.iqoption.quiz.api.response.a.e eVar) {
this.dnY.dnU.e(eVar);
} | [
"private void d() {\n }",
"public void mo1857d() {\n }",
"public void setD(String d) {\n this.d = d;\n }",
"public boolean d() {\n }",
"protected void d()\r\n/* 49: */ {\r\n/* 50:57 */ super.d();\r\n/* 51: */ }",
"protected void mo4791d() {\n }",
"@Override\n\tpublic voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public static void main(String[] args) throws IOException {
File file = new File("integerFile.txt");
if(!file.exists()) {
file.createNewFile();
}
String str = "";
for(int i = 0; i< 100; i++) {
str += (int) Math.floor(Math.random()*101) + " ";
}
FileWriter fileWriter = new FileWriter("integerFile.txt... | [
"@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"
]
]
}
} |
mOperatorAlphaLong contains the ERI text | @Override
protected void updateSpnDisplay() {
String plmn = mSS.getOperatorAlphaLong();
boolean showPlmn = false;
if (!TextUtils.equals(plmn, mCurPlmn)) {
// Allow A blank plmn, "" to set showPlmn to true. Previously, we
// would set showPlmn to true only if plmn was... | [
"public void checkSpecialOperator() throws UiObjectNotFoundException {\n commonModule.clickDescription(\"minus\");\n commonModule.clickText(\"6\");\n commonModule.clickDescription(\"divide\");\n commonModule.clickDescription(\"minus\");\n testCase.assertTextPresent(\"minus6divided... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Caches the cong chuc2 nhom thu tuc in the entity cache if it is enabled. | public void cacheResult(CongChuc2NhomThuTuc congChuc2NhomThuTuc) {
EntityCacheUtil.putResult(CongChuc2NhomThuTucModelImpl.ENTITY_CACHE_ENABLED,
CongChuc2NhomThuTucImpl.class, congChuc2NhomThuTuc.getPrimaryKey(),
congChuc2NhomThuTuc);
FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ID,
new Object[] { Long.v... | [
"public void cacheResult(DanhMucBaoCao danhMucBaoCao) {\n\t\tEntityCacheUtil.putResult(DanhMucBaoCaoModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\tDanhMucBaoCaoImpl.class, danhMucBaoCao.getPrimaryKey(),\n\t\t\tdanhMucBaoCao);\n\n\t\tdanhMucBaoCao.resetOriginalValues();\n\t}",
"@Override\n protected void updateCach... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void update(PaymentVO vo) {
} | [
"@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"
]
]
}
} |