query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Creates a new instance of the StateChangeMonitor, and is private because this is a singleton. | private StateChangeMonitor() {
// Create the registry of StateChangeListeners
listeners = new Hashtable();
} | [
"public static StateChangeMonitor getInstance() {\n\t\tsynchronized (classLock) {\n\t\t\tif (monitor == null) {\n\t\t\t\tmonitor = new StateChangeMonitor();\n\t\t\t}\n\t\t\treturn monitor;\n\t\t}\n\t}",
"Monitor createMonitor();",
"State createState();",
"public StateMachine<S> build() {\n return n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Grab the season for the entire world location. | Season getSeason(World world); | [
"@java.lang.Override\n public int getSeason() {\n return season_;\n }",
"@java.lang.Override\n public int getSeason() {\n return season_;\n }",
"void setSeason(World world, Season season);",
"public String getSeason() {\n return season;\n }",
"public Integer getSeason() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rulePrintCSV" $ANTLR start "entryRuleNbRow" InternalCsv.g:204:1: entryRuleNbRow : ruleNbRow EOF ; | public final void entryRuleNbRow() throws RecognitionException {
try {
// InternalCsv.g:205:1: ( ruleNbRow EOF )
// InternalCsv.g:206:1: ruleNbRow EOF
{
if ( state.backtracking==0 ) {
before(grammarAccess.getNbRowRule());
}
... | [
"public final void ruleNbRow() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:217:2: ( ( ( rule__NbRow__Group__0 ) ) )\n // InternalCsv.g:218:2: ( ( rule__NbRow__Group__0 ) )\n {\n // InternalCsv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(configblockstatement comment? EOL) | comment | EOL | private static boolean config_block_4_0(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "config_block_4_0")) return false;
boolean r;
Marker m = enter_section_(b);
r = config_block_4_0_0(b, l + 1);
if (!r) r = comment(b, l + 1);
if (!r) r = consumeToken(b, EOL);
exit_section_(b, m, null, ... | [
"static void writeBlockComment(String s) {\n String[] lines = s.split(\"\\u005cr\\u005cn|\\u005cr|\\u005cn\");\n\n // indent the first line. It won't have any leading whitespace, but\n // may have trailing whitespace\n String line = lines[0].trim();\n for (int j = 0; j < level; j... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper function for diagonal distance between two nodes when 8 movements are allowed | private static int diagonalDistance(int NODE1, int NODE2) {
int dx = Math.abs((NODE1 >> 16) - (NODE2 >> 16));
int dy = Math.abs((NODE1 & 0x00FF) - (NODE2 & 0x00FF));
if (dx > dy)
return 2 * (dx - dy) + 2 * dy;
else
return 2 * (dy - dx) + 2 * dx;
} | [
"private double movementDistance(Point a, Point b){\n\n double manhattan = Math.abs(b.x - a.x) + Math.abs(b.y - a.y);\n double euclidean = a.distance(b);\n\n // The difference between manhattan and euclidean distances is \n // a measure of the diagonality. As a rule, pre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds 100 humanpixel objects to a humanpixel arraylist | public void addpixeltoList() {
for (int i = 0; i < 100; i++) {
pixellist.add(new humanpixel());
}
} | [
"public void addpixeltoPanel() {\n for (int i = 0; i < 100; i++) {\r\n arrangex();\r\n arrangey();\r\n pixellist.get(i).setBounds(x, y, 10, 10); //Sets Random X and Random Y coordinates\r\n\r\n }\r\n for (int i = 0; i < 100; i++) {\r\n this.add(pixell... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
connPtoP1SetSource: (EquationViewerPanel.mathDescription mathDescription1.this) / WARNING: THIS METHOD WILL BE REGENERATED. | private void connPtoP1SetSource() {
/* Set the source from the target */
try {
if (ivjConnPtoP1Aligning == false) {
// user code begin {1}
// user code end
ivjConnPtoP1Aligning = true;
if ((getmathModel1() != null)) {
this.setMathModel(getmathModel1());
}
// user code begin {2}
/... | [
"protected void set_source(Object source) { this.source = source; }",
"private void setSource(String eventSource_p)\r\n {\r\n this.source = eventSource_p;\r\n }",
"public void setSourcepoint(Point2D src){ \n\t\tPoints.add(src);\n\t\tsource=src; \n\t}",
"public void setSource(com.vmwar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates if a registered user is able to send join request to a community | public static boolean CanSendJoinRequest()
{
//login and Goto community
Goto();
//Send Join request
WebElement JoinCommunity= Driver.Instance.findElement(PageObjRef.JoinCommunity);
JoinCommunity.click();
//Validate
String Check= Driver.Instance.findElement(PageObjRef.CheckJoinRequestSent).getText... | [
"boolean hasJoinRoomReq();",
"public static boolean CanCancelJoinRequest()\n\t{\n\t\t//login and Goto community\n\t\tGoto();\n\t\t\n\t\t//Send Join request\n\t\tWebElement CancelRequest= Driver.Instance.findElement(PageObjRef.CancelRequest);\n\t\tCancelRequest.click();\n\t\t\t\t\n\t\t//Validate\n\t\tString Check=... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will fill up the ArrayList of interest shows with information held in the TV guide. | public static void fullFilTVShowsInformationFromTVGuide(ArrayList<TVShow> interestShows, TVShow[] TVShowsInGuide) {
for (TVShow tvShow : TVShowsInGuide) {
if (tvShow != null) {
if (interestShows.stream().filter(o -> o.getShowID().equals(tvShow.getShowID())).findFirst().isPresent()) {... | [
"private void getTvShows() {\n tvShowViewModel.getTvShoweLiveData().observe(this, tvShowResponse -> {\n if (tvShowResponse != null) {\n //progress_circular_movie_article.setVisibility(View.GONE);\n List<TvShow> tvShows = tvShowResponse;\n tvShowArrayLis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Internal method that handles alarm status changes based on whether the camera currently shows a cat. | private void catDetected(Boolean cat) {
if (cat && getArmingStatus() == ArmingStatus.ARMED_HOME) {
setAlarmStatus(AlarmStatus.ALARM);
} else if (!cat && getSensorsState()) {
setAlarmStatus(AlarmStatus.ALARM);
} else {
setAlarmStatus(AlarmStatus.NO_ALARM);
... | [
"private void handleSensorActivated() {\n if (securityRepository.getArmingStatus() == ArmingStatus.DISARMED) {\n return; //no problem if the system is disarmed\n }\n switch (securityRepository.getAlarmStatus()) {\n case NO_ALARM -> setAlarmStatus(AlarmStatus.PENDING_ALARM)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleUserName" $ANTLR start "ruleUserName" InternalDependency.g:87:1: ruleUserName : ( ( rule__UserName__Group__0 ) ) ; | public final void ruleUserName() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDependency.g:91:2: ( ( ( rule__UserName__Group__0 ) ) )
// InternalDependency.g:92:2: ( ( rule__UserName__Group__0 ) )
{
// Intern... | [
"public final void rule__UserName__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDependency.g:249:1: ( ( 'UserName' ) )\n // InternalDependency.g:250:1: ( 'UserName' )\n {\n // Intern... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the named static SQL CRUD Engine instance (the primary SQL Processor class). | SqlCrudEngine getStaticCrudEngine(String name); | [
"SqlCrudEngine getCrudEngine(String name);",
"SqlCrudEngine getCheckedStaticCrudEngine(String name);",
"SqlQueryEngine getStaticQueryEngine(String name);",
"SqlCrudEngine getDynamicCrudEngine(String name, String sqlStatement);",
"SqlQueryEngine getCheckedStaticQueryEngine(String name) throws SqlEngineExcept... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The first node (on the hash ring) in this data group is the header. It determines the duty (what range on the ring do the group take responsibility for) of the group and although other nodes in this may change, this node is unchangeable unless the data group is dismissed. It is also the identifier of this data group. | @Override
public RaftNode getHeader() {
return allNodes.getHeader();
} | [
"public DNode getHeader()\r\n {\r\n return m_header;\r\n }",
"public JRBand getGroupHeader();",
"public HeadGroup getHeadGroup() {\n return headGroup;\n }",
"public Id getFirstChildId(){\n\t\treturn new Id(this.id + \".1\");\n\t}",
"public Integer getGroupFirst() {\n return gro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds a specific landmark position, or approximates the position based on past observations if it is not present. | private PointF getLandmarkPosition(Face face, int landmarkId) {
for (Landmark landmark : face.getLandmarks()) {
if (landmark.getType() == landmarkId) {
return landmark.getPosition();
}
}
PointF prop = mPreviousProportions.get(landmarkId);
if (prop... | [
"private PointF getLandmarkPosition(Face face, int landmarkId) {\n for (Landmark landmark : face.getLandmarks()) {\n if (landmark.getType() == landmarkId) {\n return landmark.getPosition();\n }\n }\n\n PointF prop = mPreviousProportions.get(landmarkId);\n if (prop == null) {\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Id'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseId(Id object) {
return null;
} | [
"public abstract long getId(T object);",
"public synchronized I identify(Object obj) {\r\n if (obj == null) {\r\n throw new IllegalArgumentException(\"Object cannot be null\");\r\n }\r\n I id = mObjectsToIdentifiers.get(obj);\r\n if (id == null) {\r\n do {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "FLOATLITERAL" $ANTLR start "DOUBLELITERAL" | public final void mDOUBLELITERAL() throws RecognitionException {
try {
int _type = DOUBLELITERAL;
int _channel = DEFAULT_TOKEN_CHANNEL;
// D:\\Work and Projects\\Speciale\\ThesisDeobfuscator\\Deobfuscation\\src\\bytecodeDeobfuscation\\JVM.g:901:17: ( ( PLUS | MINUS )? Non... | [
"public final void mDOUBLE_LITERAL() throws RecognitionException {\n try {\n int _type = DOUBLE_LITERAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // org/jf/smali/smaliLexer.g:270:2: ( BASE_FLOAT ( 'd' | 'D' )? )\n // org/jf/smali/smaliLexer.g:270:4: BASE_FLOAT ( '... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getLibroId method, of class Reserva. | @Test
public void testGetLibroId() {
System.out.println("getLibroId");
Reserva instance = new Reserva();
long expResult = 0L;
long result = instance.getLibroId();
assertEquals(expResult, result);
} | [
"@Test\n public void testSetLibroId() {\n System.out.println(\"setLibroId\");\n long libroId = 0L;\n Reserva instance = new Reserva();\n instance.setLibroId(libroId);\n \n }",
"@Test\n public void testGetLibroId() {\n System.out.println(\"getLibroId\");\n E... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end method buildWord Add the latest word to the current phrase we're building. | private void addWordToPhrase() {
if (word.length() > 0) {
if (phrase.length() > 0) {
phrase.append(' ');
}
phrase.append(word);
word = new StringBuilder();
}
} | [
"public void saveWord() {\n if (checkWordExists()) {\n return;\n }\n if (languageSelect.getValue() == null) {\n Notification.show(\"Select language\", Notification.Type.WARNING_MESSAGE);\n return;\n }\n String word = wordField.getValue().toLowerCas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a Waves object | public Waves(Game game) {
getImages();
createWaves();
this.game = game;
} | [
"public void initializeWaves(){\n\t\twaveList.add(wave1);\n\t\twaveList.add(wave2);\n\t\twaveList.add(wave3);\n\t\t\n\t\t//WAVE 1\n\t\tfor(int i=0;i<wave1.numEnemies;i++) wave1.addTriangle();\n\t\t//WAVE 2\n\t\tfor(int i=0;i<wave2.numEnemies;i++) wave2.addSquare();\n\t\t//WAVE 3\n\t\tfor(int i=0;i<wave3.numEnemies;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Consulta candidato a partir do nome | public ResultSet consultaCandidatoNome(String nome){
abreConexao();
ResultSet resultado = consultaTabela("SELECT * FROM candidato WHERE nome ILIKE '%"+nome+"%' ORDER BY nome");
fechaConexao();
return resultado;
} | [
"public Vendedor buscarVendedorPorNome(String nome);",
"private static void consultarPessoaNome() throws SQLException {\n\t\tSystem.out.println(\"==========\\n5. Consultar pessoa pelo Nome\");\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tString nome = \"\";\n\t\t\t\n\t\t\t// Validação do código digitado\n\t\t\twhile(true) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create a ByteBuffer object which backed buffer is coming from backed native memory pool. | protected native ByteBuffer ncreateByteBuffer(long id, long size); | [
"@Override\n public MemoryPooledByteBuffer toByteBuffer() {\n ensureValid();\n return new MemoryPooledByteBuffer(Preconditions.checkNotNull(mBufRef), mCount);\n }",
"ByteBuffer newBuffer();",
"native ByteBuffer NewDirectByteBuffer(long ptr, int size);",
"public ByteBuffer getByteBuffer ()\n {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform the test for the given matrix column (A119) and row (B52). | public void testA119_B52() {
test_id = getTestId("A119", "B52", "26");
NonRootModelElement src = selectA("A119");
NonRootModelElement dest = selectB("B52");
A_B_Action(src, dest);
assertTrue("Paste menu item was available even though destination was invalid", checkResult_paste... | [
"@Test\r\n public void testColumns() {\r\n int expResult=2;\r\n int result=matrixA.columns();\r\n assertEquals(expResult, result);\r\n }",
"public void testA119_B51() {\n test_id = getTestId(\"A119\", \"B51\", \"25\");\n\n NonRootModelElement src = selectA(\"A119\");\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an instance of a Fx Forward Trade | private static FXForwardTrade createFxForwardTrade() {
Counterparty counterparty = new SimpleCounterparty(ExternalId.of(Counterparty.DEFAULT_SCHEME, "COUNTERPARTY"));
BigDecimal tradeQuantity = BigDecimal.valueOf(1);
LocalDate tradeDate = LocalDate.of(2014, 7, 11);
OffsetTime tradeTime = OffsetTime.of(... | [
"private static FXForwardSecurity createFxForwardSecurity() {\n\n Currency payCurrency = Currency.GBP;\n Currency recCurrency = Currency.USD;\n\n double payAmount = 1_000_000;\n double recAmount = 1_600_000;\n\n ZonedDateTime forwardDate = DateUtils.getUTCDate(2019, 2, 4);\n\n ExternalId region = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for the field ifindex. | public void setIfindex(final int ifindex) {
m_ifIndex = ifindex;
} | [
"public int getIfIndex()\r\n { return ifindex; }",
"public Builder setSnmpIfIndex(int value) {\n bitField0_ |= 0x00000004;\n snmpIfIndex_ = value;\n onChanged();\n return this;\n }",
"public void setFaceIndex(int i) { faceIndex = i; }",
"@Override\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that merges slides and photos lists. | private static void mergeLists() {
int length = (photoList.size() / 2) - 1;
if (photoList.size() % 2 == 0) {
length++;
}
for (int i = 0; i < length; i++) {
List<String> tL = new ArrayList<String>();
Photo p1 = photoList.get(i),
p2 = photoList.get(photoList.size() - 1 - i);
for (S... | [
"fotos(){}",
"List<Photo> homePagePhotos();",
"private void loadTagsAndPhotos(){\n\n ArrayList<Album> albumList = (ArrayList) this.user.getAlbumList();\n\n for(Album album : albumList){ // for each album, go through tags\n for(Photo photo : album.getPics()){ // for each photo, go throug... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function Description : Function for Click a Link in Practice Area page Function Name : navigateTOBrowseLinksAndVerify Author : Harish Date Created : Jul'15 | public Sources navigateTOBrowseLinksAndVerify(String strParentMenuName, String strFirstSubMenuName, String strSecondSubMenuName) {
try {
commonLibrary.sleep(100);
Boolean blnFirst = false, blnSecond = false, blnThird = false;
WebElement btnIdBrowse = commonLibrary.isExist(UIMAP_Home.btnIdBrowse, 20);
comm... | [
"public void clickFavoritieslink(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Favorities Link should... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a String with all the data in the tree in LNR order, with an space between each element. Uses the toArrayList method in MorseCodeTree It should return the data in this order: "h s v i f u e l r a p w j b d x n c k y t z g q m o" Note the extra space between j and b that is because there is an empty String that ... | public static String printTree()
{
String result = "";
for (String s: tree.toArrayList())
result = result + " " + s;
return result;
} | [
"public static String printTree()\n {\n \tString tree = \"\";\n ArrayList<String> letters = converter.toArrayList();\n for(int i = 0; i < letters.size(); i++)\n {\n tree += letters.get(i);\n if(i + 1 < letters.size())\n \t tree += \" \";\n }\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get string of alert when SMA50 is above SMA200 and current volume 10% above the avg of past 50 days | public static String getAlertSMA50AbovesSMA200(String ticker, String date, double open, double high, double low,
double close, double volume, double volAverage50, double SMA50Average, double SMA200Average) {
return Utils.ALERT_BULLISH_STR + "," + ticker + "," + date + "," + open + "," + high + "," + low + "," + cl... | [
"public static String getAlertSMA50LowerThanSMA200(String ticker, String date, double open, double high, double low,\n\t\t\tdouble close, double volume, double SMA50Average, double SMA200Average) {\n\t\treturn Utils.ALERT_BEARISH_STR + \",\" + ticker + \",\" + date + \",\" + open + \",\" + high + \",\" + low + \",\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends and returns a new empty "requester" element | public org.hl7.fhir.ResourceReference addNewRequester()
{
synchronized (monitor())
{
check_orphaned();
org.hl7.fhir.ResourceReference target = null;
target = (org.hl7.fhir.ResourceReference)get_store().add_element_user(REQUESTER$14);
return target;
... | [
"public void setRequester(User requester) {\n this.requester = requester;\n }",
"public void setRequesterName(String requesterName);",
"public void unsetRequester()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(REQUESTER$14, 0);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
initializes a ObjectRepList with hardcoded Object, String and Class data fills ObjectRepList using unfilled list with fill method that also sets parents of Objects resolves VTable structure for each object using inheritance relationship proces inherited fields for data layout for each object using inheritance relations... | public static ObjectRepList getFilledObjectRepList(ObjectRepList unfilled) {
// manually add object, string, class
ObjectRepList filled = initializeRepList();
// fill with reps, in inheritance order
filled = fill(filled, unfilled);
// process reps
for (ObjectRep rep : ... | [
"public static ObjectRepList fill(ObjectRepList filled, ObjectRepList unfilled) {\n\n //Add classes from unfilled, keep doing this until filled has same size as unfilled\n while (filled.size() < unfilled.size() + 3) {\n\n for (ObjectRep rep : unfilled) {\n\n // if no parent s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The stage of the cloudendpoint definition allowing to specify StorageAccountShareName. | interface WithStorageAccountShareName {
/**
* Specifies storageAccountShareName.
* @param storageAccountShareName Storage Account Share name
* @return the next definition stage
*/
WithCreate withStorageAccountShareName(String storageAccountShar... | [
"interface WithStorageAccountShareName {\n /**\n * Specifies storageAccountShareName.\n * @param storageAccountShareName Storage Account Share name\n * @return the next update stage\n */\n Update withStorageAccountShareName(String storageAccountS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the until attribute of the HarvesterAdminForm object | public String getUntil() {
return until;
} | [
"protected Date getUntilDate() {\n\t\treturn until;\n\t}",
"public java.lang.Long getValidUntil() {\n return valid_until;\n }",
"public java.lang.Long getValidUntil() {\n return valid_until;\n }",
"public CWE getAdministeredDosageForm() { \r\n\t\tCWE retVal = this.getTypedField(8, 0);\r\n\t\tretur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use Relation.newBuilder() to construct. | private Relation(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | [
"Relation createRelation();",
"LinkRelation createLinkRelation();",
"RelationT createRelationT();",
"public MRelationRecord() {\n super(MRelation.M_RELATION);\n }",
"Relation makeRelation(String tag);",
"public MirrorRelation() {\r\n }",
"private MsAddRelation(Builder builder) {\n supe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleVarName" $ANTLR start "ruleVarName" InternalDsl.g:8583:1: ruleVarName returns [EObject current=null] : ( (lv_name_0_0= RULE_ID ) ) ; | public final EObject ruleVarName() throws RecognitionException {
EObject current = null;
Token lv_name_0_0=null;
enterRule();
try {
// InternalDsl.g:8589:2: ( ( (lv_name_0_0= RULE_ID ) ) )
// InternalDsl.g:8590:2: ( (lv_name_0_0= RULE_ID ) )
{
... | [
"public final EObject entryRuleVarName() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleVarName = null;\n\n\n try {\n // InternalDsl.g:8576:48: (iv_ruleVarName= ruleVarName EOF )\n // InternalDsl.g:8577:2: iv_ruleVarName= ruleVarName EOF\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns if the player is currently ducking/wants to duck. | public boolean isDucking() {
return this.isDucking;
} | [
"public boolean isControlledByPlayer()\n {\n return !this.isSpeedBoosted() && this.currentSpeed > this.maxSpeed * 0.3F;\n }",
"boolean isStuck(){\r\n\t\tif (elapsedTime > m_dTimeExpected){\r\n\t\t\tSystem.out.println(\"BOT \" + m_pOwner.ID() + \" IS STUCK!!\");\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a window listener to the consoleWindow to ensure that when the window is closed, the ConnectWindow.getDatabase() connection is also closed, and any spooling is also stoppped | private void addConsoleWindowListener() {
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
ConnectWindow.exitConnectWindow();
}
});
} | [
"public synchronized void addWindowListener() {\n addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n exitAction();\n }\n });\n }",
"private WindowListener getWindowListener()\n {\n return new Wi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simplified method form for invoking the TagQueue operation with an AsyncHandler. | @Override
public java.util.concurrent.Future<TagQueueResult> tagQueueAsync(String queueUrl, java.util.Map<String, String> tags,
com.amazonaws.handlers.AsyncHandler<TagQueueRequest, TagQueueResult> asyncHandler) {
return tagQueueAsync(new TagQueueRequest().withQueueUrl(queueUrl).withTags(tags), ... | [
"@Override\n public java.util.concurrent.Future<UntagQueueResult> untagQueueAsync(String queueUrl, java.util.List<String> tagKeys,\n com.amazonaws.handlers.AsyncHandler<UntagQueueRequest, UntagQueueResult> asyncHandler) {\n\n return untagQueueAsync(new UntagQueueRequest().withQueueUrl(queueUrl)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ExStart ExFor:DocumentBuilder.ListFormat ExFor:ListFormat.ApplyNumberDefault ExFor:ListFormat.ApplyBulletDefault ExFor:ListFormat.ListIndent ExFor:ListFormat.ListOutdent ExFor:ListFormat.RemoveNumbers ExFor:ListFormat.ListLevelNumber ExSummary:Shows how to create bulleted and numbered lists. | @Test
public void applyDefaultBulletsAndNumbers() throws Exception
{
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.writeln("Aspose.Words main advantages are:");
// A list allows us to organize and decorate sets of paragraphs w... | [
"@Test\r\n public void createCustomList() throws Exception\r\n {\n Document doc = new Document();\r\n\r\n // A list allows us to organize and decorate sets of paragraphs with prefix symbols and indents.\r\n // We can create nested lists by increasing the indent level. \r\n // We ca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs the song panel given an initial song. | public SongPanel(Song initialSong)
{
super();
super.setBackground(Color.WHITE);
this.song = new PaintableSong(initialSong);
PrinterJob printJob = PrinterJob.getPrinterJob();
SerializablePageFormat spf =
new SerializablePageFormat(printJob.defaultPage());
this.pageFormat =... | [
"private AlbumPanel createAlbumPanel(ArrayList<MP3Info> albumMusicsInfo) {\n MP3Info firstMP3Info = albumMusicsInfo.get(0);\n AlbumPanel album = null;\n String description = \"Album contains \" + albumMusicsInfo.size() + \" songs\";\n try {//creating an album panel with its listener\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A consumer with 1 arguments. | @FunctionalInterface
public interface Consumer1<T1> extends Consumer<T1> {
/**
* Performs this operation on the given argument.
*
* @param args The arguments as a tuple.
*/
default void accept(Tuple1<? extends T1> args) {
accept(args.v1);
}
/**
* Performs this operatio... | [
"public ArgumentConsumer getArgumentConsumer();",
"default Consumer0 acceptPartially(Tuple1<? extends T1> args) {\n return () -> accept(args.v1);\n }",
"public FunctionParameter getPositionalArgumentConsumer();",
"Consumer getConsumer();",
"Consumer<T> newConsumer();",
"public Consumer getConsum... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find and open upper message in google account (in drafts) | public WebElement openUpperMessageInDrafts() {
element = driver.findElement(By.xpath("//div[@role='main']//table//tr[1]//td[6]//div[@role='link']"));
Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
.withTimeout(30, TimeUnit.SECONDS)
.pollingEvery(5, TimeUnit.SECO... | [
"private Uri uiSaveMessage(Message msg, Mailbox mailbox, ContentValues values) {\n Context context = getContext();\n // Fill in the message\n Account account = Account.restoreAccountWithId(context, mailbox.mAccountKey);\n if (account == null) return null;\n msg.mFrom = accoun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Click on the 'Add Categories' button. | public static WebElement btn_clickAddCategories() throws Exception{
try{
element = driver.findElement(By.xpath("//*[contains(@class, 'PA_btn')]//a"));
WebDriverWait wait = new WebDriverWait(driver, 15);
wait.until(ExpectedConditions.elementToBeClickable(element));
Add_Log.info("Add Cat... | [
"public void clickButtonAddNewTag() {\n\t\tthis.btnAddNewTagCategory.click();\r\n\r\n\t}",
"public void clickAddNew()\r\n\t {\r\n\t\t addNew.click();\r\n\t }",
"public void clickAddButton()\n\t{\n\t\thellobutton.click();\n\t}",
"public void addCategory() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Bu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a set containing all namespaces used by the aggregated Functions. | public Set getUsedNamespaces() {
if (byNamespace == null) {
prepareCache();
}
return byNamespace.keySet();
} | [
"Collection<String> getNamespacesRet();",
"@Override\n public Set<String> getNamespaces() {\n synchronized(this) {\n if (namespaces == null) {\n namespaces = new HashSet<>();\n for (File dir : base.listFiles(directoryFilter)) {\n File[] files =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test method for Player default constructor | @Test
void testPlayerDefaultConstructor() {
player = new Player();
assertNotNull(player);
} | [
"public PlayerTest()\n {\n }",
"public TestPlayer()\n {\n }",
"@Test\r\n public void testPlayerConstructor() {\n Player p1 = new Player(\"Ashur\", \"Drake\", null, null, null, null, 0, 0);\r\n \r\n assertEquals(\"Ashur\", p1.getFirstName());\r\n assertEquals(\"Drake\",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the table from .META. and archives the HDFS files. | void removeTableData(final List<HRegionInfo> regions) throws IOException, KeeperException {
// 1. Remove regions from META
LOG.debug("Deleting regions from META");
MetaEditor.deleteRegions(this.server.getCatalogTracker(), regions);
// --------------------------------------------------------------------... | [
"private void flushMetaData() {\n try {\n String metaFile = this.getMetadataFilePath();\n File mf = new File(metaFile);\n if (mf.exists()) {\n mf.delete();\n }\n mf.createNewFile();\n\n this.engineMeta.setDirToSave(metaFile);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all response session from this Poster making it respond to all messages sent to it. | public void clearResponseSessions(){
while(sessionVect.size() > 0){
sessionVect.removeElementAt(0);
}
} | [
"public void clearResponses() {\n this.responses.clear();\n }",
"public void reset() {\n this.response.reset();\n }",
"public void unsetResponse()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(RESPONSE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements the file parsing logic, and builds the output string. | public void parse(String inputFile, String outputFile); | [
"public String parse(File file);",
"public abstract void handleFile(File outputFolder, BuildData buildData, String spacer) throws IOException;",
"String getFileOutput();",
"public String getOutput(){\r\n // add assembly code to outputFile\r\n outputFile.append(assemblyCode.getOutputFile());\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column patient_blood_pressure.patient_name | public String getPatientName() {
return patientName;
} | [
"public String getPatientName(){\n\t\treturn patientName;\n\t}",
"public String getPatientName() {\r\n return patientName;\r\n }",
"public static String getPatientName() {\r\n return patientName;\r\n }",
"public String getPatient()\n\t{\n\t\treturn (String) patientDropDown.getSelectedItem(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handler for before the game starts | void onPreGameStart(); | [
"void onPostGameStart();",
"public void gameStart() {\n\t}",
"public void preStart() {\n start();\n if (gracePeriodEnabled) startGracePeriodTask();\n preparePlayers();\n }",
"public void startGame()\n\t{\n\t\t\n\t}",
"public void startGame() {\r\n gameState.startGame();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a Parameter i, returns if ConcurSort contains it. | public boolean contains(int i) {
return buffer.contains(i);
} | [
"public boolean belongs(int i)\n {\n int j = 0;\n while ((c[j] != c[howmany])&&(c[j] != i)) j++;\n return ((i>0)&&(c[j] == i));\n }",
"public boolean containsParameter(Parameter p)\n {\n\treturn parameters.contains(p);\n }",
"public int indexOfParameter(Parameter p) { return parameters.indexO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use CDURATION.newBuilder() to construct. | private CDURATION(Builder builder) {
super(builder);
} | [
"private DVDURATION(Builder builder) {\n super(builder);\n }",
"public static influent.idl.FL_Duration.Builder newBuilder() {\n return new influent.idl.FL_Duration.Builder();\n }",
"public SBDuration(Duration duration){\r\n super(duration.toMillis());\r\n }",
"public ValueDuration(Long v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ \brief Calculates the new ranges after \p Replaces are applied. These / include both the original \p Ranges and the affected ranges of \p Replaces / in the new code. / / \pre Replacements must be for the same file. / / \return The new ranges after \p Replaces are applied. The new ranges will be / sorted and nonoverla... | @Converted(kind = Converted.Kind.AUTO_NO_BODY,
source = "${LLVM_SRC}/llvm/tools/clang/lib/Tooling/Core/Replacement.cpp", line = 321,
FQN="clang::tooling::calculateRangesAfterReplacements", NM="_ZN5clang7tooling32calculateRangesAfterReplacementsERKSt3setINS0_11ReplacementESt4lessIS2_ESaIS2_EERKSt6vectorINS0_5RangeESaI... | [
"@Nullable\n Replacements getReplacements(\n Project project, FileContentsProvider fileContents, Collection<TextRange> ranges);",
"private void adjust() {\n sort();\n\n int curIndex = 0;\n while(curIndex < singleRanges.size() - 1) {\n SingleRange curRange = singleRanges.get(c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the conference call reservation service. | public void setConferenceCallReservationService(
final ConferenceCallReservationService conferenceCallReservationService) {
this.conferenceCallReservationService = conferenceCallReservationService;
} | [
"public final void setReservationService(\n final IConferenceReservationService reservationService) {\n this.reservationService = reservationService;\n }",
"public void setReservationService(final IReservationService reservationService) {\r\n this.reservationService = reservationServic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes the current state of the script | synchronized public void setScriptState(ScriptState newState)
{
curState = newState;
} | [
"public static void updateScriptState(ScriptState inState) {\n previousState = currentState;\n if (inState == currentState) {\n Log.severe(\"Error: New script state same as previous.\");\n return;\n }\n currentState = inState;\n onStartCalled = false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of FileResource | public FileResource() {
} | [
"Resource createResource();",
"HierarchicalResource createFile() throws IOException;",
"public TFileFactory() {\n this(PhysicalFileSystem.instance);\n }",
"ResourceFilesType createResourceFilesType();",
"FileReference createFile(String fileName, String toolId);",
"public IFileEntry create(IResource re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the serialization of a function | public void addFunctionSerialization(String name, String expressionString) {
wrappedSerializationContext.addFunctionSerialization(name, expressionString);
} | [
"@InnerAccess synchronized void serializeWithoutSummary (\n\t\tfinal A_Function function)\n\t{\n\t\tif (AvailLoader.debugUnsummarizedStatements)\n\t\t{\n\t\t\tSystem.out.println(\n\t\t\t\tmodule\n\t\t\t\t\t+ \":\" + function.code().startingLineNumber()\n\t\t\t\t\t+ \" Forced -- \" + function);\n\t\t}\n\t\tserialize... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Arrival Pattern'. | ArrivalPattern createArrivalPattern(); | [
"AperiodicPattern createAperiodicPattern();",
"public abstract Pattern constructPattern();",
"private Route getNewAirRoute(Location from, Location to)\n\t{\n\t\tRoute route = new Route();\n\t\tdouble fractions = getLength(from, to) / cellSize;\n\t\tLocation loc = null;\n\t\tfor (long i = 1; i <= fractions; i++)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the object resolver. This can be called only once. | public void setResolver(ObjectResolver resolver) {
if (this.resolver == null) {
this.resolver = resolver;
} else {
throw new SecurityException("Cannot overwrite resolver");
}
} | [
"public void setEntityResolver(EntityResolver resolver)\n {\n if (resolver instanceof EntityResolver2)\n {\n resolver2 = (EntityResolver2) resolver;\n }\n else\n {\n resolver2 = null;\n }\n if (resolver == null)\n {\n resolver = base;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column trading_item.ScheduleTime | public void setScheduletime(Date scheduletime) {
this.scheduletime = scheduletime;
} | [
"public void setScheduleTime(Date scheduleTime) {\n this.scheduleTime = scheduleTime;\n }",
"public void setScheduleTimestamp(Date scheduleTimestamp);",
"public Date getScheduleTime() {\n return this.scheduleTime;\n }",
"public Date getScheduletime() {\r\n return scheduletime;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the DEFAULT key class for a named output. | private static Class<?> getDefaultNamedOutputKeyClass(JobContext job) {
return job.getConfiguration().getClass(DEFAULT_MO_PREFIX + KEY, null, Object.class);
} | [
"private static Class<?> getNamedOutputKeyClass(JobContext job, String namedOutput) {\n\t\treturn job.getConfiguration().getClass(MO_PREFIX + namedOutput + KEY, null, Object.class);\n\t}",
"private static Class<?> getNamedOutputKeyClass(JobContext job,\r\n\t\t\tString namedOutput) {\r\n\t\treturn job.getConfigura... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create animated text vector. I.e vector with FunScrollAnimatedText instances. | public void createAnimatedTexts(Vector lines, Font font,
Color fg, Color bg,
int dx, int dy,
String delim)
{
noOfTexts = 0;
animatedTexts = new Vector(lines.size());
dbg("Creating Animated Text...");
for (int i=0; i<lines.size(); i++) {
dbg(" " + (String) line... | [
"Text createText();",
"public void animarTextoRunas(final CustomFontText texto, final int index, final int duration, final int delay) {\n\n if (index + 1 < colorRunas.length) {\n\n final float[] from = new float[3];\n final float[] to = new float[3];\n\n Color.colorToHSV(Co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
We're validating the SAML token that we receive from the request. Through the assertion parameter is the POST request. A request format that we handle here looks like, POST /token.oauth2 HTTP/1.1 Host: as.example.com ContentType: application/xwwwformurlencoded grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agranttype%3Asaml2b... | @Override
public boolean validateGrant(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception {
boolean isValid = false;
try {
// Logging the SAML token
if (log.isDebugEnabled()) {
log.debug("Received SAML assertion : " +
... | [
"public void validateWsFederationAuthenticationRequest(final RequestContext context) {\n val service = wsFederationCookieManager.retrieve(context);\n LOGGER.debug(\"Retrieved service [{}] from the session cookie\", service);\n\n val request = WebUtils.getHttpServletRequestFromExternalWebflowCon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Autogenerated Javadoc The Interface SimpleTravelRequest. | @Service(value = SimpleTravelDao.class, locator = DaoServiceLocator.class)
public interface SimpleTravelRequest extends RequestContext {
/**
* Count simple travels.
*
* @return the request
*/
Request<Long> countSimpleTravels();
/**
* Find all simple travels.
*
* @return the request
*/
Request<List... | [
"Request<List<SimpleTravelProxy>> findAllSimpleTravels();",
"public String getTravel() {\n return travel;\n }",
"public void setTravel(Travel travel) {\n this.travel = travel;\n }",
"public Travel getTravel() {\n return travel;\n }",
"Request<List<SimpleTravelProxy>> getSimpleT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Container's getter for CountrRegFkLink. | public ViewLinkImpl getCountrRegFkLink() {
return (ViewLinkImpl) findViewLink("CountrRegFkLink");
} | [
"public ViewLinkImpl getLocCIdFkLink() {\n return (ViewLinkImpl) findViewLink(\"LocCIdFkLink\");\n }",
"public String getClasRefNo() {\r\n return clasRefNo;\r\n }",
"String getCRef();",
"java.lang.String getCnarid();",
"public ReferenceField getCrAccount()\n {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if this permission is contained in the specified scope, (either directly or indirectly.) | public boolean isContainedBy(@NonNull PermissionScope s) {
for (PermissionScope c : scopes) {
if (c.isContainedBy(s))
return true;
}
return false;
} | [
"boolean isInScope(IResource resource);",
"public boolean recognizesScope(LegalScope legalScope);",
"boolean hasPermission(String owner, String activity, String target);",
"boolean hasPermission(String permission);",
"AuthorizationQuery hasPermission(Permission permission);",
"protected void checkScopePer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to print Transaction statistic by printing the Map of filtered values | @Override
public void printFilteredMap() {
this.result.forEach((k, v )-> v.forEach((s)->System.out.println(k + " : "+ s )));
} | [
"@Override\n\tpublic void printFilteredMap() {\n\t\tthis.result.forEach((k, v )-> v.forEach((ke,ve) -> ve.forEach((s) -> System.out.println(k + \" : \"+ ke + \" : \"+ s))));\n\n\t}",
"private static void displayTransaction() {\r\n\t\tSystem.out.println(\"Client Id,Transaction Type,Transaction Date,Priority,Proces... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the decoded text assuming UTF8 encoding. | CharSequence decoded(); | [
"String decodeString();",
"TextDecoder getTextDecoder();",
"CharSequence decoded(String charset) throws UnsupportedEncodingException;",
"public String getDecodedContent();",
"public static String decode(String encodedText){\r\n //this passes the tree and the encoded text to a helper function.\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Caches the p r user in the entity cache if it is enabled. | public static void cacheResult(
com.inkwell.internet.productregistration.model.PRUser prUser) {
getPersistence().cacheResult(prUser);
} | [
"@Override\n\tpublic void cacheResult(UserAccount userAccount) {\n\t\tentityCache.putResult(UserAccountModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\tUserAccountImpl.class, userAccount.getPrimaryKey(), userAccount);\n\n\t\tuserAccount.resetOriginalValues();\n\t}",
"@Override\n\tpublic void cacheResult(RigheRichieste righ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets this property set digest. | public UUID getDigest() {
UUID uuid = digest;
if (uuid == null) {
final Map<String, Object> map = this.properties;
synchronized (map) {
uuid = digest;
if (uuid == null) {
final Digester digester = new Digester();
map.forEach((k, v) -> {
digester.digest... | [
"public String getDigest() {\n return digest;\n }",
"public byte[] digest() {\n if (_digest == null) _digest = calcDigest();\n return _digest;\n }",
"public MessageDigest getMessageDigest() {\n return digest;\n }",
"public List<DigestConfig> digests() {\n return thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the payment of this book order. | @Override
public java.lang.String getPayment() {
return _bookOrder.getPayment();
} | [
"public BigDecimal getPayment() {\n return payment;\n }",
"public java.lang.Integer getPayment() {\n return payment;\n }",
"public BigDecimal getPayment() {\r\n return payment;\r\n }",
"public io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment() {\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize N bodies with random positions and circular velocities | public void startthebodies(int N) {
double radius = 1e18; // radius of universe
double solarmass = 1.98892e30;
for (int i = 0; i < N; i++) {
double px = 1e18 * exp(-1.8) * (.5 - Math.random());
double py = 1e18 * exp(-1.8) * (.5 - Math.random());
double magv = circlev(px, py);
double absangle = Math.... | [
"private void spawnCarrots(Vector2 pos, int numCarrots,float radius) {\r\n\t\tfloat carrotShapeScale = 0.5f;\r\n\t\t//create carrots w/ box2d body and fixture\r\n\t\tfor(int i = 0; i <numCarrots;i++) {\r\n\t\t\tCarrot carrot = new Carrot();\r\n\t\t\t//calc random spawn position,rotation,scale\r\n\t\t\tfloat x = Mat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Cartridge__Group__2__Impl" $ANTLR start "rule__QualifiedName__Group__0" InternalWorkflow.g:1177:1: rule__QualifiedName__Group__0 : rule__QualifiedName__Group__0__Impl rule__QualifiedName__Group__1 ; | public final void rule__QualifiedName__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalWorkflow.g:1181:1: ( rule__QualifiedName__Group__0__Impl rule__QualifiedName__Group__1 )
// InternalWorkflow.g:1182:2: rule__QualifiedNam... | [
"public final void rule__QualifiedName__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13391:1: ( rule__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write certificate and key. | @SneakyThrows
protected void writeCertificateAndKey(final File certificate, final File key,
final Optional<SamlRegisteredService> registeredService) {
if (certificate.exists()) {
LOGGER.info("Certificate file [{}] already exists, and will be deleted", ce... | [
"public void storeCertificate(KeyStore keystore, OutputStream os, String keystorePassword) throws CertException;",
"private void saveCertificate(KeyGroup keys) {\n System.out.println(\"Please enter a name for the certificate file.\");\n Scanner in = new Scanner(System.in);\n String name = in.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Requests the model for a charter flight CommandObject. | ICommandObject doCharterFlight(); | [
"@Override\n\tpublic Automobile getAutomobileObject(String modelName) {\n\t\tSocket serverSocket = null;\n\t\twriter = null;\n\t\tAutomobile auto = null;\n\t\ttry {\n\t\t\tserverSocket = new Socket(host, port);\n\t\t\twriter = new ObjectOutputStream(serverSocket.getOutputStream());\n\t\t\tsendOutput(modelName);\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The fourth rule of the game is that a player may not have more than two chips in a connected group, whether connected orthogonally or diagonally. satisfiesFourthRule() is a helper method for isValidMove(). It checks if the given chip Pair will satisfy the fourth rule. (It is not called on empty (nonchip) coordinates. W... | public boolean satisfiesFourthRule(Pair chip) {
if (allAdjacentPieces(chip) > 1) {
return false;
}
else {
return true;
}
} | [
"private boolean isFourOfAKind()\n {\n boolean early = hand[0].getFace() == hand[1].getFace()\n && hand[1].getFace() == hand[2].getFace()\n && hand[2].getFace() == hand[3].getFace();\n\n boolean late = hand[1].getFace() == hand[2].getFace()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replaces all existing Documentation objects with a new array of Documentation objects. | public void setDocumentation(Documentation[] objArray)
{
if (objArray == null || objArray.length == 0)
this._objDocumentation.clear();
else
{
this._objDocumentation = new ArrayList(Arrays.asList(objArray));
for (int i = 0; i < objArray.length; i++)
{
if (objArray[i]... | [
"public void clearDocumentationList()\n {\n _objDocumentation.clear();\n }",
"public void setDocs(Doc[] newDocs) \n {\n\tdocs = newDocs;\n }",
"public Documentation[] getDocumentation()\n {\n return (Documentation[])_objDocumentation.toArray(new Documentation[0]);\n }",
"void updateTermsArr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new Group by combining terms | public Group(Group groupA, Group groupB){
group = new ArrayList<>();
//For each term in group A
for (Term i: groupA.group){
//for each term in group B
for (Term j: groupB.group){
if (i.isShiftByOne(j)){
//add combined term to g... | [
"ExprGroup createExprGroup();",
"private void createNestedTermAggregation(GroupBy groupBy) throws ExecutionException {\n // If any \"group by\" fields are defined they are used in order to create the appropriate aggregations\n if (null != groupBy && null != groupBy.getIds()){\n Aggregatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "IsActive" element | public boolean getIsActive()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ISACTIVE$4, 0);
if (target == null)
{
... | [
"public int getIsActive()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ISACTIVE$32, 0);\n if (target == null)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Example of expected format: "[ 2 [ 3 [ 0 2 [ 0 2 ] 2 ] 2 ] ]" This method reads the root_block statement in the BNF: root_block ::= "[" number [ "[" child_block "]" ] "]" child_block ::= number [ "[" child_block "]" ] child_block And number is simply a numeric value. | private void readStructureRootBlock(StreamTokenizer st, List<IValueTreeNode> childrenOfRootOfValueTree, long rootId) throws IOException {
// check that structure starts with "["
if (st.ttype != '[') {
if (st.nextToken() != '[') {
throw new IllegalArgumentException("The provided value tree structure defin... | [
"private NodeBlock parseBlock() throws SyntaxException {\n\t\tNodeStmt stmt = parseStmt();\n\t\tif (!curr().equals((new Token(\";\")))) {\n\t\t\tif (curr().equals(new Token(\"\")) || curr().equals(new Token(\"end\"))) {\n\t\t\t\treturn new NodeBlock(stmt,null);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new SyntaxExcept... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the buffer size to maxbuf | void resetMaxBuf() {
this.maxAllowedPacket = this.connection.getMaxAllowedPacket();
} | [
"public void setMaxBufferSize(int value) {\n this.maxBufferSize = value;\n }",
"public void setMaxBufferSize(int maxBufferSize) {\r\n this.maxBufferSize = maxBufferSize;\r\n }",
"public void setMaxCapacity(int max) {\n\t\tbuffer = new Object[max];\n\t\tbufferSize = 0;\n\t}",
"public void s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the identity matrix of the given dimension. | public static Matrix identity(final int dimension) {
final double[][] data = new double[dimension][dimension];
for (int rc = 0; rc < dimension; rc++) {
data[rc][rc] = 1;
}
return new Matrix(data, false);
} | [
"public static Matrix GetIdentity(int dim) throws LinAlgException { //tentative done and tested \r\n\t\tif (dim <= 0) throw new LinAlgException(\"Dimension \" + dim + \"cannot be less than or equal to zero\" );\r\n\t\tMatrix identity = new Matrix(dim,dim); //allocate memory for new matrix dim rows x dim cols\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the level modifier for drop | private int calculateLevelModifierForDrop(final L2PcInstance lastAttacker)
{
if (Config.DEEPBLUE_DROP_RULES)
{
int highestLevel = lastAttacker.getLevel();
// Check to prevent very high level player to nearly kill mob and let low level player do the last hit.
if (getAttackByList() != null && !getAttack... | [
"double getLevel();",
"public int getModiferLevel(){\n return this.modifer_level;\n }",
"public int getLevelsPerBonusDamage();",
"int getWantedLevel();",
"long getLevel();",
"public int getLevelCap();",
"public double getTruncLevel() {\n return this.truncLevel;\n }",
"private int getDama... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Represents a mob spawner. | public interface MobSpawner extends BlockState {
/**
* Get the spawner's mob type.
*
* @return
*/
public MobType getMobType();
/**
* Set the spawner mob type.
*
* @param mobType
*/
public void setMobType(MobType mobType);
/**
* Get the spawner... | [
"public MobSpawnerLogic getMobSpawnerLogic();",
"IBossSpawnerBuilder location(@Nonnull IBossSpawnLocation location);",
"public void createPlateauSpawner() {\n\t\tif (!spawner) {\n\t\t\tsetPlateauSpawner(new PlateauSpawner(this, 1, 150));\n\t\t\tspawner = true;\n\t\t}\n\t}",
"public void handleSpawnMob(SSpawnM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the value of publisherName. | public String getPublisherName() {
return _publisherName;
} | [
"public static final String getPublisherName() { return publisherName; }",
"public java.lang.String getPublisherName() {\r\n return publisherName;\r\n }",
"public String getPublisherName() {\n return this.publisherName;\n }",
"public String publisherName() {\n return this.in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets (as xml) the "dateEnd" element | void xsetDateEnd(org.apache.xmlbeans.XmlDate dateEnd); | [
"void xsetEndDate(org.apache.xmlbeans.XmlDate endDate);",
"public void setEndDate(Date value) {\n setAttributeInternal(ENDDATE, value);\n }",
"public void setEndDate(Date value) {\r\n setAttributeInternal(ENDDATE, value);\r\n }",
"void setDateEnd(java.util.Calendar dateEnd);",
"public void set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read image with ImageJ and convert to openCV | @SuppressWarnings( "unchecked" )
@Test
public void testImgToMatConversion() throws IOException {
Dataset dataset = getScifio().datasetIO().open( input );
Mat convertedImg = new ImgToMatConverter().convert( ( RandomAccessibleInterval< UnsignedByteType > ) dataset.getImgPlus().getImg(), Mat.class );
opencv_imgcod... | [
"@SuppressWarnings( \"unchecked\" )\n\t@Test\n\tpublic void testMatToImgConversion() throws IOException {\n\t\tMat mat = imread( input, opencv_imgcodecs.IMREAD_GRAYSCALE );\n\t\tif ( mat.empty() )\n\t\t\tfail( \"Couldn't load image: \" + input );\n\t\tRandomAccessibleInterval< ByteType > convertedMat = ( RandomAcce... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Code Visit'. | TrackingCodeVisit createTrackingCodeVisit(); | [
"Code createCode();",
"T visitCode(Code elm, C context);",
"public void visitCode() {\n if (mv != null) {\n mv.visitCode();\n }\n }",
"public CodeBlock() {}",
"Coding createCoding();",
"public Code()\r\n {\r\n startTag=\"CODE\";\r\n endTag=\"/CODE\";\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draws tiles surface in two colors. | @Override
public void draw(GL2 gl) {
gl.glDisable(GLLightingFunc.GL_LIGHTING);
// gl.glColor3f(0.0f, 0.1f, 0.4f);
gl.glColor3fv(firstColor, 0);
DrawUtil.drawTiles(gl, 50, true);
// gl.glColor3f(0.0f, 0.5f, 0.1f);
gl.glColor3fv(secondColor, 0);
DrawUtil.drawT... | [
"protected void draw_tile(int i, int j){\n if(j%2==0 && i%2==0 ||j%2==1&&i%2==1) {\n if(bgrid[i][j]){\n buttons[i][j].setBackgroundResource(R.drawable.lp_queen);\n }else {\n buttons[i][j].setBackgroundResource(R.drawable.lp_tile);\n }\n }e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test when in transaction Summary and selects 'Repeat the menu' . | @Test
public void testFetchMoneyTransferActionRepeatThisMenu()
{
CallRecord callRecord = prepareForTest(ONE);
IvrRequest ivrRequest = createIvrRequest();
ivrRequest.setDigits("8");
ivrRequest.setIvrController(PRIOR_TRANSACTION_MENU);
InternalResultsResponse<String> response =
(getOptionsLi... | [
"@Test(description = \"AT-29561:TRA_01_03:Verify the Add a Transaction pop up window displayed\", priority = 4)\r\n\tvoid verifyAddManualTransactPopHeader() throws InterruptedException {\n\t\tif (PropsUtil.getEnvPropertyValue(\"MOBILEORWEB\").equalsIgnoreCase(\"MOBILE\")\r\n\t\t\t\t&& PropsUtil.getEnvPropertyValue(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field247' field. doc for field247 | public java.lang.CharSequence getField247() {
return field247;
} | [
"public java.lang.CharSequence getField247() {\n return field247;\n }",
"java.lang.String getField1538();",
"java.lang.String getField1372();",
"java.lang.String getField1164();",
"java.lang.String getField1371();",
"java.lang.String getField1571();",
"java.lang.String getField1762();",
"java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test response to a FormEncodingException for GuvnorFormDefinitionService.saveFormItem(...) | public void testSaveFormItemEncodingProblem() throws Exception {
HttpClient client = EasyMock.createMock(HttpClient.class);
Map<String, String> responses = new HashMap<String, String>();
responses.put("POST " + helper.getApiSearchUrl("somePackage") + "formItemDefinition_item1.json", "{}");
... | [
"public void testSaveFormEncodingProblem() throws Exception {\n HttpClient client = EasyMock.createMock(HttpClient.class);\n Map<String, String> responses = new HashMap<String, String>();\n FormRepresentation form = RESTAbstractTest.createMockForm(\"form2\", \"oneParam\");\n String jsonF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add gold, for earning income when fighting | public void addGold(int x) {
this.gold += x;
} | [
"public void addGold(int amount) {\n gold += amount;\n }",
"public void addGold(int g){\n this.gold += g;\n }",
"public void addGold(int amount) {\n \tcurrentGold += amount;\n \tgrossGold += amount;\n }",
"public void addGold(){\n this.gold = this.gold + 1;\n }",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define el valor de la propiedad tipoCarga. | public void setTipoCarga(int value) {
this.tipoCarga = value;
} | [
"public int getTipoCarga() {\n return tipoCarga;\n }",
"public void setTipo(Valor tipo) {\n this.tipo = tipo;\n }",
"public void setTipoCuenta(java.lang.String tipoCuenta) {\r\n this.tipoCuenta = tipoCuenta;\r\n }",
"public void setTipo(String tipo) {\r\n this.tipo = tipo;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to get OS Name on which test cases are running like Windows 98,Windows 2000,Windows ME,Windows XP Linux,Solaris/sparc,MacOSX | public static String getOSName() {
return System.getProperty(Constants.OS_NAME);
} | [
"public static String getOSName() {\n\n String osName = System.getProperty(\"os.name\");\n\n if (osName.contains(\"Linux\")) {\n return \"linux\";\n } else if (osName.contains(\"Mac OS X\")) {\n return \"osx\";\n } else if (osName.contains(\"Windows\")) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the persistence engine. | PersistenceEngine getPersistenceEngine(); | [
"public JpaPersistenceEngine getPersistenceEngine() {\n\t\treturn persistenceEngine;\n\t}",
"public DatabaseEngine getEngine()\n {\n return engine;\n }",
"public String getDatabaseEngine() {\n return this.databaseEngine;\n }",
"public PersistenceEnvironment<?> getPersistenceEnvironment(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the length of the header delimiter. | protected abstract int delimiterLength(ByteBuf buffer, int eoh); | [
"public int headerLength();",
"public int getPacketHeaderLength();",
"int getMinHeaderLength();",
"public int offendingHeaderFrameLength()\n {\n return buffer().getInt(offset() + OFFENDING_HDR_FRAME_LENGTH_FIELD_OFFSET, LITTLE_ENDIAN);\n }",
"public long getSizeOfHeaders()\n throws IOExcepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
that methods give all the cells reachable from the origin within the range given, attached with the number of moves needed to go there | public static ArrayList<Journey> getReacheableCellsInRangeWithPath(Cell cell_origin, int range) {
ArrayList<Journey> journeys = new ArrayList<>();
ArrayList<Cell> cells = new ArrayList<>();
LinkedList<Cell> active_queue = new LinkedList<>();
LinkedList<Cell> inactive_queue = new LinkedLi... | [
"public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XMemberFeatureCall__MemberCallArgumentsAssignment_1_1_3_1_1_1_1" $ANTLR start "rule__XMemberFeatureCall__MemberCallArgumentsAssignment_1_1_4" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:19033:1: rule__XMemberFeatureCall__Memb... | public final void rule__XMemberFeatureCall__MemberCallArgumentsAssignment_1_1_4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalChe... | [
"public final void rule__XMemberFeatureCall__MemberCallArgumentsAssignment_1_1_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/Intern... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Asks if this tab is optional. | public boolean isOptional() {
return formFieldSet.isTabOptional(tabName);
} | [
"public boolean isOptional();",
"public boolean isOptional() {\n\t\treturn optional;\n\t}",
"public boolean isOptional() {\n\t\treturn _optional;\n\t}",
"boolean isOptional();",
"@Override\n\tpublic boolean isMandatory() {\n\t\treturn _formItem.isMandatory();\n\t}",
"private static boolean isOptionalPrope... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Find all observation given one source id. V_s | public static Set<Value> findValueWithIdSource(Set<Observation> data,int id) {
Set<Value> data_select = new HashSet<>();
for (Observation observation : data) {
if (observation.getSource().getIdSource()==id) {
data_select.add(observation.getValue()) ;
}
}
return data_select;
} | [
"public static Set<Source> findSetOfSourceGivenValue(Set<Observation> data,String observation){\n\t\t\n\t\tSet<Source> source = new HashSet<>();\n\t\t for (Observation observation_line : data) {\n\t\t if (observation_line.getValue().getDescriptionValue()==observation) {\n\t\t \t source.add(observation_line.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |