query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
If the global postID variable is found, proceed
@Override public void onComplete(@NonNull Task<DocumentSnapshot> task) { if (task.isSuccessful()) { DocumentSnapshot document = task.getResult(); if (document.exists()) { Log.d("postId_call", "DocumentSnapshot data: " + document...
[ "private static synchronized int getPostingContentID(){\n\t\treturn postingContentID++;\n\t}", "public int getPostServiceID(){\r\n return localPostServiceID;\r\n }", "public void setPOSTID(long value) {\r\n this.postid = value;\r\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the cached copy of the words in the adapter.
@Override public void onChanged(@Nullable final List<mytable> words) { mAdapter.setWords(words); }
[ "public void refreshIndexToWords() {\n this.indexToWantedWords = new HashMap<>();\n }", "@Override\n public void onChanged(@Nullable final List<WordEntity> words) {\n adapter.setWords(words);\n wordCount = words.size();\n }", "@Override\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor for the property "LeaseGranularity" Setter for property LeaseGranularity. The lease granularity. Valid values are: Lease.BY_THREAD thread based ownership (default) Lease.BY_MEMBER member based ownership
protected void setLeaseGranularity(int nHeldBy) { __m_LeaseGranularity = nHeldBy; }
[ "public int getGranularity() {\n return granularity_;\n }", "public void setGranularity( String granularity )\n {\n this.granularity = granularity;\n }", "public Builder setGranularity(int value) {\n bitField0_ |= 0x00000004;\n granularity_ = value;\n onChanged();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ supervisor list for Workoffer ....
@GET("workOrders/getSupervisor") Call<ResponseBody> getWorkOfferSupervisors(@Header("Authorization") String token);
[ "public List<Worker> getWorkers();", "public List<Job> getMyJobs() {\n\t\treturn DataPollster.getInstance().getVolunteerJobs(super.getEmail());\t\t\n\t}", "public void dailyListJob() {\n\t}", "@XmlElement( name = \"Supervisor\" )\r\n\t@JsonProperty( \"Supervisors\" )\r\n\tpublic List<EspSupervisor> getCurrent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Optional. SMB share settings for the volume. repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL];
public Builder addSmbSettings(com.google.cloud.netapp.v1.SMBSettings value) { if (value == null) { throw new NullPointerException(); } ensureSmbSettingsIsMutable(); smbSettings_.add(value.getNumber()); onChanged(); return this; }
[ "public ShareSmbSettings getSmb() {\n return this.smb;\n }", "java.util.concurrent.Future<CreateSMBFileShareResult> createSMBFileShareAsync(CreateSMBFileShareRequest createSMBFileShareRequest);", "public ShareProtocolSettings() {}", "public SMBMounter createMounter() {\n\t\t\n\t\t// Check if the SMB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ JADX WARNING: Missing block: B:10:0x0025, code skipped: resetPriorityAfterLockedSection(); r0 = r1.length; r2 = 0; / JADX WARNING: Missing block: B:11:0x002a, code skipped: if (r2 >= r0) goto L_0x0034; / JADX WARNING: Missing block: B:12:0x002c, code skipped: r1[r2].windowsChanged(); r2 = r2 + 1; / JADX WARNING: Miss...
private void notifyWindowsChanged() { synchronized (this.mWindowMap) { try { boostPriorityForLockedSection(); if (this.mWindowChangeListeners.isEmpty()) { } else { WindowChangeListener[] windowChangeListeners = (WindowChangeListener...
[ "void aXn() {\n /*\n r4 = this;\n r0 = r4.cancelled;\n if (r0 == 0) goto L_0x0005;\n L_0x0004:\n return;\n L_0x0005:\n monitor-enter(r4);\n r0 = r4.cancelled;\t Catch:{ all -> 0x003e }\n if (r0 == 0) goto L_0x000c;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to handle a mouse event
void onMouse(int[] mouseVal);
[ "public void mousePressedHandler(MouseEvent mouseEvent){}", "public void mousePressed (MouseEvent event) {}", "public void mouseClicked(MouseEvent event){\n mouseX=event.getX();\n mouseY=event.getY();\n thread.handleClick(mouseX,mouseY);\n\t}", "public void mousePressed (MouseEvent e) {}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .model.Step steps = 1;
public io.kope.testr.protobuf.model.Model.Step getSteps(int index) { if (stepsBuilder_ == null) { return steps_.get(index); } else { return stepsBuilder_.getMessage(index); } }
[ "@Override\n public void increment(int steps) {\n\n }", "public void advanceStep() {;}", "void incrementStep();", "public void increaseStep() {\r\n\t step++;\r\n\t}", "public void step()\n {\n step(1, 0.0);\n }", "public void step(){\n\t\tif(myModel!=n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use DrawEllipseEvent_PB.newBuilder() to construct.
private DrawEllipseEvent_PB(Builder builder) { super(builder); }
[ "private void updateEllipseEdge() {\n\n\t\tCoords m = conic.getMidpoint3D();\n\t\tCoords ev0 = conic.getEigenvec3D(0);\n\t\tCoords ev1 = conic.getEigenvec3D(1);\n\t\tdouble r0 = conic.getHalfAxis(0);\n\t\tdouble r1 = conic.getHalfAxis(1);\n\n\t\tdouble start0 = getStart(0);\n\t\tdouble end0 = getEnd(0);\n\t\tdouble...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new VisionSubsystem.
public VisionSubsystem(final VisionCore vision) { this.vision = vision; colorChooser.setDefaultOption("Black", Color.BLACK); colorChooser.addOption("Red", Color.RED); colorChooser.addOption("Green", Color.GREEN); colorChooser.addOption("Blue", Color.BLUE); ShuffleTabs.o...
[ "public VisionCommand(final RobotDriveSubsystem subsystem, final VisionSubsystem vSubsystem) {\n this.driveSubsystem = subsystem;\n this.visionSubsystem = vSubsystem;\n // Use addRequirements() here to declare subsystem dependencies.\n addRequirements(this.driveSubsystem);\n addRequirements(this.visi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setup the mandatory fields
@Override public void setupAddFields(EquationStandardTransaction transaction) { // transaction.setField("GZDNO2", "100"); // Original draft number (16A) transaction.setFieldValue("GZDNO", createCashierReference()); // New draft number (16A) }
[ "public void setupFields()\n {\n FieldInfo field = null;\n field = new FieldInfo(this, ID, 6, null, null);\n field.setDataClass(Integer.class);\n field.setHidden(true);\n field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getter for page count of current Books() object
public int getPgCount() { return numPgs; }
[ "public Integer getPageCount() {\r\n return this.pageCount;\r\n }", "public int getPageCount() {\r\n \t\treturn pageCount;\r\n \t}", "public Uni<Integer> pageCount();", "public int getPageCount() {\n\t\treturn pageCount;\n\t}", "public int getNrOfPages() { return nrOfPages; }", "public int getPa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If FAILED arrives after DONE, the job is marked as FAILED.
public void testFailedAfterDone() { JMSConnectionMockupMQ con = (JMSConnectionMockupMQ) JMSConnectionFactory .getInstance(); Job j1 = TestInfo.getJob(); theDAO.create(j1); j1.setStatus(JobStatus.NEW); theDAO.update(j1); long j1ID = j1.getJobID().longValue(...
[ "public void onFailure() {\n\t\tisComplete = true;\n\t}", "@Override\n public void onFailedTask() {\n LOG.entering(\"TaskNodeImpl\", \"onFailedTask\", getQualifiedName());\n if (!running.compareAndSet(true, false)) {\n LOG.fine(getQualifiedName() + \"Trying to set failed on an already failed task. Som...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tears down test environment.
protected void tearDown() throws Exception { TestHelper.tearDownDataBase(); TestHelper.clearConfig(); delegate = null; bean = null; }
[ "@AfterMethod\n public void tearDown() throws Throwable {\n if (bridgeSpine != null) {\n bridgeSpine.shutdown(true);\n }\n bridgeSpine = null;\n if (otherBridgeSpine != null) {\n otherBridgeSpine.shutdown(true);\n }\n otherBridgeSpine = null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides an acknowledgement for the message. Once ack'ed the message is removed from the queue forever.
public boolean ack(String messageId);
[ "public abstract void onAck(Ack message);", "protected abstract void handleAcked(MessageId messageId);", "@Override\r\n public void ackQueueStoreEntry(Message message) throws JMSException {\n message.acknowledge();\r\n }", "void acknowledge();", "public void acknowledge() {\r\n if (id ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor for Card Value
public char getValue() { return value; }
[ "public int getValue() { return cardVal; }", "@Override\n public CARDVALUE getValue() {\n return value;\n }", "private int getCardValue()\n\t{\n\t\t/**\n\t\t*Precondition: None.\n\t\t*Postcondition: Returns the value of value.\n\t\t*/\n\t\treturn this.value;\n\t}", "public int getCardValue() {\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
para el progress dialog
protected void onPreExecute() { pDialog = new ProgressDialog(NewBillActivity.this); pDialog.setMessage("Adding Bill...."); pDialog.setIndeterminate(false); pDialog.setCancelable(false); pDialog.show(); }
[ "private void showProgress()\n {\n showDialog(0);\n }", "private void exibirProgressDialog(){\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); // ESTILO HORIZONTAL\n // progressDialog.setProgr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
option 1: By sentence.
public SentenceSplitContainer sentDetect(String filename) { DocumentPreprocessor dp = new DocumentPreprocessor(filename); ArrayList<ArrayList<String>> sent = new ArrayList<>(); ArrayList<List<HasWord>> sent2 = new ArrayList<>(); for (List<HasWord> sentence : dp) { ArrayList<String> sentInner = new ArrayList<...
[ "static void randomSentence() {\n /* A simple sentence*/\n randomSimpleSentence();\n if (Math.random() > 0.75) {// 25% of sentences continue with another clause.\n\n System.out.println(\" \" + randomItem(conjunction));\n randomSimpleSentence();\n\n }\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Layout of the control panel
public static JPanel panelCreator(){ startScreen.setLayout(new BoxLayout(startScreen, BoxLayout.Y_AXIS)); JButton home = new JButton("Back to Home"); home.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { //EconDataComp.q1q3ResultPanel.removeAll(); //EconDataComp.q...
[ "protected abstract void layoutPanel();", "private void layoutComponents() {\n setContentPane(wizard);\n }", "private void setLayout() {\n\t\t\n\t\tthis.layout = new BorderLayout();\n\t\tthis.layout.setHgap(30);\n\t\tthis.layout.setVgap(30);\n\t\tthis.setLayout(this.layout);\n\t\tthis.label.setBorder(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the configuration builder for the valid twitter user
public static ConfigurationBuilder getConfigurationBuilder() { ConfigurationBuilder cb = new ConfigurationBuilder(); try { Properties twitterCredentialProp = AppProperties.getPropertyFile(AirportTweetAppConstants.TWITTER_PROPERTIES_FILE); cb.setDebugEnabled(true).setOAuthConsumerKey(twitterCredentialProp....
[ "public yandex.cloud.api.mdb.mongodb.v1.config.Mongodb36.MongodConfig3_6.Builder getUserConfigBuilder() {\n \n onChanged();\n return getUserConfigFieldBuilder().getBuilder();\n }", "public ConfigurationBuilder getConf() {\n\t\tcb.setDebugEnabled(true).setOAuthConsumerKey(AccountInformati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .CMsgFantasyLeagueScoring stats = 10;
DotaGcmessagesClientFantasy.CMsgFantasyLeagueScoring getStats();
[ "public void getTeamStats() {\r\n ba.sendArenaMessage(Tools.formatString(\"|\" + getTeamName(), 73, \"-\"));\r\n ba.sendArenaMessage(\"|SHIPS |PLAYERS |G |A |SH |ST |TO |CM |CT |PC |PCT |T |+/-|RATING\", 1);\r\n\r\n for(twhtPlayer i : m_players.values())\r\n i.reportPlayer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void beforeChangeValueOf(WebElement element, WebDriver driver) { }
[ "@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 Autogenerated method stub
@Override public CreditCard getValidator(CreditCardType creditCardType) { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an array list of the C language lines contained in the C language token group.
public ArrayList<ClangLine> getLines() { return lines; }
[ "public List<List<String>> readTokenLines() {\n List<List<String>> tokenLines = new ArrayList<>();\n try (\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, charsetName))\n ){\n String line;\n while((line = reader.readLine()) !=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column music_friends_idea.content
public void setContent(String content) { this.content = content == null ? null : content.trim(); }
[ "public void setContent(String value)\n {\n try\n {\n if(value != null)\n {\n set(contentDef, value);\n }\n else\n {\n unset(contentDef);\n }\n }\n catch(ModificationNotPermite...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create and return the created URI
@PostMapping(value = "users") public ResponseEntity<Object> saveUser(@Valid @RequestBody UserEntity userEntity){ UserEntity savedUserEntity = userService.saveUser(userEntity); URI location = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}").buildAndExpand(savedUserEntity.getId()).toUri(); return ...
[ "public abstract UriBuilder createUriBuilder();", "private GitURI create(URIish uri) {\n GitURI u = new GitURI();\n u.uri = uri;\n return u;\n }", "private URI createUri(String uri) {\n try {\n if (this.baseAddress == null) {\n return com.reply.solidsoft....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO to Optional> , verify DetailsViewState.isActive
public State(String name, String title, DataGrid.Table<String, T> list, Optional<DetailsViewState<T>> details) { this.name = name; this.title = title; this.list = list; this.details = details; }
[ "boolean isSetInstrumentationstate();", "@OnClick(R.id.iv_visibility)\n public void reverseDetailState() {\n if (isDetailVisible) {\n isDetailVisible = false;\n preferencesHelper.setOverviewState(false);\n hideOverviewState();\n } else {\n isDetailVisib...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Creates the drop down menu that appears when a right click is performed on the table.
private void initializeDropDownMenu(){ Box menu = new Box(BoxLayout.Y_AXIS); initializeDropDownLabels(); addLabelsToBox(menu); //Sets the highlighted background color, note that it does not become "Highlighted" until opaque(true) is called setMenuHighlightedBackground(Color....
[ "private void rightClickMenu(){\n JPopupMenu rightClickMenu = new JPopupMenu();\n // creating new menu items to add to the right lick menu\n JMenuItem deleteMenuItem = new JMenuItem(\"Delete Row\");\n JMenuItem editMenuItem = new JMenuItem(\"View/Edit\");\n // adding the items to ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the verison of WDL that this mod is targeted at.
public abstract String getTargetedWDLVersion();
[ "public String getVersion() {\n/* 650 */ return this.m_handler.getVersion();\n/* */ }", "public String Engine_Version_getNormal();", "public String getVerif();", "public int getVerNum() {\n return verNum;\n }", "MCVersion getVersion();", "BmpVersion getVersion();", "public double g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) { CokeMachine drink = new CokeMachine(); drink.Cup2 = "hi"; drink.dispenseCoke(); drink.printMixIntruct(); SuperClass sup = new SuperClass("HI"); sup.test(); sup.test4(); }
[ "@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" ] ] } }
Use Camera.newBuilder() to construct.
private Camera(Builder builder) { super(builder); }
[ "public Camera() {\n\n light = new Relay(CameraConstants.lightRelay);\n\n cameraTable = NetworkTableInstance.getDefault()\n .getTable(CameraConstants.chameleonVisionTableName)\n .getSubTable(CameraConstants.cameraTableName\n );\n \n robotPose = cameraTable.getEntry(\"targetPose\");\n\n v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserts a task into the DB
private static void insert(Connection conn, Task task) { final String sql = "INSERT INTO Tasks(id,title,description,state,due) VALUES(?,?,?,?,?)"; try { PreparedStatement pstmt = conn.prepareStatement(sql); pstmt.setInt(1, (int) task.id); //fixme cast pstmt.setString(2, task.data.title); pstmt.setStrin...
[ "void insertTask(Task task);", "public void create(Task task) throws SQLException {\n\r\n connection = DriverManager.getConnection(URL, USER, PASSWORD);\r\n\r\n PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO task(id, description, user_id) VALUES (?,?,?)\");\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__UserDef__Group_2_1__1__Impl" $ANTLR start "rule__UserDef__Group_2_2__0" ../org.eclipse.osee.ats.dsl.ui/srcgen/org/eclipse/osee/ats/dsl/ui/contentassist/antlr/internal/InternalAtsDsl.g:3160:1: rule__UserDef__Group_2_2__0 : rule__UserDef__Group_2_2__0__Impl rule__UserDef__Group_2_2__1 ;
public final void rule__UserDef__Group_2_2__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.eclipse.osee.ats.dsl.ui/src-gen/org/eclipse/osee/ats/dsl/ui/contentassist/antlr/internal/InternalAtsDsl.g:3164:1: ( rule__UserDef__Group_2_2__0__Impl...
[ "public final void rule__Type__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMiniJava.g:1612:1: ( rule__Type__Group_0__2__Impl )\n // InternalMiniJava.g:1613:2: rule__Type__Group_0__2__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public void mo15322a(String str, String str2) { if (MultiGlobalInfo.m11808b()) { SPMultiHelper.m11874a("ttopenadsdk", str, str2); } else { this.f7314b.edit().putString(str, str2).apply(); } }
[ "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" ] ] } }
Destroy doesn't do regular destroy here but changes the whole array and recreates the node hierarchy. Does not even call super.destroy()!
public void destroy() throws java.io.IOException { Object[] newArray = (Object[]) Array.newInstance(getConvertedType(), array.length - 1); System.arraycopy(array, 0, newArray, 0, index); System.arraycopy(array, index + 1, newArray, index, array.length - index - 1); // th...
[ "@Override\r\n\tpublic void destroy() {\n\t\tdestoryData();\r\n\t\tsuper.destroy();\r\n\t}", "@Override\n\tpublic void clear() {\n\t\tgetChild().clear();\n\t}", "public void destroy() {\n removeAllRules();\n processDestroy();\n destroyChildren();\n }", "@Override\n public void removeFromHie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the location to a deep copy of the given Posn.
public void setLocation(Posn position) { this.shape.setLocation(position); }
[ "public void setCoordinate(final WorldCoordinate copy)\n {\n this.north = copy.north;\n this.east = copy.east;\n }", "public void setPosition(Point p);", "@Override\n\tpublic void setLoc(Point p) {\n\t\tthis.loc.setLocation(p);\n\t\t\n\t}", "public void changePosition(Posn posn) {\n if (posn ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a rating to the database.
public static void AddRating(Rating newRating) throws FileNotFoundException, IOException, ParseException { JSONParser jsonParser = new JSONParser(); JSONObject JSONrating = newRating.toJSONObject(); try (FileReader reader = new FileReader(RatingDBFile.toString())) { //Read J...
[ "public static void add( Rating rating ) throws SQLException {\n\t\t\n\t\t//INSERT INTO `tmi`.`rating` \n\t\tString stmt = \"REPLACE INTO rating VALUES (?,?,?,?)\";\n\t\ttry {\n\t\t\tPreparedStatement ps = DBConnection.getConnection().prepareStatement(stmt);\n\t\t\tps.setString(1, rating.getUsername() );\n\t\t\tps....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the hour value represented by this MyTime.
public int getHour() { return this.mHour; // TODO - replace }
[ "public int getHour() {\n return this.hour; // returns the hour value of the time\n }", "private int getHour() {\n long millis = getPersistedLong(mCurrentValue);\n mTime.set(millis);\n mTime.normalize(true);\n \n return mTime.hour;\n }", "public long getHour() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the version value for this FeatureDataDataType.
public java.lang.String getVersion() { return version; }
[ "public int getDataVersion() {\n return dataVersion;\n }", "public Number getVersion() {\n return (Number)getAttributeInternal(VERSION);\n }", "public String getVersion() {\n if (featureModel == null)\n return null;\n return featureModel.getFeature().getVersion();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
prime = n a fuzetben
public static boolean millerRabinPrimeTest(BigInteger prime) { int k = 0; BigInteger a = new BigInteger("2"); BigInteger nMinusOne = prime.subtract(new BigInteger("1")); BigInteger m = new BigInteger(nMinusOne.toString()); while ((m.remainder(new BigInteger("2"))).equals(BigInteger.ZERO)) { k++; m = m.d...
[ "static boolean isPrime(int n) { \n if (n <= 1) \n return false; \n if (n <= 3) \n return true; \n \n // Kontrollojme nese numri eshte i thjeshte \n \n if (n % 2 == 0 || n % 3 == 0) \n return false; \n \n for (int i = 5; i * i <= n; i = i ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepare the variables map.
@Override public void execute(CopyEntry fileSystemObject, BuildContext buildContext) { HashMap<String, Object> variables = new HashMap<String, Object>() {{ put("forme", buildContext.getForme()); put("user", buildContext.getUserResponses()); }}; //Generate the paths t...
[ "private void initializeVariables()\n {\n this.prefixes = new HashMap<String, String>();\n this.statements = new ArrayList<IStatement>();\n this.unknowns = new HashSet<String>();\n }", "private void instanciateValuationMapping() {\n\t\tthis.aVariableMap = new HashMap<String, Double>();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Looks up the current transaction associated with the given number
@Nullable public ScheduleTransaction lookupTransaction(String phoneNumber) { String json = lookupTransactionJson(phoneNumber); if (json == null) { return null; } return ScheduleTransaction.fromJson(json); }
[ "public Item findItemForNumber(String number) {\n\t\treturn items.get(number);\n\t}", "Transaction viewTransaction(int transactionId);", "@SuppressWarnings(\"unchecked\")\r\n\tpublic ImportLCIssue findByTransactionNumber(String transactionNumber) {\r\n\t\tImportLCIssue importLCIssue = null;\r\n\t\ttry {\r\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the storage account to be used for logging during replication.
public HyperVReplicaAzureEnableProtectionInput withLogStorageAccountId(String logStorageAccountId) { this.logStorageAccountId = logStorageAccountId; return this; }
[ "void setAccount(String val);", "public void setAccount( String account ) {\n this.account = account;\n }", "void setUserAccount(@NonNull String nick, @Nullable String account);", "void logSetReplication( String src, short replication ) {\n logEdit(OP_SET_REPLICATION, \n new UTF8(src), \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 45 /Coverage entropy=0.0
@Test(timeout = 4000) public void test45() throws Throwable { int int0 = JavaCharStream.hexval('b'); assertEquals(11, int0); }
[ "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: 0000
public void releaseResourcesAfterFailure() { super.releaseResourcesAfterFailure(); this.task = null; }
[ "private B000066() {\r\n\r\n\t}", "@Override\n\tpublic int modifiers() {\n\t\treturn 0;\n\t}", "protected void method_5557() {}", "@Override\r\n\tpublic int getAccessCode() {\n\t\treturn 0;\r\n\t}", "public abstract void mo30462c();", "@Override\n public int utilite() {\n return 0;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if column exists in a table, if it does not then it attempts to find a replacement name
private Map<String, String> getReplacementColumnNamesFromTables(String originalColumnName, Collection<SQLTable> tables) throws SMatchException { Map<String, String> replacements = new HashMap<>(); // TODO: if column names are with table names, only check for that table if(!database.columnI...
[ "@Override\n public boolean existsColumn(String table, String column)\n {\n try {\n ResultSet columns = getConnection().getMetaData().getColumns(null, null, table, column);\n boolean empty = columns.next();\n columns.close();\n return empty;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Search for data in dataholder or members of union recursively
@Nullable public static <T> T findData(@NotNull final PyType type, @NotNull final Key<T> key) { if (type instanceof UserDataHolder) { return ((UserDataHolder)type).getUserData(key); } if (type instanceof PyUnionType) { for (final PyType memberType : ((PyUnionType)type).getMembers()) { ...
[ "public interface IUnionFind<T> {\n\n /**\n * unites the dynamic sets that contain member1 and member2\n */\n public void UNION(T member1, T member2);\n\n /**\n * creates a new set whose only member (and thus representative) is member\n */\n public void MAKESET(T member);\n\n /**\n * returns a refere...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start date of when the promotion is eligible to be redeemed. .google.protobuf.StringValue promotion_start_date = 7;
public Builder clearPromotionStartDate() { if (promotionStartDateBuilder_ == null) { promotionStartDate_ = null; onChanged(); } else { promotionStartDate_ = null; promotionStartDateBuilder_ = null; } return this; }
[ "@javax.annotation.Nullable\n @ApiModelProperty(example = \"2017-01-04\", value = \"The timestamp of the customers registration in the merchants platform. Format is YYYY-MM-DD.\")\n\n public String getStartDate() {\n return startDate;\n }", "public void setPromotionEndDate(String promotionEndDate) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns folder which acts as a holder for puzzles imported without folder. If this folder does not exists, it is created.
public FolderInfo getInboxFolder() { FolderInfo inbox = findFolder(INBOX_FOLDER_NAME); if (inbox != null) { inbox = insertFolder(INBOX_FOLDER_NAME, System.currentTimeMillis()); } return inbox; }
[ "public static String getTestFolder() {\r\n if (properties == null) {\r\n loadProperties();\r\n }\r\n return TEST_FOLDER;\r\n }", "FileObject getFolder();", "File getTempFolder ();", "ArchitectureFolder createArchitectureFolder();", "void createOutputFolder()\n\t{\n\t\tStr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the submatrix which top left at (i, j) and bottom right at (k, l). The content of the submatrix will be that of this matrix. Changes to this matrix's content will be visible in the submatrix, and vice versa.
public BigMatrix submatrix(int i, int j, int k, int l) { if (i < 0 || i >= m || k < i || k >= m || j < 0 || j >= n || l < j || l >= n) { throw new IllegalArgumentException(String.format("Invalid submatrix range (%d:%d, %d:%d) of %d x %d", i, k, j, l, m, n)); } long offset = index(i,...
[ "public Matrix getSubMatrix(int i, int j, int k, int l){\n \t if(i>k)throw new IllegalArgumentException(\"row indices inverted\");\n \tif(j>l)throw new IllegalArgumentException(\"column indices inverted\");\n \tif(k>=this.numberOfRows)throw new IllegalArgumentException(\"Sub-matrix position is o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Division of two fractions
public Fraction div(Fraction f) { return this.mul(f.inverse()); }
[ "public double division(double num1, double num2);", "public double division (double a, double b);", "public void division(){\n\t\t\n\t result = (double) (a) / ((double) (b));\n\t \n\t System.out.println(\"Result of division a/b: \" + result);\n\t\n\t}", "double div (double num1, double num2) {\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test for creating a ShowMealView
@Test public void ShowMealViewTest() { ShowMealView lv = (ShowMealView) factory.create("ShowMeal"); ShowMealView lu = (ShowMealView) factory.create("showMeal"); assertNotNull(lu); assertNotNull(lv); }
[ "public void test(View view) {\n\n try {\n Class<?> clazz = Class.forName(\"com.innotect.annotationdemo.model.MealFactory\");\n Object obj = clazz.newInstance();\n Method method = clazz.getMethod(\"create\", String.class);\n method.setAccessible(true);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
public boolean isOpaqueCube() { return false; }
[ "public boolean isFullCube(IBlockState state)\n\t{\n\t\treturn false;\n\t}", "public boolean isBlockOpaqueCube(int par1, int par2, int par3)\n {\n Block block = Block.blocksList[getBlockId(par1, par2, par3)];\n\n if (block == null)\n {\n return false;\n }\n else\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtains all the String values from a StringValueState list.
public static List<String> getStringsFromStringValueStates(List<StringValueState> stringValueStates) { return stringValueStates.stream().map(StringValueState::getStringValue).collect(Collectors.toList()); }
[ "java.util.List<java.lang.String>\n getStringValList();", "java.util.List<java.lang.String>\n getSValuesList();", "public String [] getStringValues() {\n\tString [] stringArray = new String[value.size()];\n\tfor (int i = 0; i < value.size(); i++){\n\t\tstringArray[i] = (String) value.get(i);\n\t}\n\tret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
as default you should also fix clone() when you add attributes =================================================================================== Constructor =========== Construct the handy date by the specified date. The specified date is not changed by this handy date.
public HandyDate(Date date) { assertConstructorArgumentNotNull("date", date); _cal.setTime(date); }
[ "public MyDate() {\n\t\tthis(new Date());\n\t}", "public BasicDate()\r\n {\r\n this(new java.util.Date());\r\n }", "public Date(Date date)\r\n {\r\n this.month = date.month;\r\n this.day = date.day;\r\n this.year = date.year; \r\n }", "public Date(Date date1)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Skips comment lines in the input.
public void skipComments() throws IOException { while (skipComment()) { // Empty } }
[ "private void skipComment() {\n assert tokens.get(position - 1).getText().equals(\"<!--\");\n\n boolean foundEnd = false;\n while (!foundEnd && position < tokens.size()) {\n Token token = tokens.get(position++);\n if (token.isSpecial()) {\n String text = tok...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FLOAT en la BD
public FotoMultaPlaca(FotoMulta fotomulta, Placa placa, String sColorAuto, Timestamp fechaHora, double dVelocidadInfraccion) { this.fotomulta = fotomulta; this.placa = placa; this.sColorAuto = sColorAuto; this.fechaHora = fechaHora; this.dVelocidadInfraccion = dVelocidadInfraccion; }
[ "public float getFloat() throws SQLException;", "@Override\r\n\tpublic float getFloat(String sql) {\n\t\treturn 0;\r\n\t}", "void setFloat(float value) throws SQLException;", "public float getFloat(String arg0) throws SQLException {\n\t\treturn 0;\r\n\t}", "public float getFloat(int arg0) throws SQLExceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method cleans up the proc dir if success is false and it sets the lists to null.
public void finalize() { // delete any of the files that were created if success is false if (success == false) { if (isProcDirCreated) { Preferences.debug("! Deleting .list, .path, and .BMTXT (if created) from proc dir \n", Preferences.DEBUG_ALGORITHM); ...
[ "protected void cleanup() {\n \t\tList<String> removal = new ArrayList<String>();\n \t\t// Iterate through the users\n \t\tfor(String user : users.keySet()) {\n \t\t\tUser u = users.get(user);\n \t\t\tif(u.getPermissions().size() == 0 &&\n \t\t\t\t\t(u.getGroupsAsString().size() == 0 ||\n \t\t\t\t\t\t(u.getGroupsAs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Dado el conjunto de oids de clientes de los consolidados en proceso y su periodo, se recupera de la entidad 'REC:Clientes a chequear' aquellos oids de consultoras especificadas para chequeo y su indicador a aplicar. Devolvemos un Hashtable cuya clave es oid del Cliente y el valor oid del Indicador de revision.
public Hashtable obtenerClientesAChequear(ArrayList oidsClientes, Long oidPeriodo) throws MareException { UtilidadesLog.info("MONBalanceoAreaChequeoBean.obtenerClientesAChequear(oidsClientes, oidPeriodo): Entrada"); Hashtable clientesAChequear = new Hashtable(); DTOSalida dtoS = new DAO...
[ "private void historialMovimientosClientes() {\n\t\ttry {\n\t\t\tRegisterDomain rr = RegisterDomain.getInstance();\n\t\t\tDate desde = Utiles.getFechaInicioOperaciones();\n\t\t\tDate hasta = this.hasta;\n\t\t\tCliente cliente = rr.getClienteByEmpresa(this.selectedItem.getId());\n\t\t\tboolean incluirChequesRechazad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a map with multipart form data.
public HashMap<String, Value> multiForm(final MediaType type) throws IOException, QueryException { // parse boundary, create helper arrays final byte[] bound = concat(DASHES, boundary(type)), last = concat(bound, DASHES); final HashMap<String, Value> data = new HashMap<>(); final ByteList cont = new By...
[ "private static Map<String, String> parseFormData(String formData) throws UnsupportedEncodingException { \n Map<String, String> map = new HashMap<>(); \n String[] pairs = formData.split(\"&\"); \n for(String pair : pairs){ \n String[] keyValue = pair.split(\"=\"); \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onCreate(SQLiteDatabase db) { }
[ "@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" ] ] } }
Specifically for the listener
public Quest() { }
[ "@Override\n protected void setListener() {\n }", "private void registerListener() \r\n\t{\n\t}", "@Override\n protected void initListener() {\n\n }", "public void addToListener() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}", "@Override\n public int getListenerOrder() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DOWN A PLAYER Down a specific player. Call again to undown. This puts the player in a sitting position on a slab. He can still cause/take damage.
public void down(Player p){ if(!downedPlayers.containsKey(p.getName())) { //reset food and health p.setFoodLevel(Integer.MAX_VALUE); p.setHealth(20); //set up block to sit on int plX = doubleToInt(p.getLocation().getX()); int plZ = doub...
[ "public void down() {\n\t\tsetPlayer(pacmanDown);\n\t}", "public void moveDown() {\n\t\tTile down = tiles[startx + 5][starty + 5];\n\t\tif (!isPassable(down.tileType) && isMineable(down.tileType) && Math.abs(deltaX) < 0.5\n\t\t\t\t&& Math.abs(deltaY) < 0.1) {\n\t\t\tdigTile = down;\n\t\t\tdiggingDirection = 3;\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new post custom emoji.
public PostCustomEmoji(String filePath, String emojiName) { setZulipAPIUrl("/api/v1/realm/emoji/" + emojiName); this.emojiName = emojiName; boolean check = ImageChecker.checkIfFileIsAnImage(filePath); if (check) { this.filePath = filePath; } else { try { throw new InvalidArgumentException("Invalid ...
[ "public void createPost(String post)\n\t{\n\t\t// untested as I haven't been able to connect my bot yet\n\t\tTextPost t = new TextPost();\n\t\ttry {\n\t\t\tt = tumblr.newPost(USERNAME, t.getClass());\n\t\t\tt.setBody(post);\n\t\t\tt.setTags(TAGS);\n\t\t\tt.save();\n\t\t} catch (IllegalAccessException e) {\n\t\t\tSy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
StringReader test = new StringReader("De kat krabt de krullen van de trap"); NoFormatReader reader = new NoFormatReader(test); char[] res = new char[1024]; int amount = reader.read(res); System.out.println(""+amount+" characters read, in an array of size "+res.length); char[] second = Tools.removeAccents(res); System.e...
public static void main(String[] args) throws IOException{ if(args == null || args.length == 0){ args = new String[1]; // args[0] = "corpus/training"; args[0] = "corpus/gutenberg_cases"; } if(args.length == 0){ System.out.println("Not enough parameters given. Expected: [Directory path]"); ...
[ "@Test(timeout = 4000)\n public void test181() throws Throwable {\n StringReader stringReader0 = new StringReader(\";!g'^^b#6teX|_wDfW\");\n StringReader stringReader1 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1640), (-1640));\n StringRea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public List<Transaction> listForAccount(int accountId) { return getCurrentSession().createQuery("from Transaction where auth=? and status=? " + "and (senderAccNumber=? or receiverAccNumber=?)") .setParameter(0, 1) .setParameter(1, 1).setParameter(2, accountId).setParameter(3, accountId).list();...
[ "@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 Autogenerated method stub
@Override public CrewMember getCrewMember(int id) { return repository.findById(id); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public int getChildrenCount(int groupPosition) { return hijos[groupPosition].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" ] ] } }
Constructor for the sequence factory. Used when the name of the Sequence must be lazily created, e.g. when a Proxy is involved.
public SequenceFact(ILambda<String, Void> getNameCmd, ITokenizer tkz, ITokVisitorFact fact1, ITokVisitorFact fact2) { super(getNameCmd, tkz); _fact1 = fact1; _fact2 = fact2; }
[ "public Sequence() {\n super();\n }", "public static Sequence createSequence(String name, String seq) throws SequenceException {\r\n \t\ttry {\r\n \t\t\treturn new Sequence(name, seq);\r\n \t\t} catch(SequenceException e) {\r\n \t\t\treturn new BaseSequence(name, seq);\r\n \t\t}\r\n \t}", "public BaseSequen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
13. Eulerian Path and Cycle for Unidirected and Directed Graphs (P5) For Unidirected Euler Path : All edges are visited exactly once Eular Cycle : All edges are visited exactly once but start & end vtx are same Connected Graph is essential or unconnected graph with every component except 1 having 0 vtxs For Eular Path ...
static int isEulerian(ArrayList<ArrayList<Edge>> graph) { if (isConnected(graph)) { return 0; } // count number of odd vertices int odd = 0; for (int i = 0; i < graph.size(); i++) { if (graph.get(i).size() % 2 == 1) { odd += 1; } } if (odd > 2) { return 0; // again not eulerian } retur...
[ "private static void traverseEulerianPath(network netw) {\n\t\tArrayList<node> accessible_nodes = new ArrayList<node>();\n\t\tArrayList<edge> accessible_edges = new ArrayList<edge>();\n\t\tnode node = netw.getNodes().get(0);\n\t\tQueue<node> forward = new LinkedList<node>();\n\t\tedge edge;\n\t\tedge last_edge = nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the lcdd data structures.
public void addToLCDD(LCDD lcdd, SensitiveDetector sens) throws JDOMException { Solids solids = lcdd.getSolids(); Structure structure = lcdd.getStructure(); // Name of support structure. String supportName = node.getAttributeValue("name"); // polycone solid Polycone pc ...
[ "public InfoLs getLS();", "DataStructure getDataStructure();", "public java.util.List<fzdeepnet.Setting.Data> getVldDatList() {\n if (vldDatBuilder_ == null) {\n return java.util.Collections.unmodifiableList(vldDat_);\n } else {\n return vldDatBuilder_.getMessageList();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
parse x and y coordinates from command line arguments
public static void main(String[] args) { int x=Integer.parseInt(args[0]); int y=Integer.parseInt(args[1]); //compute distance to(0,0) double distance=Math.sqrt(x*x+y*y); //output distance System.out.println("distance from the point " + x + " , " + y + " to the origin (0,0) = " +distance); }
[ "public static void main(String[] args) {\n\n System.out.println(checkCoordinate( \"116.434027\",\"39.941037\"));\n }", "private Coord parse(String actionCommand) {\n String[] strArr = actionCommand.split(\",\");\n int xCoord = Integer.parseInt(strArr[0]);\n int yCoord = Integer.par...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merge current workspace with given revision. Executes hg merge . Do not forget to commit merge afterwards manually.
public String mergeWorkspaceWith(String revision, String updateTo, String message, String username) throws AdvancedSCMException { if (updateTo != null) { this.update(updateTo); } String output = ""; try { output = this.advancedHgExe.merge(revision); ou...
[ "public static void merge(String branch) {\n Command.merge(branch);\n }", "public void merge()\r\n {\n }", "void merge(String path1, Revision revision1, String path2,\n Revision revision2, String localPath, boolean force, Depth depth,\n boolean ignoreAncestry, boolean...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
retrieveUser method is used to fetch the user details based on the id.
@RequestMapping(value = "/users/{id}", method = RequestMethod.GET) public RegisterU retrieveUser(@PathVariable long id) { Optional<RegisterU> user = userRepository.findById(id); if (!user.isPresent()) throw new UserNotFoundException("id-" + id); return user.get(); }
[ "@GetMapping(\"/users/{id}\")\n\tpublic Resource<User> retrieveUser(@PathVariable int id)\n\t{\n\t\tUser user = service.findUser(id);\n\t\tif (service.findUser(id).getId()==null)\n\t\t\n\t\t\tthrow new UserNotFoundException(\"id-\"+ id);\n\t\t\tResource<User> resource = new Resource<User>(user);\n\t\t\tControllerLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Required. Whether the FinancialAccount should have the Feature.
public Builder setRequested(Boolean requested) { this.requested = requested; return this; }
[ "public boolean ifRFOrganizationFeatures() {\n return choiceSelect == RF_ORGANIZATION_FEATURES_CHOICE;\n }", "public boolean isFrankingRequired() {\n return (false);\n }", "boolean isSetRequired();", "@Override\n public boolean hasFeature(String feature) {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XIfExpression__Group__4__Impl" $ANTLR start "rule__XIfExpression__Group__5" InternalCreate.g:14029:1: rule__XIfExpression__Group__5 : rule__XIfExpression__Group__5__Impl rule__XIfExpression__Group__6 ;
public final void rule__XIfExpression__Group__5() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalCreate.g:14033:1: ( rule__XIfExpression__Group__5__Impl rule__XIfExpression__Group__6 ) // InternalCreate.g:14034:2: rule__XIfExpression_...
[ "public final void rule__XIfExpression__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:16511:1: ( rule__XIfExpression__Group_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if this is a position in which the positioning logic allows an ad to be placed.
boolean canShowAd(int position, int internalAdapterSize) { return mPositioner.canPlaceAd(position) && isAdAvailable(position, internalAdapterSize); }
[ "public boolean isThePlacementCorrect(Position pos) {\n return isThePlacementCorrect(pos, player);\n }", "@Override\n\tpublic boolean isPositionValid() {\n\t\treturn true;\n\t}", "public boolean hasPos() {\n return posBuilder_ != null || pos_ != null;\n }", "private boolean checkShipPlacin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tells you the current center of this ball.
@Override public Point getCenter() { return this.center; }
[ "public void findCenter() {\n\t\tdouble centerX = (width / 2.0) + position.x;\n\t\tdouble centerY = (width / 2.0) + position.y;\n\t\tcenterPoint = new Vec2f((float) centerX, (float) centerY); \n\n\t}", "public double getCenter() {\n return center;\n }", "public Point getCenter()\n {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retounr l'id de l'objet.
public long getItemId(int index) { return index; }
[ "public int getID() {\r\n \t\treturn obj.getID();\r\n \t}", "public Long getIdObject();", "Declaracao getId();", "public long getObjectID();", "public String getId(Object o);", "public Object getId() {\n\t\t\treturn id;\n\t\t}", "public ObjectID getID() {\n return id;\n }", "public static EO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: protected
public void addTopView(View view) { if (view != null) { this.mTopCustomContainer.addView(view); if (this.mTopCustomContainer.getVisibility() != 0) { this.mTopCustomContainer.setVisibility(0); } } }
[ "@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}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static CommandItem createEntity(EntityManager em) { CommandItem commandItem = new CommandItem() .quantity(DEFAULT_QUANTITY) .price(DEFAULT_PRICE) .color(DEFAULT_COLOR) .size(DEFAULT_SIZE); return commandItem; }
[ "protected abstract Entity createEntity();", "EntityInstance createEntityInstance();", "@Override\n protected void createEntity() {\n Company company = createCompany(1001);\n setEntity(company);\n }", "public final Entity createEntity() {\n Entity entity = new Entity(this);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a helper object to create, open, and/or manage a database for games.
public GameSQLiteHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); }
[ "public interface LocalLevelDbFactory {\n public DB open(File path, Options options) throws IOException;\n\n public void destroy(File path, Options options) throws IOException;\n}", "public DatabaseHelper(Context context) throws IOException {\n super(context,DB_NAME,null,2);\n this.mycontext=cont...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: i
void mo46603i(C18405u c18405u);
[ "public void mo2977a(int i) {\n }", "public abstract void mo91949l(int i);", "public abstract void mo46067wj(int i);", "public void mo39659c(int i) {\n }", "private int harta(int i) {\n\t\treturn 0;\n\t}", "public void mo9595a(int i) {\n }", "public void mo105a(int i) {\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if a name is not null
@Test(expected = NullPointerException.class) public void nullNameTest() throws NullPointerException, IllegalArgumentException { new ForeseeableAction(null,1); }
[ "public boolean isNull(){\r\n\t\treturn name.equals(\"\");\r\n\t}", "public boolean hasName() {\n\t\treturn (!name.equals(\"\"));\n\t}", "public boolean hasName() {\n return !name.equals(\"\");\n }", "private static boolean isValidName(String name) {\n return !name.isEmpty();\n //TODO:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the array of GeneralValue values
public GeneralValue[] getValues() { //returns the values array with x, y, z return values; }
[ "public abstract Object[] getValue();", "private List<ValueDescriptor<?>> getArrayValue() {\n List<ValueDescriptor<?>> values = arrayValueDescriptor.getValue();\n if (values == null) {\n values = new LinkedList<>();\n arrayValueDescriptor.setValue(values);\n }\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds spaces to the end of a string
public String addSpace(String s, int spaces){ int l = s.length(); while(l+spaces>s.length()){ s+=" "; } return s; }
[ "protected void addSpace()\n {\n addString(SPACE);\n }", "private String padWithSpace(AutocompleteResponse response) {\n String appendCharacter = \"\";\n if (response.getPhrase().charAt(response.getPhrase().length() - 1) != ' ') {\n appendCharacter = \" \";\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets whether this reconciler's editor is active.
private synchronized void setEditorActive(boolean state) { fIsEditorActive = state; }
[ "@Override\n public void setActive(boolean value) {\n active = value;\n }", "public boolean setActive() {\n return active = true;\n }", "public void setActive(boolean value) {\n active = value;\n }", "protected void setActive(boolean active) {\n m_active = active;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reply bool answer = 2;
public boolean getAnswer() { return answer_; }
[ "Answer getAnswer();", "public abstract void handleAnswer(boolean isOK);", "public void setAnswer(boolean isAnswer) {\n this.isAnswer = isAnswer;\n }", "Boolean testAnswer(String answer);", "public ReplyType getReply(){\r\n return localReply;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the size of the bound import directory.
public long getBoundImportDirectorySize() { return boundImportDirectorySize; }
[ "public int DataDirs_Roots_getSize();", "public long getSize() {\n try {\n FileStatus fs = dfs.getFileStatus(path);\n log.debug(\"path[\" + this.getName() + \" getSize[\" + fs.getLen() + \"]\");\n return fs.getLen();\n } catch (IOException e) {\n e.printStackTrace();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of API paths that are throttled
public int getNumThrottleRules(){ return throttleRulesMapReference.get().size(); }
[ "int getClientURLsCount();", "int getConnectionPathsCount();", "int getNumberOfCalls();", "public long getNRequests() {\n return basicStats.getLong(LOCK_REQUESTS);\n }", "public int numOutstandingRequests() {\n return outstandingFetches.size() + outstandingRpcs.size() + outstandingPushes.size()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: protected / renamed from: k
public boolean mo7322k() { return this.f4782a.getType() == AppLovinAdType.INCENTIVIZED; }
[ "private boolean k() {\n }", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "void mo29335d(K k);", "public abstract K getThisK();", "@Override\r\n\tpublic String k() {\n\t\treturn null;\r\n\t}", "protected void method_5557() {}", "@Override\r\n\tpublic void keyPressed(int k) {\n\t\t\r\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DESCRIPTION: This method initializes all of the commands found in the cimtest.properties file. It will be called only once when the program is first started. NOTES/ASSUMPTIONS: NONE
public void initializeCommands() { m_Commands = new HashMap(); String commandName = null; final String packageName = "devmgr.wbem.client.commands"; final String pathSeperator = File.separator; final String directoryName = "devmgr" + pathSeperator + "wbem" + pathSeperator + "clie...
[ "protected synchronized void initialize () {\n if (initCommand!=null && initCommand.trim().length()>0) Scilab.Exec (initCommand.substring(0,initCommand.lastIndexOf(\";\")));\n }", "public void initialize() {\n \t\tname = \"\"; //$NON-NLS-1$\n \t\tdirPath = ResourcesPlugin.getWorkspace().getRoot().getLocation(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find all text regions of a METS document ordered by 'image' and 'order'.
Iterable<TextRegion> findByResourceIdOrderByImageUrlAscOrderAsc(String resourceId);
[ "@Override\n public void extractRegions(PDPage page) throws IOException {\n setSortByPosition(true);\n addRegion(\"top\", top);\n super.extractRegions(firstPage);\n getTextForRegion(\"top\");\n }", "String ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up methodlevel rule of /wx/remogen/tricky/oddprop.
protected void ruleOfRemogenTrickyOddprop(FlutyRemoteApiRule rule) { }
[ "@Test\n public void test2() {\n Rule rule = LevelInequalityRule.getRule(\"~\", \"iNfO\");\n AssertJUnit.assertNull(rule);\n }", "private void setupTestPropertyWeights() {\n this.evaluationWeights = new HashMap<>();\n\n // For each test property create, designate each evaluation point that i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__BuiltInFn__Alternatives" $ANTLR start "rule__LintStatement__Alternatives" InternalResoluteParser.g:3482:1: rule__LintStatement__Alternatives : ( ( ( rule__LintStatement__Group_0__0 ) ) | ( ( rule__LintStatement__Group_1__0 ) ) | ( ( rule__LintStatement__Group_2__0 ) ) );
public final void rule__LintStatement__Alternatives() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalResoluteParser.g:3486:1: ( ( ( rule__LintStatement__Group_0__0 ) ) | ( ( rule__LintStatement__Group_1__0 ) ) | ( ( rule__LintStatement__Group_...
[ "public final void rule__Arg__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalResoluteParser.g:2325:1: ( ( ( rule__Arg__Group_0__0 ) ) | ( ( rule__Arg__Group_1__0 ) ) )\n int alt4=2;\n int LA4_0 = i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int64 max_depth = 1;
public boolean hasMaxDepth() { return ((bitField0_ & 0x00000001) == 0x00000001); }
[ "public int depth(){return 1;}", "public Long getMaxDepth() {\n return max_depth;\n }", "public int getMaxDepth() {\n return _maxDepth;\n }", "private int getDepth()\n {\n return _depth;\n }", "public Integer getDepth() { return depth; }", "public int getDepth () {\n return d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementa la diferencia de conjuntos
public ArrayList<Integer> diferenciaConjuntos(ArrayList<Integer> array1, ArrayList<Integer> array2) { ArrayList<Integer> finalArray3 = new ArrayList<>(); ArrayList<Integer> repeated1 = new ArrayList<>(); ArrayList<Integer> repeated2 = new ArrayList<>(); for(int i = 0; i < getCardinality(...
[ "@Override\r\n\tvoid addCondiments() {\n\t\tSystem.out.println(\"레몬을 추가하는 중\");\r\n\t}", "public void inicializaConjuntos() {\n conjuntos = new ArrayList<>();\n conjuntos.add(new Conjunto(1, 2.5, 5, 4850.2, \"Disponível\", 1));\n conjuntos.add(new Conjunto(2, 12.5, 12, 8250.2, \"Disponível\",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Strip all white space.
private void normalizeLockName() { if (this.lockName != null) { this.lockName = this.lockName.replaceAll("\\s*", ""); } }
[ "private void removeWhiteSpaces() {\n\t\tString whitespace = \"\\\\s+\";\n\t\tthis.expressionString = this.expressionString.trim();\n\t\tthis.expressionString = this.expressionString.replaceAll(whitespace, \"\");\t\t\n\t}", "protected static String removeWhiteSpace(String string) {\n return string.replaceA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Decimal Adjust Accumulator alters all flags (CHECKED)
private final void daa_a() { int ans = A(); int incr = 0; boolean carry = Cset(); if ((Hset()) || ((ans & 0x0f) > 0x09)) { incr |= 0x06; } if (carry || (ans > 0x9f) || ((ans > 0x8f) && ((ans & 0x0f) > 0x09))) { incr |= 0x60; } if (ans > 0x99) { carry = true; ...
[ "@Override\r\n\tpublic void setValueIsAdjusting(boolean valueIsAdjusting) {\n\t\t\r\n\t}", "private void proratedChecked()\n {\n updateProratedAmountText();\n }", "@Override\r\n\tprotected void onRestart() {\n\t\ttry {\r\n\t\t\r\n\t\tdouble prevtotal=0;\r\n\t\tif(!sharedPreferences.getString(\"newA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
instantiate and bind the chat registry
public static void main (String[] args) { try { ChatRegistryImplementation chatRegistry = new ChatRegistryImplementation(); Naming.rebind("ChatRegistry", chatRegistry); System.out.println("INFO: the Registry is running"); } catch (Exception ex) { ex.printStackTrace(); } }
[ "public JabberBackend() {\n\t\tsuper();\n\t\tjabberChatServiceAction = new JabberChatServiceAction(this);\n\t\tjabberMultiChatSeviceAction = new JabberMultiChatSeviceAction(this);\n\t\tthis.capabilities = new Capabilities();\n\t\tthis.buddies = new BuddyRoster(this);\n\n\t\t// Chat, multi-chat and e-conference supp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }