query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
repeated .edcdatatypes.EdcPayload.EdcMetric metric = 5000; repeated .edcdatatypes.EdcPayload.EdcMetric metric = 5000; can be zero, so optional | java.util.List<com.eurotech.cloud.message.protobuf.EdcPayloadProto.EdcPayload.EdcMetric>
getMetricList(); | [
"com.eurotech.cloud.message.protobuf.EdcPayloadProto.EdcPayload.EdcMetric getMetric(int index);",
"com.eurotech.cloud.message.protobuf.EdcPayloadProto.EdcPayload.EdcMetric.ValueType getType();",
"public Builder addMetric(com.eurotech.cloud.message.protobuf.EdcPayloadProto.EdcPayload.EdcMetric value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the current quote character. | public char getQuoteCharacter() {
return this.quoteCharacter;
} | [
"public Character getQuoteChar() {\n\t\treturn quote;\n\t}",
"public String getQuoteCharacter()\n {\n return this.quoteCharacter;\n }",
"public char openQuote() {\n return '\"';\n }",
"public String getQuoteEscapeCharacter() {\n return this.quoteEscapeCharacter;\n }",
"String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the record component attribute appender for a given record component. | RecordComponentAttributeAppender getRecordComponentAppender(); | [
"FieldAttributeAppender getFieldAppender();",
"String getAppenderName();",
"RecordComponentDescription getRecordComponent();",
"public Appender<E> getAppender(String name) {\n if (name == null) {\n return null;\n }\n for (Appender<E> appender : appenderList) {\n if (name.equals(appender.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int64 duration_usec = 2; | long getDurationUsec(); | [
"long getDurationUs();",
"public interface DURATION_INFINITY_NSEC\n{\n\tint value = 134217727;\n}",
"int getDurationSecond();",
"Integer dpdTimeoutSeconds();",
"public int getDurationSecs();",
"private long getDuration() { return System.nanoTime() - start; }",
"long getNsFrameDuration();",
"long getTi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prepare TAPIR Dataset for use in tests, having 1 contact, 1 identifier, 2 machine tags, 1 tag, and 1 endpoint. | private Dataset prepareDataset() {
// create TAPIR dataset with single endpoint
Dataset dataset = new Dataset();
dataset.setKey(UUID.randomUUID());
dataset.setTitle("Beavers");
dataset.addEndpoint(endpoint);
// add single Contact
Contact contact = new Contact();
contact.setKey(1);
c... | [
"private void prepareDataset() {\n \t\tClassificationManager classifierManager = ClassificationManager\n \t\t\t\t.getInstance(filtersList, preprocessorsList);\n \t\tString path = classifierManager.getGoldenDataPath(username);\n \t\tDAO dao = DAO.getInstance(\"FileSystems:\" + path);\n \t\tArrayList<String> labels =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a random job title. | public static String getRandomTitle(Random random) {
int length = titles.size();
if (length < 2) {
return null;
}
int titleIndex = random.nextInt(length);
String title = titles.get(titleIndex);
return title;
} | [
"java.lang.String getJobTitleSnippet();",
"public String getDesiredJobTitle() {\r\n\t\treturn desiredJobTitle;\r\n\t}",
"public String getJob_title() {\r\n return (String) get(\"job_title\");\r\n }",
"public String getRandomName(){\n Random rand = new Random();\n return data.get(rand.n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the clas ref no. | public String getClasRefNo() {
return clasRefNo;
} | [
"public long getClassRef() {\r\n return classRef;\r\n }",
"public int getClassNo() {\n return classNo_;\n }",
"public String getClassNo() {\n return classNo;\n }",
"int getClassNo();",
"public void setClasRefNo(String clasRefNo) {\r\n this.clasRefNo = clasRefNo;\r\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
show the history screen | public void openHistory() {
usingHistoryScreen = true;
myActivity.setContentView(R.layout.history);
Button historyButtonToGame = myActivity.findViewById(R.id.button8);
TextView historyText = myActivity.findViewById(R.id.textView46);
historyText.setText(state.getHistory());
... | [
"public void showHistory(){\r\n history.showList();\r\n }",
"public void showHistory(){\n \tif (historyExample==null) historyExample = new HistoryExample();\n setWidgetAsExample(historyExample);\n }",
"HistoryDisplayRequest display();",
"@UiHandler(\"history\")\n public void showHist... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AstTransition__Group__7" $ANTLR start "rule__AstTransition__Group__7__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:12226:1: rule__AstTransition__Group__7__Impl : ( ';' ) ; | public final void rule__AstTransition__Group__7__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:12230:1: ( ( ';' ) )
// ../org... | [
"public final void rule__AstTransition__Group__7() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:12219:1: ( rule__AstTransition__Grou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test if endpoint "/reports/resource_average" works | @Test
public void testReportAvaregeResouces() throws Exception {
when(survivorsRepository.findAll()).thenReturn(Arrays.asList(survivor, survivor2, survivor3));
this.mockMvc.perform(get("/reports/resource_average").accept(MediaType.parseMediaType("application/json;charset=UTF-8"))).andDo(print())
.andExpect(s... | [
"@Test\r\n\tpublic void testGetBatchComparisonAvg(){\r\n\t\tString date = \"Wed Sep 21 15:48:45 EDT 2016\";\r\n\t\tlog.debug(\"Here it is testGetBatchComparisonAvg Test\");\r\n\t\tgiven().spec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON)\r\n\t\t.when().get(baseUrl+\"all/reports/compare/skill... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the customerNbr value for this ClaimSettlementVO. | public void setCustomerNbr(java.lang.String customerNbr) {
this.customerNbr = customerNbr;
} | [
"public void setCustIdNbr(java.lang.String custIdNbr) {\n this.custIdNbr = custIdNbr;\n }",
"public void setCustomerNumber(java.lang.String customerNumber)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns all relevant Method's of the current active class in a not null List. Methods like toString() will be skipped | public List<Method> getMethods() {
Class<?> currIntf = JetArgument.getCurrent().getElementClass();
return this.getMethods(currIntf);
} | [
"public List<Method> getAllMethods();",
"public abstract List<MethodInstance> methods();",
"List<Method> getAllMethods();",
"public abstract Method[] getMethods();",
"private void getAllMethods() {\n\t\tMethod[] methods = classObject.getDeclaredMethods();\n\t\tSystem.out.println(\"Method: \");\n\t\tfor (Met... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create animation for eyes look at start position | public Animation obtainEyesLookAtStartPosition(final int frame)
{
final AnimationParallel animationParallel = new AnimationParallel();
Node node = this.mainNode.getFirstNode(CharacterHuman.EYE_LEFT);
PositionNode startPosition = this.eyeLeftPosition;
AnimationPositionNode animationPositionNo... | [
"private Animation obtainEyesDizzy()\n {\n if(this.eyesDizzy != null)\n {\n return this.eyesDizzy;\n }\n\n this.eyesDizzy = new AnimationParallel();\n\n Node node = this.mainNode.getFirstNode(CharacterHuman.EYE_LEFT);\n PositionNode startPositionNode = new PositionNode(node);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set if we should reAttach the Fragments in the ViewPager in TVs. | public void setReAttachTVFragments(boolean reAttachTVFragments) {
this.reAttachTVFragments = reAttachTVFragments;
} | [
"public void setReAttachMovieFragments(boolean reAttachMovieFragments) {\n this.reAttachMovieFragments = reAttachMovieFragments;\n }",
"public void updateViewPager (){\n if (bf.pager != null)\n bf.pager.getAdapter().notifyDataSetChanged();\n }",
"private void setupViewPager(ViewPa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor of exception StringException receiving a message by parameter | public StringException(String message){
super(message);
} | [
"public StringException(){\n\t\tsuper(MESSAGE);\n\t}",
"public FormatException(String message) {\n this(null, message);\n }",
"public MyException() {\n super(\"This is my message. There are many like it but this one is mine.\");\n }",
"public SaodException(String string, Exception e) {\n\t\tsupe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The palette (chart color) display setup of the visual. | public void setVisualPalette(VisualPalette visualPalette) {
this.visualPalette = visualPalette;
} | [
"public VisualPalette getVisualPalette() {\n return this.visualPalette;\n }",
"static void update_palette( void )\n\t{\n\t//\tconst unsigned char *color_prom = memory_region( REGION_PROMS );\n\t/*\n\t\tThe actual contents of the color proms (unused by this driver)\n\t\tare as follows:\n\t\n\t\tD11 \"blu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENFIRST:event_txtsoyadActionPerformed TODO add your handling code here: | private void txtsoyadActionPerformed(java.awt.event.ActionEvent evt) {
} | [
"private void Anul_InfintariiTextActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txtserchActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextFieldSvojstvaActionPerformed(java.awt.event.ActionEvent evt) {\n \n }",
"private void txtBusquedaActionPerfo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first project in the ordered set where status = &63;. | public static Project findByStatus_First(int status,
OrderByComparator<Project> orderByComparator)
throws com.liferay.projects.dashboard.project.exception.NoSuchProjectException {
return getPersistence().findByStatus_First(status, orderByComparator);
} | [
"private Project getFirstOpenProject()\n {\n Project[] projects = ProjectManager.getInstance().getOpenProjects();\n return (projects.length > 0) ? projects[0] : null;\n }",
"@GetMapping(path = \"/projects\")\n public List<Project> projects(@RequestParam(\"status\") Optional<String> status, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes whether a template can be resolved by this resolver or not, applying the corresponding patterns. Meant only for use or override by subclasses. | protected boolean computeResolvable(final IEngineConfiguration configuration, final String ownerTemplate, final String template, final Map<String, Object> templateResolutionAttributes) {
if (this.resolvablePatternSpec.isEmpty()) {
return true;
}
return this.resolvablePatternSpec.matc... | [
"public abstract boolean matches(VariableResolver<Boolean> resolver);",
"boolean isAllowSubstitutable();",
"@Override\n public boolean isTemplate() {\n return templateDescriptor != null;\n }",
"public boolean checkTemplates( DefaultRecord is )\r\n {\r\n /* Lists of Templates which are o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the item view. Each item will have the same layout of preset_item.xml | @Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = mLayoutInflater.inflate(R.layout.preset_item, parent, false);
return new ViewHolder(itemView);
} | [
"protected abstract View fillItemViews(View container, int position, ViewGroup parent);",
"private void initViews() {\n removeAllViews();\n this.setOrientation(HORIZONTAL);\n this.setOnTouchListener(this);\n\n TextView textView;\n ImageView imageView;\n for (PickerItem pi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
0xFX18 sound timer = VX | public void setSoundX() {
soundTimer = V[(opcode & 0x0F00) >> 8];
pc += 2;
} | [
"private void opcodeFX18(byte x) {\n timers.setSoundTimer(memory.V[x]);\n PC += 2;\n }",
"MidiVarF8TimingTick createMidiVarF8TimingTick();",
"double getUVRelayTimer1();",
"int getVoiceTime();",
"private void opcodeFX07(byte x) {\n memory.V[x] = timers.getDelayTimer();\n PC += ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Count prime number in 2d array | public void countPrimes(){
int primeNumber = 0;
for (int i=0; i<array.length; i++){
for (int j=0; j<array.length; j++){
if (isPrime(array[i][j])){
primeNumber++;
}
}
}
System.out.println("\nTotal Prime Numbers F... | [
"public int countPrimes() {\r\n int count = 0;\r\n for (int i = 2; i < primes.length; i++) {\r\n if (primes[i]) {\r\n count = count + 1;\r\n }\r\n }\r\n return count;\r\n }",
"public void countPrimes()\n {\n for (int i = 0; i <= input; ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("Trying saving " + this.getCacheDocumentURL()); | public boolean saveDocument(boolean fromOriginalURL){
String filename = Utils.URLSource.getSourceName(this.getDocumentURL());
if(!filename.contains(".")){
filename += ".owl";
}
try {
BufferedWriter out = new BufferedWriter(new FileWriter(filename));
... | [
"public void\n\tsaveDownload();",
"OutputStream getCacheOutputStream();",
"private static void storeCache()\n\t{\n\t\tFile index = new File(cacheDirectory,\".index\");\n\n\t\tsynchronized (downloadHashMap)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tPrintWriter bw = new PrintWriter(index);\n\n\t\t\t\tfor (String key : ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that parses queries by reading the file line by line and calling the appropriate exact/partial search method | public void parseQuery(Path path, boolean exact) throws IOException
{
try(BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8))
{
// Parse each line
String line = reader.readLine();
while(line != null)
{
// Cleaned query string
String[] words = WordParser.parseWords(lin... | [
"public void parseQueries(String query, ThreadSafeInvertedIndex index) \n\t{\n\t\ttry {\n\t\t\tFile file = new File(query);\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tString queryLine;\n\t\t\twhile ((queryLine = br.readLine()) != null) \n\t\t\t{\n\t\t\t\ta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve a product with its reviews. | public Optional<Product> retrieveProductWithReviews(long productId) {
try {
Optional<Product> product = productClient.getProductById(productId);
product.ifPresent(this::addReviews);
return product;
} catch (HttpClientErrorException ex) {
throw handleHttpCl... | [
"public Review retrieveReviews(String productId) {\n delay(1000); // Simulate retrieve\n return new Review(200, 4.5);\n }",
"List<Review> getReviewByProductId(Integer productId);",
"@RequestMapping(value=\"{productId}/review\",method = RequestMethod.GET)\r\n\tpublic List<Review> findProductWith... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a new given vehicle to the array. | public void addVehicleToArray(BEVehicle newVehicle) {
allVehicles.add(newVehicle);
} | [
"@Override\r\n public void add_Vehicle(Vehicle vehicle) {\r\n\r\n if (vehicle.toString().equals(\"Van\")) {//check if van or not\r\n parkingSlots -= 2;\r\n } else {\r\n parkingSlots--;\r\n }\r\n fh.writeData(vehicle);//call filewriter\r\n vehicles.add(vehi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use of this constructor forms new instance of recipe and gives it a new UUID | public Recipe() {
this(UUID.randomUUID());
} | [
"public UUID() {\n data = makeNewGuid();\n }",
"public Recipe createRecipe();",
"public UUIDGenerator() {\n super();\n }",
"public Identifier() {\n\t\tthis(Scheme.UUID, UUID.randomUUID().toString());\n \t}",
"public UUID(String string) {\n FromString(string);\n }",
"@NotNull public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the father instance variable. | public int getFather() {
return father;
} | [
"public FPTreeNode getFather() {\n\t\treturn father;\n\t}",
"public Person GetFather() {\r\n return father;\r\n }",
"public String getFatherName() {\n\t\treturn fatherName;\n\t}",
"public PersonModel getFather() {return this.father;}",
"public String getFatherId() {return this.fatherId;}",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool is_exclusive = 8; | boolean getIsExclusive(); | [
"public abstract boolean isExclusive();",
"Boolean getExclusiveMinimum_java_lang_Boolean_();",
"public boolean isExclusive() {\r\n\t\treturn exclusive;\r\n\t}",
"public Integer getExclusiveflag() {\n return exclusiveflag;\n }",
"public void setExclusiveflag(Integer exclusiveflag) {\n this.e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the employee of the month for the department. | public void setEmployeeOfTheMonth(Employee employeeOfTheMonth) {
this.employeeOfTheMonth = employeeOfTheMonth;
} | [
"public final void setEmployee_Department(myfirstmodule.proxies.Department employee_department)\n\t{\n\t\tsetEmployee_Department(getContext(), employee_department);\n\t}",
"public void setEmployee(Employee employee) {\n this.employee = employee;\n }",
"public void setParkManager(Employee employee) {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks if document name already exists. if it doesn't then the new document is created. If it does already exist, then a dialog is opened to notify user and take them back to main screen. | public void createDocument(View view){
if (numFonts == 0){
notExists.setMessage("Please create a font before starting a document.");
notExists.show();
return;
}
//create Dialog box New Document
AlertDialog.Builder nameDoc = new AlertDialog.Builder(thi... | [
"private static boolean checkDuplicateDocName(User user, String name) {\n\n\t\t// Check if document name is already in user's documents\n\t\tboolean isInvalid = false;\n\n\t\tfor(@SuppressWarnings(\"unchecked\")\n\t\tIterator<Document> iter = user.getDocumentList().iterator(); iter.hasNext(); ) {\n\t\t\tDocument do... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the COM property "RevisionUser" | @DISPID(2)
// = 0x2. The runtime will prefer the VTID if present
@VTID(8)
java.lang.String revisionUser(); | [
"public String getAuthor() {\r\n return this.svnLogEntry.getAuthor();\r\n }",
"Optional<User> getUserOfRevisionToRepresent();",
"@Override\n\tpublic long getModifieduser() {\n\t\treturn _ext_information.getModifieduser();\n\t}",
"public String getModUser() {\n return modUser;\n }",
"public Str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a Collection with all root uris attached to this JaxRsRestlet. | public Collection<String> getRootUris() {
List<String> uris = new ArrayList<String>();
for (RootResourceClass rrc : this.resourceClasses.roots())
uris.add(rrc.getPathRegExp().getPathTemplateEnc());
return Collections.unmodifiableCollection(uris);
} | [
"List<URI> getURIs();",
"public List<String> urls() {\n return this.innerProperties() == null ? null : this.innerProperties().urls();\n }",
"public Collection<String> getUrls()\n\t{\n\t\tif (null == mData.mUrls)\n\t\t{\n\t\t\tArrayList urls = new ArrayList<String>(mData.mUrlMapping.keySet());\n\t\t\tu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the ith "RelationshipType" element | public void removeRelationshipType(int i)
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(RELATIONSHIPTYPE$0, i);
}
} | [
"void unsetRelationType();",
"private void deleteRelationships(Node node, RelationshipType type, Direction direction) {\n\t\tif(!node.hasRelationship(type, direction)) return;\n\t\tIterator<Relationship> iterator = node.getRelationships(type, direction).iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tRelations... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to show the display to enabling internet | private void displayPromptForEnablingInternet() {
final AlertDialog.Builder builder =
new AlertDialog.Builder(getActivity());
final String actionWifiSettings = Settings.ACTION_WIFI_SETTINGS;
final String actionWirelessSettings = Settings.ACTION_WIRELESS_SETTINGS;
final St... | [
"public void showEneableMessageIfNeeded() {\n if (!isNetworkAvailable()) {\n displayPromptForEnablingInternet();\n }\n }",
"private void display_noInternet() {\n progressBar.setVisibility(View.GONE);\n textView.setVisibility(View.VISIBLE);\n }",
"void promptForIntern... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a direct class reference. Useful for static invokation. | public JClass getClassDirect(String fullyQualifiedClassName) {
if (!classCache.containsKey(fullyQualifiedClassName)) {
JClass cls = codeModel.directClass(fullyQualifiedClassName);
classCache.put(fullyQualifiedClassName, cls);
return cls;
}
return classCache.ge... | [
"public ClassType getClassReference() {\n if (clazz == null) {\n throw new IllegalStateException(\"class reference not available\");\n }\n return clazz;\n }",
"public Class getReferenceClass(GenerationContext genContext) {\r\n return resolveClass(genContext);\r\n }",
"public long getCla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new message series | @POST
@Path("/series/")
@Consumes("application/json;charset=UTF-8")
@Produces("application/json;charset=UTF-8")
@RolesAllowed(Roles.SYSADMIN)
@GZIP
@NoCache
public SystemMessageSeriesVo createMessageSeries(SystemMessageSeriesVo seriesVo) throws Exception {
log.info("Creating message ... | [
"public void createSeries() {\n List<ProtocolApplication> seriesApps = new ArrayList<>();\n seriesApps.add(this);\n seriesApps.addAll(subordinateApps);\n series.add(new ProtocolSeries(seriesApps));\n }",
"private void createChannel() {\n Tail tail = new Tail(this.channelName);\n tail.po... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get all emp trainings employees | @RequestMapping(value = "/Training/GetEmpTrainingEmployees", method = RequestMethod.GET, produces = "application/json")
@ResponseBody
public List<Employee> getEmpTrainingEmployees() {
return employeeTrainingService.getEmpTrainingEmployees();
} | [
"public List<Employee> getAllEmployees() \n\t{\n\t\tList<Employee> emp1 = empdb.getAllEmployees();\n\t\treturn emp1;\n\t}",
"public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee emplo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Count grades and return an array with the counted frequencies. | public int[] countGrades(int[] grades) {
int[] gradeFrequencies = new int[11];
for (int grade : grades) {
gradeFrequencies[grade]++;
}
return gradeFrequencies;
} | [
"private int[] calcFrequencies() {\n\t\t\n\t\tint[] arr = new int[26];\n\t\t// your code here\n\t\t\n\t\tfor (int i = 0; i < content.length(); i++) {\n\t\t\tchar letter = content.charAt(i);\n\t\t\tif (letter >= 'a' && letter <= 'z') {\n\t\t\t\tarr[letter - 97] ++;\n\t\t\t}\n\t\t\t\n\t\t\telse if (letter >= 'A' && l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setup for the exitButton and retryButton. When exitButton is clicked, the game goes back to MainActivity. When retryButton is clicked, the game resets its timer and generates a new board. When languageButton is clicked, the game changes its UI language to Chinese. When scoreboardButton is clicked, the view switches to ... | private void setupButtons() {
exitButton = findViewById(R.id.exitButton);
retryButton = findViewById(R.id.retryButton);
languageButton = findViewById(R.id.languageButton);
scoreboardButton = findViewById(R.id.scoreBoardButton);
replayButton = findViewById(R.id.replayButton);
... | [
"private void wrongAnswerButtonOnClick()\r\n {\r\n //if the button clicked has the wrong answer, then do the following;\r\n noOfLifelines += 1;\r\n\r\n vibrate();\r\n noMPlayer.start();\r\n streak = 0;\r\n streakEditText.setText(streak + \"\");\r\n\r\n if(noOfLife... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODOPPA1 Solution Start 1) Parse the scene using the ray1 parser | public void setupScene(ScenePath p) {
Parser parser = new Parser();
Scene scene = (Scene) parser.parse(p.getFile(), Scene.class);
// 2) Load the first light in the XML file
List<Light> lights = scene.getLights();
Light light = lights.get(0);
this.lightPos = new Vector3((float)light.p... | [
"public void parseScene(String sceneFileName) throws IOException, RayTracerException\r\n {\r\n FileReader fr = new FileReader(sceneFileName);\r\n\r\n BufferedReader r = new BufferedReader(fr);\r\n String line = null;\r\n int lineNum = 0;\r\n System.out.println(\"Started parsing... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'var235' field. | public com.dj.model.avro.LargeObjectAvro.Builder clearVar235() {
var235 = null;
fieldSetFlags()[236] = false;
return this;
} | [
"public com.dj.model.avro.LargeObjectAvro.Builder clearVar123() {\n var123 = null;\n fieldSetFlags()[124] = false;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder clearVar234() {\n var234 = null;\n fieldSetFlags()[235] = false;\n return this;\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets (as xml) the "TotalCredit" element | void xsetTotalCredit(x0101.oecdStandardAuditFileTaxPT1.SAFmonetaryType totalCredit); | [
"void setTotalCredit(java.math.BigDecimal totalCredit);",
"public void setTotalCredit(java.lang.String totalCredit) {\r\n this.totalCredit = totalCredit;\r\n }",
"void xsetTotalDebit(x0101.oecdStandardAuditFileTaxPT1.SAFmonetaryType totalDebit);",
"public void setTotalDebit(java.math.BigDecimal tota... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a new keyboard selection handler for the specified table. | public CellTableKeyboardSelectionHandler(AbstractCellTable<T> table) {
super(table);
this.table = table;
} | [
"private void createKeybindings(JTable table) {\n ActionMap actionMap = table.getActionMap();\n// im.put(enter, im.get(tab));\n\n actionMap.put(\"Action.NextCell\", new NextCellAction(table, \"pur\"));\n }",
"SelectionKeyHandler getSelectionKeyHandler();",
"TableSelectionButtonListener( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/MovieImage addImageToMovie(long id, MultipartFile file); void deleteMovieImage(String name); String setMainImageToMovie(long id, MultipartFile file); String addImageToNewMovie(MultipartFile file); | void createAndSaveNewMovie(String movieName, String description,String dateRange, List<Long> types,MultipartFile mainMovieImage,
List<MultipartFile> movieImages, String trailerLink, Seo seo); | [
"public String savePostImage(MultipartFile multipartFile, String fileName);",
"public void storeMovie() {\n\n logger.log(Level.INFO, \"FileController / storeMovie=\" + file);\n \n if (file != null) {\n String fileName=file.getFileName();\n logger.log(Level.INFO, \"FileCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the magnitude within which we will consider the requested motor power to have been reached. | void setPowerMagnitudeTolerance(AarrePowerMagnitude powerMagnitude); | [
"public void setMagnitude(float magnitude) {\n this.magnitude = magnitude;\n }",
"public void setMagnitude(int magnitude)\r\n {\r\n this.magnitude = magnitude; \r\n }",
"public void setMinMagnitude(double magnitude);",
"public void setMagnitude(float mag) {\n scaleVector... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Subproject__Group__1__Impl" $ANTLR start "rule__Subproject__Group__2" InternalMyDsl.g:5341:1: rule__Subproject__Group__2 : rule__Subproject__Group__2__Impl rule__Subproject__Group__3 ; | public final void rule__Subproject__Group__2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:5345:1: ( rule__Subproject__Group__2__Impl rule__Subproject__Group__3 )
// InternalMyDsl.g:5346:2: rule__Subproject__Group__2__Impl ... | [
"public final void rule__Subproject__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:5318:1: ( rule__Subproject__Group__1__Impl rule__Subproject__Group__2 )\n // InternalMyDsl.g:5319:2: rule__Subproject__G... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new DoubleHolder object with its value field initialized to 0.0. | public DoubleHolder() {} | [
"public DoubleHolder(double initial) {\n value = initial;\n }",
"public DoubleValue() {\n this.value = 0;\n }",
"public MyDouble() {\n this.setValue(0);\n }",
"public DoubleWrapper() {}",
"public DoubleField() {\n\t\tthis(\"\", Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
time: O(N^2) preconditions: int x,y 0 <= x < xSize 0 <= y < ySize postconditions: checks surroudning 8 cells for mines to find of mines near returns the number of mines near | private int closeMines(int x, int y) {
int minX, minY, maxX, maxY;
int result = 0;
//boundaries
if (x <= 0) minX = 0;
else minX = x - 1;
if (y <= 0) minY = 0;
else minY = y - 1;
if (x >= xSize - 1) maxX = xSize;
else maxX = x + 2;
if (y >= ySize - 1) maxY = ySize;
... | [
"private int surroundingMines(int x, int y) {\r\n int startingX, startingY, endingX, endingY;\r\n int count = 0;\r\n \r\n // putting condition for edges\r\n startingX = startEdgeConditon(x);\r\n startingY = startEdgeConditon(y);\r\n endingX = endEdgeConditon(x);\r\n endingY = endEdgeCond... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a StorageProvider which captures events and passes them to the audit queue. | public StorageProvider createWithAudit(StorageProviderCredentials credentials,
String accountSubdomain,
TaskQueue auditQueue) {
UserUtil userUtil = new SimpleUserUtil();
StorageProvider storageprovider = create(credent... | [
"void create(Storage<?> storage);",
"public interface LogEventProvider {\n\n\t/**\n\t * This method returns the current LogEvent the LogEventProvider has stored\n\t * \n\t * @return LogEvent The stored LogEvent\n\t */\n\tpublic LogEvent getLogEvent();\n\n\t/**\n\t * This method sets the LogEvent for the LogEventP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the standardized data correlation coefficient of an item and the totals of the items` | public double standardizedCorrelationCoefficient(int index){
if(!this.dataPreprocessed)this.preprocessData();
if(index<1 || index>this.nItems)throw new IllegalArgumentException("The first item index, " + index + ", must lie between 1 and the number of items plus one (for totals)," + (this.nItems+1) + ",... | [
"public double standardizedCorrelationCoefficient(String itemName){\n if(!this.dataPreprocessed)this.preprocessData();\n if(!this.covariancesCalculated)this.covariancesAndCorrelationCoefficients();\n int index = this.itemIndex(itemName);\n return this.standardizedCorrelationCoefficients[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will return total amount of sale orders search by cell, case insensitive | public double searchTotalSaleAmountByCell(String cell)
{
Session session = HibernateUtil.getInstance().getSession(this.appId);
double totalSaleAmount = 0 ;
try
{
Query<Object> query = session.getNamedQuery("searchTotalSaleAmountByCell");
query.setParameter("c... | [
"public int searchTotalSaleOrderByCell(String cell)\n {\n Session session = HibernateUtil.getInstance().getSession(this.appId);\n try \n {\n Query<EntitySaleOrder> query = session.getNamedQuery(\"searchSaleOrderByCell\");\n query.setParameter(\"cell\", \"%\" + cell.toLo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the given list of Tasks to the given model | public void addTaskToModel(Model model, List<Task> tasksToAdd) throws Exception{
for(Task p: tasksToAdd){
model.addTask(p);
}
} | [
"void addToModel(Model model, List<Task> tasksToAdd) throws Exception{\n for(Task p: tasksToAdd){\n model.addTask(p);\n }\n }",
"void addToModel(Model model, Task... tasksToAdd) throws Exception{\n for(Task t: tasksToAdd){\n model.addTask(t);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the item at the given index, where 0 is the front, 1 is the next item, and so forth. If no such item exists, returns null. Must not alter the deque! | public T get(int index) {
//First check if the specified item is exist
//If not, return null
if (index > size) {
return null;
}
//Initialize a Node object to traverse the list
Node p = sentinel;
//Find the specified element
while (index != -1) {
p = p.next;
... | [
"public T get(int index) {\n if (index > size - 1) {\n return null;\n }\n int i = nextFirst + index + 1;\n if (i <= len - 1) {\n return items[i];\n } else {\n i -= len;\n return items[i];\n }\n }",
"public T get(int index) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints on the "System.out" stream that the ZTYPE of specID is not soported. | public static void printSpecIDZTypeNotSoported(String specIDZType) {
System.out.println();
System.out.println("**************************************************");
System.out.println("The ZTYPE: " + specIDZType + " is not soported yet.");
System.out.println("****************************... | [
"public void printSuspects() {\n\t\tfor(String name : suspects) {\n\t\t\tif(name == null)\t\t\t\t\t\t//if name is empty then skip\n\t\t\t\tcontinue;\n\t\t\tSystem.out.println(name);\n\t\t}\n\t\t\t\n\t}",
"public void printStatus() {\n System.out.print(arr.length + \"\\t\");\n if (isSorted(arr))\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
In onPause() and onDestroy(), if the counterIsActive flag is true, cancel countDownTimer. | @Override
protected void onPause() {
super.onPause();
if(counterIsActive){
countDownTimer.cancel();
}
} | [
"private void stopCountDownTimer() {\n countDownTimer.cancel();\n }",
"private void stopCountdown() {\n if (countDownTimer != null) {\n countDownTimer.cancel();\n countDownTimer = null;\n }\n }",
"@Override\r\n protected void onStop() {\r\n super.onStop... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Go to Description an pass the movieItem data to it using intent.putExtra() | @Override
public void onClick(View v) {
Intent intent = new Intent(context, Description.class);
intent.putExtra("movieItem", movieItem);
context.startActivity(intent);
} | [
"@Override\n public void onClick(View v) {\n Intent i = new Intent(context, DetailActivity.class);\n // i.putExtra(\"title\", movie.getTitle()); this gets removed from step 33.3 changing the way title gets passed in\n // Step 31 put in a parcel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the available terms for bioportal submission | public TermsForBioportalBean getAvailableTermsForSubmission(String dataset)
throws SQLException {
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rset = null;
ResultSet sentenceSet = null;
ArrayList<String> regStrctures = new ArrayList<String>();
ArrayList<String> regCharacters = new A... | [
"String legalTerms();",
"Set<String> getTerms();",
"public List<String> getTerms() {\r\n return Collections.unmodifiableList(terms);\r\n }",
"List<DocTerm> getDocTermsFor(String term);",
"public abstract Set<String> getTerms(Document doc);",
"private VocabularyTerms getVocabularyTerms(Collection... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Checks if json file is correctly formatted with enough information. Also creates maps from database by matching dbNames and other variables from the genestation to obtain, feature ID, Organism ID, Cvterm ID, and so on. | private static void initializeJsonFile(JsonTuple jTuple) {
featureQue = new ArrayDeque<FeatureTuple>();
featureLocQue = new ArrayDeque<FeatureLocTuple>();
if (jTuple.columns.containsKey("NAME") || jTuple.baseName != null) {
System.out.println("Json File has depreciated feature of nam... | [
"public boolean importDataFromJSON(){\n try {\n File dbJsonPath = new File(FileUtils.getAppDir(appContext) + \"/databases/\" + DB_NAME + \".json\");\n if(dbJsonPath.exists() && !dbJsonPath.isDirectory()) {\n ImportConfig config = new ImportConfig(this, dbJsonPath, ImportC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if matrix is a partial order Must be reflexive, symmetric, and transitive | public void checkPartialOrder(int[][] M, int size) {
if(reflexive == true && antiSymmetric == true && transitive == true) {
partialOrder = true;
} else {
partialOrder = false;
}
} | [
"@Override\r\n\tpublic boolean isPartialOrder() {\r\n\t\treturn partialOrderReduction;\r\n\t}",
"boolean hasIsPartial();",
"public boolean areParallelDiagonalsSame(int[][] matrix) {\n if (matrix == null || matrix.length == 0 || matrix[0].length == 0) {\n return false;\n }\n int r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the integer map that applies a function to the results of this map. | default DiscreteIntMap2D pushForwardToInt(DoubleToIntFunction function) {
return (x, y) -> function.applyAsInt(getValueAt(x, y));
} | [
"public static <V> IntMap<V> createIntMap() {\n return CollectionUtils.getCollectionFactory().createIntMap();\n }",
"default ImmutableIntKeyMap<ImmutableIntSet> groupByInt(IntToIntFunction function) {\n final MutableIntKeyMap<MutableIntArraySet> map = MutableIntKeyMap.empty();\n for (int value :... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the second point. | public IPoint getSecondPoint()
{
Set<IPoint> vertices = this.getVertices();
Object[] verticesArray = vertices.toArray();
IPoint secondPoint = (IPoint)verticesArray[1];
return secondPoint;
} | [
"public GPoint getSecondPoint(){\n return(point2);\n }",
"public Point getPoint2()\r\n {\r\n return point2;\r\n }",
"public Point getP2(){\n return this.p2;\n }",
"public Point2D getPoint();",
"public double getSecondValue()\n {\n return this.getSecondVector().getEl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method sets the activity server. | public void setActivityServer(ActivityServer activityServer) {
_activityServer = activityServer;
} | [
"public void setServer(Server server);",
"private void setServer(Server s){\n server = s;\n }",
"public void setServer(Server server) {\n this.server = server;\n server.setScreen(this);\n }",
"public void setActivity(Activity activity) {this.activity = activity;}",
"public ActivityServer ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to swich on the ATM | public void switchAtm(boolean flag); | [
"public static void runAtm(Context context) throws NumberFormatException, IOException {\n // Run the ATM interface\n int userId = 0;\n boolean userAuthen = false;\n // Create a map of all roles in the database\n EnumMapRoles roleMap = new EnumMapRoles(context);\n while ((userAuthen != true)) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ sortByPhenotype Sort by the phenotypes | public void sortByPhenotype() {
int ind[] = phenotypeName.sort(); // Sort the phenotype names
selectPhenotypeObject(ind);
Text lst = new Text();
for (int i = 0; i < phenotypeName.size; i++) {
int s[] = selectPhenotypeIndexObject(new int[]{i});
for (int j = 0; j... | [
"public void sortPhenotype() {\n int ind[] = phenotypeName.sort(); // Sort the phenotype names\n selectPhenotypeObject(ind);\n }",
"public void sortByPhenotypeHierarchical() {\n // int indp[] = phenotypeName.sort (); // Sort the phenotype names\n // selectPhenotypeObject ( indp );... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.forecast,menu); | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.forecast,menu);
return true;
} | [
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.popmovies_menu, menu);\n\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.quote_menu, menu);\n\n }",
"@Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
After obtaining object relation 'CONT2' and storing old controller, controller cont2 is connected, then this controller is setting as current. Sets the old controller as current. Has OK status if set and gotten controllers are not equal. | public void _setCurrentController() {
XController cont2 = (XController) tEnv.getObjRelation("CONT2");
XController old = oObj.getCurrentController();
result = false;
if (cont2 == null) {
log.println("No controller no show");
} else {
oObj.connectController... | [
"public void _connectController() {\n XController cont2 = (XController) tEnv.getObjRelation(\"CONT2\");\n XController old = oObj.getCurrentController();\n result = false;\n\n if (cont2 == null) {\n log.println(\"No controller no show\");\n } else {\n oObj.con... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column news_bean.imageurls | public String getImageurls() {
return imageurls;
} | [
"java.lang.String getHotelImageURLs(int index);",
"public List<String> getImageUrls()\n {\n return imageUrls;\n }",
"public String getImagesUrl() {\n\t\treturn this.imagesUrl;\n\t}",
"public String getPicUrls() {\n return picUrls;\n }",
"public List findByImgurl(java.lang.String imgur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the formulaTreatBlanksAs value for this CustomField. | public com.sforce.soap._2006._04.metadata.TreatBlanksAs getFormulaTreatBlanksAs() {
return formulaTreatBlanksAs;
} | [
"public void setFormulaTreatBlanksAs(com.sforce.soap._2006._04.metadata.TreatBlanksAs formulaTreatBlanksAs) {\r\n this.formulaTreatBlanksAs = formulaTreatBlanksAs;\r\n }",
"public Boolean getDisableValueTrimming() {\n return this.disableValueTrimming;\n }",
"void convertBlanksToNull();",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return true if the node is resizable when the parent container is resized false otherwise. | public static Boolean isResizableWithParent(Node node) {
if (node.hasProperties()) {
Object value = node.getProperties().get(RESIZABLE_WITH_PARENT);
if (value != null) {
return (Boolean)value;
}
}
return true;
} | [
"boolean isResizable();",
"boolean isDockedLayoutResizable();",
"public static boolean isResizable() {\n return clientAccessor().isResizableMode();\n }",
"public boolean isResizable() {\r\n return environment.getAppletFrame().isResizable();\r\n }",
"public boolean getResizable() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register to listen for radio mode change events from the HAL. | public void registerRadioModeChangeHandler(
WifiNative.VendorHalRadioModeChangeEventHandler handler) {
synchronized (sLock) {
mRadioModeChangeEventHandler = handler;
}
} | [
"public interface MyModeChangedListener {\r\n\t\r\n\t/**\r\n\t * @param mode\r\n\t * new EV mode\r\n\t */\r\n\tvoid onModeChange(int mode);\r\n\r\n}",
"private void setRadioOnCheckedChangedEvent() {\n ((RadioButton) findViewById(R.id.radio_akb48)).setOnCheckedChangeListener(this);\n ((Rad... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test nr 6 weryfikacja koloru ikonki | @Then("^Pobranie koloru$")
public void Pobranie_koloru() throws Throwable {
WebDriverWait wait = new WebDriverWait(driver, 15);
WebElement c9 = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id=\"30373\"]/div/div/div/div/div/div/div/p[3]/a")));
String color = driver.find... | [
"@Test\n public void testValidarSiGanoHorizontal5TirosMismoColor() {\n Tablero tablero = new Tablero(10);\n boolean expResult = true;\n tablero.validarJugada(0, 0, \"N\");\n tablero.validarJugada(1, 0, \"N\");\n tablero.validarJugada(2, 0, \"N\");\n tablero.validarJugada... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method generates JSON file out of JSONObject. | void generateJSON(JSONObject object, String name); | [
"public static void createJsonFile(JsonObject json) throws IOException {\n\r\n FileWriter file = new FileWriter(\"outputfile\", false);\r\n try {\r\n file.write(Jsoner.prettyPrint(json.toJson(),2));\r\n file.flush();\r\n } catch (IOException e) {\r\n out.println... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
///////////////////// Get largest child // ///////////////////// Gets the largest child of index | private int largestChild(int index) {
int largest;
if (2 * index + 1 > this.size) {
return (2 * index);
} else {
largest = 2 * index;
if (this.__heap.get(largest).getCGPA() < this.__heap.get(2 * index + 1).getCGPA()) {
largest = 2 * index + 1;
... | [
"public long getHighestChildNumber() {\n\t\treturn children.keySet().stream().mapToLong(l -> l).max().orElse(0);\n\t}",
"int largestChildOrGrandChild(int pos) {\n\t\tint largestValueIndex = 0;\n\t\tif (hasChildren(pos)) {\n\t\t\tlargestValueIndex = 2*pos+1;\n\t\t\tif (MMHeap[2*pos+2].compareTo(MMHeap[2*pos+1]) > ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PriorityClassName to apply to workflow pods. | public String getPodPriorityClassName() {
return podPriorityClassName;
} | [
"@Test\n public void podPriorityClassNameTest() {\n // TODO: test podPriorityClassName\n }",
"@Nullable\n PriorityClass findPriorityClassByName(@NotNull String priorityClassName);",
"@NotNull\n PriorityClass getDefaultPriorityClass();",
"@NotNull\n PriorityClass getPersonalPriorityClass();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Analizamos las configuraciones que tiene asignadas la persona, por si faltan. | private void prepareConfiguration() {
if (configurationList == null || configurationList.size() < PersonOptions.values().length) {
LOG.log(Level.INFO, "prepareConfiguration() - Analizando las configuraciones de la persona: {0}", getFullName());
for (Person.PersonOptions option : Person.P... | [
"public void mostrarConfiguracion(){\n\t\tSystem.out.println(\"Acción: \"+RecuperadorPropiedadesConfiguracionGenerales.getInstance().getAction());\n \tSystem.out.println(\"Nivel de paralelismo: \"+RecuperadorPropiedadesConfiguracionGenerales.getInstance().getNivelParalelismo());\n \tSystem.out.println(\"Usa P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the status name. | public void setStatusName(String statusName) {
this.statusName = statusName;
} | [
"public void setStatusName(String statusName) {\r\n this.statusName = statusName;\r\n }",
"public void setStatusName(String statusName);",
"@Override\n\tpublic void setStatusName(java.lang.String statusName) {\n\t\t_dmGtStatus.setStatusName(statusName);\n\t}",
"public void setStateName(String value)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the x axis coordinate for the xAxisNumber x axis | public PlotPosition setX( double x, int xAxisNumber )
{
assert xAxisNumber > 0 : "xAxisNumber starts at 1";
put( X + xAxisNumber, x );
return this;
} | [
"private void setXAxis() {\n XAxis xAxis = mChart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setGranularityEnabled(true);\n xAxis.setCenterAxisLabels(false);\n xAxis.setDrawGridLines(false);\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setValueFormat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a domain factory for the specified class. | @SuppressWarnings("unchecked")
public static <T> IDomainFactory<T> getFactory(Class<T> clazz) {
for (IDomainFactory<?> factory : instance) {
String alias = factory.getAlias(clazz);
if (alias != null) {
return (IDomainFactory<T>) factory;
}
... | [
"Class getDomainClass();",
"Domain createDomain();",
"DomainType createDomainType();",
"GetDomainType createGetDomainType();",
"public static NavajoFactory getInstance(String className) {\n\n\t\tsynchronized (semaphore) {\n\t\t\tif (alternativeFactories.get(className) != null) {\n\n\t\t\t\tif (impl != null)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new priority class | @NotNull
PriorityClass createPriorityClass(@NotNull String name, @NotNull String description, int priority)
throws InvalidPriorityClassNameException, InvalidPriorityClassDescriptionException, DuplicatePriorityClassNameException; | [
"public Priority() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"@NotNull\n PriorityClass createPriorityClass(@NotNull String name, @NotNull String description, int priority, @NotNull Set<SBuildType> buildTypes)\n throws InvalidPriorityClassNameException, InvalidPriorityClas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new Cover object with initial values for cover name and image resource. | public Cover(String coverName, int imageResourceId) {
mCoverName = coverName;
mImageResourceId = imageResourceId;
} | [
"public Cover(String coverName, String artistName, int imageResourceId) {\n mCoverName = coverName;\n mArtistName = artistName;\n mImageResourceId = imageResourceId;\n }",
"private void setupDefaultCoverImage() {\n try {\n ColorAdjust colorAdjust = new ColorAdjust();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensures that the height of the thumb is equal size. | @Override
protected Dimension getMaximumThumbSize()
{
return new Dimension(size, size);
} | [
"@Override\n protected Dimension getMinimumThumbSize()\n {\n return new Dimension(size, size);\n }",
"public void setThumbHeight(int thumbHeight) {\n\t Assert.isTrue(thumbHeight <= 0, \"Height must be greater than 0!\");\n\t this.thumbHeight = thumbHeight;\n\t}",
"public int getThumbnailHe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the employees before and after the current employee in the ordered set where positionId = &63;. | @Override
public Employee[] findByPositionId_PrevAndNext(long employeeId,
long positionId, OrderByComparator orderByComparator)
throws NoSuchEmployeeException, SystemException {
Employee employee = findByPrimaryKey(employeeId);
Session session = null;
try {
sess... | [
"public org.opencps.usermgt.model.Employee[] filterFindByG_W_MJP_PrevAndNext(\n\t\tlong employeeId, long groupId, long workingUnitId, long mainJobPosId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.opencps.usermg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shortcut method to make a mob remove an item and put it into their inventory. | public boolean postRemove(MOB mob, Item item, boolean quiet); | [
"void removeFromInventory(IEquipableItem item);",
"void removeFromInventory(Item item) {\n inventory.remove(item);\n }",
"public void remove(String item) {\n Inventory removeItem = em.find(Inventory.class, item);\n inventoryList.remove(removeItem);\n em.remove(removeItem);\n }",
"v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Call a method here which is named method1(), and then implement it below, right after the main method. All that method1() is to do is print out "This is from method1." | public static void method1(){
System.out.println("This is from method 1.");
} | [
"public void method1() {\n\t\t\tSystem.out.println (\"Child's method1()\");\r\n\t\t}",
"public void method1() \r\n\t\t{\r\n\t\t System.out.println (\"Child's method1()\");\r\n\t\t}",
"public static void main(String[] args) {\n\n method2();\n System.out.println(\"Hello\");\n\n }",
"public void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "terminator" D:\\workspace\\s\\JLLVM_b\\src\\cn\\edu\\sjtu\\jllvm\\VMCore\\Parser\\LLVM.g:186:1: terminator returns [Instruction inst] : ( ( 'ret' ( VOID | return_type e1= expression ) | UNWIND ) | (t= 'br' (b0= block_label | BOOLEAN_TYPE e2= expression ',' b1= block_label ',' b2= block_label ) |t= 'switch... | public final LLVMParser.terminator_return terminator() throws RecognitionException {
LLVMParser.terminator_return retval = new LLVMParser.terminator_return();
retval.start = input.LT(1);
Token t=null;
Token it1=null;
Token it2=null;
Token VOID40=null;
T... | [
"IRBasicBlock getExit();",
"private void parseReturnStatement() {\n check(Token.RETURN);\n\n if (EXPR_STARTERS.contains(nextToken.kind)) {\n Struct type = parseExpr().type;\n if (!(type.assignableTo(currentMethod.type))) {\n error(\"Invalid expression type in ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the tableCount value for this GetDBMetaDataResponse. | public java.math.BigInteger getTableCount() {
return tableCount;
} | [
"public Hashtable<String, Integer> getCountTable() {\n\t\treturn countTable;\n\t}",
"public int getNbTables() {\n\t\treturn nbTables;\n\t}",
"private HashMap<String,Integer> countInTableWrap(){\n HashMap<String,Integer> outTablesCounted=new HashMap<>();\n DAO.Connection connection = DAO.Connection... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add the appropriate geometries to show a point and the coordinates for that point. | public void addGeometries(GeographicPosition pos, String label)
{
// Create the geometries
PointGeometry mainPoint = getPointGeometry(pos, Color.GREEN, 5, 998);
PointGeometry outlinePoint = getPointGeometry(pos, Color.DARK_GRAY.darker(), 10, 999);
Pair<TileGeometry, PolylineGeometry>... | [
"public void addPoint(Point p) {\r\n\t\tOptional<Polygon> selected = model.getSelected();\r\n\t\tif (!selected.isPresent()) {\r\n\t\t\t// create the polygon\r\n\t\t\tPolygon poly = new Polygon();\r\n\t\t\tpoly.addPoint(p.x, p.y);\r\n\t\t\t\r\n\t\t\tmodel.addPolygon(poly);\r\n\t\t\tmodel.makeCurrent(poly);\r\n\t\t} ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Especifica o valor do atributo rotina. | public void setRotina(String rotina20) {
this.rotina = rotina20;
} | [
"public String getRotina() {\n return rotina;\n }",
"public int obtenerRotacion(){\n return this.rotacion;\n }",
"private void setARo(final String a) {\r\n this.aRo = a;\r\n }",
"public void setAmaterno(String amaterno) {\r\n this.amaterno = amaterno;\r\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes the amount of hours remaining until cullTime | public double hoursToDate() {
Date oldDate = new Date();
return (this.cullTime.getTime() - oldDate.getTime()) / HOURS_IN_MILLIS;
} | [
"public long elapsedHours(){\n if(isRunning){\n return ((System.currentTimeMillis() - t0) / 3600000L);\n }else{\n return ((t1 - t0) / 3600000L);\n }\n }",
"private double getTimeRemainingInUTCDay(){\n\t\tdouble daysLeftInDay;\n\n\t\tInstant origin = Instant.ofEpochMil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column REP_INFO.REP_DATE | public void setREP_DATE(Date REP_DATE) {
this.REP_DATE = REP_DATE;
} | [
"public Date getREP_DATE() {\r\n return REP_DATE;\r\n }",
"public void setResDate(Date resDate) {\r\n\t\tthis.resDate = resDate;\r\n\t}",
"public void setDateRecruitment(Date dateRecruitment);",
"public void setPROMISE_DATE(Date PROMISE_DATE)\r\n {\r\n\tthis.PROMISE_DATE = PROMISE_DATE;\r\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log a message at level VERBOSE according to the specified format and argument. This form avoids superfluous object creation when the logger is disabled for level VERBOSE. | public void trace(final String format, final Object arg) {
formatAndLog(Log.VERBOSE, format, arg);
} | [
"public static void v(String tag, String msg, Object... args) {\n\t\tlog(OSLogLevel.VERBOSE, tag, String.format(msg, args), null);\n\t}",
"public static void v(String message, Object... args) {\n log(VERBOSE, null, null, message, args);\n }",
"public static void v(Object message) { // Log verbose mess... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field138' field | public java.lang.CharSequence getField138() {
return field138;
} | [
"public java.lang.CharSequence getField138() {\n return field138;\n }",
"java.lang.String getField1371();",
"public java.lang.CharSequence getField146() {\n return field146;\n }",
"public java.lang.CharSequence getField148() {\n return field148;\n }",
"java.lang.String getField1301();",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Page findByProjectTitleContainingAndProjectStageInAndProjectTypeInAndResourceResourceTypeInAndStageIn (String value, List projectStages, List projectTypes, List resourceTypes, List stages, Pageable pageable); | Page<Positioning> findByNeedTitleContainingAndNeedStageInAndNeedTypeInAndResourceResourceTypeInAndStageIn
(String value,
List<NeedStage> needStages,
List<NeedType> needTypes,
List<ResourceType> resourceTypes,
List<PositioningStage> stages,
Pag... | [
"com.google.container.v1beta1.OperationProgress getStages(int index);",
"java.util.List<com.google.container.v1beta1.OperationProgress> getStagesList();",
"com.google.container.v1beta1.OperationProgressOrBuilder getStagesOrBuilder(int index);",
"@GET\n\t@Path(\"stage\")\n\tpublic Page<BillDO> getBillsByStage(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks to see if this Sprite is fully inside another sprite | boolean insideSprite(Sprite s){
if (s._hitbox.length == 1) {
if (_hitbox.length == 1) {
return PVector.dist(s._getCenter(),this._getCenter()) <
s._hitbox[0].x - this._hitbox[0].x;
}
return _insideCirc(_getPoints(), s._getCenter(), s._hitbox[0].x);
}
if (s._hitbox.len... | [
"public boolean intersects(Sprite otherSprite)\n {\n return otherSprite.getBoundary().intersects(this.getBoundary());\n }",
"public boolean collision(Sprite other){return false;}",
"public boolean overlaps(Sprite s) {\r\n \r\n //if the object A overlaps object B is any of the\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor(s) Constructs a new Agent using the specified configuration. | public AgentImpl(AgentConfigImpl agentConfig) throws AdminException, IllegalArgumentException {
loggingSession = LoggingSession.create();
shutdownHook = new LoggingThread("Shutdown", false, this::disconnectFromSystem);
addShutdownHook();
if (agentConfig == null) {
throw new IllegalArgumentExcepti... | [
"public Agent() {\n this(null, false);\n }",
"Agent createAgent();",
"public Agent(String name) {\n this(name, false);\n }",
"public TestLiveAgent(Configuration config) {\n\t\tsuper(config);\n\t\taddHandler(Actions.GET_AGENT_DESC, this);\n\t\taddHandler(Actions.ADD_AGENT, this);\n\t\taddHandler(Action... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Element__ParaAssignAssignment_2_1_1" $ANTLR start "rule__SchedulerDSL__DefcoreAssignment_0" InternalDsl.g:37424:1: rule__SchedulerDSL__DefcoreAssignment_0 : ( ruleDefCore ) ; | public final void rule__SchedulerDSL__DefcoreAssignment_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:37428:1: ( ( ruleDefCore ) )
// InternalDsl.g:37429:2: ( ruleDefCore )
{
// InternalDsl.g:37429:2... | [
"public final void rule__SchedulerDSL__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:17271:1: ( ( ( rule__SchedulerDSL__DefcoreAssignment_0 )? ) )\n // InternalDsl.g:17272:1: ( ( rule__SchedulerDSL__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Only reauthenticate if username doesn't match SecurityContextHolder and user isn't authenticated (see SEC53) | private boolean authenticationIsRequired(String username) {
Authentication existingAuth = SecurityContextHolder.getContext().getAuthentication();
if (existingAuth == null || !existingAuth.isAuthenticated()) {
return true;
}
// Limit username comparison to providers which us... | [
"String reAuthenticateUser(User user);",
"public abstract Authentication attemptAuthentication(HttpServletRequest request);",
"private void resetAuthentication(User currentUser) {\n SecurityContext securityContext = SecurityContextHolder.getContext();\n Authentication authentication = securityCont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
From json wx cp tp license batch code info resp. | public static WxCpTpLicenseBatchCodeInfoResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseBatchCodeInfoResp.class);
} | [
"protected static CodedValue extractCode(JsonNode c) throws Exception {\n CodedValue cv = new CodedValue();\n cv.setCodingSystem(c.path(\"set\").getTextValue());\n cv.setVersion(c.path(\"version\").getTextValue());\n JsonNode values = c.path(\"values\");\n if (values.isArray()) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "seriesnumber" attribute | public org.apache.xmlbeans.XmlInteger xgetSeriesnumber()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlInteger target = null;
targ... | [
"public org.apache.xmlbeans.XmlInteger xgetSeriesnumber()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |