query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
TODO Complete this method This method should return the movie with the lowest average rating. | public Movie getLowestRated(){
double lowestAvg = movies.get(0).getAverageRating();
int lowestIndex = 0;
for(int i = 0; i < movies.size(); i++){
if(lowestAvg > movies.get(i).getAverageRating()){
lowestAvg = movies.get(i).getAverageRating();
lowestIndex... | [
"public Movie getHighestRated(){\n double highestAvg = movies.get(0).getAverageRating();\n int highestIndex = 0;\n for(int i = 0; i < movies.size(); i++){\n if(highestAvg < movies.get(i).getAverageRating()){\n highestAvg = movies.get(i).getAverageRating();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Name of a flow | @ApiModelProperty(value = "Name of a flow")
public String getName() {
return name;
} | [
"public String getFlowName() {\n return flowName;\n }",
"public void setFlowName(String flowName) {\n this.flowName = flowName;\n }",
"public void setFlowName(String flowName) {\n this.flowName = flowName;\n }",
"public String getFlowCnName() {\n\t\treturn flowCnName;\n\t}",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method binarizes floats in longs. Float length must be multiple of 64 | static final public long[] getLongs(float[] f ) {
long[] res = new long[f.length / 64];
for ( int iRes=0, iF=0; iRes<res.length; iRes++ ) {
for ( int ib=0; ib<64; ib++, iF++) {
if ( f[iF] > 0 )
res[iRes] = res[iRes] | ( 1L << ib );
}
}
return res;
} | [
"static final public long[] getLongs(float[] f, float thr) {\r\n\t\t\r\n\t\tlong[] res = new long[f.length / 64];\r\n\t\t\r\n\t\tfor ( int iRes=0, iF=0; iRes<res.length; iRes++ ) {\r\n\t\t\tfor ( int ib=0; ib<64; ib++, iF++) {\r\n\t\t\t\tif ( f[iF] > thr )\r\n\t\t\t\t\tres[iRes] = res[iRes] | ( 1L << ib );\r\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates line with podcast url and podcast metadata | private void buildMetadataLine(SuggestedPodcast addPodcastFormData) {
StringBuffer metadataLine = new StringBuffer();
metadataLine.append(addPodcastFormData.getFeedUrl());
metadataLine.append("; ");
metadataLine.append(addPodcastFormData.getIdentifier());
metadataLine.append("; ");
if (addPodcastFormData... | [
"public static String buildPodcastDetailUrl(String podcastId){\n Uri builtURI = Uri.parse(LISTEN_NOTE_BASE_URL).buildUpon()\n .appendPath(PODCAST)\n .appendPath(podcastId)\n .build();\n\n return builtURI.toString();\n }",
"public PodcastEntity getPodca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the builder for the settings used for calls to moveDirectory. | public UnaryCallSettings.Builder<MoveDirectoryRequest, MoveDirectoryResponse>
moveDirectorySettings() {
return moveDirectorySettings;
} | [
"public UnaryCallSettings.Builder<MakeDirectoryRequest, MakeDirectoryResponse>\n makeDirectorySettings() {\n return makeDirectorySettings;\n }",
"public UnaryCallSettings<MoveDirectoryRequest, MoveDirectoryResponse> moveDirectorySettings() {\n return moveDirectorySettings;\n }",
"public googl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new transfer window for the specified UI controller and owner. | public TransferWindow(final SwingController controller, final FrameContainer owner) {
super(controller, owner);
final TransferContainer container = (TransferContainer) owner;
dcc = container.getDCC();
dcc.addHandler(this);
container.addSocketCloseCallback(this);
setLay... | [
"public TransferPanel(final WindowModel owner, final EventBus errorBus) {\n this.transferContainer = (TransferContainer) owner;\n this.errorBus = errorBus;\n dcc = transferContainer.getDCC();\n\n dcc.addHandler(this);\n transferContainer.getConnection()\n .flatMap(C... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form GsJFrame | public GsJFrame() {
initComponents();
} | [
"public NewJFrame() {\n initComponents();\n \n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n Connect();\n initComponents();\n }",
"public NewJFrameAgregar() {\n initComponents();\n }",
"public xinxiNewJFrame() {\n in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search for the end of the set of homme in the LinkedList and position the iterator at this place | private void trouverFinDesHommes(ListIterator<EtreVivant> iterateur) {
while(iterateur.hasNext()) {
iterateur.next();
}
} | [
"public void setIteratorEnd() {\n iter = (next > 0 ? next - 1 : -1);\n }",
"Iterator<T> end();",
"Position getEnd();",
"public slistNode end() {\r\n\t\treturn tail;\r\n\t}",
"int getEndSearch();",
"public ListLoc findEnd(E item) {\r\n if (size == 0) {\r\n return new ListLoc(0, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get forwarding table as base class | public Table getForwardingTable(){
return forwardingTable;
} | [
"Table getBaseTable();",
"AbstractCubeTable getBaseTable();",
"public RoutingTable getFIB(){\n return forwardingTable;\n }",
"String getBaseTable();",
"public Double getTableBase() {\r\n return tableBase;\r\n }",
"public Class<?> getTableClass() {\n return tableClass;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field944' field. doc for field944 | public java.lang.CharSequence getField944() {
return field944;
} | [
"public java.lang.CharSequence getField944() {\n return field944;\n }",
"java.lang.String getField1063();",
"java.lang.String getField1263();",
"java.lang.String getField1663();",
"java.lang.String getField1558();",
"java.lang.String getField1463();",
"java.lang.String getField1058();",
"java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.tutorial.Person owner = 2 [json_name = "owner", (.leo.proto.javatype) = "com.example.custom.CustomOwnerClass"]; | SELF setOwner(com.example.custom.CustomOwnerClass value); | [
"com.zzsong.netty.protobuff.two.ProtoData.Person getPerson();",
"com.zzsong.netty.protobuff.two.ProtoData.PersonOrBuilder getPersonOrBuilder();",
"com.example.custom.CustomOwnerClass getOwner();",
"com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();",
"com.google.protobuf2.Any getObject();",
"org.royl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the given element to the RewrittenToNewAccountSourceJoinArray array. This is achieved by setting the parent foreign key to this entity instance. | public void addToRewrittenToNewAccountSourceJoinArray(entity.PolicyPolicyRewrite element) {
__getInternalInterface().addArrayElement(REWRITTENTONEWACCOUNTSOURCEJOINARRAY_PROP.get(), element);
} | [
"private void setRewrittenToNewAccountSourceJoinArray(entity.PolicyPolicyRewrite[] value) {\n __getInternalInterface().setFieldValue(REWRITTENTONEWACCOUNTSOURCEJOINARRAY_PROP.get(), value);\n }",
"public void setRewrittenToNewAccountSourceJoinArray(entity.PolicyPolicyRewrite[] value) {\n __getInternalInt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an instance of BroadcastParserException with the specified detail message. | public BroadcastParserException(String msg) {
super(msg);
} | [
"public BroadcastParserException() {\r\n }",
"public NotBroadcastableException(String message) {\n super(message);\n }",
"public EbtsParsingException(final String message) {super(message);}",
"public ParserException(String message) {\n super(message);\n }",
"public NotValidException(String messag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "distDate" element | public boolean isSetDistDate()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(DISTDATE$8) != 0;
}
} | [
"public boolean isSetDate() {\n return this.date != null;\n }",
"public boolean isSetStartDate()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(STARTDATE$8) != 0;\n }\n }",
"public boolea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Count of emails kicked, formatted | @ApiModelProperty(value = "Count of emails kicked, formatted")
public String getKickboxCountFormatted() {
return kickboxCountFormatted;
} | [
"@ApiModelProperty(value = \"Count of emails kicked\")\r\n public Integer getKickboxCount() {\r\n return kickboxCount;\r\n }",
"Integer getEmailCount(String emailId);",
"long getJoinedEventsCount();",
"int getParticipantsCount();",
"private void numberOfAttempts() {\r\n //a variable that stores ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates the arithmetic expression | public String generateExpresssion() {
//Instantiate Random number
Random rarndomNo = new Random();
int low = minValue;
int high = maxValue + 1;
noOfIntegers = rarndomNo.nextInt(high - low) + low;
for (int x = noOfIntegers; x > 0; x--) {
int temp = rarndomNo.nextInt(21) + 1;
expression += temp;
numb... | [
"public int expr(){\n int soma = product();\n while(is(TokenTypes.OP_PLUS) || is(TokenTypes.OP_MINUS)){\n boolean op = is(TokenTypes.OP_PLUS);\n check(TokenTypes.OP_PLUS, TokenTypes.OP_MINUS);\n int produto = product();\n soma += op?produto:-produto;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Break block at location as if given tool was used | public boolean breakNaturallyAt(int x, int y, int z, MC_ItemStack tool); | [
"private void breakBlockAction() {\n\t\tint selectedBlock = 0;\n\n\t\t// Get targeted block based on view\n\t\tif(changeViewSlider.getValue() == 0) {\n\t\t\t// Viewing Red Line\n\t\t\t// Based on the viewed track controller ID, get that block\n\t\t\tif(tcComboBox.getSelectedIndex() == 0) {\n\t\t\t\tselectedBlock = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Your kmeans code goes here Update the array rgb by assigning each entry in the rgb array to its cluster center | private static void kmeans(int[] rgb, int k){
// Define Variables
ArrayList<Integer> current_ks = new ArrayList<Integer>();
ArrayList<Integer> previous_ks = new ArrayList<Integer>();
Map<Integer, ArrayList<Integer>> itemPerK = new HashMap<Integer,ArrayList<Integer>>();
//-----------... | [
"public void assignPixelsToClusters(int[][] assigned){\n\n for(int i = 0; i < imageHeight; i++){\n for(int j = 0; j < imageWidth; j++){\n //System.out.println(\"pixel[\" + i + \"][\" + j + \"]\"); // Used for some debugging\n\n //Find the cluster color that is closest... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overrides for methods inherited from PApplet that are disabled for NApplets because they're either inappropriate or too tricky. Overrides PApplet.delay(). For now, this just means delay() is disabled for embedded NApplets. For standalone NApplets, this just passes through to PApplet.delay(). | public void delay(int napTime) {
if (embeddedNApplet || windowedNApplet)
System.err.println("NApplet: delay() disabled.");
else
super.delay(napTime);
} | [
"public void delay() {\n\t\tdelay(delayTime);\n\t\ttry {\n\t\t\t// Wait for the gui thread to complete execution\n\t\t\tSwingUtilities.invokeAndWait(() -> {});\n\t\t} catch (InvocationTargetException e) {\n\t\t\tthrow new Error(e);\n\t\t} catch (InterruptedException e) {\n\t\t\tthrow new RuntimeException(\"The test... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the TGet to check for | public exists_args setTget(TGet tget) {
this.tget = tget;
return this;
} | [
"public boolean isGet() {\n\t\treturn isGet;\n\t}",
"public boolean isSetTget() {\n return this.tget != null;\n }",
"public boolean isGet() {\n return requestBuilder.getMethod().equals(HTTP_GET);\n }",
"boolean getMust();",
"Object getIf();",
"public void issueGetGet()\n {\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set List Price Old. Old List Price | public void setPriceListOld (BigDecimal PriceListOld); | [
"public void setListPrice(Double listPrice) {\n this.listPrice = listPrice;\n }",
"public void setNewListPrice(String newListPrice) {\r\n this.newListPrice = newListPrice;\r\n }",
"public BigDecimal getPriceListOld();",
"private void updatePrices() {\r\n\t\tfor (int i=first; i<last; i++){\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes all the checks for this host | public void executeChecks(IResultCollector collector) {
for(ActiveHostCheck check: hostChecks.values()) {
collector.addResult(check.call());
}
} | [
"@Override\n\tpublic void executeChecks() {\n\t\tActiveAgent.getInstance().executeChecks(this);\n\t}",
"private void check() throws MojoExecutionException\n {\n if ( new File( resolveCloverDatabase() ).exists() )\n {\n checkDatabase( resolveCloverDatabase() );\n }\n if ( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates a new MENameTagger. | public MENameTagger () {
mene = new MaxEntNE();
annotator = new HMMannotator(mene);
annotator.setBItag (true);
annotator.setAnnotateEachToken (false);
} | [
"private static void InitTagger() {\n\t\ttagger = new MaxentTagger(\"models/english-left3words-distsim.tagger\");\n\t}",
"public static NetworkTagManager create()\n {\n return new ForgeNetworkTagManager();\n }",
"public PosTagger() {\n\t\ttry {\n\t\t\t//Load pos model only if it has not been loaded... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends the pcode to assign a register to the result of a pcode op call with arguments args | public static void emitAssignRegisterFromPcodeOpCall(StringBuilder pCode, String register, String pcodeop, String... args){
pCode.append(register);
pCode.append(" = ");
pCode.append(pcodeop);
pCode.append("(");
for (int i = 0, numArgs = args.length; i < numArgs; ++i){
pCode.append(args[i]);
if (i < numA... | [
"@Override\n\tprotected CodeObject postprocess(CallNode node, List<CodeObject> args) {\n\t\t\n\t\t//STEP 0\n\t\tCodeObject co = new CodeObject();\n\n\t\t/* FILL IN FROM STEP 4*/\n\n\t\t/* MODIFY THIS TO GENERATE 3AC */\n\t\t//Step 1 - push args on stack\n\t\tint i = 0;\n\t\tInstruction store = null;\n\t\t//System.o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ItemMatrix for the recipe | public ItemMatrix getMatrix(); | [
"java.lang.String getMatrix();",
"public double[][] getMatrix(){\n return matrix;\n }",
"public Recipe getRecipe(){\n\t\tRecipe recipe = new Recipe();\n\t\trecipe.setName(name);\n\t\trecipe.setNumPersons(numPersons);\n\t\trecipe.setPrepTime(prepTime);\n\t\trecipe.setRestTime(restTime);\n\t\trecipe.se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of products scraped from the url given and manipulated as required | public List<Product> getProductList(String url) {
Document doc;
List<Product> productsList = new ArrayList<Product>();
try {
doc = HtmlParser.getDocumentFromUrl(url);
Elements products = doc.select("div.product ");
for (Element productElement : products) {
// Getting the product title
... | [
"public List<Product> scrapeProducts() {\n\n // Create empty list for the products that are going to be fetched\n List<Product> foundProducts = new ArrayList<>();\n\n // Open the url\n getDriver().get(getWebStore().getURL());\n\n // Locate the overview of all products\n Sys... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Train the generator by adding the sourceText | @Override
public void train(String sourceText)
{
// TODO: Implement this method
if(is_trained==0) {
wordList.clear();
list.clear();
int to_add=0;
// Matcher m = Pattern.compile("[a-zA-Z']+").matcher(sourceText);
String[] list_of_data = sourceText.split("\\s");
// while(m.find()) {
for(String wo... | [
"@Override\n\tpublic void retrain(String sourceText)\n\t{\n\t\t// TODO: Implement this method.\n\t\t\n\tif(is_trained == 1 ) {\n\n\t\t\tis_generable = 0;\n\t\t\twordList.clear();\n\t\t\tlist.clear();\n\t\t\n\t\tif(!sourceText.isEmpty()) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tint to_add=0;\n//\t\t\tMatcher m = Pattern.com... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notifying all subscribed users that trip has been created | void notifyTripCreated(Trip trip); | [
"private void autoSubscribeUserToTopics() {\n final ArrayList<Feature> features = new ArrayList<>();\n ParseQuery<Feature> featureQuery = ParseQuery.getQuery(Feature.class);\n featureQuery.whereEqualTo(Feature.AUTO_SUBSCRIBE_KEY, true);\n featureQuery.findInBackground(new FindCallback<Fe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method tests FlagCell. | public void testFlagCell()
{
y.loadBoardState(" ", "OOOO", "O++O", "OOOO");
y.flagCell(1, 2);
assertEquals(y.getCell(1, 2), MineSweeperCell.FLAGGED_MINE);
y.loadBoardState(" ", "OOOO", "OOOO", "OOOO");
y.flagCell(0, 2);
assertEquals(y.getCell(0, 2), MineSweepe... | [
"public void testFlagMethodsHappyPath(){\n Cell cell = new Cell(24, 25, Cell.CellContents.FIVE);\n assertFalse(cell.isFlagged());\n cell.flag();\n assertTrue(cell.isFlagged());\n cell.removeFlag();\n assertFalse(cell.isFlagged());\n }",
"public void testFlagCell()\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the OpenGL native library, using the specified library name. | public static void create(String libName) {
create(Library.loadNative(GL.class, "org.lwjgl.opengl", libName));
} | [
"public static native int loadLibrary(int pid, String name);",
"public static void loadLwjglNatives(){\n File lwjglNativeFolder = new File(System.getProperty(\"user.dir\"),\n \"..\" + File.separator + \"Shared libraries\" + File.separator\n + \"Native\" + File.separator + \"lw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Counts the number of elements in the input collection that match the beanPropertyName with value specified in beanPropertyValue. A null collection or predicate matches no elements. | public static int countMatches(Collection<?> inputCollection, String[] beanPropertyNames,
String[] beanPropertyValues) {
int matches = 0;
if (!ArrayUtils.isEmpty(beanPropertyNames) && !ArrayUtils.isEmpty(beanPropertyValues)) {
// assertEquals("Length of beanPropertyNames and beanPropertyValues are mism... | [
"public static <T> int countIf(Collection<T> values, Predicate<T> predicate) {\n\t\tint numberOf = 0;\n\t\t\n\t\tfor(T value : values) {\n\t\t\tif(predicate.test(value)) {\n\t\t\t\t++numberOf;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn numberOf;\n\t}",
"static public <T> int countIf(Collection<T> collection, \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated Property Getter for attribute SYM11 | @Override
public java.lang.Object getSym11() throws G2AccessException {
java.lang.Object retnValue = getAttributeValue (SYM_11_);
return (java.lang.Object)retnValue;
} | [
"@Override\n public java.lang.Object getSym122() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SYM_122_);\n return (java.lang.Object)retnValue;\n }",
"@Override\n public java.lang.Object getSym18() throws G2AccessException {\n java.lang.Object retnValue = getAttributeVal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generic method to save an object | T save(T object); | [
"public Serializable save(T t);",
"void save(Object entity);",
"public void save(T data);",
"<T> T save(T bean);",
"public abstract void save();",
"@Override\n\tpublic <T> T save(T obj) {\n\t\tassertObject(obj);\n\n\t\tEntity<?> entity = getEntity(obj.getClass());\n\t\tassertTable(entity);\n\n\t\tEntityFi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
and cst_compensate >= ? | public M cstCompensateMin(Object min){this.put("cstCompensateMin", min);return this;} | [
"boolean hasIsSupportComp();",
"boolean hasC2S();",
"boolean hasS2C();",
"private boolean checkCpscConstr(Schedule sched)\n\t{\n\t\tif(!checkEvenings(sched))\n\t\t\treturn false;\n\t\telse if(!checkFifthYear(sched))\n\t\t\treturn false;\n\t\telse if(!checkTuesdayEleven(sched))\n\t\t\treturn false;\n\t\telse i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the steviloOtrok value for this Rezervacija. | public void setSteviloOtrok(java.lang.Integer steviloOtrok) {
this.steviloOtrok = steviloOtrok;
} | [
"public void setSteviloOdraslih(java.lang.Integer steviloOdraslih) {\n this.steviloOdraslih = steviloOdraslih;\n }",
"public java.lang.Integer getSteviloOtrok() {\n return steviloOtrok;\n }",
"public void setRezervacijskaStevilka(java.lang.String rezervacijskaStevilka) {\n this.rezerv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clear downbutton in proper floor | private void clearButtonDown(Floor floor)
{
directionButtonPanels[floor.getNumber()][0]=LiftButton.NOT_ACTIVE;
} | [
"private void clearButton(Floor floor)\r\n\t{\r\n\t\t\tbuttonPanel[floor.getNumber()]=LiftButton.NOT_ACTIVE;\r\n\t}",
"private void clearButtonUp(Floor floor)\r\n\t{\r\n\t\t\tdirectionButtonPanels[floor.getNumber()][1]=LiftButton.NOT_ACTIVE;\r\n\t}",
"void btnClearPlanning();",
"public void clearButtonState()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of SAGMessageImpl | public SAGMessageImpl() {
SwiftMessage msg = objectFactory.getNewMessage();
msg.setEnvelope(objectFactory.getNewEnvelope());
msg.setLetter(objectFactory.getNewLetter());
setSwiftMessage(msg);
if (logger.isLoggable(Level.INFO)) {
logMsg = "SAGMessageImpl.SAGMessageImpl... | [
"Message createMessage();",
"public ServiceMessage() {\r\n\t}",
"public Message createMessage();",
"public MessageFactoryImpl() {\n\t}",
"public MessageFactory() {}",
"private UpnpMessageFactory() {\n super();\n }",
"InboundMessage createInboundMessage();",
"@Override\n public GasPumped_M... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the course ID of this course image. | public void setCourseId(long courseId) {
_courseImage.setCourseId(courseId);
} | [
"public void setId(int courseId){\n this.courseId = courseId;\n }",
"public void setIdCourse(Long idCourse) {\n this.idCourse = idCourse;\n }",
"public void setImageId(long imageId) {\n _courseImage.setImageId(imageId);\n }",
"public void setCourseImageId(long courseImageId) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes the exercise identified by the ejercicioId provided. | public void deleteEjercicio(int ejercicioId){
daoEjercicio.deleteEjercicio(ejercicioId);
} | [
"@DELETE\n\t@Path(\"/{exerciseId}\")\n\t@Nonnull\n\tResponse deleteExerciseById(@Nonnull @PathParam(\"exerciseId\") Long exerciseId);",
"@DELETE\n\t@Path(\"/{exerciseId}\")\n\t@Nonnull\n\tString deleteExerciseById(@Nonnull @PathParam(\"exerciseId\") Long exerciseId);",
"@RequestMapping(value = \"/removerExercic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value related to the column: teeth | public void setTeeth (java.lang.Integer teeth) {
this.teeth = teeth;
} | [
"public abstract void setT(double t);",
"void setCellValue(double value);",
"void setTD(java.math.BigInteger td);",
"void setColumnValue(int colIndex, Object value);",
"public void set(String specie, int t, double value){\n\t\tt_minus_one.put(specie, value);\n\t\tif(t==0 || t % (calculation_resolution/resul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that if insert will throw DuplicateKeyException correctly. | @Test
public void test08testDuplicateKeyException() {
boolean caughtDuplicate = false;
try {
tree.insert(5);
tree.insert(5);
} catch (DuplicateKeyException e) {
caughtDuplicate = true;
} catch (IllegalArgumentException e) {
System.out.... | [
"@Test\n public void test005_insert_duplicate() throws IllegalNullKeyException, DuplicateKeyException {\n try {\n htIntegerKey.insert(1, \"test1\");\n htIntegerKey.insert(2, \"test2\");\n htIntegerKey.insert(3, \"test3\");\n htIntegerKey.insert(4, \"test4\");\n htIntegerKey.insert(5, \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log.d(TAG,"AddUserToTrip TripId : " + trip.getTripId() + " UserEamil: " + userEmail); | private void AddUserToTheTrip(final Trip trip){
DocumentReference tripRef = db.collection("Trips").document(trip.getTripId());
tripRef
.update("users", FieldValue.arrayUnion(userEmail))
.addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
... | [
"public void setTripId(){\n tripId = \"mXdgfyxOyh1zaolkJQPU\";\n }",
"public void addFlight(View view) {\n String flightNumber = ((EditText) findViewById(R.id.flight_number)).getText().toString();\n String departureDateTime = ((EditText) findViewById(R.id.departure_date_time)).getText()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds a new preference scope, that requires a custom key, and has the passed child scope. | PreferenceScope createScope(String type,
String key,
PreferenceScope childScope) throws InvalidPreferenceScopeException; | [
"PreferenceScope createScope(String type,\n PreferenceScope childScope) throws InvalidPreferenceScopeException;",
"PreferenceScope createScope(String type,\n String key) throws InvalidPreferenceScopeException;",
"Scope createScope();",
"PreferenceS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
finish _setPrinter Printing performed into file in SOffice temp directory. First this file is deleted if it already exist (using com.sun.star.ucb.SimpleFileAccess service. After that the method with appropriate parameter is called. Has OK status if the file to which printing is made exists. | public void _print(){
boolean result = true ;
final String file = "XPrintable.prt" ;
final String fileName = utils.getOfficeTempDirSys((XMultiServiceFactory)tParam.getMSF())+file ;
final String fileURL = utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF()) + file ;
XSimpl... | [
"public void print() throws PrintException {\n setRequest();\n service = null;\n if (useDialog) {\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\n int defaultPSidx = 0;\n PrintService dps = PrintServiceLookup.lookupDefaultPrintService();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set NumberOfBeaconsInSolutionPresent bit field value and update the related Bluetooth GATT Characteristic. | public boolean setNumberOfBeaconsInSolutionPresent(int value) {
if (!setValue(0, 0, value)) {
return false;
}
updateGattCharacteristic();
return true;
} | [
"public boolean setNumberOfBeaconsInSolution(int value) {\r\n if (!FormatUtils.uint8RangeCheck(value)) {\r\n return false;\r\n }\r\n mNumberOfBeaconsInSolution = FormatUtils.intToUint8(value);\r\n updateGattCharacteristic();\r\n return true;\r\n }",
"public boolean... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Details of properties for the worklog. Optional when creating or updating a worklog. | @Schema(description = "Details of properties for the worklog. Optional when creating or updating a worklog.")
public List<EntityProperty> getProperties() {
return properties;
} | [
"JobDetails properties();",
"public String log() {\n return this.innerProperties() == null ? null : this.innerProperties().log();\n }",
"@ApiModelProperty(value = \"Details of the issue properties identified in the request.\")\n public Map<String, Object> getProperties() {\n return properties;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_green_zz_jzjl.c_lsh | public String getcLsh() {
return cLsh;
} | [
"public String getLsjgcc() {\n return lsjgcc;\n }",
"public String getcZzzjlsh() {\n return cZzzjlsh;\n }",
"SPC getLCol();",
"public String getLsh() {\n return lsh;\n }",
"public String getJkglStxxc()\n\t{\n\t\treturn jkglStxxc;\n\t}",
"java.lang.String getSqlCode();",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query all authors count | @Override
public int getAllAuthorsCount() {
SqlSession sqlSession = null;
try {
sqlSession = MybatisUtil.getSqlSession();
AuthorMapper authorMapper = sqlSession.getMapper(AuthorMapper.class);
return authorMapper.getAllAuthorsCount();
} finally {
... | [
"int getAuthorsCount();",
"int getAuthoritiesCount();",
"Long countByAuthor(Long authorId) ;",
"public int totalAuthors(){\n\t\treturn authors.size();\n\t}",
"public int getAuthorsCount() {\n CriteriaQuery cq = em.getCriteriaBuilder().createQuery();\n Root<Authors> rt = cq.from(Authors.class);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Instance Decl'. | InstanceDecl createInstanceDecl(); | [
"Instance createInstance();",
"Declaration createDeclaration();",
"Declarator createDeclarator();",
"public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns a boolean value indicating whether or not ads are currently being processed. | public boolean adsAreOn() {
return (mAdsOn);
} | [
"private boolean isAdAvailable() {\n return appOpenAd != null;\n }",
"public boolean hasAd() {\n return ad != null;\n }",
"public boolean isProcessing()\r\n {\r\n return (getActiveCount() > 0) || hasWaitingTasks();\r\n }",
"public boolean hasCAdvisorRunning() {\n if (ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if there exists pair in the card deck | private boolean isPair(){
boolean found = false;
for(int i = 0; i< size; i++){
Card temp = cards[i];
for(int j = size-1; j>i; j--){
if(temp.getInt() == cards[j].getInt()){
found = true;
}
}
}
return found;
} | [
"public boolean hasPair() {\n return this.getCard1().getRank() == this.getCard2().getRank();\n }",
"public static boolean hasPair(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 0; i < cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ String PATTERN_PLAIN_STR = "\\d\\d\\d\\d[]\\d\\d[]\\d\\d"; Pattern PATTERN_ISO8601 = Pattern.compile(PATTERN_PLAIN_STR +"[T]\\d\\d[:]\\d\\d(?:[:]\\d\\d)?" // hours, minutes, optional seconds +"(\\.\\d+)?" // optional second fractions +"(Z|[+]\\d\\d(?:[:]?\\d\\d)?)?" // optional timeoffset/Z ); final Pattern p = PATTE... | public void testISO8601RegexpFull() throws Exception
{
final Pattern p = StdDateFormat.PATTERN_ISO8601;
Matcher m;
// First simple full representation (except no millisecs)
m = p.matcher("1997-07-16T19:20:00+01:00");
assertTrue(m.matches());
assertEquals(2, m.groupCo... | [
"private static Date parseISOTimestring(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n int len = timestring.length();\r\n char colonTZ = timestring.charAt(len-3);\r\n if(colo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EnumValue__ValueAssignment_3_1" $ANTLR start "rule__EnumValue__NumberAssignment_4_1" InternalMyDsl.g:2384:1: rule__EnumValue__NumberAssignment_4_1 : ( ruleInt1 ) ; | public final void rule__EnumValue__NumberAssignment_4_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:2388:1: ( ( ruleInt1 ) )
// InternalMyDsl.g:2389:2: ( ruleInt1 )
{
// InternalMyDsl.g:2389:2: ( r... | [
"public final void rule__EnumValue__Group_4__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:1996:1: ( ( ( rule__EnumValue__NumberAssignment_4_1 ) ) )\n // InternalMyDsl.g:1997:1: ( ( rule__EnumValue__Numbe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enable the dark mode | void setDarkMode(boolean enable); | [
"public void registerDarkness() {\n this.setDark(true);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n app.toggleDarkMode();\n isDark = !isDark;\n }",
"boolean isDarkTheme();",
"@FXML public void handleDarkMode() { this.settingMe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Selecciona el usuario con el id que se le pasa | public Usuario select(int id) {
// select * from usuarios where id = 7
try {
PreparedStatement pst = super.conexion.prepareStatement("select * from usuarios where id = ?");
pst.setInt(1, id);
ResultSet rs = pst.executeQuery();
if (rs.next()) {
Usuario usuario = new Usuario();
usuario.s... | [
"User selectById(String uid);",
"public Usuario getUsuario(int id);",
"public Usuario getUser(String idUser) throws ExceptionUsers;",
"private void get_selected_simple_users_id(ListView<String> selected_users) {\n\t\tfor (int i = 0; i <selected_users.getItems().size(); i++) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tjdb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns view task option for command type VIEW | public ViewTaskOption getViewTaskOption() {
return (ViewTaskOption) commandData.get(CommandProperties.TASKS_VIEW_OPTION);
} | [
"@DISPID(1610743816) //= 0x60020008. The runtime will prefer the VTID if present\r\n @VTID(15)\r\n int viewOptions();",
"ITaskView getTaskView();",
"ViewCommand parseView() throws Exception {\r\n\t\tViewCommand command;\r\n\t\tCalendar calendar[] = new Calendar[2];\r\n\t\tcalendar[0] = null;\r\n\t\tcalendar[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the left node | public Node getLeft()
{
return left;
} | [
"public Node getLeft() \n\t{\n\t\treturn left;\n\t}",
"public Node getLeft(){\r\n\t\treturn left;\r\n\t}",
"public Node getLeft () {\r\n\t\treturn left;\r\n\t}",
"public Node getLeft() {\n\t\treturn this.left;\n\t}",
"public Node getLeftChild() {\r\n \treturn getChild(true);\r\n }",
"public Geometry... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempt to connect to the mySQL database. | private void connect() {
connectionString = "jdbc:mysql://" + Config.getInstance().getMySQLServerName() + ":" + Config.getInstance().getMySQLServerPort() + "/" + Config.getInstance().getMySQLDatabaseName();
try {
Assassin.p.getLogger().info("Attempting connection to MySQL...");
... | [
"public void connect() {\n\t\t\n\t\ttry {\n\t\t\t// 1. Get a connection to database\n\t\t\tmyConn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306?autoReconnect=true&useSSL=false\", \"kelly\" , \"kelly\");\n\t\t\tif (myConn != null){\n\t\t\t\tSystem.out.println(\"Connected to Database\");\n\t\t\t}\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the modified date of this commitment. | @Override
public Date getModifiedDate() {
return _commitment.getModifiedDate();
} | [
"public String getDatemodified() {\n\t\treturn datemodified;\n\t}",
"public java.lang.String getModifiedDate() {\r\n return modifiedDate;\r\n }",
"@Override\n\tpublic Date getModifiedDate() {\n\t\treturn _changesetEntry.getModifiedDate();\n\t}",
"@Override\n\tpublic java.util.Date getModifiedDate() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds tweets to newsFeed and prints the last updated time to console | public void postTweet(String tweet) {
lastUpdateTime = System.currentTimeMillis();
Date updateTime = new Date(lastUpdateTime);
System.out.println(updateTime + ": " + tweet);
newsFeed.addElement(tweet);
setChanged();
notifyObservers(tweet);
System.out.println("Observers notified.");
} | [
"private void listenForTweets()\n {\n log.info(\"Listening to live Twitter feed. This will take some time...\");\n\n try{\n\n final String TWITTER_STREAM_URI = \"https://stream.twitter.com/1.1/statuses/filter.json\";\n\n //open link to Twitter API\n OAuthService tw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required int64 trace_id = 1; | long getTraceId(); | [
"@java.lang.Override\n public long getTraceId() {\n return traceId_;\n }",
"public long getTraceId() {\n return traceId_;\n }",
"public String getTraceId() {\n return traceId;\n }",
"public int getTraceID(){\r\n\t\treturn this.traceID;\r\n\t}",
"long getTraceTag();",
"long getTr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the match for the result of the transformation (after the unit has been applied). | Match getResultMatch(); | [
"float getMatch();",
"Match getCompleteMatch();",
"public Object getMatched()\n {\n return matched;\n }",
"public String getMatchThat()\n {\n return match.getThat();\n }",
"@Override\n public Match getMatch() {\n return match;\n }",
"private ApproxMatch<K,V> toAppr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity_rules.stop_rules_processing | public void setStopRulesProcessing(String stopRulesProcessing) {
this.stopRulesProcessing = stopRulesProcessing;
} | [
"public String getStopRulesProcessing() {\n return stopRulesProcessing;\n }",
"public void setSTOP(int value) {\n this.stop = value;\n }",
"public synchronized void stopExecution() {\n if (running) {\n running = false;\n try {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "Street" element | public boolean isSetStreet()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(STREET$26) != 0;
}
} | [
"boolean isSetStreet();",
"public boolean isSetStreet() {\n return this.street != null;\n }",
"public boolean isSetStreetNo() {\n return this.streetNo != null;\n }",
"public boolean ContainsStreet( ObjectId id ){\n return streets_.containsKey(id);\n }",
"public boolean isSetAddress() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines whether or not the feature holder style objects within the tokens are both pointing to the same object. That is, the both reference exactly the same object. | public boolean hasSameStyleReference(FeatureHolderStyleToken other)
{
// Null check:
if (other == null)
{
return false;
}
// Null style check:
else if (this.feautureHolderStyle == null || other.feautureHolderStyle == null)
{
return false;
}
return (this.feautureHolderStyle == other.feautureHol... | [
"public boolean is(Token other) {\n // TODO: 05/12/20 implement a better way to check if tokens are the same (when copying the line two copies of the same token are made, but with different memory address, thus not being exactly the same object)\n if (other == null)\n return false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getting Announcement, Coursework Count | public int getAnnounceCount() {
Cursor c = db.query(TABLE_TEACHER_ANNOUNCEMENT,
new String[] { KEY_ROW_ID }, null, null, null, null, null);
return c == null ? 0 : c.getCount();
} | [
"public int getSubjectStatementCount();",
"int getCourseidsCount();",
"public int getAnnouncementsCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_ANNOUNCEMENTS;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n cursor.clo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of configuration elements matching the references list. | public static List<IConfigurationElement> resolveReferences(List<String> refs,
String attr, String extensionPointId)
{
return resolveReferences(refs, attr, extensionPointId, false);
} | [
"private static List<IConfigurationElement> resolveReferences(List<String> refs,\r\n String attr, String extensionPointId, boolean allowNull)\r\n {\r\n // create map for fast testing if an elements attribute value is in the references list (#refernces < #elements)\r\n Map<String, IConfigurationE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a collection Sources entities. | @XmlTransient
public Collection<Sources> getEntities() {
entities = new ArrayList<Sources>();
if (references != null) {
for (SourceRefConverter ref : references) {
entities.add(ref.getEntity());
}
}
return entities;
} | [
"@NotNull\n EntityIterable getSource();",
"public List<Source> sources() { return sources; }",
"@GetMapping(path=\"/sources\")\r\n\tpublic List<SourceBO> getAllSources()\r\n\t{\r\n\t\treturn this.busy.findAllSources();\r\n\t}",
"Observable<SourceUserEntity> getUserSources();",
"List<SourceFeed> findAll()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the latitude of this commitment. | @Override
public void setLatitude(double latitude) {
_commitment.setLatitude(latitude);
} | [
"void setLatitude(double latitude);",
"public void setLat(double lat);",
"private void setLatitude(double latitude) {\r\n\t\tthis.latitude = latitude;\r\n\t}",
"public void setLatitude(double aLatitude) {\r\n latitude = aLatitude;\r\n }",
"public void setLatitude(double latitude){\n this.latitude... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the map of type names to config registrations. | public static Map<String, TriTuple<String, String, String>> getNamedRegistrations(
CompactSerializationConfig compactSerializationConfig) {
return compactSerializationConfig.typeNameToNamedRegistration;
} | [
"public static Map<String, TriTuple<Class, String, CompactSerializer>> getRegistrations(\n CompactSerializationConfig compactSerializationConfig) {\n return compactSerializationConfig.typeNameToRegistration;\n }",
"public static Map<String, Byte> genNameToTypeMap(){\n byte[] types = ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Care Plan Detail'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseCarePlanDetail(CarePlanDetail object) {
return null;
} | [
"public T caseCarePlan(CarePlan object) {\n\t\treturn null;\n\t}",
"public T caseClaimResponseDetail(ClaimResponseDetail object) {\n\t\treturn null;\n\t}",
"public T caseClaimDetail(ClaimDetail object) {\n\t\treturn null;\n\t}",
"public T casePaymentReconciliationDetail(PaymentReconciliationDetail object) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List list = userMapper.select(userId); | @GetMapping("/select")
public List<User> select(@RequestParam String userId){
List<User> list = userMapper.findAll();
System.out.println(list);
return list;
} | [
"List<UserGroupMapping> selectByExample(UserGroupMappingExample example);",
"public List<User> getListUserById(int idUser);",
"@Test\n public void getUserList(){\n SqlSession sqlSession = MybatisUtils.getSqlSession();\n\n // Second step: get the needed DAO\n UserMapper mapper = sqlSessio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets Images of all cards currently in User Hand | public ArrayList<Card> getUserHand(){
//ArrayList<Image> userHandImages = new ArrayList<Image>();
for (int i = 0; i < userHand.size(); i++) {
userHand.get(i).image.setToFrontImage();
//userHandImages.add(userHand.get(i).image);
}
return userHand;
} | [
"List<BufferedImage> getUserCardImages() throws IOException;",
"private void getImages()\n {\n // get image urls for computer and player cards\n String pImgURL = \"cardpics//\" + playerCard.getRank() + (String)(playerCard.getSuit().charAt(0) + \".jpg\");\n String cImgURL = \"cardpics... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the number of dbcolumns. Will perform a dummy select if not known so far. (assumes getFields() will compute the number of columns!) | public int getFieldCount() {
int count = getLegacyDbObjectClassVariables().fieldCount;
if (count <= 0) {
gettingFieldCount = true;
// perform a dummy select (this happens only once, hence no prepared statement)
ResultSetWrapper rs = getDb().createStatement().executeQuery(
getSql... | [
"int getOracleColumnsCount();",
"public int getMaxColumnsInSelect()\n throws SQLException\n {\n return 0;\n }",
"int columnCount();",
"public int getMaxColumnsInSelect() throws SQLException {\n // Sybase jConnect says 0\n // per \"Programming ODBC for SQLServer\" Appendix A\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns PSL48: "Comment" creates it if necessary | public ST getPsl48_Comment() {
ST retVal = this.getTypedField(48, 0);
return retVal;
} | [
"Comment createComment();",
"public String getCommentCode();",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:55:50.992 -0500\", hash_original_method = \"0DEFD663D479F88E7A114CE703AF8835\", hash_generated_method = \"468767B16106E3DDBED1803029F31BE7\")\n \np... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The time at which the stage transitioned to this state. .google.protobuf.Timestamp current_state_time = 3; | com.google.protobuf.Timestamp getCurrentStateTime(); | [
"com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();",
"@Override\n public float getStateTime() {\n return stateTime;\n }",
"long getCurStateStartTime();",
"public long getStateTime() {\n return _stateTime;\n }",
"public long getCurStateStartTime() {\n return c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column h_admin.a_password | public String getaPassword() {
return aPassword;
} | [
"@Generated(value = \"org.mybatis.generator.api.MyBatisGenerator\", date = \"2020-04-12T12:59:05.835+09:00\", comments = \"Source field: USER.password\")\r\n public String getPassword() {\r\n return password;\r\n }",
"private String getAdminPassword() throws CommandValidationException {\n // c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Duplicate directive labels must not be accepted | public void testDupDirectiveTypes() throws Exception {
File file = getResourceFile("/testdata/javascript/head.js");
DirectiveBasedJavascriptGroup jg = new DirectiveBasedJavascriptGroup("testDummy", file.getParentFile(),
file.getName(), ImmutableList.<DirectiveType<?>> of(DirectiveFactory... | [
"public boolean isValidDirectiveName ( String name );",
"@Override\n public boolean hasAlias(String directive) {\n return false;\n }",
"protected void validateLabels(String[] param){\n \n }",
"public void removeAllTaglabel() {\r\n\t\tBase.removeAll... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert it into a smile DataFrame object. | public DataFrame toDataFrame() {
BaseVector[] cols = new BaseVector[matrix.ncols() + 1];
// Need to export the row names too
cols[0] = StringVector.of("Cell", rowNames);
for (int i = 1; i < cols.length; i++) {
cols[i] = DoubleVector.of(colNames[i - 1],
... | [
"public SpagoBiDataSet toSpagoBiDataSet() {\r\n\t\treturn wrappedDataset.toSpagoBiDataSet();\r\n\t}",
"private Matrix toMatrix(DataFrame<?,?> frame) {\n final Matrix matrix = new Matrix(frame.rowCount(), frame.colCount());\n frame.forEachValue(v -> {\n final int i = v.rowOrdinal();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
compatible the vim insert mode will trigger the highlight from normal mode to insert at caret mode | @Override
public void keyTyped(KeyEvent e) {
if (e.getKeyChar() != VIM_INSERT_KEY ||
this.editor.getSettings().isBlockCursor())
return;
this.highlightEditorComponent.highlightEditorCurrentPair(this.editor);
} | [
"private synchronized void insertCursor() {\n rw.setCursorPosition((short) bufferAddr);\n }",
"public void insert(String text) {\n\t\tcmd = new InsertCommand(text, editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}",
"public void setCaretUse(){\n\t}",
"public void inse... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes the RMSE of the current output and a given target vector. | public static double RMSE(final double[][] output, final double[][] target) {
//
final int length = Math.min(output.length, target.length);
//
double error = 0;
int ctr = 0;
//
for (int t = 0; t < length; t++) {
assert(output[t].length > 0);
assert(target[t].length > 0);
assert(target[t].len... | [
"public static double RMSE(final double[] output, final double[] target) {\n\t\t//\n\t\tassert(output.length > 0);\n\t\tassert(target.length > 0);\n\t\tassert(target.length <= output.length);\n\t\t//\n\t\tdouble error = 0;\n\t\t//\n\t\tfor (int i = 0; i < target.length; i++) {\n\t\t\tfinal double e = output[i] - ta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new PopupDateField with given caption and listener. | public PopupDateField popupdatefield(String caption,
Property.ValueChangeListener changeListener) {
PopupDateField c = popupdatefield(caption);
c.addListener(changeListener);
return c;
} | [
"public PopupDateField popupdatefield(String caption) {\n PopupDateField c = popupdatefield();\n c.setCaption(caption);\n return c;\n }",
"public DateField datefield(String caption,\n Property.ValueChangeListener changeListener) {\n DateField c = datefield(caption);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Constructor del Baguette Personalizado, recibe un ingrediente | public BaguettePersonalizado(Baguette baguette) {
//this.ingredientes = ingredientes;
this.baguettes = baguette;
//agregar = false;
//lista_ingredientes = new ArrayList<Ingredientes>();
} | [
"public Boleta(){\r\n\t\tsuper();\r\n\t}",
"public Billete() {\n\t\t\n\t}",
"public Candidatura (){\n \n }",
"public Paciente () {}",
"public Barco()\n {\n this.coordenadaInicial = new Punto(rd.nextInt(10), rd.nextInt(10));\n this.orientacion = rd.nextInt(2);\n }",
"public Pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform the test for the given matrix column (A119) and row (B50). | public void testA119_B50() {
test_id = getTestId("A119", "B50", "24");
NonRootModelElement src = selectA("A119");
NonRootModelElement dest = selectB("B50");
A_B_Action(src, dest);
assertTrue("Paste menu item was available even though destination was invalid", checkResult_paste... | [
"@Test\r\n public void testColumns() {\r\n int expResult=2;\r\n int result=matrixA.columns();\r\n assertEquals(expResult, result);\r\n }",
"public void testA119_B90() {\n test_id = getTestId(\"A119\", \"B90\", \"64\");\n\n NonRootModelElement src = selectA(\"A119\");\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TSMobileAnalytics constructor with Builder class. | public TSMobileAnalytics(Builder builder) {
this.context = builder.context;
this.cpId = builder.cpId;
this.appName = builder.appName;
this.panelistTrackingOnly = builder.panelistTrackingOnly;
useHttpsActivated = builder.useHttpsActivated;
logPrintsActivated = builde... | [
"public AnalyticsMediator() {\n firebaseAnalyticsTracker = FirebaseAnalyticsMonitor.getInstance();\n faceBookAnalyticsTracker = FaceBookAnalyticsMonitor.getInstance();\n flurryAnalyticsTracker = FlurryAnalyticsMonitor.getInstance();\n// huaweiAnalyticsTracker = HuaweiAnalyticsTracker.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the connection specified by userid and password. | public abstract Connection getConnection(String user, String password) throws SQLException; | [
"@Override\n public final ConnectionIF getConnection(final String user, final String password) throws ConnectionException, AuthenticationException\n //----------------------------------------------------------------\n {\n String METHOD_NAME = CLASS_NAME + \":getConnection(): \";\n ConnectionIF conn ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleAnnotationValuePair" $ANTLR start "entryRuleAnnotationValue" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:1099:1: entryRuleAnnotationValue : ruleAnnotationValue EOF ; | public final void entryRuleAnnotationValue() throws RecognitionException {
try {
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:1100:1: ( ruleAnnotationValue EOF )
// ../org.ow2.mindEd.idt.edito... | [
"public final void entryRuleAnnotationValuePair() throws RecognitionException {\r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:1072:1: ( ruleAnnotationValuePair EOF )\r\n // ../org.o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make sure simpleperf is supported by setting an O device. | @Test
public void suggestedProfilingConfigurationIsSimpleperf() {
addAndSetDevice(AndroidVersion.VersionCodes.O, "Any Serial");
myServices.setNativeProfilingConfigurationPreferred(false);
myStage = new CpuProfilerStage(myStage.getStudioProfilers());
myStage.enter();
// ART Sampled should be the d... | [
"@Test\n public void hardwareTest() {\n // TODO: test hardware\n }",
"@Test\r\n public void testSamsungDeviceList()\r\n {\r\n \tSystem.out.println( \"\\ntestSamsungDeviceList\\n\" );\r\n\r\n Devices deviceHolder = PerfectoMobile.instance().devices();\r\n HandsetCollection devic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Call buyEquity to realize the execute of ITrader. | @Override
public void execute(IRetrievableStrategyTraderModel m) {
try {
m.buyEquityWithCommission(tickerSymbol, volume, time,
portfolio, commission);
} catch (Exception e) {
if (e instanceof IllegalArgumentException) {
System.out.println(e.getMessage());
}
System... | [
"public void trade() {\n\t}",
"public void buy() {\n\t}",
"public void trade() {\n //This method will be implemented in a later version\n }",
"public void buyStock(double askPrice, int shares, int tradeTime) {\n }",
"void buyStock(String portfolioName, String stockName, Date d,\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the roulette score address :return: Address of the roulette score :rtype: :class:`iconservice.base.address.Address | @External(readonly = true)
public Address get_roulette_score() {
return this.roulette_score.get();
} | [
"public java.math.BigInteger getAddress_score() {\n return address_score;\n }",
"@External(readonly = true)\n\tpublic Address get_revshare_wallet_address(Address _scoreAddress) {\n\t\t\n\t\tString gamedata = this.proposal_data.get(_scoreAddress);\n JsonValue json = Json.parse(gamedata);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called when a file is dragged over the main UI. It allows to open presentation or template to be opened by drag'n'drop. | @FXML
private void dragOverUI(DragEvent dragEvent) {
if (dragEvent.getGestureSource() != this.openedPresentationsTabPane && dragEvent.getDragboard().hasFiles()) {
/**
* Check if either a template or a presentation is drag over the browser.
*/
Optional<File> ... | [
"@FXML\n private void dragDroppedOnUI(DragEvent dragEvent) {\n final var board = dragEvent.getDragboard();\n var dragSuccess = false;\n\n if (board.hasFiles()) {\n final Optional<File> slideshowFXFile = board.getFiles().stream()\n .filter(file -> file.getName().... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes this taglet with the given doclet environment and doclet. | @Override
public void init(final DocletEnvironment env, final jdk.javadoc.doclet.Doclet doclet) {
reporter = ((Doclet) doclet).reporter;
} | [
"public Doclet() {\n }",
"public void init() { \n\t\ttry { \n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder(); \n\t\t\tthis.document = builder.newDocument(); \n\t\t\tlogger.info(\"initilize the document success.\");\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Server doesn't have the statement with the ID from the request bool missing_statement = 1; | boolean getMissingStatement(); | [
"public boolean getMissingStatement() {\n return missingStatement_;\n }",
"public boolean getMissingStatement() {\n return missingStatement_;\n }",
"boolean isSetMedicationStatement();",
"public void prepareExistsStatement() {\n throw new DbRuntimeException(\"prepareExistsStatement() no... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to write balance to text file to allow resuming the program from the point where it left off at last time | public void updateStatus() throws IOException{
writeToFile("bank_status.txt", "" + balance, false);
} | [
"@Override\r\n\tpublic void updateFile()\r\n\t{\r\n\t\ttry (FileWriter f = new FileWriter(\"cashRegister.txt\");\r\n\t\t\t\tBufferedWriter b = new BufferedWriter(f);\r\n\t\t\t\tPrintWriter p = new PrintWriter(b);) \r\n\t\t\t {\r\n\t\r\n\t\t\t\tp.println(cashOnHand + \",Cash On Hand\");\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Seta o valor de sessionContext | public void setSessionContext(SessionContext sessionContext) {
this.sessionContext = sessionContext;
} | [
"void setContext(SessionContext current);",
"public void setSession(Session session);",
"public void setSession(Session session) { this.session = session; }",
"void setSession(Session session);",
"public void setCurrentContext(HttpContext context) {\r\n this.currentContext = context;\r\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks to see if the value models need to change from TextModels to DateModels and vice versa. | private void checkModels()
{
if (myDataType != null)
{
SpecialKey specialKey = myDataType.getMetaDataInfo().getSpecialTypeForKey(myField.get());
if (specialKey instanceof TimeKey)
{
if (!(myCriterionValue instanceof DateModel))
{
... | [
"@Override\r\n protected boolean handleIsDateType()\r\n {\r\n return UMLMetafacadeUtils.isType(\r\n this,\r\n UMLProfile.DATE_TYPE_NAME);\r\n }",
"@Override\n public void onChange() {\n java.lang.String callbackArg_0 = android.databinding.adapters.TextViewBi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build an account instance with the default fee structure. | public FeeAccount ()
{
} | [
"protected BalanceOwingAccount() {\n /* empty constructor for builder */\n }",
"private Account createAccount8() {\n Account account = new Account(\"123456008\", \"Jean Sans Enfant\",\n new SimpleDate(4, 23, 1976).asDate(), \"jse@qui.fr\", true, false, new CreditCar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the uid of the deleted category. | @Basic
@Column(name = "CATEGORY_UID", nullable = false)
public long getCategoryUid() {
return categoryUid;
} | [
"long getCategoryUid();",
"public String getUid() {\n\t\treturn cat.getUid();\n\t}",
"public Integer getCategoryDelete() {\n return categoryDelete;\n }",
"public Long getTncDeleteuserid() {\n return tncDeleteuserid;\n }",
"public int removeCategory(long userId, long categoryId );",
"St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setting off Alarm! Playing sound and snooze timer. Additional counting number of snoozers times from first settoff | private void setoffAlarm() {
playSound();
super.snooze();
snoozeCounter++;
} | [
"public void resetAlarmClock(){\n \tsetStartToZero();\n \tsnoozeCounter = 0;\n \tprogressMax = getTimeLeft();\n \tprogressNow = 0;\n \tunpauseAlarmClock();\n runUpdate();\n }",
"public void snoozeAlarm() {\n AlarmHelper ah = new AlarmHelper();\n ah.snoozeAlarm();\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .com.cst14.im.protobuf.UserDetail userDetail = 10; | com.cst14.im.protobuf.ProtoClass.UserDetail getUserDetail(); | [
"com.cst14.im.protobuf.ProtoClass.UserDetailOrBuilder getUserDetailOrBuilder();",
"com.lxd.protobuf.msg.result.user.User.User_OrBuilder getUserOrBuilder();",
"com.lxd.protobuf.msg.result.user.User.User_ getUser();",
"public com.cst14.im.protobuf.ProtoClass.UserDetailOrBuilder getUserDetailOrBuilder() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |