query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Retrieves the head packet from the queue. Waiting, if necessary, for a packet to be added to the queue. | public DatagramPacket dequeuePacket() throws InterruptedException {
final DatagramPacket packet = queue.take();
queue.remove(packet);
return packet;
} | [
"@Override\r\n public T head() throws QueueUnderflowException {\r\n if (isEmpty()) {\r\n throw new QueueUnderflowException();\r\n } else {\r\n Wrapper<T> rtnVal = (Wrapper<T>) storage[0];\r\n for (int i = 0; i <= tail; i++) {\r\n Wrapper<T> item = (Wr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method 2: Without extra class or data structure O(n) | public static boolean isPalindrome2(String sample) {
if (sample.length() == 0 || sample.length() == 1 || sample.trim().length() == 0) {
return true;
}
else {
int x = 0, y = sample.length() - 1;
while (x < y) {
if (sample.charAt(x) == sample.charAt(y)) {
x++;
y--;
} else {
return ... | [
"O invert(O operation);",
"public static int BigO(int[] list) {\n return list[0]; // We can see that the function executes only one operation\n // The efficiency is Big O of 1 or O(1)\n }",
"public ho b(int paramInt1, int paramInt2)\r\n/* 449: */ {\r\n/* 450:461 */ if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
node.setData(Field.SuiteId, new Data(display.getSelectedSuite().getId())); node.setData(Field.SuiteName, new Data(display.getSelectedSuite().getName())); node.setData(Field.Address, new Data(display.getSelectedSuite().getAddress())); node.setData(Field.MLS, new Data(display.getSelectedSuite().getMLS())); | private void saveData() {
} | [
"@Override\n\tprotected void setData(Object data) {\n\t\tDepartmentModel department = (DepartmentModel)data;\n\t\tidText.setText(department.getId());\n\t\tnameText.setText(department.getName());\n\t\tTools tool = new Tools();\n\t\ttool.setSelectedItem(collegeBox, department.getCollegeId());\n\t}",
"public void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column pe_feedback.ANSWER_BY | public String getAnswerBy() {
return answerBy;
} | [
"public String getUserAnswer(){\n return this.userAnswer.getAnswer();\n }",
"public String getUserAnswer() {\n return user_answer;\n }",
"public String getEP_SREPLYBY() {\n return EP_SREPLYBY;\n }",
"public String getAnswer()\n\t{\n\t\treturn getAnswer( getSession().getSessionContext()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set whether this LED effect should loop after finishing, unless the LED is otherwise commanded differently. | public Builder setRepeating(boolean repeating) {
this.repeating = repeating;
return this;
} | [
"public void setLoop()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(isLooped == false)\n\t\t\t{\n\t\t\t\tisLooped = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tisLooped = false;\n\t\t\t}\n\n\t\t}\n\t\tcatch(Exception ext)\n\t\t{\n\t\t\tSystem.out.println(\"Muser Looper Error: \"+ext);\n\t\t}\n\t}",
"public boolean shouldLoop(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Rate (/s) counter for totpriqvalidcookies | public Long get_priqvalidcookiesrate() throws Exception {
return this.priqvalidcookiesrate;
} | [
"private void incrementRqsPerSecCount(LocalDateTime now) {\n updateRequestsPerSecondCounter();\n updateRequestTimeWithinSecond(now);\n }",
"public void calculateRates(){\n \thit_rate = total_hits/(double)total_accesses;\n }",
"private void updateScore(HttpServletRequest request, int count... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setter method for destinationCountry field. | public void setDestinationCountry(final String newDestinationCountry) {
if (destinationCountryValidator(newDestinationCountry)) {
destinationCountry = newDestinationCountry;
}
} | [
"public void setDestinationCountryID(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localDestinationCountryIDTracker =\r\n param != java.lang.Integer.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sound Functions Below This function plays a sound file Takes the name of the sound file and a volume in Decibels | public void playSoundFile(String file_name, float volume) {
try {
File clipFile = new File(file_name);
AudioInputStream audioIn = AudioSystem.getAudioInputStream(clipFile);
shortclip = AudioSystem.getClip();
shortclip.open(audioIn);
FloatControl volume... | [
"private void playSound(String fileName) {\r\n\t\t\ttry {\r\n\t\t\t\tFile soundFile = new File(fileName);\r\n\t\t\t\tAudioInputStream ais = AudioSystem.getAudioInputStream(soundFile); //Audio stream (which is an object) allows us to get the audio format\r\n\t\t\t\tAudioFormat theformat = ais.getFormat();\t //This ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle navigation view item clicks here. | @SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id) {
case R.id.nav_brand:
startActivity(new Intent(DrawerActivity.this, BrandActivity.class));
break;
... | [
"void onNavigationItemClick(int item);",
"public void ClickItem(View view){\n MainActivity.redirectActivity(this, item.class);\n }",
"@Override\n public void clickitem(View view, final int position) {\n\n }",
"@Override\n publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Arrays.asList(var arg) can be used to add items while object is being created However , 1 , The variable type MUST BE A LIST because the method return List not ArrayList 2 , It will generate a unmodifiable list can not add or remove item | public static void main(String[] args) {
List<Integer> lst = Arrays.asList(3,5,6,7,5,4,3);
//lst.add(100) ;
//lst.remove(0);
//lst.set(0, 100);
System.out.println( lst );
List<String> JLA = Arrays.asList("Superman","Batman","Wonder Woman");
Sy... | [
"public static void main(String[] args){\n\t\t\n\t\tInteger [] arr={12,23,45};\n\t\tList<Integer> list=Arrays.asList(arr);//return list\n\t\tSystem.out.println(list);\n\t\t//case1\n\t\t//arr[0]=67;//arrayis backed by list\n\t\t//System.out.println(list);\n\n\t\t//case2\n\t\t//list.set(0,23);//list is backed by arra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Leaderboard's function swapPlayers swaps the places of two players in the players ArrayList | private void swapPlayers(Player x, Player y, int index)
{
Player temp = y;
x.setIndex(y.getIndex());
players.set(y.getIndex(), x);
x = temp;
y.setIndex(index);
} | [
"private void swapPlayers() {\n ArrayList<Player> alivePlayers = new ArrayList<>(participants);\n\n Collections.shuffle(alivePlayers);\n\n Location firstPlayerLocation = alivePlayers.get(0).getLocation();\n String firstPlayerName = alivePlayers.get(0).getName();\n\n Bukkit.broadca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the resultado with the primary key or returns null if it could not be found. | @Override
public Resultado fetchByPrimaryKey(ResultadoPK resultadoPK) {
return fetchByPrimaryKey((Serializable)resultadoPK);
} | [
"@Nullable\n SqlRow findOne();",
"public T findById(int id){\n Connection c = Conexiune.getConnection();\n try{\n ResultSet set;\n PreparedStatement statement = (PreparedStatement) c.prepareStatement(select(clasa.getDeclaredFields()[0].getName())+id);\n set= stateme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialise les "listeners" internes au composant graphique. | protected void initListeners() {
aedActions.addModifyActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
switch (state) {
case VIEW:
state = State.EDITION;
break;
case EDITI... | [
"public void init_Listeners()\n\t{\n\n\t}",
"private void _initListeners()\n\t{\n\t\t\n\t}",
"@Override protected void initListeners() {\n\n }",
"public void setListeners() {}",
"private void setListeners() {\n\t}",
"private void initListener() {\n\t}",
"public void initListener() {\n\n\t}",
"priva... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
private CouponBean entry; public com.pocketJini.util.ImageLoader imageLoader; | public OrderListAdapter(Activity activity, ArrayList<HashMap<String, String>> list) {
super();
this.activity = activity;
this.list = list;
} | [
"public String getProfileImage()\n{\n return profileImage;\n}",
"public Image getImage(){ return image;}",
"private Property(ImageIcon imageIcon) {\n this.imageIcon = imageIcon;\n }",
"public void setProfileImage(String profileImage)\n{\n this.profileImage = profileImage;\n}",
"public String getPi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Do nothing, handled directly in the ability listener to save time | @Ability(name = "Blessings of Battle", info = "Can only die while being attacked.", type = Ability.Type.PASSIVE, placeholder = true)
public void cheatDeathAbility() {
} | [
"@Override\n\tpublic void msgPleaseComeAboard() {\n\t\tlog.add(new LoggedEvent(\"please come aboard\"));\n\t}",
"public void setCanDoEvent() {\n setLastEvent(timeSinceLastEvent() - getInterval());\n }",
"protected void check() {\n\t\tpurgeTask();\n\n\t\tif (server.getOnlinePlayers().length == 0) {\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the message of this event. | public void setMessage(String message) {
this.message = message;
} | [
"@SuppressWarnings(\"unused\")\n public void setMessage(String message) {\n this.mMessage = message;\n }",
"public void setMessage ( String message ) {\r\n\t\tgetStateHelper().put(PropertyKeys.message, message);\r\n\t\thandleAttribute(\"message\", message);\r\n\t}",
"public void setMessage(String message... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for ATTRIBUTE12 using the alias name Attribute12. | public String getAttribute12() {
return (String)getAttributeInternal(ATTRIBUTE12);
} | [
"public Number getAttribute12_1_1_1_1_1_1() {\n return (Number)getAttributeInternal(ATTRIBUTE12_1_1_1_1_1_1);\n }",
"String attributeForAlias(String alias);",
"@OleMethod String GetAttribute(String AttributeName);",
"public String getAttribute(String key) {\n\t}",
"public Object getAttribute(Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void playerRender(Graphics win) {
} | [
"@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"
]
]
}
} |
the constructor of a socket network handler takes as parameter the address of the server and a reference to the client's game controller | public NetworkHandlerSocket(InetSocketAddress serverAddress,
GameControllerClient controller, int token) throws IOException {
super(controller, token);
// save the server address
this.serverAddress = serverAddress;
// try to connect
connect();
} | [
"public ClientHandler(Socket socket, MainServer server) {\n //System.out.println(\"Collegamento socket creato\");[Debug]\n this.socket = socket;\n this.server = server;\n this.clientID = 0;\n try {\n OutputStream output= socket.getOutputStream();\n outputStre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Image uploading code starts here | public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RESULT_LOAD_IMAGE && null != data) {
Uri selectedImage = data.getData();
String[] filePathColumn = { MediaStore.Images.Media.DATA };
Cursor... | [
"public void uploadImage() {\n //when image is selected from gallery\n if (imgPath != null && !imgPath.isEmpty()) {\n //convert image to string using base64\n encodeImagetoString(imgPath);\n //when image is not selected from gallery\n } else {\n Log.e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Last argument true for LRU ordering | public GifMemoryCache() {
} | [
"public interface LRU<E> {\r\n\t\r\n\tpublic void accessPage(E page);\r\n\r\n\tpublic E recentPage();\r\n\t\r\n\tpublic E leastRecentPage();\r\n\t\r\n\tpublic int size();\r\n\t\r\n}",
"public static void main(String[] args) {\r\n\t\tLRUCache cache = new LRUCache(1);\r\n\t\t\r\n\t\tcache.put(2, 1);\r\n\t\t\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the activity is first created. | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FlurryAgent.onStartSession(this, "86WCRJPJSM6KBR6K24CK");
setContentView(R.layout.map);
myMapView = (MapView) findViewById(R.id.mapview);
myMapController = myMapView.getController();
Bundle b = getIntent().getEx... | [
"protected void onCreate() {}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tinitData();\n\t\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tULog.i(this, \"onCreate() \");\n\t\tinitData();\n\t}",
"@Override\n public void onCreate () {\n super.onC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Get raw HTTP responses from raw HTTP requests. Multiple requests and responses may be handled, but only if persistent connections conditions apply. | public ByteArrayBuffer getResponses(ByteArrayBuffer rawRequests, LocalConnector connector) throws Exception
{
connector.reopen();
ByteArrayBuffer responses = connector.getResponses(rawRequests,false);
return responses;
} | [
"SdkBytes rawResponse();",
"public APIResponse getAll() {\n // set thirdPartyRequest Url and HttpMethod\n request.setRequestType(HttpMethod.GET);\n request.setUrl(\"https://jsonplaceholder.typicode.com/posts\");\n\n // set APIResponse body, status, and message depending on outcome of t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when refreshing the list | protected void loadRefresh(MyCallBack caller) {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStack... | [
"private void refreshList()\n\t{\n\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\trefreshLists();\n\t\t\t\t\t\t\t\t\t\t}",
"private void modifyListAdapter() {\n adapter.refreshData(matches);\n }",
"@Override\n\t\t\t\tpublic void refreshList() {\n\t\t\t\t\tArrayList... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
does this board equal y? | public boolean equals( Object y )
{
if ( y == null )
{
return false;
}
if ( !( y instanceof Board ) )
{
return false;
}
if ( y == this )
{
return true;
}
if ( ( (Board) y ).dimension() != this.dimensi... | [
"public boolean equals(Object y){\n if(y == this) return true;\n if(y == null) return false;\n if(y.getClass() != this.getClass()) return false;\n Board that = (Board) y;\n if(that.dimension()!=this.dimension()) return false;\n for(int i=0;i<N;i++){\n for(int j=0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ System.out.println(System.currentTimeMillis()); System.out.println(calculateExpireTime(System.currentTimeMillis(), 366)); System.out.println(new Date(1501656949063l)); | public static void main (String[] args) {
Calendar calendar = Calendar.getInstance();
long time = calendar.getTime().getTime();
System.out.println(time);
calendar.add(Calendar.YEAR, 1);
long end = calendar.getTime().getTime();
System.out.println(end - time);
Syste... | [
"private Date calculateExpiryDate() {\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n calendar.add(Calendar.WEEK_OF_MONTH, 2);\r\n return calendar.getTime();\r\n }",
"int getTimeExpiry();",
"public static void main(String[] args) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__RequiredInterfaceDefinition__NameAssignment_5" $ANTLR start "rule__RequiredInterfaceDefinition__CollectionAssignment_6_0" ../org.ow2.mindEd.adl.textual.ui/srcgen/org/ow2/mindEd/adl/textual/ui/contentassist/antlr/internal/InternalFractal.g:9594:1: rule__RequiredInterfaceDefinition__CollectionAssignment... | public final void rule__RequiredInterfaceDefinition__CollectionAssignment_6_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ow2.mindEd.adl.textual.ui/src-gen/org/ow2/mindEd/adl/textual/ui/contentassist/antlr/internal/InternalFractal.g:9598:1... | [
"public final void rule__Interface__NameAssignment_6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:17622:1: ( ( RULE_ID ) )\n // InternalOperationDsl.g:17623:2: ( RULE_ID )\n {\n // I... | {
"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) {
startActivity(new Intent(this, SettingsActivity.class));
return true;
}
return super.o... | [
"@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"
]
]
}
} |
$ANTLR end "rule__QCREF__Group_2__0" $ANTLR start "rule__QCREF__Group_2__0__Impl" InternalAgreeParser.g:25916:1: rule__QCREF__Group_2__0__Impl : ( FullStop ) ; | public final void rule__QCREF__Group_2__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAgreeParser.g:25920:1: ( ( FullStop ) )
// InternalAgreeParser.g:25921:1: ( FullStop )
{
// InternalAgreeParse... | [
"public final void rule__QCREF__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.osate.xtext.aadl2.propertyset.ui/src-gen/org/osate/xtext/aadl2/propertyset/ui/contentassist/antlr/internal/InternalPropertysetParser.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Disconnect method that closes the open socket with stream API server | public void streamDisconnect() {
this.streamAPI.disconnect();
} | [
"public void disconnect()\n {\n try {\n streamIn.close();\n streamOut.close();\n }\n catch(Exception e)\n {/*do nothing*/}\n\n try {\n socket.close();\n }\n catch(Exception e)\n {/*do nothing*/}\n\n this.terminated = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(Highstock) A wrapper object for all the series options in specific states. | public interface PlotWmaStatesOptions extends Any {
/**
* (Highstock) Options for the hovered series. These settings override the
* normal state options when a series is moused over or touched.
*
* @see <a href="https://api.highcharts.com/highstock/plotOptions.wma.states.hover">https://api.highcharts.com/... | [
"public interface PlotZigzagStatesOptions extends Any {\n /**\n * (Highstock) Options for the hovered series. These settings override the\n * normal state options when a series is moused over or touched.\n *\n * @see <a href=\"https://api.highcharts.com/highstock/plotOptions.zigzag.states.hover\">https://a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return a string which is to be prepended to all log messages. | @Nonnull @NotEmpty protected String getLogPrefix() {
// local cache of cached entry to allow unsynchronised clearing.
String prefix = logPrefix;
if (null == prefix) {
final StringBuilder builder = new StringBuilder("Attribute Definition '").append(getId()).append("':");
p... | [
"protected String getLogPrefix(PipeLineSession session) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Pipe [\"+getName()+\"] \");\n\t\tif (session!=null) {\n\t\t\tsb.append(\"msgId [\"+session.getMessageId()+\"] \");\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public String GetPrependString() {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Configuration of the Analyser | public static boolean getTypesReport() {
return toBoolean(getProperty("Analyser.TYPES_REPORT"));
} | [
"public void configurations(){\n }",
"private void configure() {\n\r\n\r\n String freqpct = getConfigParameter2(\"frequencyPct\");\r\n if (freqpct != null)\r\n percentTimeToSelectXact = Double.parseDouble(freqpct);\r\n String x = getConfigParameter2(\"numProblemsBetweenOffers\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an aliased public.plan_status table reference | public PlanStatus(String alias) {
this(DSL.name(alias), PLAN_STATUS);
} | [
"@Developing\n private LogicalPlan withTableAlias(LogicalPlan plan, TableAliasContext ctx) {\n String alias = ctx.strictIdentifier().getText();\n if (null != ctx.identifierList()) {\n throw new ParseException(\"Do not implemented\", ctx);\n // TODO: multi-colName\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the businessmisusers local service. | public void setbusinessmisusersLocalService(
com.chola.businessmis.service.businessmisusersLocalService businessmisusersLocalService) {
this.businessmisusersLocalService = businessmisusersLocalService;
} | [
"@Override\n\tpublic void setWrappedService(UserLocalService userLocalService) {\n\t\tsuper.setWrappedService(userLocalService);\n\t}",
"public void setUserService(UserServiceImpl usrSrv) {\n this.uSrv = usrSrv;\n }",
"public void setServiceName(java.lang.String param){\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by Marcel on 22/03/2017. | public interface Pool<Type> {
public void recycle(final Poolable<Type> data);
public Type get();
public void setFactory(final PoolObjectFactory<Type> factory);
public void reset();
public String debug();
} | [
"@Override\n public void extornar() {\n \n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n }",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n public int utilite() {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a listener called when connection occurs, ie when the connection is established and capabilities are exchanged. | void addConnectionListener(Listener listener); | [
"@Override\n\t\tpublic void addListener(ICoedConnectionListener listener) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void addConnectionEventListener(ConnectionEventListener arg0) {\n\n\t}",
"ListenerRegistration addConnectionListener(Listener<? super ConnectionEvent> l);",
"public void addConnectionListener(Conn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_exercise_select, container, false);
/* Routine Button */
startByRoutine = root.findViewById(R.id.start_b... | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.movie_statistic_layout, parent, false);\n }",
"@Override\n\tprotected View initView(LayoutInflater inflate... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the creator of this Graphics object | synchronized Object getCreator() {
return creator;
} | [
"@Override\r\n\tpublic String creatorType() {\n\t\treturn \"Curve Viewer\";\r\n\t}",
"@java.lang.Override\n public java.lang.String getCreator() {\n java.lang.Object ref = creator_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the current target iteration duration for a game update. | public void setUpdatePeriod(long updatePeriod) {
this.updatePeriod = updatePeriod * NANO_TO_MILLI;
} | [
"public void setDuration(long duration){\n animator.setDuration(duration);\n }",
"protected abstract void setDurationImpl(float duration);",
"public void updateDuration(int _exerciseDuration) {\n\n if(_exerciseDuration <= 0) {\n System.out.println(\"Exercise duration can not be 0 or ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An Amazon S3 bucket name to limit the search for revisions. If set to null, all of the user's buckets are searched. | public void setS3Bucket(String s3Bucket) {
this.s3Bucket = s3Bucket;
} | [
"public String getBucketName() { return this.bucketName; }",
"String getBucket();",
"public String bucketName() {\n return bucketName;\n }",
"String bucketName();",
"public Builder setBucket(\n String value) {\n copyOnWrite();\n instance.setBucket(value);\n return this;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates list of CoursePreRequisite which are embeddable tables containing IDs for the PreRequisite Courses | private List<CoursePreRequisite> createCoursePreRequisites(
String strCoursePreReq) {
// Stores the prerequisite Courses
List<CoursePreRequisite> coursePreRequisites = new ArrayList<CoursePreRequisite>();
if (strCoursePreReq != null && !strCoursePreReq.isEmpty()) {
if ((!strCoursePreReq.equalsIgnoreCase("No... | [
"@GetMapping(\"/coursePrerequisite\")\n\tpublic List<CoursePrerequisite> getAllCoursePrerequisites() {\n\t\treturn coursePrerequisiteRepo.findAll();\n\t}",
"public Course(String courseCode, String courseTitle, int creditPoints,\r\n String[] preRequisites)\r\n {\r\n this.courseCode = courseC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enum improves type safety. Enum can be traversed. Enum can be used easily in switch. Enum can have fields, constructors, methods. Enum constants are static and final implicitly. Enum can be defined within or outside of the class because it is similar to a class. Enum cannot be instantiated with new keyword because it c... | public static void showEnumValues() {
for(Season s: Season.values()) {
logger.info(s.toString());
}
} | [
"public interface BaseEnum {\n}",
"public interface BaseEnum {\r\n\r\n public static final String GET_NAME = \"getName\";\r\n public static final String GET_TYPE = \"getType\";\r\n\r\n public String getName();\r\n\r\n public int getType();\r\n\r\n\r\n}",
"EnumCOD createEnumCOD();",
"String asEnumC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List hesabVOs = new ArrayList(); | public String getRelatedHesabTreeByContact(Long contactId) {
String treeXml = "";
try {
ContactHesabEntity contactHesabEntity = contactHesabService.getContactHesabByContactId(contactId,
getCurrentUserActiveSaalMaali().getId());
HesabTafsiliEntity hesabShenavar = contactHesabEntity.getHesabTafsili... | [
"public ListaSincronizada ()\r\n {\r\n\t lista = new ArrayList<String>();\r\n }",
"private void reservarMemoria()\r\n {\r\n audiUsuarioList = new ArrayList<AudiUsuario>();\r\n }",
"public ArrayList<Voo> lista_do_banco();",
"public ArrayList<Avion> obtAvion(){\n return (ArrayList<Avion>) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Preorder traversal:find and update two swapped nodes while traversing | public static void recoverTree2(TreeNode root) {
findSwappedNodes(root, null, null);
swap(maxSwappedNode, minSwappedNode);
} | [
"private void swapElements(Object newParam, int index1, int index2) {\r\n\r\n\t\t// the two elements to be swapped\r\n\t\tLinearElement firstElement = root.getVector().get(index1);\r\n\t\tLinearElement secondElement = root.getVector().get(index2);\r\n\r\n\t\t// the two elements after each of the elements to be swap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by alon on 7/13/2020. | public interface IPagedRestClientFactory {
IPageRestClient getPagedRestClient(URI uri);
} | [
"@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}",
"@Override\n public int utilite() {\n return 0;\n }",
"private static void EX5() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Logs out 4k records and syncs out the file to disk every 50 ms. Does not buffer the output stream. Results on a 1.3 ghz Intel: syncs:8 wrote: 64000.0 kb in 4226 ms. (15144.345 kb/s) | public void testSyncedAppend() throws IOException {
FileOutputStream out = new FileOutputStream("test.log");
FileChannel channel = out.getChannel();
long lastSyncTime= System.currentTimeMillis();
long syncCount=0;
long startTime = System.currentTimeMillis();
for... | [
"@Override\n public void sync() throws IOException {\n this.logStream.flush();\n this.fout.getChannel().force(false);\n }",
"@Override\n public void flushSync() {\n while (getOutstandingRecordsCount() > 0) {\n flush();\n try {\n Thread.sleep(500);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets their zip code | public void setZip(int zip) {
this.zip = zip;
} | [
"public void setZip(String zip)\r\n\t{\r\n\t\tthis.entries[2]=zip;\r\n\t}",
"public void doSetZipCode(String zipCode) {\n this.zipCode = zipCode;\n }",
"public void setZip(int input) {\n\t\tsuper.setZip(input);\n\t}",
"public void setZipCode(String theZipCode) {\n\t\tmyZipCode = theZipCode;\n\t}",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called to close the editing session. | public void close(); | [
"private void close() {\n\t\teditingService.disposeData();\n\t\teditingService.getDataService().getProvider().closeSession();\n\t}",
"private void closeEdit() {\n\n Stage stage = (Stage) cancelBtnEditEvent.getScene().getWindow();\n stage.close();\n\n }",
"public void close() {\n clearFie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Commands testing: Function Event: Test command toggleShareScreen and getContentSharingParticipants. | @Test(dependsOnMethods = { "testCommandToggleRaiseHand" })
public void testCommandToggleShareScreen()
{
this.iFrameUrl = getIFrameUrl(null, null);
ensureTwoParticipants(this.iFrameUrl, null);
WebParticipant participant1 = getParticipant1();
String endpointId1 = participant1.getE... | [
"@Test\r\n public void test03_sendDetailsScreen() throws IOException {\n test.log(Status.INFO, SenderReciverScreen.msgInfo);\r\n boolean sendScreen = false;\r\n try {\r\n System.out.println(SenderReciverScreen.msgPassClickScrollDown);\r\n SenderReciverScreen.scrollDwonI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A constructor that creates a new, empty ArrayBag with the specified maximum size. | public ArrayBag(int maxSize) {
if (maxSize <= 0) {
throw new IllegalArgumentException("maxSize must be > 0");
}
this.items = new Object[maxSize];
this.numItems = 0;
} | [
"public Bag() {\n this(MAX_AMOUNT);\n }",
"public Bag(int size) {}",
"public IntArrayBag(int initialCapacity){\n if(initialCapacity < 0){\n throw new IllegalArgumentException\n (\"initialCapacity is negative: \" + initialCapacity);\n }\n manyItems = 0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the currently selected product in the "Products" table, or null if no product is selected. | ProductData getSelectedProduct(); | [
"public String getSelectedProduct() {\n\n\t\treturn selectedProduct;\n\t}",
"public Object getSelectedItem() {\n\t\tint row = table.getSelectedRow();\n\t\tif (row < 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\trow = table.getRowSorter().convertRowIndexToModel(row);\n\t\t\treturn tableModel.getItem(row);\n\t\t}\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the pipe if it went out of screen and adds new pipe. | private void modfiyPipe() {
boolean needPipe = false;
float pos = 0;
for (BaseObject o : pipeList) {
if (o.getX() + o.getImageWidth() < 0) {
pos = o.getX();
Handler.getInstance().removeObject(pipeList, o);
needPipe = true;
... | [
"public void addPipe(@SuppressWarnings(\"UnusedParameters\") View view){\r\n params.setAddPipe=true;\r\n getGameBoardView().setAddPipe(true);\r\n getPipeSelectView().setDiscard(false);\r\n\r\n if(getGameBoardView().addToGrid(this)) {\r\n getPipeSelectView().discardPipe();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the ranking produced by this experiment. | public Ranking<String> getRanking() {
assert this.hasRun;
return this.ranking;
} | [
"public int getRank() {\n return (rank);\n }",
"public int rank() {\n svd();\n return rank;\n }",
"public double getRank()\n {\n return rank;\n }",
"public Ranking getRank() {\n return rank;\n }",
"public int getRank()\r\n\t{\r\n\t\treturn rankValue;\r\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checking location permissions for display the current position on map | private void getLocationPermission() {
//list of permission to check
String[] permission = {
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.ACCESS_COARSE_LOCATION,
};
if (ContextCompat.checkSelfPermission(this.getContext(), Manifest.permissi... | [
"private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n\n // Permission granted, update the position in ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves references to the APDU and its buffer | void processListIdentifiers() {
APDU apdu = APDU.getCurrentAPDU();
byte[] buf = APDU.getCurrentAPDUBuffer();
// Checks P1 and initializes the "current" value
if (buf[ISO7816.OFFSET_P1] == 0)
current = PasswordEntry.getFirst();
else if ((buf[ISO7816.OFFSET_P1] != 1) |... | [
"public static byte[] getCurrentAPDUBuffer() throws SecurityException {\n return thisAPDU.getBuffer();\n }",
"public void get_info(APDU apdu, byte[] buffer) throws ISOException{\n if (pin.isValidated()) {\n Util.arrayCopyNonAtomic(nom,(short)0,buffer,(short)0,NOM_LENGTH);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets num chromosome outputs in parameters | private static void setNumOutputs(CartesianGP params, int numOutputs) {
/* error checking */
if (numOutputs < 0) {
throw new IllegalArgumentException(String.format("Number of chromosome outputs cannot be less than one; " +
"%d is invalid.", numOutputs));
}
... | [
"public void setGeneLength(int geneLength);",
"public void setNumSplits(int n){\n\n numSplits = n;\n \n}",
"public int getNOutputs() {\r\n return (nOutputs);\r\n }",
"default int getNumberOfOutputs() {\n\t\treturn 1;\n\t}",
"int getNumOutputs();",
"public Individual(int[] chromosome) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a clientside proxy object with the default SocketFactory | public static IpcProtocol getProxy(Class<? extends IpcProtocol> protocol,
InetSocketAddress addr, Configuration conf, int rpcTimeout)
throws IOException {
return getProxy(protocol, addr, conf,
NetUtils.getDefaultSocketFactory(conf), rpcTimeout);
} | [
"public HttpGetProxy()\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Initialize proxy server\n\t\t\tlocalServer = new ServerSocket(0, 1,\n\t\t\t\t\tInetAddress.getByName(LOCAL_IP_ADDRESS));\n\t\t\tlocalPort = localServer.getLocalPort();// There ServerSocket\n\t\t\t\t\t\t\t\t\t\t\t\t\t// automatically assigned\n\t\t\t\t\t\t\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overide setting of support for Anisotropic texture filtering. | public static void overrideAnisoSupport(boolean use) {
supportsAniso = use;
} | [
"public void setMagFilter(TextureFilter filter);",
"public boolean effectsTexture() {\n return false;\n }",
"void glGetTexParameteriv(int target, int pname, int params[]) {\n switch (target) {\n case GL_TEXTURE_1D:\n switch (pname) {\n case GL_TEXTURE_MAG_FILTER:\n p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by Kelvin on 6/07/2016. | public interface EventBus {
void register(Object subscriber);
void unregister(Object subscriber);
void post(Object event);
} | [
"@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}",
"private static void EX5() {\n\t\t\r\n\t}",
"protected void method_5557() {}",
"@Override\n public int utilite() {\n return 0;\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a random gallows | private Gallows getRandomGallows() {
return gallows.get(new Random().nextInt(gallows.size()));
} | [
"G1 random_G1();",
"Random getBlockRandom();",
"public int getRandom() {\n return list.get(ran.nextInt(map.size()));\n }",
"public static ArrayList<Double> random_netkeys() {\n int size = Parameter.GENE_SIZE;\n\n ArrayList<Double> genes;\n double uL = Parameter.LOWER_BOU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .com.kedacom.ops.flink.etl.proto.DssNetAddr DstAddr = 2; optional .com.kedacom.ops.flink.etl.proto.DssNetAddr DstAddr = 2; | boolean hasDstAddr(); | [
"public static void main(String[] asArgs)\n {\n AddressPort addrportHost = null;\n List listAddrPort = new ArrayList();\n Properties propOptions = new Properties();\n\n for (int iArg = 0, cArgs = asArgs == null ? 0 : asArgs.length; iArg < cArgs; ++iArg)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new event object. | public Event(Pair<Integer, Integer> pair, EventType type) {
this.pair = pair;
this.type = type;
} | [
"private void createEvent() {\r\n Event event = new Event();\r\n updateEventValues(event);\r\n DatabaseManager.getInstance().getDatabase().eventDao().insert(event);\r\n }",
"private Event createNewEvent() throws CreateException, FinderException {\n\t\t// Finds an object with a unknown iden... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the next two methods must be implemented to satisfy the MouseListener interface the implementation here says 'do nothing' | public void mouseExited(MouseEvent e)
{
} | [
"@Override\n public void mouseReleased(MouseEvent e) {\n // do nothing\n }",
"public void mouseMoved(MouseEvent e)\n {\n // Do nothing but maybe override\n }",
"@Override\r\n\r\n\tpublic void mouseReleased(MouseEvent arg0) {\n\r\n\t}",
"@Override\n\tpublic void mouseReleased() {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads DICOM files into a 3D (+time) image | public DicomViewer(String name, String imagePath, Pattern filePattern) {
this(name, imagePath, filePattern, false);
} | [
"private void parse(File file) {\r\n imageTableModel.removeAllRows();\r\n imagePanel.removeAll();\r\n imagePanel.repaint();\r\n\r\n long time = System.currentTimeMillis();\r\n\r\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\r\n\r\n File[] children = file.listFiles();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required string contentType = 1; | public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentT... | [
"Q contentType(String contentType);",
"public void setContentType( String type );",
"public String getContentType() {\nreturn null ;\r\n}",
"default String getContentType() {\n return getHeaderValue(\"Content-Type\");\n }",
"private void setContentType(String contentType) {\n this.contentType = c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new vertex. | public Vertex(int id) {
super();
this.id = id;
} | [
"public V createVertex() throws DataAccessException;",
"public abstract V createVertex(Element vertexElt);",
"void addVertex(String vertex) throws RuntimeException;",
"public SDFVertex() {\r\n\t\tsuper();\r\n\t\tsetKind(VERTEX);\r\n\t}",
"public Vertex(String id, String name) {\n this.id = id;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notify the specified device has been detached | private void onDeviceDetached(@NonNull UsbDevice detachedDevice) {
deviceDetachedListener.onDeviceDetached(detachedDevice);
// Stop input device's thread.
Set<MidiInputDevice> inputDevices = midiInputDevices.get(detachedDevice);
if (inputDevices != null && inputDevices.size() > 0) {
... | [
"@Override\n public void onDeviceDetached(@NonNull UsbDevice usbDevice) {\n }",
"private final void processDetach(final UsbDevice device) {\n\n Log.i(TAG, \"processDetach() entry\");\n\n if (handlerThreadDestroyed) return;\n\n if (onUsbDeviceConnectListener != null) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string token = 2; | public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
... | [
"public Token(){\n type = UNDEFINED;\n value = \"\";\n }",
"public static Object style_token(Object... arg) {\r\nUNSUPPORTED(\"28oqkocgew358xzz1ws4vsuz4\"); // static int style_token(char **s, agxbuf * xb)\r\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\r\nUNSUPPORTED(\"8m3k758dcwwz4y8dqzc62remf\"); //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ These get the entered username and password | public void actionPerformed(ActionEvent arg0) {
String User = UserTF.getText();
String Pass = PassPF.getText();
if (User.equals(null) || Pass.equals(null)) {
// If there is nothing entered the an error message will pop
// up for the user
JOptionPane.showMessageDialog(controllingFrame... | [
"public String getUserPassword();",
"public String getUser_pass() { return user_pass; }",
"public String login(String aadhar,String password);",
"public Integer login(String username, String password);",
"public String login(String userName, String pwd) throws Exception;",
"public String toString(){\n\tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_btnMenuActionPerformed Cria o objeto jogador | private Jogador criarJogador(String nome, String pontuacao) {
Jogador jogador = new Jogador();
jogador.setNome(nome);
jogador.setPontuacao(Integer.parseInt(pontuacao));
return jogador;
} | [
"private void crearMenu() {\n\t\tbarra = new JMenuBar();\n\t\tmenuElegirOpcion= new JMenu(\"Elegir Opción\");\n\t\tmenuDeportes = new JMenu(\"Deportes\");\n\t\tmenuVideojuegos = new JMenu(\"Videojuegos\");\n\t\tmenuNuestrasTiendas = new JMenu(\"Nuestras Tiendas\");\n\t\tmenuInformacion = new JMenu(\"Información\");... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
KZV SGZ COST ['KZV', 'VJO', 'SGZ'] 702.87 > these are trickier cases! 5% of total, or 10 points | @Test
@Autograder(points = 1, group = "small data set")
public void testKZVtoSGZcostSmallDataset()
{
BestPath path = smallDataset.getBestPath("KZV", "SGZ", FlightCriteria.COST);
ArrayList<String> checkPath = breakUpPath(path);
String answer = df2.format(Double.parseDouble(checkPath.get(0)));
Strin... | [
"public static void main(String[] args) {\n\n int str1Len = 30;\n int str2Len = 15;\n int v = 5;\n for (int i = 0; i < 100000; i++) {\n String str1 = generateRandomString(str1Len, v);\n String str2 = generateRandomString(str2Len, v);\n int ans3 = RIGHT_CO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the constructor without escapeChar, fail for the name is Empty, IllegalArgumentException should be thrown. | public void testConstructor_WithOutEscapeChar_FailForNameEmpty() {
try {
new LikeFilter(" ", LikeFilter.CONTAIN_TAGS + VALUE);
fail("IllegalArgumentException should be thrown.");
} catch (IllegalArgumentException e) {
//pass
}
} | [
"public void testCtor_EmptyName() {\n try {\n new MockRemoveStateNodeAbstractAction(\" \", state);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"public void testCtor_EmptyName() {\n try... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The timing of the event (if this is a periodic trigger). | public String timingDateTime() {
return getString(FhirPropertyNames.PROPERTY_TIMING_DATE_TIME);
} | [
"String getTilt_event_time();",
"String getCommunication_tamper_event_time();",
"public Timing getTiming() {\r\n return timing;\r\n }",
"long getTimingTimestamp();",
"public static double generate_time_event(){\n\t\treturn exp(simulatorKN.arrival_rate);\n\t}",
"public long getTimingTimestamp() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated uint32 Port = 4; | int getPortCount(); | [
"public int getPort() {\n/* 250 */ return this.port;\n/* */ }",
"protected int getUniquePort() {\n return portGenerator.getAndIncrement();\n }",
"int getPortnum();",
"public abstract int port();",
"int frontendPort();",
"public void testPortNoUsed() {\n }",
"public int getPort()\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the content of this message may be Serializable or XmlAble | public Object getContent() throws InternalSecurityException {
if (!isOpen()) {
throw new InternalSecurityException("You have to open the message first!");
}
return content;
} | [
"@getter(Message.CONTENT)\r\n\tpublic IList getContent() {\r\n\t\t// OutputManager.debug(\"Message \" + getName() + \" is read.\");\r\n\t\tsetUnread(false);\r\n\t\treturn data.getContent();\r\n\t}",
"public String getContent() {\n Object ref = content_;\n if (!(ref instanceof String)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Translate the given block into bytecodes. | private void translate(int blk, int freeSlot, BytecodeForest forest, ArrayList<Bytecode> bytecodes) {
translate(new BytecodeForest.Index(blk, 0), freeSlot, forest, bytecodes);
} | [
"public static void matrixToBlock(byte[] block, byte[][] matrix,\n boolean columnMapping) {\n int size = matrix[0].length;\n if (columnMapping) {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < size; j++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads bytes from BytePipe. It reads from a byte array (data). | public int readFromBytePipe (byte[] data, int offset, int length) throws PipeTypeNotSupportedException, IOException {
if (!this.getPipeType().equals(PipeType.BYTE)) {
throw new PipeTypeNotSupportedException ("Pipe of type \""
+ this.getPipeType()
+ "\" is not supported by port with ID \""
+ this.... | [
"public static Bytes read(DataInput in) throws IOException {\n int len = WritableUtils.readVInt(in);\n byte b[] = new byte[len];\n in.readFully(b);\n return wrap(b);\n }",
"public byte[] read() throws IOException;",
"public byte[] getDataBytes();",
"public byte[] read(int offset, int length);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ID of the folder that the origin group belongs to. string folder_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; | @java.lang.Override
public java.lang.String getFolderId() {
java.lang.Object ref = folderId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.Stri... | [
"public java.lang.String getFolderId() {\n java.lang.Object ref = folderId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n folderI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper to find an op method. | private MethodConstant findOpMethod(
Context ctx,
TypeConstant typeTarget,
String sMethodName,
String sOp,
Expression[] aexprArgs,
TypeConstant typeReturn,
ErrorListener errs)
{
assert sMethodName ... | [
"JvmOperation getInterfaceMethod();",
"private Method findMethod (Object o, String szMethodName)\n {\n Method method;\n Class c = o.getClass ();\n Method[] theMethods = c.getMethods ();\n\n for (int i = 0; i < theMethods.length; i++)\n {\n method = theMethods[i];\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that gives information to other methods which panel is actually used | public static Panels getSide(){
if(side_checker==0) return left;
else return right;
} | [
"public abstract int getPanelInfo(int x, int y);",
"public void wypelnij(){\n info.info(podgladPanel);\n }",
"private InfoPanel getInfoPanel() {\n if (infoPanel == null) {\n infoPanel = new InfoPanel();\n infoPanel.setTitle(\"Bytecode Instrumentation Rules\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. .google.cloud.functions.v2.EventTrigger event_trigger = 5; | com.google.cloud.functions.v2.EventTriggerOrBuilder getEventTriggerOrBuilder(); | [
"protected abstract boolean runTrigger(T event) throws ScriptException;",
"@Override\n\tpublic void onTrigger(String event, Tile caller) {\n\t\t\n\t}",
"public CustomEventsTrigger() {}",
"public java.lang.String getTriggerEvent() {\n return localTriggerEvent;\n }",
"ScheduleToken schedule(ZonedDat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read the json data with information about the tourist attractions near to a hotel and load it into the appropriate data structure(s). Using JsonParser to parse the response. | public void parseTouristAttractions(String hotelID, String touristAttractionsJson) {
// FILL IN CODE (from lab 1)
JsonParser jsonParser = new JsonParser();
JsonObject jsonObject = (JsonObject) jsonParser.parse(touristAttractionsJson);
JsonArray touristAttractions = jsonObject.getAsJsonAr... | [
"protected HotelData parseReviews(Path reviewsPath){\n\n try (JsonReader reader = new JsonReader(new FileReader(reviewsPath.toString()))) {\n reader.beginObject();\n\n while (reader.hasNext()) {\n\n String keyName = reader.nextName();\n\n if (keyName.equals... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if has no field, add it; if map has field compare it and remove it | String validateEquality( String sField, String sValue )
{
if (!mMapEquality.containsKey(sField)) // map has no field?
{
mMapEquality.put(sField, sValue);
return "";
}
// obviously map has the field
String ret = "";
if ( !mMapEquality.get(sField).... | [
"private void addIfNotNull(Map<String, String> bodyMap, String field, BodyMapKeys key) {\n if (field != null) {\n bodyMap.put(key.getKey(), field);\n }\n }",
"private boolean addOriginalFieldMap (Record record, RecordSet originalRecordSet) {\r\n boolean isAdded=false;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getting data from files only | @Test
public void testGet_FromFilesOnly() throws IOException {
init(this.name.getMethodName());
// Put data in memstore
this.store.add(new KeyValue(row, family, qf1, 1, ((byte[]) (null))), null);
this.store.add(new KeyValue(row, family, qf2, 1, ((byte[]) (null))), null);
// f... | [
"void getDocumentData( String fileName ) throws FileNotFoundException;",
"public List<File> getData(){\n\t return this.data;\n }",
"fileData(){\r\n\t}",
"FileObject getFile();",
"public File[] getFilesFromTheFile() {\n Log.d(\"Files\", \"Path: \" + PATH + \"/Voice Recordings\");\n File dir... | {
"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"
]
]
}
} |
Set to true to disable rollback of the stack if stack creation failed. You can specify either DisableRollback or OnFailure, but not both. Default: false | public CreateStackRequest withDisableRollback(Boolean disableRollback) {
setDisableRollback(disableRollback);
return this;
} | [
"public abstract DoNotAddToBackStackTransaction doNotAddToBackStack();",
"public void setRollbackOnly() throws IllegalStateException, SystemException {\n }",
"boolean hasRollbackFrom();",
"public static void rollBack() {\r\n\t\tTransactionAspectSupport.currentTransactionStatus().setRollbackOnly();\r\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adiciona a especialidade Aluno ao Pesquisador | public void adicionarEspecialidadeAluno(int semestre, double IEA) {
validador.validaIeaAluno(IEA);
validador.validaSemestreAluno(semestre);
this.especializacao = new Aluno(semestre, IEA);
} | [
"public void addAula(String nom, int capacitat, TipusAula tipusAula) {\n Aula aula = new Aula(idAula++, nom, capacitat, tipusAula);\n aules.add(aula);\n saveState();\n \n }",
"public void apagar() {\n int codigoAluno =\n Integer.parseInt(view.getjTableAlun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GIVEN a mock server that answers a json object | @Test
public void testDeserializeRecord() throws Exception {
String bucket = "mybucket";
String collection = "mycollection";
String record = "myrecord";
String requestPath = ENDPOINTS.RECORD.getPath()
.replace("{bucket}", bucket)
.replace("{collection}... | [
"@Test\r\n\tpublic void testUnit2() throws JsonProcessingException {\r\n mapper = new ObjectMapper(); \r\n\tClient client =new Client(\"Hector\",\"844222112\", \"Colosio HXWR\", 100000,\"Medina\",user, \"xxx\");\r\n jsonAsString = mapper.writeValueAsString(client); \r\n System.out.println(js... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
&47; Destination of the request. required string uri = 6; | public Builder setUriBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
uri_ = value;
onChanged();
return this;
} | [
"public String getRequestUri();",
"void mo25542a(Uri uri);",
"@Override\n\tpublic void uri(String uri) {\n\t\t\n\t}",
"@Override /* HttpUriRequest */\r\n\tpublic URI getURI() {\r\n\t\treturn request.getURI();\r\n\t}",
"public void setUri(javax.sip.address.URI r1) {\n /*\n // Can't load method ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the suite for this unit test. | public static Test suite() {
return new TestSuite(InformixInvoiceFilterFactoryTest.class);
} | [
"public static TestSuite suite() {\n return null;\n }",
"public static Test suite() {\n return new TestSuite();\n }",
"public String getTestSuite()\r\n\t{\r\n\t\treturn testSuite;\r\n\t}",
"public String getTestSuite() {\n \t\treturn testSuite;\n \t}",
"public static Test suite()\r\n {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/methods begin must pass connectednode,tf will be initialized from the caller, see rosjava_tf TfViz | public LocalPlanner(String hostname,TransformListener tf, VoxelGrid costmap_ros){
this.hostname=new String(hostname);
tf_=tf;
initialized_=false;
costmap_ros_ = costmap_ros;
current_waypoint_ = 0;
skip_next_ = false;
} | [
"private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the class given the class name. | public static Class getClassForName(String className) throws ClassNotFoundException, IllegalAccessException,
InstantiationException {
return Class.forName(className);
} | [
"ClassObject getClass(String className);",
"private Class<?> getClassFromName(String className) {\n\t\ttry {\n\t\t\tClass<?> clazz = Class.forName(className);\n\t\t\treturn clazz;\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tLogM.log(v_activity, getClass(), Level.SEVERE, \"Error:\", e);\n\t\t}\n\t\treturn nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end synpred26_InternalBuildDSL $ANTLR start synpred27_InternalBuildDSL | public final void synpred27_InternalBuildDSL_fragment() throws RecognitionException {
// ../org.xtext.builddsl/src-gen/org/xtext/builddsl/parser/antlr/internal/InternalBuildDSL.g:3856:4: ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )
// ../org.xtext... | [
"public final boolean synpred86_InternalVilBuildLanguage() {\r\n state.backtracking++;\r\n int start = input.mark();\r\n try {\r\n synpred86_InternalVilBuildLanguage_fragment(); // can never throw exception\r\n } catch (RecognitionException re) {\r\n System.err.prin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the wheels are moving, if yes return true, false otherwise | public boolean isNavigating(){
return (Lab5.leftMotor.isMoving() && Lab5.rightMotor.isMoving());
} | [
"public boolean isMoving(){\n return distanceToNextPositionX != 0 || distanceToNextPositionY != 0;\n }",
"public boolean isMoving() {\r\n\t\treturn dx != 0 || dy != 0;\r\n\t}",
"public void hasWheels();",
"public boolean isMoving()\r\n {\r\n return (dx != 0) && (dy != 0);\r\n }",
"pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ / / / / / / / / | public void setAlternateURL(String alternateURL)
/* */ {
/* 1006 */ this.alternateURL = alternateURL;
/* */ } | [
"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"
]
]
}
} |
load run file and store similarities based on groups | public void eval(File runFile) throws IOException {
this.runDisMap = new HashMap<>();
this.runSimMap = new HashMap<>();
for(String line: Files.readAllLines(runFile.toPath())){
String pair = line.split(":")[0].replaceAll("[^0-9,]+", " ").trim();
double[] values = Arrays.s... | [
"@Override\r\n\tpublic void run() {\n\t\tint nodeNumPhy=-1,edgeNumPhy=-1;\r\n\t\tint nodeNumVir=-1,edgeNumVir=-1;//改进:这里好像用不到两个变量,物理网络和虚拟网络可以用同一对变量。\r\n//\t\tLinkedHashMap<Integer,Double> embOrder =new LinkedHashMap<Integer,Double>();//最终映射顺序\r\n//\t\tLinkedHashMap<Integer,Integer> result=new LinkedHashMap<Integer,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end of arm movement | public void angle_turn(double angle_I_want) {
internalGyro.turnDegrees(angle_I_want, left_motor, right_motor, telemetry);
} | [
"protected void end() {\n Robot.arm.set(0);\n }",
"@Override\n\tprotected void end() {\n\t\t// Keep arm at this angle\n\t\tRobotModule.arm.controller.setSetpoint(RobotModule.arm.getRawEncoder());\n\t\tRobotModule.arm.pidTicker.start();\n\t}",
"@Override\n\tprotected void end() {\n\t\tRobot.arm.stopArm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Open through the header menu Service > Different Elements Page | public void openPageElement(){
serviceDrop.click();
differentElements.click();
} | [
"public void open()\n\t{\n\t\tclickWebElement(menuBtn());\n\t}",
"@SuppressWarnings(\"unused\")\n @BeforeMethod\n private void loadPage() {\n openComponent(\"Context Menu\");\n scrollIntoView(LOC_SECOND_EXAMPLE_HEADER, true);\n }",
"public static void openBoardsMenuInHeader(WebDriver... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XCatchClause__Group__3" $ANTLR start "rule__XCatchClause__Group__3__Impl" ../org.yakindu.sct.generator.genmodel.ui/srcgen/org/yakindu/sct/generator/genmodel/ui/contentassist/antlr/internal/InternalSGen.g:11695:1: rule__XCatchClause__Group__3__Impl : ( ')' ) ; | public final void rule__XCatchClause__Group__3__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.yakindu.sct.generator.genmodel.ui/src-gen/org/yakindu/sct/generator/genmodel/ui/contentassist/antlr/internal/InternalSGen.g:11699:1: ( ( ')' )... | [
"public final void rule__XCatchClause__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalScripting.g:12749:1: ( rule__XCatchClause__Group__2__Impl rule__XCatchClause__Group__3 )\n // InternalScripting.g:12750:2: rul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |