query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Get the name of the credential that the permissions apply to. | public String getCredentialName() {
return this.credentialName.getName();
} | [
"public String getName() {\n if (request == null) return null;\n return request.getCredential().getName();\n }",
"public java.lang.String getCredentialId() {\r\n return credentialId;\r\n }",
"public Credential getCredential() {\n return credential;\n }",
"public CredentialReference ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new Font object by replicating the current Font object and applying a new set of font attributes to it. | public Font deriveFont(Map<? extends Attribute, ?> attributes) {
if (attributes == null || attributes.size() == 0) {
return this;
}
Hashtable newAttrs = new Hashtable(getAttributes());
Attribute validAttribs[] = getAvailableAttributes();
Object obj;
for(int i = 0; i < validAttribs.length; i++){
i... | [
"public Font deriveFont(int style){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public Font deriveFont(AffineTransform trans){\n\tHashtable newAttributes = (Hashtable)ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes the Task. If the Task contains sub tasks, it will call execute() on those as well. If the Task is unsucessful (which sometimes is important to see) the method returns false, else it will return true. The task is unsuccessful when not all resources that was requested could be transfered. | public boolean execute() throws GeneralTaskException {
if(done == true) {
throw new GeneralTaskException();
}
// Set values of done and success in advance and change if needed
done = false;
boolean successful = true;
if(transferAll) {
// Don't change successful, isn't needed when transferi... | [
"@Override\n public int execute() {\n for (Task task : tasks) {\n if (task.validate()) {\n return task.execute();\n }\n }\n //no task was valid, let's not eat up the cpu though\n return 1000;\n }",
"public void perform() {\n //logger.info(\"Doing Action\");\n if(contro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add the uid of the file Submit is trying to upload to the list that is waiting for a response from Submit. | public void listenForFileUid(String uid) {
this.mSendObjectFiles.add(uid);
} | [
"public void addOtherSubmitFile(File f)\n{\n file_list.add(f);\n}",
"private void uploadFile() {\r\n\t\tbyte[] bytes = this.turnQueueToBytes();\r\n\t\ttry {\r\n\t\t\tFileOutputStream fileOutputStream =\r\n\t\t\t\t\tnew FileOutputStream(BidiMessagingProtocolImpl.FilesDir +\"/\" +fileName,false);\r\n\t\t\tfileOut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts directory apache directory service. | public void startLdapServer(int port) throws Exception {
workDir = new File(System.getProperty("java.io.tmpdir"), "TEMP_APACHEDS-" + System.currentTimeMillis());
workDir.mkdirs();
// Initialize the LDAP service
ldapServer = new LdapServer();
ldapServer.setTransports(new TcpTrans... | [
"@Override\n public void startDirectoryManager() {\n // We don't need to do anything.\n }",
"private void launchApacheDS()\n {\n try\n {\n // Getting the default VM installation\n IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();\n \n //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets by author uuid. | @GetMapping("/author/{uuid}")
public List<BookBean> getByAuthorUuid(@PathVariable(value = "uuid") String uuid) {
return this.bookDAS.search(BookRequest.builder().authorUuid(uuid).build());
} | [
"public Author getAuthorProfile(int authorId);",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getAuthor();",
"public String getAuthorUID() {\n return authorUID;\n }",
"Reference getAuthor();",
"User getUserByUUID(String uuid);",
"public IUser getAuthor() {\n\t\treturn message... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'email_address' field. | public java.lang.CharSequence getEmailAddress() {
return email_address;
} | [
"public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }",
"public java.lang.String getEmailAddress() {\n return EmailAddress;\n }",
"public String getEmailAdress() {\n\n return this.emailAdress;\n }",
"public EmailAddress getEmail() {\r\n\t\treturn email;\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
uint32 chunkIndex = 2; | int getChunkIndex(); | [
"long getChunkNum();",
"int getChunkId();",
"int getChunks();",
"org.tensorflow.proto.util.MemChunk getChunk(int index);",
"public abstract Chunk getChunk(int x);",
"public int getChunkNo() {\n return chunkNo;\n }",
"prometheus.Types.Chunk getChunks(int index);",
"int getListChunkId();",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ProcessVariable__Group__1__Impl" $ANTLR start "rule__GlobalVariable__Group__0" InternalReflex.g:3797:1: rule__GlobalVariable__Group__0 : rule__GlobalVariable__Group__0__Impl rule__GlobalVariable__Group__1 ; | public final void rule__GlobalVariable__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalReflex.g:3801:1: ( rule__GlobalVariable__Group__0__Impl rule__GlobalVariable__Group__1 )
// InternalReflex.g:3802:2: rule__GlobalVariabl... | [
"public final void ruleGlobalVariable() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:267:2: ( ( ( rule__GlobalVariable__Group__0 ) ) )\n // InternalReflex.g:268:2: ( ( rule__GlobalVariable__Group__0 ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'yC' field. | public java.lang.Double getYC() {
return yC;
} | [
"public java.lang.Double getYC() {\n return yC;\n }",
"public void setYC(java.lang.Double value) {\n this.yC = value;\n }",
"public Integer getCocYy() {\n\t\treturn cocYy;\n\t}",
"public double getY() {\r\n return yValue;\r\n }",
"public com.xplordat.rtmonitoring.avro.Triangle.Builder ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the status_reason value for this LnpPonReport. | public void setStatus_reason(https.LnpStatusReason status_reason) {
this.status_reason = status_reason;
} | [
"public void setStatusreason(java.lang.String statusreason) {\n this.statusreason = statusreason;\n }",
"void setStatusReason(final UserStatusReason statusReason);",
"public void setSTATUS_REASON(String STATUS_REASON) {\r\n this.STATUS_REASON = STATUS_REASON == null ? null : STATUS_REASON.trim(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
heal hp every round | public void healHp(){
for(int i : team){
//System.out.println(allPoke.get(i).getName());
allPoke.get(i).heal();
}
} | [
"public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}",
"public void heal(int h){\n\t hp+= h;\n\t if(hp>maxHP){\n hp = maxHP;\n\t }\n\t }",
"@Override\n public void heal() { }",
"public void healPokemon()\n\t{\n\t\tfor(Pokemon pokemon : getParty())\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the medical profile controllers. | private void initializeMedicalProfileControllers() {
trAddNewPetVaccination = MedicalProfileControllersFactory.createTrAddNewVaccination();
trObtainAllPetVaccinations = MedicalProfileControllersFactory.createTrObtainAllPetVaccinations();
trUpdatePetVaccination = MedicalProfileControllersFactory.... | [
"private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Area ID of the best area to gather the given unit type. | public native int kbAreaFindBestGatherAreaID(int unitTypeID); | [
"java.lang.String getAreaUnit();",
"IAreaType getAreaType(UUID id) throws SiteWhereException;",
"public String getAreaType() {\n return areaType;\n }",
"java.lang.String getAreaUnitCode();",
"UUID getAreaId();",
"public String getAreaNo()\n\t{\n\t\treturn getValue(WorkingInformation.AREANO).toSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field162' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField162() {
field162 = null;
fieldSetFlags()[162] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField123() {\n field123 = null;\n fieldSetFlags()[123] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField121() {\n field121 = null;\n fieldSetFlags()[121] = false;\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function multithreads the prime function to split the work. First I created an array of threads to store all the ID's of each thread. IMPORTANT POINT: The number of primes is also equal to one fourth the maximum prime because theoretically, multiplying three primes greater than 1 / 4 of the sphenic number will res... | public static void threadedPrime(long primeToCheck, int threads)
{
long maxForSphenic = (long) (Math.cbrt(primeToCheck) * 3);
long size = maxForSphenic / threads;
final long INITIAL_MAX = -1;
long min, max;
long previousMax = INITIAL_MAX;
MultiThreaded threadArr[] = n... | [
"public static void getPrimeList(long prime, int threads)\n {\n threadedPrime(prime, threads);\n }",
"@Override\n public void run() {\n int everyBlock = limit / THREADS;\n int end = everyBlock * threadId + 2;\n for(int i = end - everyBlock; i < end; i++){\n if(i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A getter for a page table mapping | public int getPageTableMapping(int segment, int page) {
return pageTable[segment][page];
} | [
"public MapEntry<K, V>[] getTable() {\r\n // DO NOT MODIFY THIS METHOD!\r\n return table;\r\n }",
"public String getMapping();",
"public Map<UUID, Table> getTableMap() {\n\t\treturn tableMap;\n\t}",
"private HashMap<Long, String> getTable() {\n return table;\n }",
"public String g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "productType" element | java.lang.String getProductType(); | [
"public String getType() {\r\n\t\treturn productType;\r\n\t}",
"public String getProductType() {\n\t\treturn productType;\n\t}",
"public String getProductType() {\n\n return productType;\n }",
"public String productType() {\n return this.innerProperties() == null ? null : this.innerProperties... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write a method to return a list of the ages of all Students who have a status of HIBERNATING. | @Test
public void lab5() {
StudentService ss = new StudentService();
Utils.fillStudents(ss);
List<Student> students = ss.getAllStudents();
//List<Long> listOfAges = students.stream()
Set<Long> listOfAges = students.stream()
.filter(s -> s.getStatus() == Stud... | [
"public List<Attendance> getAttendance(Student s, Studygroup sg);",
"public ArrayList<String> getBadgesEarned() {\n\t\treturn badgesEarned;\n\t}",
"int getStudentAge();",
"private void AverageAgeOfStudent(){\n \t\n \tsumOfStudentAge = sumOfStudentAge + this.age;\n \taverageAgeOfStudent = sumOfStudent... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes sure that arg is not a key in the specified map. | public static <T> void keyNotInMap(T arg, Map<? extends T, ?> map, String argName, String mapName) {
if (map.containsKey(arg)) {
throwBinary(arg, map, argName, mapName, NOT_KEY_IN_MAP);
}
} | [
"public static <T> void keyNotInMap(T arg, Map<? extends T, ?> map, String argName) {\n\t\tif (map.containsKey(arg)) {\n\t\t\tthrowBinary(arg, map, argName, NOT_KEY_IN_MAP);\n\t\t}\n\t}",
"public static <T> void keyInMap(T arg, Map<? extends T, ?> map, String argName) {\n\t\tif (!map.containsKey(arg)) {\n\t\t\tth... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
springwebflux + Reactor + Netty | @GetMapping("/hello2")
public Mono<String> hello2() {
return Mono.just("Welcome to reactive world ~");
} | [
"Mono<ClientResponse> exchange(ClientRequest request);",
"RedissonReactiveClient reactive();",
"public Mono<ServerResponse> flux(ServerRequest serverRequest) {\n return ServerResponse.ok()\n .contentType(MediaType.APPLICATION_JSON)\n .body(Flux.just(1, 2, 3, 4).log(), Intege... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return true if the specified type+member combination should have been omitted given the context of the compileTimeProperties. | public boolean shouldOmitSymbol( @Nonnull final Map<String, String> compileTimeProperties,
@Nonnull final String type,
@Nonnull final String member )
{
return _omitRules.stream().anyMatch( r1 -> r1.matches( compileTimeProperties, type, member )... | [
"public final boolean isToBeExcluded(final BinMember member) {\r\n if (this.publicAndProtectedMembersExcluded &&\r\n (member.isPublic() || member.isProtected())) {\r\n return true;\r\n }\r\n\r\n if (member instanceof BinConstructor) {\r\n if (((BinConstructor) member).isSynthetic()) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse the ptree cmd output and get the pid's of the children processes | private static String parsePtreeInformation(final StringBuffer buffer, final String command) {
final StringTokenizer stArr = new StringTokenizer(buffer.toString(), "\n"); // NOI18N
boolean isCmdFound = false;
String pidList = ""; // NOI18N
while (stArr.hasMoreTokens()) {
fina... | [
"private static List<Long> getChildPIDs(long pid) {\n List<Long> childPIDs = new ArrayList<>();\n try {\n // Get child pid(s)\n ProcessBuilder builder = new ProcessBuilder();\n builder.command(SH, HYPHEN_C, \"pgrep -P \" + pid);\n Process p = builder.start()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses an StringReader instance and generates a new P system without any file routes | public final Psystem parse(StringReader reader) throws PlinguaCoreException {
return parse(reader, new String[] { "" });
} | [
"public Psystem parse(StringReader reader, String fileRoutes[])\n\t\t\tthrows PlinguaCoreException {\n\t\tinitFileRoutes(fileRoutes);\n\t\tresetReport();\n\t\tPsystem ps= specificParse(reader, fileRoutes);\n\t\tcheckPsystem(ps);\n\t\treturn ps;\n\t\t\n\t}",
"private PLPParser makeParser(String input) throws Lexic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the width of the column. | public int getColumnWidth() {
return COLUMN_WIDTH;
} | [
"public int getColumnWidth() {\n return properties.getInt(getID() + \".columnWidth\", 150);\n }",
"public int getWidth() {\n return tableau.getColumnDimension();\n }",
"long getColumnWidthPixels();",
"protected int getColumnWidth() {\n if (columnWidth == 0) {\n Fo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To determine whether a year is a leap year, follow these steps: 1.If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5. 2.If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4. 3.If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5. 4.The year is a... | private boolean isLeapYear(int year){
if (year%4 == 0){
if (year%100 == 0){
if (year%400 == 0){
return true;
}
else {
return false;
}
}
else {
return true;
... | [
"private int isLeap(int year){ \r\n\t\tif((year % 400 == 0)||(year % 4 == 0 && year % 100 != 0 )) \r\n\t\t\treturn 1;\r\n\t\telse return 0;\r\n\t}",
"public static boolean isLeapYear(int year) {\n if(year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)){\n return true;\n } \n else{\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleProcessConfiguration" $ANTLR start "entryRuleDefBehaviorProc" InternalDsl.g:3341:1: entryRuleDefBehaviorProc returns [EObject current=null] : iv_ruleDefBehaviorProc= ruleDefBehaviorProc EOF ; | public final EObject entryRuleDefBehaviorProc() throws RecognitionException {
EObject current = null;
EObject iv_ruleDefBehaviorProc = null;
try {
// InternalDsl.g:3341:56: (iv_ruleDefBehaviorProc= ruleDefBehaviorProc EOF )
// InternalDsl.g:3342:2: iv_ruleDefBehaviorPr... | [
"public final void entryRuleDefBehaviorProc() throws RecognitionException {\n try {\n // InternalDsl.g:1130:1: ( ruleDefBehaviorProc EOF )\n // InternalDsl.g:1131:1: ruleDefBehaviorProc EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the default application type using the name of the given Zip. | @Get(uri = "/{name}.zip{?type,features,lang,build,test}", produces = "application/zip")
@ApiResponse(
description = "A ZIP file containing the generated application.",
content = @Content(
mediaType = "application/zip"
)
)
public HttpResponse<Writable> ... | [
"@Override\n @Get(uri = \"/create/{type}/{name}{?features,lang,build,test,javaVersion}\", produces = \"application/zip\")\n @ApiResponse(\n description = \"A ZIP file containing the generated application.\", \n content = @Content(\n mediaType = \"application/zip... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the voyage number of this temp crew list. | @Override
public void setVoyageNumber(java.lang.String voyageNumber) {
_tempCrewList.setVoyageNumber(voyageNumber);
} | [
"public void setVoyageNumber(String voyageNumber);",
"@Override\n\tpublic java.lang.String getVoyageNumber() {\n\t\treturn _tempCrewList.getVoyageNumber();\n\t}",
"public void setNumberOfCrew(int numberOfCrew);",
"@Override\n\tpublic void setCrewNumber(long crewNumber) {\n\t\t_tempNoTiceShipMessage.setCrewNum... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use C_GetGrowthFund.newBuilder() to construct. | private C_GetGrowthFund(Builder builder) {
super(builder);
} | [
"private S_GetGrowthFund(Builder builder) {\n super(builder);\n }",
"java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> \n getFundsList();",
"public cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getFundsOrBuilder(\n int index) {\n if (fundsBuilder_ == null) {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Always applies the interceptor if the "trackAllInvocations" flag has been set; else just kicks in if the log is enabled. | @Override
protected boolean isInterceptorEnabled(MethodInvocation invocation, Log logger) {
return (this.trackAllInvocations || isLogEnabled(logger));
} | [
"public JamonPerformanceMonitorInterceptor(boolean useDynamicLogger, boolean trackAllInvocations) {\n this(useDynamicLogger, trackAllInvocations, false);\n }",
"public boolean isInterceptorEnabled();",
"public JamonPerformanceMonitorInterceptor(boolean useDynamicLogger, boolean trackAllInvocations, bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "north" element | public org.apache.xmlbeans.XmlBoolean xgetNorth()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlBoolean target = null;
target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(NORTH$0, 0);
return target;
}
... | [
"public String getNorthNorth()\n\t{\n\t\treturn northNorth;\n\t}",
"public boolean getNorth()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_eleme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if this request is a Multipart request | boolean isMultipart(); | [
"public boolean isMultiPart(HttpServletRequest request) {\n try {\n // Check if we have a multi-part upload\n return (request.getContentType() != null && \n request.getContentType().toLowerCase().contains(\"multipart/form-data\") );\n } catch (Exception ex) {\n logger.DoError(\"isM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a data cursor with all client applications. | public Cursor getApplications() {
final SQLiteDatabase db = mDbHelper.getReadableDatabase();
return db.query(
FullContract.Apps.TABLE_NAME,
FullContract.Apps.PROJECTION_DEFAULT,
null, null, null, null,
FullContract.Apps.SORT_ORDER_DEFAULT)... | [
"ApplicationsClient getApplications();",
"public ResultSet getAllClient () \r\n {\r\n try {\r\n PreparedStatement statement = connection.prepareStatement(\r\n \"SELECT \" + CLIENT.ID + \" FROM \" + CLIENT.TABLE_NAME,\r\n ResultSet.TYPE_SCROLL_SENSITIVE, R... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a table model with specified data and columnNames | public MyTableModel(Object[][] data, Object[] columnNames) {
super(data, columnNames);
} | [
"@SuppressWarnings(\"deprecation\")\n private void initDataTable() {\n dataTable = DataTable.create();\n \n // Columns have explicit ids so that they can addressed by Rhizosphere code\n // (see metamodel definition below).\n dataTable.addColumn(ColumnType.STRING, \"Name\", \"name\");\n dataTab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an Activation object that contains the ActivationOS information. | private Activation createActivation() {
Activation activation = new Activation();
activation.setActiveByDefault(false);
activation.setOs(createOsBean());
return activation;
} | [
"ActivationSpec createActivationSpec();",
"private ActivationOS createOsBean() {\n ActivationOS os = new ActivationOS();\n\n os.setArch(arch);\n os.setFamily(family);\n os.setName(name);\n os.setVersion(version);\n\n return os;\n }",
"ActivationExpression createActiv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the access/security map using an XML document | public static Map buildAccessMap(Document doc) {
Map m = new Hashtable();
NamedNodeMap nMap = null;
Node root = doc.getLastChild();
Node listNode = findEnclosingNode(root, "ContentList");
NodeList children = listNode.getChildNodes();
Node childNode;
String sConten... | [
"private static Map<String, String> readMappingFromXML(List<String> args, String XMLDocument)\n\t\t\tthrows ParserConfigurationException, SAXException, IOException, UnkownOrInvalidDOIException {\n\t\tMap<String, String> mapping = new HashMap<>();\n\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create query for showing grade for students registered in a course by using student email and course name | public String showGrade(String courseName, String studentEmail){
String query = String.format("SELECT grade, c.faculty FROM REGIE.registrations r,\n" +
"REGIE.users u, REGIE.courses c\n" +
"WHERE u.type = \"S\" and u.typeid = r.student_id\n" +
"and c.id = r.cours... | [
"public Student getStudentByGmail(String email) throws SQLException {\n\t\tStudent stu = null;\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\n\t\ttry {\n\t\t\tconn = OracleConnection.getConnection();\n stmt = conn.prepareStatement(OracleQueries.GETSTUDEN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the full path for the given database name, whether the database exists or not. | String getDbPath(String dbName); | [
"private String findCurrentDBPath(){\n String startingDir = System.getProperty(\"user.dir\");\t\t\t\t//get starting directory\n File database = new File(startingDir + \"/src/currentDatabase.txt\");\n String currentDatabasePath= null;\n try {\n if (database.exists()) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__SchedulerPropertyDef__IvalueAssignment_3_1_1" $ANTLR start "rule__SchedulerPropertyName__NameAssignment" InternalDsl.g:38987:1: rule__SchedulerPropertyName__NameAssignment : ( RULE_ID ) ; | public final void rule__SchedulerPropertyName__NameAssignment() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:38991:1: ( ( RULE_ID ) )
// InternalDsl.g:38992:2: ( RULE_ID )
{
// InternalDsl.g:38992:2: ( ... | [
"public final void rule__SchedulerPropertyDef__NameAssignment_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:38946:1: ( ( ruleSchedulerPropertyName ) )\n // InternalDsl.g:38947:2: ( ruleSchedulerPropertyName )\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns how many times in the sequence arr numbers come up twice in a row with exactly k prime factors? | public static int consecKprimes(int k, long[] arr) {
// your code
int result = 0;
long temp = multiplyCountkPrimes(arr[0]);
for (int i = 1; i < arr.length; i++) {
long count = multiplyCountkPrimes(arr[i]);
if (count == k && count == temp) result++;
temp = coun... | [
"private int countSubarrays(int[] A, int k) {\n int cnt = 0, i = 0;\n for (int j = 0; j < A.length; j++) {\n // if A[j] is not odd, A[j] % 2 = 0\n // if A[j] is odd, A[j] % 2 = 1\n k -= A[j] % 2;\n while (k < 0) {\n // k is sum of odd numbers.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This elegant solution is from a sudoku solver | public boolean solutionAsSolver(char[][] board){
int n = board.length;
int m = (int)Math.sqrt(n);
//available integer for each slot
ArrayList<HashSet<Integer>> aMap = new ArrayList<HashSet<Integer>>();
for(int i = 0; i < n; i++)
for(int j = 0; j < n; j++){
... | [
"public static void main(String[] args) {\n\t\tString message = \"Please enter the Sudoku you want to solve: \";\r\n\t\tSystem.out.println(message);\r\n\t\tString sudoku = scanner.nextLine();\r\n\t\tString[] sudokuString = sudoku.split(\" \");\r\n\t\tint[] realSudoku = new int[81];\r\n\t\t\r\n\t\tfor(int a = 0;a<su... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a properties file from the map. | private File createPropertiesFile(Map<String, String> properties) throws IOException {
File file = tempFolder.newFile();
Writer fileWriter = Files.newBufferedWriter(file.toPath(), UTF_8);
for (Map.Entry<String, String> entry : properties.entrySet()) {
fileWriter.write(String.format("%s=%s\n", entry.ge... | [
"public static void storePropertiesFile(Map properties, String fileLoc) throws IOException {\n File inputFile = new File(fileLoc);\n inputFile.delete();\n RandomAccessFile ram = new RandomAccessFile(inputFile,\"rw\");\n Set keys = properties.keySet();\n for (Iterator iterator = ke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a connecion by using dbconn.properties file | public static Connection openConnectionFromDbConn() throws SQLException, IOException {
// Connect to the database with the provided connection configuration
Properties configProps = new Properties();
configProps.load(new FileInputStream("dbconn.properties"));
String serverURL = configProps.getProperty("... | [
"public static Connection openConnectionFromDbConn() throws SQLException, IOException {\n // Connect to the database with the provided connection configuration\n Properties configProps = new Properties();\n configProps.load(new FileInputStream(\"dbconn.properties\"));\n String serverURL ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method return an arrayList of all coupons that the customer ordered from the same type. | @RequestMapping( path = "getCouponsByType", method=RequestMethod.GET)
public List<Coupon> getCustomerCouponByType(@RequestParam CouponType type , HttpSession session){
return customer.getCustomerCouponByType(type , loggedUsser(session).getId());
} | [
"public Collection<Coupon> getAllPurchasedCouponsByType(CouponType coupontype) \r\n\t{\r\n\t\tArrayList<Coupon> allCustomerCoupons = new ArrayList<>();\r\n\r\n\t\ttry \r\n\t\t{\r\n\t\t\tallCustomerCoupons = (ArrayList<Coupon>) customerdbdao.getCouponsByType(coupontype);\r\n\t\t\t\r\n\t\t\t// initializing array if n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
simple method to filter an input list of rows by service type takes input of a List of Rows and a service type (ServiceType.FIRE or ServiceType.EMS) | public static List<Row> filterServiceType(List<Row> inputList, ServiceType serviceType) {
List<Row> outputList = new ArrayList<>();
//iterates through inputList, adding only the rows that match the specified service type to the outputList
for(Row row : inputList) {
if(row.getServiceType() == serviceType) {
... | [
"public List<Service> searchServiceByType(String type);",
"String getTypeFilter(String column, Collection<FxType> types);",
"public List<Service> findServicesByTypes(ServiceType type1, ServiceType type2)\r\n {\r\n List<Service> returnServices = new ArrayList();\r\n for (Service s : _services)\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last save point of this ke hoach kiem dem nuoc. | @Override
public java.util.Date getLastSavePoint() {
return _keHoachKiemDemNuoc.getLastSavePoint();
} | [
"public Point getLastPoint() {\n return this.points.get(this.points.size() - 1);\n }",
"public GPoint getLastPoint() {\n\t\treturn (points.size() > 0) ? points.get(points.size() - 1) : null;\n\t}",
"public Point getLastPoint() {\n\t\tif (points.size() == 0)\n\t\t\treturn null;\n\t\treturn points.get(p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a value of property MusicCDIdentifier as an RDF2Go node | public void removeMusicCDIdentifier( org.ontoware.rdf2go.model.node.Node value) {
Base.remove(this.model, this.getResource(), MUSICCDIDENTIFIER, value);
} | [
"public void removeMusicCDIdentifier(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), MUSICCDIDENTIFIER, value);\r\n\t}",
"public static void removeMusicCDIdentifier( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get list of ExtensionFilters for supported file types. | public static List<ExtensionFilter> getExtensionFilters(OpenMode mode) {
return FileType.getFileTypes(mode, Workbook.class).stream()
.map(t -> new ExtensionFilter(
t.getName(),
t.getExtensions()
... | [
"public static List<ExtensionFilter> getExtensionFilters() {\n return FileType.fileTypes().stream().map(t -> new ExtensionFilter(t.getName(), t.getExtensions())).collect(Collectors.toCollection(LinkedList::new));\n }",
"protected FileNameExtensionFilter[] getExtensions()\n {\n List<FileNameExt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checking the current value with last value and finding the total of decimal value | public static int findDecimal(int currentDecimal, int previousNum, int lastDecimal) {
if (previousNum > currentDecimal) {
return lastDecimal - currentDecimal;
//if if previous is greater than current then subtract that
} else {
return lastDecimal + currentDecimal;
//if previous v... | [
"public float getTotalValue()\r\n\t{\r\n\t\treturn getStocksValue() + getBalance();\r\n\t}",
"float getTotalValue (Stock stock[]){\r\n\t\tfloat totalValue = 0;\r\n\t\ttotalValue = getStocksValue(arrayOfStocksStatus)+ getBalance();\r\n\r\n\t\treturn totalValue;\r\n\t}",
"private double prixTotal() \r\n\t{\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This will block until load is low or time limit exceeded loadLimit(TAG + " getlatest() 107", 1 , 5 1000, 3 60 1000); | public void loadLimit(String who, int loadMin, int waitms, int waittimemax) {
i(TAG,"loadLimit() loadMin("+loadMin+") waitms("+waitms+") waittimemax("+waittimemax+") for " + who);
double load = 0;
double lastload = 0;
int waitloopmax = waittimemax / waitms;
int sleepcounter = 0;
//Threa... | [
"long getMaxWait();",
"@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n private void getLatestGame(String uid) {\n String url = \"http://ec2-user@ec2-54-153-82-188.us-west-1.compute.amazonaws.com:3000/getlatestgame/\" + uid;\n\n StringRequest stringRequest = new StringRequest(Request.Method.GET, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
give user id and seq id, get the seq contents(ap list) | private List<Integer> getAPList(String uid, int seq_id, UserManager um){
List<Integer> ap_list = new LinkedList<Integer>();
SequencesHelper now_seqHelper = um.getSequencesHelper(uid);
Sequence now_seq = now_seqHelper.getSequenceOrigin(seq_id);
for(Itemset now_itemset : now_seq.getItemsets()){
int now_ap = ... | [
"java.lang.String getSeq();",
"java.lang.String getSysSeq();",
"String getSequenceid();",
"private String retrieveUniProtSequenceEntry(String accession) {\n\t\tClient client = Client.create();\n\t\tSystem.out.println(\"Retrieving UniProt Accession \"+accession +\" from UniProt\");\n\t\tWebResource webResource... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
addCollidable adding collidable to the game environment. | public void addCollidable(Collidable c) {
environment.addCollidable(c);
} | [
"public void addCollidable(Collidable c) {\n this.environment.addCollidable(c);\n }",
"public void addCollidable(Collidable c) {\r\n this.environment.addCollidable(c);\r\n }",
"public void addCollidable(Collidable c) {\r\n this.collidables.add(c);\r\n }",
"void addCollider(Collid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a new DbsnpConverter. | public DbsnpConverter(Database database, Model model, ItemWriter writer) {
super(database, model, writer, DATA_SOURCE_NAME, DATASET_TITLE);
} | [
"public SourcesConverter() {\n }",
"public Builder setDbsnpRSBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n dbsnpRS_ = value;\n onChanged();\n return this;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a InputStream that is the result of creating a new FileInputStream object for the file named by the given path. If the argument is `' then System.in is returned. If path is null, return defaultValue. | public static InputStream
parseInputStream(String path, InputStream defaultValue)
throws IOException
{
if (path == null)
return defaultValue;
if (path.equals("-"))
return System.in;
return new FileInputStream(path);
} | [
"public static InputStream parseInputStream(String path, String defaultPath)\n\tthrows IOException\n {\n\tif (path == null)\n\t path = defaultPath;\n\tif (path.equals(\"-\"))\n\t return System.in;\n\treturn new FileInputStream(path);\n }",
"private InputStream open(File path) {\n try {\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column device_data.data_value | public void setDataValue(String dataValue) {
this.dataValue = dataValue == null ? null : dataValue.trim();
} | [
"public void setData_value(String data_value) {\n this.data_value = data_value;\n }",
"public void setDeviceData(final String value)\n\t{\n\t\tsetDeviceData( getSession().getSessionContext(), value );\n\t}",
"public void setDevice(com.iot.data.schema.DeviceData value) {\n this.device = value;\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "Created" element | public boolean isSetCreated()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(CREATED$0) != 0;
}
} | [
"public final boolean isCreated() {\n\t\treturn created;\n\t}",
"public Boolean isCreated() {\n return this.created;\n }",
"public boolean isCreated() {\n\t\treturn this.viewer != null;\n\t}",
"public boolean IsCreated( ) {\n return exists;\n }",
"public boolean isObjectCreated() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes the position from the database. Also notifies the appropriate model listeners. Important: Inspect PositionLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there. | @Override
public company.model.Position deletePosition(
company.model.Position position) {
return _positionLocalService.deletePosition(position);
} | [
"@Delete\n void deletePosition(Position position);",
"@Indexable(type = IndexableType.DELETE)\r\n\tpublic Position deletePosition(Position position);",
"@Override\n\tpublic void deletePosition(Integer id) {\n\t\t\n\t\tpositionRepo.deleteById(id);\n\t}",
"@DeleteMapping(\"/position-destroys/{id}\")\n @Ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Increased total number of queue entries. | public void incTotalOfQueueEntries() {
totalOfQueueEntries++;
} | [
"public void incrementTimeSpentQueueing();",
"public void enqueue ()\n {\n count++;\n questionList.add(newQuestion);\n //System.out.println(\"Question #\"+ totNumQ + \" is added to the queue.\");\n }",
"public void sizeIncrease1() {\n\t\t _size++;\n\t}",
"private void growSize() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates report for monthly patient List from checkin information table | public void viewMonthlyPatientList(Scanner input) {
//Get the year for patient list
System.out.println("Please enter the year for patient list record in form yyyy.");
String year = null;
try {
year = input.nextLine();
if(year.length() > 4) {
Syste... | [
"public void viewMonthlyMedicalRecord(Scanner input) {\n System.out.println(\"Please enter the patient ID for medical record.\");\n int pId = 0;\n try {\n pId = Integer.parseInt(input.nextLine());\n } catch (NumberFormatException e) {\n System.err.println(\"Patient ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table btc_user_income_verify | int updateByPrimaryKey(UserIncomeVerify record); | [
"UserIncomeVerify selectByPrimaryKey(Long id);",
"int insert(UserIncomeVerify record);",
"int insertSelective(UserIncomeVerify record);",
"PerIncome selectByPrimaryKey(Integer incomeid);",
"public List<Transaction> findAllIncome() throws SQLException {\n return daoImpl.findAllIncome();\n }",
"Li... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method used to get the Attribute Id from ATTRIBUTE table based on the name as OUTFIT_Type. | public long getOutfitTypeId() {
Attribute attributeValue = null;
Long atttributeId = null;
List list = getHibernateTemplate().find("FROM Attribute WHERE name =\'OUTFIT_Type\'");
Iterator itr = list.iterator();
if (itr.hasNext()) {
attributeValue = (Attribute) itr.next();
atttributeId = (attributeValue... | [
"String getIdAttribute();",
"int getIdAttributeIndex();",
"String getTypeID();",
"private String getSchemaAttributeTypeGUID(SchemaAttribute schemaAttribute)\n {\n ElementType type = schemaAttribute.getType();\n if (type != null)\n {\n return type.getElementTypeId();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
devuelve la ruta al XML. | private String obtenerRutaXML(Contenido contenido) {
return REPOSITORIO_XML + File.separator
+ contenido.obtenerRutaArchivo() + EXTENSION_ARCHIVO;
} | [
"XMLString getXmlIn();",
"public XmlManager xml();",
"String getXMLPath();",
"public ArrayList<Klant> getKlantenXML();",
"void initFromXml(org.w3c.dom.Node xml);",
"public void crearXML() {\r\n\t\tString strPath = \"D:\\\\proyecto\\\\XML\\\\vehiculos.xml\";\r\n\t try {\t\r\n\t \tStatement stmTurismo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all geometries that have been added so far. Some of them may have been merged, so this list is shorter than the list of provided geometries. | public ArrayList<RecordedOsmGeometries> getGeometries() {
final ArrayList<RecordedOsmGeometries> geometries = new ArrayList<>();
for (final MergeGroup m : mergeGroups) {
geometries.addAll(m.getGeometries());
}
return geometries;
} | [
"public ArrayList<GeometryObject> getGeometryObjects() {\n return this.geometryObjects;\n }",
"public Iterator<Geometry>getGeometryIterator()\n\t\t{\n\t\t\treturn geometries.iterator();\n\t\t}",
"public List<Geometry> getGeoms() {\r\n return geoms;\r\n }",
"public Scene addGeometries(Inter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds new Warehouse to the company | public void addWarehouse(Warehouse addition)
{
_warehouses.addElement(addition);
} | [
"void addWarehouseID(java.lang.String warehouseID);",
"public void addWarehouseStock(String name, int amount);",
"public void addWaterPurityReport(WaterPurityReport w) {\n getFirebaseInstance().getReference(\"waterPurityReports\")\n .child(Integer.toString(purityReportList.size()))\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ IE_CalcCU Calculate Luminaire Coefficient of Utilization Purpose: To calculate the zonal cavity coefficient of utilization for a luminaire. Setup: double IE_CalcCU ( IE_CALC double g, double p1, double p2, double p3 ) Where: pcalc is a pointer to an IE_CALC data structure. g is the room cavity ratio. p1 is the wall c... | private double IE_CalcCU(double g, double p1, double p2, double p3) {
/* Check for conditions which could cause a divide-by-zero error */
if (p1 > 0.999 || p2 > 0.999 || p3 > 0.999)
return 0.0;
/* Calculate the flux functions */
double phi_d = 0.0; /* Total downward luminaire flux */
for (int n = 0; n ... | [
"public void calculateCoefficients(double g, double p1, double p2, double p3) {\n\n\t\t/* Check for conditions which could cause a divide-by-zero error */\n\t\tif (p1 > 0.999 || p2 > 0.999 || p3 > 0.999) {\n\t\t\tcu = 0.0;\n\t\t\tccec = 0.0;\n\t\t\twec = 0.0;\n\t\t\twdrc = 0.0;\n\t\t\treturn;\n\t\t}\n\n\t\t/* Calcu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert and then repeat the measures for a given number of times | public void convert(int repeatMeasures)
{
this.convert();
int startLength = this.convertedMeasures.size();
for(int i = 0; i < repeatMeasures; i++)
{
for(int j = 0; j < startLength; j++)
{
this.convertedMeasures.add(this.convertedMeasures.get(j));
}
}
} | [
"public void convert()\r\n\t{\r\n\t\tfor(int t = 0; t < sequence.getTracks().length; t++)\r\n\t\t{\r\n\t\t\t//get the track\r\n\t\t\tTrack track = sequence.getTracks()[t];\r\n\t\t\t\r\n\t\t\t//lastActiveNoteTick will keep track of when the last note started; for determining the length of a note\r\n\t\t\tlong lastAc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks the value of the system property "riena.lnf.update.view". | private boolean checkPropertyUpdateView() {
return Boolean.getBoolean(PROPERTY_RIENA_LNF_UPDATE_VIEW);
} | [
"@Override\n\tprotected boolean checkUpdate(IViewerUpdate update) {\n\t\tif (!super.checkUpdate(update))\n\t\t\treturn false;\n\n\t\t// Currently always update, although the view content is static and\n\t\t// does not depend on debug state or other views.\n\t\treturn true; // Conservative;\n\t}",
"boolean isShowU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the given date is yesterday. | public static boolean isYesterday(long date) {
final Calendar currentDate = Calendar.getInstance();
currentDate.setTimeInMillis(date);
final Calendar yesterdayDate = Calendar.getInstance();
yesterdayDate.add(Calendar.DATE, -1);
return yesterdayDate.get(Calendar.YEAR) == curren... | [
"public static Matcher<LocalDateTime> isYesterday() {\r\n\t\treturn sameDay(LocalDateTime.now().minusDays(1));\r\n\t}",
"public static ZonedTemporalMatcher<Date, ZoneId> isYesterday() {\r\n return sameDay(LocalDate.now().minusDays(1));\r\n }",
"public static boolean isYesterday(LocalDateTime dateTime)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Main method to access the ReadHTMLText class. | public static void main(String[] args){
new ReadHTMLText();
} | [
"@Test \n\tpublic void testProcessTextWithSimpleHTML() {\n\t\tString testString = \"<HTML><HEAD><TITLE>My Web Page</TITLE></HEAD><BODY><P>This is where you will enter all the text and images you want displayed in a browser window. Lets see if the sentence count is correct!</P></BODY></HTML>\";\n\t\tString testSourc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the DataItemUtils files | public static boolean CreateDataItemUtils(ATaGProgram aProgram, String dartRoot) {
String code =""+
"/*********************/\n"+
"/** DataItemUtils.java */\n"+
"/*********************/\n"+
"package atag.apps.mainApp.gen;\n"+
"... | [
"@org.junit.Test\n public void testImportAdminUsersAndOrgs() throws Exception {\n\n String rand1 = RandomStringUtils.randomAlphanumeric( 10 );\n String rand2 = RandomStringUtils.randomAlphanumeric( 10 );\n String rand3 = RandomStringUtils.randomAlphanumeric( 10 );\n\n UUID user_uuid_1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column jk_loan_apply_address.residential_address | public String getResidentialAddress() {
return residentialAddress;
} | [
"java.lang.String getAddressForPayment();",
"public String getAddress() {\n\t\treturn this.full_address;\n\t}",
"public CsvCell getAddressCombined() {\n return super.getCell(\"ADDRESS\");\n }",
"private String getAddress(Document brDocument)\n throws XPathExpressionException {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the mailbox entry. | public MailboxEntry(
FileEntry inboxFile,
String postboxFilename,
ContentSinkConsumer contentSource,
ContentSinkConsumer envSource
) throws IOException {
this.inboxEntry = inboxFile;
this.messageStatus = getMailStatus(inboxFile);
this.postboxId = postboxFilename;
this.content = new DataSource(con... | [
"public\r\nMBRecord(Name name, int dclass, long ttl, Name mailbox) {\r\n\tsuper(name, Type.MB, dclass, ttl, mailbox, \"mailbox\");\r\n}",
"private PBMailItem() {}",
"public Entry() {\n }",
"public Account(String user)\r\n\t{\r\n\t\taccountname = user;\r\n\t\tmailBoxList.add(new MailBox(\"Sent\"));\r\n\t\tm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the last access time (in local time) of a file or directory. | long getLastAccessTime(String path) throws IOException; | [
"public long getLastAccessTime();",
"long getLastAccessTimeUtc(String path) throws IOException;",
"long getLastAccessedTime();",
"public int getLastAccessTime() {\n return this.lastAccessTime;\n }",
"public long getAccessTime()\r\n {\r\n return lastAccess;\r\n }",
"long getL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
closes the shop window and opens the main window. | public void finishShop(ShopWindow shop) {
shop.closeWindow();
new MainWindow(this);
} | [
"public void openShop(MainWindow mainWindow) {\n mainWindow.closeWindow();\n new ShopWindow(this);\n }",
"public void showShop() {\n disableAllPanel();\n shopPanel.setVisible(true);\n shopPanel.requestFocus();\n showQuitScreen();\n }",
"public void finishedWindow() {\n\t\tc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column tb_cust_url.cust_id | public void setCustId(Integer custId) {
setField("custId", custId);
} | [
"public void setCustUrlId(Integer custUrlId) {\n setField(\"custUrlId\", custUrlId);\n }",
"public void setCustId(Integer custId) {\n this.custId = custId;\n }",
"public void setCustID(String custID) {\r\n this.custID = custID;\r\n }",
"public void setCustomerId(String value)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calls the RemoveTerminologyOrConcept(parameter, null) function. | public RemoveTerminologyOrConceptResponseType RemoveTerminologyOrConcept(RemoveTerminologyOrConceptRequestType parameter){
return RemoveTerminologyOrConcept(parameter, null);
} | [
"private static void removeTerminology(String command,\r\n List<CodingScheme> csList) {\r\n if (command == null || csList == null)\r\n return;\r\n StringTokenizer st = new StringTokenizer(command, \" \\n\\r\\t,\");\r\n st.nextToken(); // lose first command (r)\r\n S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy a TransformTrack, setting the indexed keyframe to the specified transform. | public static TransformTrack replaceKeyframe(
TransformTrack oldTrack, int frameIndex, Transform transform) {
float[] oldTimes = oldTrack.getTimes();
int frameCount = oldTimes.length;
Validate.inRange(frameIndex, "keyframe index", 0, frameCount - 1);
Validate.nonNull(transfor... | [
"public static Track replaceKeyframe(\n Track oldTrack, int frameIndex, Transform transform) {\n assert oldTrack instanceof BoneTrack\n || oldTrack instanceof SpatialTrack;\n float[] oldTimes = oldTrack.getKeyFrameTimes();\n int frameCount = oldTimes.length;\n V... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Constructor for the TCPListen class. It creates a ServerSocket to use for listening for clients. Displays the port number and IP address for the ServerSocket to the console and then enters an infinite loop to listen for clients. Spawns a new TCPListenThread object to handle each client. | public TCPListen() throws IOException
{
try {
// Instantiate socker to listening
serverSocket = new ServerSocket(LISTEN_PORT);
}
catch (IOException e) {
// Port not available
System.err.println("Could not listen on port: "
+ LISTEN_PORT);
System.exit(-1);
}
// Display socket inform... | [
"public TCPServer() {\n\n try {\n serverSocket = new ServerSocket(6666);\n clientSocket = serverSocket.accept();\n log.info(\"Connection established\");\n } catch (IOException e) {\n log.error(\"Exception in initializing the socket\", e);\n }\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicate that the connection attempt failed and notify the UI Activity. | private void connectionFailed() {
// Send a failure message back to the Activity
Message msg = handler.obtainMessage(SdlRouterService.MESSAGE_LOG);
Bundle bundle = new Bundle();
bundle.putString(LOG, "Unable to connect device");
msg.setData(bundle);
handler.sendMessage(ms... | [
"private void connectionFailed() {\n\t\tsetState(STATE_LISTEN);\n\t\tBundle bundle = new Bundle();\n\t\tbundle.putString(ScaleActivity.TOAST, \"Unable to connect device\");//toast\n\t\t// Send a failure message back to the Activity\n\t\tif (mHandler!=null) {\n\t\t\tMessage msg = mHandler.obtainMessage(ScaleActivity... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test Order By Different Sort PK Order By Exception | @Test
public void testRVCOffsetSamePKDifferentSortOrderBy() throws SQLException {
String failureSql = String.format("SELECT %s FROM %s ORDER BY t_id DESC, k1, k2 OFFSET (%s)=(%s)",
TABLE_ROW_KEY,TABLE_NAME, TABLE_ROW_KEY,GOOD_TABLE_ROW_KEY_VALUE);
try (Statement statement = conn.crea... | [
"@Test\n public void testCreateInvalidOrderBy() throws Exception {\n LOG.info(\"Start test: \" + getCurrentTestMethodName());\n\n // Test scalar index against ORDER BY non existing column.\n session.execute(\"CREATE TABLE test_order_by(a INT PRIMARY KEY, b INT, c INT,\" +\n \" non_inde... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setTableId method, of class FoodOrder. | @Test
public void testSetTableId() {
o1.setTableId(3);
assertEquals("setTableID failed", 3 , o1.getTableId());
} | [
"public void setTableId(int value) {\n this.tableId = value;\n }",
"public void setTableId(int table) {\n\t\tthis.tableId = table;\n\t}",
"@Test\n public void testGetTableId() {\n assertEquals(\"getTableID failed\", 3, o1.getTableId());\n }",
"@Override\n\tpublic void setTableId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add an annotation when the var/val declaration's type is implicit and inferred by the SARL compiler. | @SuppressWarnings({ "checkstyle:npathcomplexity" })
private <T extends EObject> void createImplicitVarValType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor,
Class<T> elementType,
Function1<T, JvmTypeReference> getDeclaredTypeLambda,
Function1<T, String> getInferredTypeLambda,
Function1<T,... | [
"private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {\n\t\tcreateImplicitVarValType(resource, acceptor, XtendVariableDeclaration.class,\n\t\t\tit -> it.getType(),\n\t\t\tit -> {\n\t\t\t\tLightweightTypeReference type = getLightweightType(it.getRight());\n\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
aStarAlgorithm performs the A algorithm given by the following steps: 1) Priority Queues for board state nodes closed and open are created 2) The initial state is added to the open list 3) A loop begins which is repeated until the open list is empty. During this loop: a) The current state to be examined is grabbed from... | private static BoardStateNode aStarAlgorithm()
{
// customized priority queue for BoardStateNode objects
BSNPriorityQueue open = new BSNPriorityQueue();
BSNPriorityQueue closed = new BSNPriorityQueue();
// add initial state to the open list
open.add(new BoardStateNode(init, n... | [
"public Vector<PuzzleState> aStarSearch() {\r\n System.out.println(\"Starting A*\");\r\n long startTime = (new Date()).getTime();\r\n Vector<PuzzleState> solution = new Vector<PuzzleState>();\r\n HashSet<PuzzleState> closedList = new HashSet<PuzzleState>();\r\n PriorityQueue<Puzzl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the application's icon. | public static Drawable getAppIcon() {
return getAppIcon(getApp().getPackageName());
} | [
"public Image getApplicationIcon() {\n return new javafx.scene.image.Image(this.getClass()\n .getResourceAsStream(DOCKICON));\n }",
"public AppIcon getAppIcon () ;",
"Drawable getAppIcon();",
"public java.lang.String getApplicationIconFile() {\r\n return applicationIconFile;\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XMemberFeatureCall__FeatureAssignment_1_1_2" $ANTLR start "rule__XMemberFeatureCall__ExplicitOperationCallAssignment_1_1_3_0" InternalDroneScript.g:17902:1: rule__XMemberFeatureCall__ExplicitOperationCallAssignment_1_1_3_0 : ( ( '(' ) ) ; | public final void rule__XMemberFeatureCall__ExplicitOperationCallAssignment_1_1_3_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDroneScript.g:17906:1: ( ( ( '(' ) ) )
// InternalDroneScript.g:17907:2: ( ( '(' ) )
... | [
"public final void rule__XMemberFeatureCall__ExplicitOperationCallAssignment_1_1_3_0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the constructor of CallStateImpl class. Verifies an instance of the CallStateImpl class could be successfully created. | public void testCallStateImpl() {
assertNotNull("failed to instantiate CallStateImpl.",
new CallStateImpl());
} | [
"public void testCtor() {\n assertNotNull(\"Failed to create a new AddActionStateAction instance.\", action);\n assertTrue(\"The state should be formatted.\", state.isSpecification());\n }",
"@Test\r\n public void testCtor() {\r\n assertNotNull(\"ActiveContestsManagerImpl instance shoul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of peptides that compose this polypeptide | public int size() {
return polypeptide.size();
} | [
"public int getNumberPeptides() {\n return numberPeptides;\n }",
"public int getnPeptides() {\n return nPeptides;\n }",
"public int getNumberValidatedPeptides() {\n return numberValidatedPeptides;\n }",
"public int getPeptidesNumber() {\n return peptidesNumber;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks to see if the selection state (selection / no selection) has changed and if so fire an enablement changed notification. | private void checkSelection() {
boolean oldIsSelection = isSelection;
isSelection = text.getSelectionCount() > 0;
if (oldIsSelection != isSelection) {
fireEnablementChanged(COPY);
fireEnablementChanged(CUT);
}
} | [
"@Override\n\tpublic void selectionChanged() {\n\t\tif (listenToSelectionChanges) {\n\t\t\tsendWhenPossible(SendCond.ALWAYS);\n\t\t}\n\t}",
"public void selectionChanged () {\n\t\tcheckWidget();\n\t\tOS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilitySelectedChildrenChangedNotification.id);\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all private end point connections for a specific private link service. | Observable<PrivateEndpointConnection> listPrivateEndpointConnectionsAsync(final String resourceGroupName, final String serviceName); | [
"public List<PrivateLinkServiceConnection> privateLinkServiceConnections() {\n return this.privateLinkServiceConnections;\n }",
"PrivateEndpointConnectionsClient getPrivateEndpointConnections();",
"public List<PrivateEndpointConnectionInner> privateEndpointConnections() {\n return this.privateE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the dcp property. | public void setDCP(final DCPList value) {
this.dcp = value;
} | [
"void setDPID(java.lang.String dpid);",
"public void setDSCP(int dSCP) {\r\n\t\tthis.DSCP = dSCP;\r\n\t}",
"public void setCdpFlag(String cdpFlag) {\r\n\t\tthis.cdpFlag = cdpFlag;\r\n\t}",
"public void setDpId(Number value) {\n setAttributeInternal(DPID, value);\n }",
"public void setCdcs(java.lan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets type to the value of s | public void setType(String s) {
// validate first
if (s == null || s.length() == 0) {
throw new IllegalArgumentException("Invalid type string: " + s);
}
this.set("TYPE", s);
} | [
"public void setType( String pType )\r\n {\r\n mType = pType;\r\n }",
"public void setType(String newVal) {\n if ((newVal != null && this.type != null && (newVal.compareTo(this.type) == 0)) || \n (newVal == null && this.type == null && type_is_initialized)) {\n return; \n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
buttonClick Will initalize the gameComplete MediaPlayer. | public void initializeGameComplete() {
gameComplete = MediaPlayer.create(context, R.raw.gameoversound);
} | [
"public void initializeButtonClick() {\n buttonClick = MediaPlayer.create(context, R.raw.buttonclicked3);\n }",
"public void startButton(ActionEvent event) {\n\t\t\t\t\n\t\t\t\tuserPlayer.setCycleCount(MediaPlayer.INDEFINITE);//Allow the media to play indefinitely until the 'pauseButton' button is pressed\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get location of linux native | private String getLinuxLocation() {
String nativeLocation =null;
boolean is64bit = (System.getProperty("os.arch").indexOf("64") != -1);
if(is64bit){
nativeLocation = LINUX_64;
}
else{
nativeLocation = LINUX_32;
}
return nativeLocation;
} | [
"private static String nativeLocationInJar() {\n\t\tString OS = System.getProperty(\"os.name\");\n\t\tString arch = System.getProperty(\"os.arch\");\n\t\tlog.info(\"Found OS={}, arch={}\", OS, arch);\n\t\tString key = OS+\"_\"+arch;\n\t\tswitch(key)\n\t\t{\n\t\tcase \"Linux_amd64\":\n\t\t\treturn \"native/MANIFEST.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Below we will inflate "single_row_notification" layout. | @Override
public NotificationRecyclerAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent,
int viewType) {
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
View view = inflater.inflate(R.layout.single_row_n... | [
"private void setupNotificationLayout() {\n //Setup notification area to begin date-set process on click.\n notificationLayout.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n showTimerPickerDialog(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ModuleList__Group__1__Impl" $ANTLR start "rule__ModuleList__Group__2" ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/srcgen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:1126:1: rule__ModuleList__Group__2 : rule__ModuleList__Group__2__Impl rule__ModuleLis... | public final void rule__ModuleList__Group__2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:1130:1: (... | [
"public final void rule__ModuleList__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests if a empty cart can be set to another empty ArrayList | @Test
public void setCartEmptyCartToAnotherEmptyList() {
ArrayList<IProduct> testList = new ArrayList<>();
cart.setCart(testList);
assertTrue(cart.viewCart().isEmpty());
} | [
"@Test\n public void setCartEmptyCartToAnotherListWithMoreThanOneProductInIt() {\n ArrayList<IProduct> testList = new ArrayList<>();\n testList.add(products.get(0));\n testList.add(products.get(1));\n cart.setCart(testList);\n assertTrue(cart.viewCart().contains(products.get(0)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter of the property which_interface | public HInterface getWhich_interface() {
/* HConfiguration c = (HConfiguration) this.link_to_interface.getConfiguration();
HConfiguration topC = (HConfiguration) c.getTopConfiguration();
return topC.getInterface(this.link_to_interface.toString()); */
return link_to_interface;
} | [
"String getInterface();",
"public java.lang.Object getInterface()\n {\n return this._interface;\n }",
"public String interfaceName() {\n return this.innerProperties() == null ? null : this.innerProperties().interfaceName();\n }",
"public Interface getInterface() {\n\t\treturn this.iface... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a geometric object with the specified color and filled value | public GeometricObject(String color, boolean filled) {
dateCreated = new java.util.Date();
this.color = color;
this.filled = filled;
} | [
"public GeometricObject(String color, boolean filled) {\n\t\t dateCreated = new Date();\n\t\t this.color = color;\n\t\t this.filled = filled;\n\t }",
"public SimpleGeometricObject(String color, boolean filled) {\r\n this.dateCreated = new java.util.Date();\r\n this.color = color;\r\n this.filled = filled... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Fuvr' attribute. The default value is "0.0". | double getFuvr(); | [
"public double getFvalue() {\r\n return fvalue;\r\n }",
"public float getVFloat() {\n return vFloat_;\n }",
"float getVFloat();",
"@Override\n\tpublic float getRealFloat() {\n\t\treturn r.floatValue();\n\t}",
"public float getVolum() {\n return volum;\n }",
"public float getVlValor()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |