query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
$ANTLR end "rule__PrimitiveType__TypeNameAssignment_0" $ANTLR start "rule__PrimitiveType__ArrayAssignment_1" InternalTaskDefinition.g:3387:1: rule__PrimitiveType__ArrayAssignment_1 : ( ruleArrayType ) ; | public final void rule__PrimitiveType__ArrayAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalTaskDefinition.g:3391:1: ( ( ruleArrayType ) )
// InternalTaskDefinition.g:3392:2: ( ruleArrayType )
{
/... | [
"public final void rule__PrimitiveType__ArrayAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:2302:1: ( ( ruleArrayType ) )\n // InternalBasicAttributes.g:2303:2: ( ruleArrayType )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets arguments for this command to newArguments. | public void setArguments(String[] newArguments) {
// Checking if command is recursive. We don't need to include the recursive
// flag in the command arguments.
if (this.containsRecrusiveFlag(newArguments)) {
this.arguments = Arrays.copyOfRange(newArguments, 1, newArguments.length);
this.recursiv... | [
"void setArguments(String arguments);",
"public void setArguments(List<CommandLineBinding> arguments) {\n this.arguments = arguments;\n }",
"public void setArguments (String arguments)\n {\n this.arguments = arguments;\n }",
"public void setCommandLineArgs(final String[] args) {\r\n \t\tthis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines whether this path starts with a specified prefix. A path is a prefix if it is equal to getPrefix(prefix.size()). | public boolean startsWith(
Path prefix
) {
return prefix.size <= this.size && prefix.equals(getPrefix(prefix.size));
} | [
"public boolean startsWith(String prefix) {\n return path.startsWith(prefix);\n }",
"public boolean startsWith(String prefix) {\n\t\treturn match(prefix, 0, false);\n\t}",
"public boolean startsWith(String prefix) {\n Trie root = this;\n char[] words = prefix.toCharArray();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this character is facing right | boolean isFacingRight(); | [
"public abstract boolean facingRight();",
"public boolean isGoingRight() {\n return direction.getX() > 0.0f;\n }",
"private boolean isRight() {\n return (Gdx.input.isTouched() && game.cam.getInputInGameWorld().x >= SpaceShooter.WIDTH / 2);\n }",
"public boolean fishAtRightEdge() { // has t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the pod service. | public void setPodService(IPODService podService) {
this.podService = podService;
} | [
"public void setService(Service service)\n {\n this.service = service;\n }",
"private void setService(Service service) {\n this.service = service;\n }",
"void setService(java.lang.String service);",
"void setServiceName(String serviceName);",
"public abstract void setServiceName(Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts the specified values into a List of terms. | private static List<Term> toTerms(ByteBuffer... values)
{
List<Term> terms = new ArrayList<>();
for (ByteBuffer value : values)
terms.add(toTerm(value));
return terms;
} | [
"<Type extends PropertyValue<?, ?>> ListTerm<Type> createListTermFromTerms(\n\t\t\tTerm<Type>... values);",
"protected final List getValuesAsList(String values)\r\n {\r\n List list = new LinkedList();\r\n StringTokenizer tok = new StringTokenizer(values, DELIMITER);\r\n\r\n while(tok.hasMoreTokens())\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__SetStateStat__Group_2_1__1" $ANTLR start "rule__SetStateStat__Group_2_1__1__Impl" InternalReflex.g:7102:1: rule__SetStateStat__Group_2_1__1__Impl : ( ( rule__SetStateStat__StateAssignment_2_1_1 ) ) ; | public final void rule__SetStateStat__Group_2_1__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalReflex.g:7106:1: ( ( ( rule__SetStateStat__StateAssignment_2_1_1 ) ) )
// InternalReflex.g:7107:1: ( ( rule__SetStateStat__State... | [
"public final void rule__SetStateStat__Group_2_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:7041:1: ( rule__SetStateStat__Group_2_0__1__Impl )\n // InternalReflex.g:7042:2: rule__SetStateStat__Group_2_0__1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify that stateID is received into call before caller is notified. | @Test(timeout=60000)
public void testReceiveStateBeforeCallerNotification() throws IOException {
AtomicBoolean stateReceived = new AtomicBoolean(false);
AlignmentContext alignmentContext = Mockito.mock(AlignmentContext.class);
Mockito.doAnswer((Answer<Void>) invocation -> {
Thread.sleep(1000);
... | [
"boolean hasFromIdIsReceived();",
"private void assertState() {\n \tif( WAITING_FOR_NUKE != getState() ) {\n\t\t\tlog.error(\"Called state WAITING_FOR_NUKE(\" + WAITING_FOR_NUKE + \"), when in state \" + getState() + \".\");\n\t\t\tthrow new RuntimeException(\"Called state WAITING_FOR_NUKE(\" + WAITING_FOR_NUKE ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ \brief Whether we are allowed to insert extra padding between fields. / These padding are added to help AddressSanitizer detect / intraobjectoverflow bugs. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/tools/clang/lib/AST/Decl.cpp", line = 3814,
FQN="clang::RecordDecl::mayInsertExtraPadding", NM="_ZNK5clang10RecordDecl21mayInsertExtraPaddingEb",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tool... | [
"public boolean hasPadding() {\n return (buffer.get(0) & 0x20) == 0x020;\n }",
"protected boolean isUsePadding() {\r\n\t\treturn false;\r\n\t}",
"private Annotated padAnnotation(Annotated annot, int padding) {\n AnnotationBuilder builder = Annotation.builder();\n annot.getBlockStream()\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
clear() This method set the bit to 0. | public void clear()
{
bitHolder.setValue(0);
} | [
"public void clear() {\n\t\tint length = bits.length;\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tbits[i] = 0;\n\t\t}\n\t}",
"public void clearBits()\r\n {\r\n clear();\r\n }",
"public void clear(final int flag) {\n flags &= ~flag;\n }",
"public final BitField clear() {\n this.f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simple test to find the only rank='class' from the searchIteratorDenormalized function. | @Test
public void testSearchIteratorDenormalized(){
Iterator<Map<String,Object>> taxonIt = taxonDAO.searchIteratorDenormalized(-1, null, null, null, null, new String[]{"class"}, false, null);
assertTrue(taxonIt.hasNext());
Map<String,Object> row = null;
int qty=0;
while(taxonIt.hasNext()){
row = taxonI... | [
"@Test\n\tpublic void searchIteratorStatusRankCriteria(){\n\t\tRegionQueryPart regionQueryPart = new RegionQueryPart();\n\t\tregionQueryPart.setRegion(new String[]{\"AB\",\"bc\"});\n\t\tregionQueryPart.setRegionSelector(RegionSelector.ANY_OF);\n\t\t\n\t\tIterator<TaxonLookupModel> it = taxonDAO.searchIterator(200, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for all cases where a decompression stop is required, that stop is at 15 feet if minutes is 0, no decompression stop is required | public int decompressionStopMinutesRepetitiveDiveFeet (char group, int depth, int minutes) {
int totalDiveTime = getTotalDiveTimeFeet (group, depth, minutes);
if (totalDiveTime == -1) {
return -1; //error - either depth, pressure group, or minutes is out of range
}
int row = getIndexDepthFeet (depth);
i... | [
"public int decompressionStopMinutesFirstDiveMeters (int depth, int minutes) {\n\t\tint row = getIndexDepthMeters (depth);\n\t\tif (row == -1) {\n\t\t\treturn -1; //error - depth out of range\n\t\t}\n\t\t\n\t\tint col = getColFirstDiveTable (row, minutes);\n\t\tif (col == -1) {\n\t\t\treturn -1; //error - minutes o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retun True if arrows are available. Overridden in : L2PcInstance | protected boolean checkAndEquipArrows()
{
return true;
} | [
"protected boolean checkAndEquipArrows() {\n // Check if nothing is equipped in left hand\n if (getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND) == null) {\n final ItemInstance activeWeapon = getActiveWeaponInstance();\n if (activeWeapon != null) {\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
looks for the relation created by setCreator and returns the associated resource, which must be a User | public User getCreator() {
// Something dodgy going on here. Seem to get different results wihthout
// the transient variable
if (this.creator == null) {
this.creator = (User) _(CreatorService.class).getCreator(this);
}
return creator;
} | [
"public T getCreatorUser() {\n return this.creatorUser;\n }",
"public java.lang.Object getCreatedByResourceID() {\n return createdByResourceID;\n }",
"private MiniUser getCreator(int hikeId) {\n ResultSet rs = databaseConnector.callProcedure(\"get_creator_info\", Arrays.asList(\"\" + ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of compute transitive closure to true, if the parameter is true. Otherwise it still uses the old value. | public void updateComputeTransitiveClosure(boolean computeTransitiveClosure){
if(computeTransitiveClosure){
this.computeTransitiveClosure = true;
}
} | [
"default boolean needsTransitiveClosureForEvaluation() { return false; }",
"Configuration setTransitive(boolean t);",
"public void setComputed(boolean value)\n {\n this.isComputed = value;\n }",
"public void setTransitive(boolean transitive) {\n this.transitive = transitive;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class Server Connection | ServerConnection createServerConnection(); | [
"public Connection createConnection();",
"public ServerConnection() {\r\n\r\n }",
"Connection createConnection();",
"public Connection() {\n\tthis(\"localhost\", 61613);\n }",
"public PServerConnection() {\n }",
"public ServerConnection getServerConnection()\n {\n return m_oServerConnec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a validation builder for InstructionForReturns. | @Nonnull
public static UBL22ValidatorBuilder <InstructionForReturnsType> instructionForReturns ()
{
return UBL22ValidatorBuilder.create (InstructionForReturnsType.class);
} | [
"@Nonnull public static UBL23ReaderBuilder<InstructionForReturnsType> instructionForReturns(){return UBL23ReaderBuilder.create(InstructionForReturnsType.class);}",
"@Nonnull\n public static UBL23WriterBuilder <InstructionForReturnsType> instructionForReturns ()\n {\n return UBL23WriterBuilder.create (Instruc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set to true whenthenative ad supports buyerspecific privacy notice | public void setPrivacy(boolean privacy) {
mPrivacy = privacy;
} | [
"@Override\n public boolean isAgreedToPrivacy() {\n return _contactInfo.isAgreedToPrivacy();\n }",
"@Override\n public boolean getAgreedToPrivacy() {\n return _contactInfo.getAgreedToPrivacy();\n }",
"public String getPrivacy();",
"private WebElement getPublicPrivacySetting() {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column order_list.OrderProfile | public void setOrderprofile(String orderprofile) {
this.orderprofile = orderprofile == null ? null : orderprofile.trim();
} | [
"public String getOrderprofile() {\n return orderprofile;\n }",
"@objid (\"6680b948-597e-4df9-b9a2-de8dc499acb3\")\n void setOwnerProfile(Profile value);",
"public void setProfile(Profile profile) {\n\t\tthis.profile = profile;\n\t}",
"public void setProfile(Profile profile) {\n _profile =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate an XML Document with the contents of a mappings handler. | public static Document toDocument(Mappings mappings) {
Document document = new Document(mappings.getTemplate().toElement(JSONUtils.toMap(mappings.getNamespaces())));
return document;
} | [
"public MapXmlHandler() {\r\n }",
"public static String toXML(Mappings mappings) {\n\t\treturn XMLUtils.toDocument(mappings).toXML();\n\t}",
"private Document createMapping() {\n return getIndexOperations().createMapping();\n }",
"private void generateXGHMapping() {\n if (xClassDocMap == n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a pairing with the given word, and frequency of one. | public WordWithFrequency(String requiredWord)
{
word = requiredWord;
frequencySoFar = 1;
} | [
"public void addToMap(String word, int count){\n if(!freqMap.containsKey(word) && word.length()>=1){ \r\n freqMap.put(word, count);\r\n }\r\n \r\n }",
"private void updateFrequency(String word)\r\n {\n Integer currentFrequency = wordFrequencies.get(word);\r\n \r\n totalWordCount++;\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this worker is sandboxed. | public abstract boolean isSandboxed(); | [
"public Boolean isSandboxMode()\n\t{\n\t\treturn isSandboxMode( getSession().getSessionContext() );\n\t}",
"@Override\n public boolean isSandbox() {\n return _appVersion.isSandbox();\n }",
"public Boolean isSandboxMode(final SessionContext ctx)\n\t{\n\t\treturn (Boolean)getProperty( ctx, SANDBOXMOD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the templates for your service. Filtered by template type if not null. | TemplateList getAllTemplates(String templateType) throws NotificationClientException; | [
"public List<Template> getTemplates() {\r\n\t\treturn templateDao.findAll();\r\n\t}",
"public Collection<Template> getListTemplates()\n\t{\t\t\n\t\tTemplateDAO dao = new TemplateDAO();\n\t\treturn dao.getAll(UtilCodesEnum.CODE_ACTIVE.getCode(),null);\t\t \n\t}",
"public ArrayList<Template> getTemplates() {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO false? identifier > Identifier() nodeToken > "." nodeToken1 > "isLast" nodeToken2 > "(" nodeToken3 > ")" | public Snippet visit(DotIsLast n, Snippet argu) {
Snippet _ret= new Snippet("","",null,false);
_ret = n.identifier.accept(this, argu);
n.nodeToken.accept(this, argu);
n.nodeToken1.accept(this, argu);
n.nodeToken2.accept(this, argu);
n.nodeToken3.accept(this, argu);
//ret... | [
"public void visit(DotIsLast n, String argu) {\n\t n.identifier.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t }",
"String getEndingNode();",
"public Token getEn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for property snmpVersion. | public SNMPVersion getSnmpVersion() { return version ; } | [
"public String get_snmpversion()\r\n\t{\r\n\t\treturn this.snmpversion;\r\n\t}",
"public Byte getSnmpVersion() {\r\n return snmpVersion;\r\n }",
"public Number getVersion() {\n return (Number)getAttributeInternal(VERSION);\n }",
"public String getSnmpVersionView() {\r\n return snmpVersion... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replace the contents of a file with another and returns the list of level names in a word list | public static String[] addFromAFileToAnotherFileAndGetTitles(File from, File to) throws InvalidWordListException{
boolean levelExist = false;
ArrayList<String> returns = new ArrayList<String>(); // the level titles to return
ArrayList<String> wordsToCopy = new ArrayList<String>(); // the words to copy from a file... | [
"public void loadWords(String level) {\n\t\tif(file.getName().equals(\"NZCER-spelling-lists.txt\")){\n\t\tReadNWrite wordlist = new ReadNWrite(file);\n\t\twords = wordlist.chooselevelwordlist(\"%\" + level);\n\t\tselectedWords = wordlist.choosewords(words);\n\t\t}else {\n\t\t\tReadNWrite wordlist = new ReadNWrite(f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Issue a getGet and return immediately. | public void issueGetGet()
{
if(isDestroyed) throw new RuntimeException("pvaClientPutGet was destroyed");
if(PvaClient.getDebug()) {
System.out.println("PvaClientPutGet::issueGetGet()"
+ " channelName " + pvaClientChannel.getChannel().getChannelName());
}
... | [
"public void getGet()\n {\n if(isDestroyed) throw new RuntimeException(\"pvaClientPutGet was destroyed\");\n if(PvaClient.getDebug()) {\n System.out.println(\"PvaClientPutGet::getGet()\"\n + \" channelName \" + pvaClientChannel.getChannel().getChannelName());\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the user prefs' pdf book file value. | Path getPdfBookFilePath(); | [
"public String verPathPDF(){\n return this.pdfFile.getAbsolutePath();\n }",
"Path getPropertyBookFilePath();",
"private File getFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(Main.class);\n String filePath = prefs.get(FILE_PATH, null);\n if (filePath != null) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setup servlet objects that will be used for the test: config (MockServletConfig) servletContext (MockServletContext) request (MockHttpServletRequest response (MockHttpServletResponse) session (MockHttpSession) | protected void setUpServletObjects() throws Exception
{
servletContext = new MockServletContext();
config = new MockServletConfig(servletContext);
session = new MockHttpSession();
session.setServletContext(servletContext);
request = new MockHttpServletRequest(session);
... | [
"@Before\r\n public void setUp() {\r\n servlet = new InputHandler();\r\n// request = new MockHttpServletRequest();\r\n// response = new MockHttpServletResponse();\r\n }",
"public static synchronized MockServletContext createServletContext() {\r\n return new MockServletContext(\"t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The type of file. | FileType getType(); | [
"public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }",
"public String getFileType() {\n return fileType;\n }",
"public java.lang.String getFileType() {\n return fileType;\n }",
"public Integer getFileType() {\n return fileType;\n }",
"public String getFileTyp()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Place a String on the clipboard, and make this class the owner of the Clipboard's contents. | public void setClipboardContents( String aString ){
StringSelection stringSelection = new StringSelection( aString );
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents( stringSelection, (ClipboardOwner) this );
} | [
"public void setClipboardContents(String aString) {\n StringSelection stringSelection = new StringSelection(aString);\n Clipboard clipboard =\n Toolkit.getDefaultToolkit().getSystemClipboard();\n clipboard.setContents(stringSelection, this);\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Listener for on drop down list click | public interface OnDropDownListClick {
/**
* Called when a item on the list is clicked
*
* @param show The item clicked
*/
void onSuggestionClickListener(ApiResult show);
} | [
"private void activity_dropdownActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"public void dropdown_Selection(){\n\t\tlog.info(\"selecting the dropdown\");\n\t\tWebElement select = driver.findElement(dropdown);\n\t\t\n\t\t\n\t\tList<WebElement> options = select.findElements(By.tagName(\"option\"));\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column account_chart_template.bank_account_code_prefix | public void setBankAccountCodePrefix(String bankAccountCodePrefix) {
this.bankAccountCodePrefix = bankAccountCodePrefix == null ? null : bankAccountCodePrefix.trim();
} | [
"public String getBankAccountCodePrefix() {\n return bankAccountCodePrefix;\n }",
"public void setCashAccountCodePrefix(String cashAccountCodePrefix) {\n this.cashAccountCodePrefix = cashAccountCodePrefix == null ? null : cashAccountCodePrefix.trim();\n }",
"public String getCashAccountCodeP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the given string indicates that the given stat is for a WA member. | public static boolean isWaMember(String stat) {
return stat.equals(Nation.WA_MEMBER) || stat.equals(Nation.WA_DELEGATE);
} | [
"public static boolean hasA( String w, String letter ) \n {\n\treturn w.indexOf(letter) >= 0;\n\t// str.indexOf() returns a value >= 0 if the letter is in str\n }",
"public static boolean hasA( String w, String letter ) {\n\treturn w.indexOf(letter) != -1;\n }",
"public static boolean hasA( String w, S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reading wsdl from the provided jar file. The format for documetn base URI would be "jar:file:[JAR_FILE_LOCATION]!/[WSDL_JAR_ENTRY_PATH]" | public static Definition readWSDLFromJarFile(final File file,
final String jarEntryLocation)
throws WSDLException, IOException {
InputStream wsdlStream = null;
if (file.exists() && file.canRead()) {
final JarFile jarFile = new JarFile(file);
final JarEntry jarEntry = jarFile.getJarEntry(jarEntryLoc... | [
"Map readWSDL(File dir) throws WSDLException;",
"private static void loadJar( File jarFile )\n\t{\n\t\ttry {\n\t\t\tURL url = jarFile.toURI().toURL();\n\n\t\t\tClass<?>[] parameters = new Class[] { URL.class };\n\n\t\t\tURLClassLoader sysLoader = (URLClassLoader)ClassLoader.getSystemClassLoader();\n\t\t\tClass<?>... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Update status of Current Booking for : on my way , arrived | @POST("/booking/set_notify_status")
Call<ResponseViews.UpdateBookingStatusResponse> updateNotifyStatusOfCurrentBooking(@Query("id") int ownerId, @Query("token") String token, @Query("booking_id") long bookingId,
@Query("notify_s... | [
"@POST(\"/booking/set_status\")\n Call<ResponseViews.UpdateBookingStatusResponse> updateBookingStatusOfCurrentBooking(@Query(\"id\") int ownerId, @Query(\"token\") String token, @Query(\"booking_id\") long bookingId, @Query(\"status\") int statusVal,@Query(\"reason\") String message, @Query(\"who\") int who);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when SequenceReset has been received. | default void onSequenceResetReceived(SessionID sessionID, int newSeqNo, boolean gapFillFlag) {
} | [
"protected void onReset() {}",
"protected void resetSequence() {\n doQuery(\"ALTER SEQUENCE feedentryqueue_id_seq RESTART\");\n }",
"@Override\n protected boolean checkSeqResetSeqNum() {\n return false;\n }",
"public void decodeReset() {\n iChannel = -1;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns true if the dot at location (i,j) has been clicked, false otherwise | public boolean hasBeenClicked(int i, int j){
return model[i][j].hasBeenClicked();
} | [
"public boolean isClicked(int x, int y) {\n boolean in_flag = false ;\n int i ;\n int j=0 ;\n for (i=1; i<4; i++) {\n j=i-1 ;\n if ((((ypoints[i] <= y) && (y < ypoints[j])) || ((ypoints[j] <= y) && (y < ypoints[i]))) \n && (x < (xpoints[j] - xpoints[i]) *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method displayHeader This method displays the header to the screen | private void displayHeader(String header)
{
System.out.println("\n***********************************");
System.out.println(" " + header + " ");
System.out.println("***********************************\n");
} | [
"public static void printHeader()\n {\n \n System.out.println (\"\\n\\t**************************Payroll Report***************************\");\n System.out.printf (\"\\n\\t%-20s%20s\",\"Name: \\t\", name);\n System.out.printf (\"\\n\\t%-20s%20s\",\"Course:\\t\", course);\n System.out.printf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds a shortest path, if one exists, between nodes s and t. The path will be a list: (s, ..., t). If no path exists, then this method will return null. | public List<Node> findShortestPath(Node s, Node t); | [
"@Override\n public List<Node> findShortestPath(Node s, Node t)\n {\n nodeDists.clear(); //clear previously calculated distances\n\n recordNodeDistances(s, t); //record node distances to target\n\n LinkedList<Node> shortestPath = new LinkedList<Node>();\n\n shortestPath.addLast(s);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds a new robot with in a specific maze | public Robot(Maze maze) {
this.maze = new Maze(maze);
botName = "Alex";
currentCol = maze.getStartCol();
currentRow = maze.getStartRow();
} | [
"private void constructMaze() {\n Random r = new Random();\r\n // generate random numbers between 0 and dimension (non-inclusive)\r\n int randomStartI = r.nextInt(columnCount); // row/i coordinate\r\n int randomStartJ = r.nextInt(rowCount); // column/j coordinate\r\n constructMaze... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ given a set of doubles speedSum = the sum of all elements of the set currentSpeedCount = number of elements in the set to increase performance keeping reference to individual elements is not needed | private void updateAverageSpeed(double speed){
speedSum += speed;
currentSpeedCount++;
if(topSpeed<speed) topSpeed= speed;
} | [
"private void setSpeedValues(){\n minSpeed = trackingList.get(0).getSpeed();\n maxSpeed = trackingList.get(0).getSpeed();\n averageSpeed = trackingList.get(0).getSpeed();\n\n double sumSpeed =0.0;\n for (TrackingEntry entry:trackingList) {\n\n sumSpeed += entry.getSpeed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Integer'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseInteger(sensorDeploymentLanguage.Integer object) {
return null;
} | [
"public T caseInteger(org.hl7.fhir.Integer object) {\n\t\treturn null;\n\t}",
"public T caseIntegerValue(IntegerValue object) {\n\t\treturn null;\n\t}",
"public IntType asInt() { return null; }",
"public T casePrimitiveTypeInt(PrimitiveTypeInt object) {\n\t\treturn null;\n\t}",
"public T caseInteg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
In this method an instance of the outer class is needed to instantiate the inner using 'animal.new InnerClass()'. | public static InnerAnimal createInnerClassInStaticMethod(MemberInnerClassAnimal animal) {
InnerAnimal ianimal = animal.new InnerAnimal();
return ianimal;
} | [
"public InnerAnimal createInnerClass() {\n\t\tInnerAnimal ianimal = new InnerAnimal();\n\t\treturn ianimal;\n\t}",
"@Test\n\tpublic void makeInstanceOfInnerClassFromOuterShouldReturnInnerClassInstance() {\n\t\tprint(\"Test: makeInstanceOfInnerClassFromOuterShouldReturnInnerClassInstance\");\n\t\t\n\t\tOuter outer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
toString() Method Override. returns "Thermostat on day setting". | public String toString() {
return "Thermostat on day setting";
} | [
"public String toString()\n {\n String workDayStr = new String(\"\");\n workDayStr = workDayStr.concat(date.toString());\n workDayStr = workDayStr.concat(\" | \");\n workDayStr = workDayStr.concat(timeSlot.toString());\n return workDayStr;\n }",
"@O... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether the working version being checkedin has an enabled action. | public boolean
hasEnabledAction()
{
return pHasEnabledAction;
} | [
"public boolean isPreCheckin();",
"public boolean isRunEnabled() {\n\t\treturn methods.settings.getSetting(173) == 1;\n\t}",
"public boolean isCheckedOut();",
"boolean hasBuyArtifactState();",
"public boolean enabled() {\n return _enabled & _pp > 0;\n }",
"protected boolean isChangeSetsEnabled() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ TODO: 1. Create a handler that places an email in the SPAM folder if it detects a phrase "pennies a day" in any case (upper, lower, camelcase, etc.) 2. However, if the email is marked LOW, HIGH, or URGENT priority, then do nothing. 3. Wire this handler to an email processor. | @Test
public void testSpam() {
Email good = new Email();
good.addTo("it@lportal.com");
good.setFrom("hr@lportal.com");
good.setSubject("VPN no worky");
good.setBody("Please fix our VPN connection!");
processor.processEmail(good);
assertFalse("Email is not spam but is marked spam!", good.getFolder().eq... | [
"@Test\n\tpublic void testReorderingHandlers() {\n\n\t\tEmail client = new Email();\n\t\tclient.addTo(\"macy@lportal.com\");\n\t\tclient.setFrom(\"rachel@liferay.com\");\n\t\tclient.setSubject(\"An offer you can't refuse!\");\n\t\tclient.setBody(\"We will sell you EE for just pennies a day!\");\n\n\t\tprocessor.pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET : URL API Top | public String getUrlApiTop() {
return this.URL_API_TOP;
} | [
"private String callAPI(String url) throws MalformedURLException, IOException {\n\n\t URL uurl = new URL(url);\n\t HttpURLConnection conn = (HttpURLConnection) uurl.openConnection();\n\t conn.setRequestMethod(\"GET\");\n\t BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInpu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets up a committer for testing. | @Before
public void setup() throws IOException {
committer = new StubCommitter();
File queue = tempFolder.newFolder("queue");
committer.setQueueDir(queue.toString());
committed = false;
// listCommitAdd.clear();
metadata.clear();
metadata.addString(
... | [
"public void setCommitter(final PersonIdent c) {\n \t\tcommitter = c;\n \t}",
"public String getCommitter() {\n return committer;\n }",
"@Before\r\n\tpublic void setUp() {\r\n\t\tman = new Manager(\"Bob\", \"Smith\", \"man@uw.edu\", WorkLoad.HIGH);\r\n\t}",
"@Before\r\n public void setup() {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XMemberFeatureCall__Group_1_0__0" $ANTLR start "rule__XMemberFeatureCall__Group_1_0__0__Impl" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6262:1: rule__XMemberFeatureCall__Group_1_0__0__Impl : ( ( rule__XMemberFeatureCall_... | public final void rule__XMemberFeatureCall__Group_1_0__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6266:1: ( ( ( ... | [
"public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the next page or null if the page doesn't exist | public Page next() {
String[] nextPageInfo = pageName.split("#");
String newPageName = tableName + "#" + (Integer.parseInt(nextPageInfo[1]) + 1);
try {
return load(newPageName);
} catch (Exception e) {
return null;
}
} | [
"public String getNextPage(){\n try {\n //print next page\n return \"```json\\n\" + getPage(page.incrementAndGet()) + \"```\";\n }catch(NullPointerException e){\n //if next page doesnt exist, undo page number value change\n page.decrementAndGet();\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Defines a single VAT item valid within a country. | @MustImplementEqualsAndHashcode
public interface IVATItem extends IHasDisplayText, IHasID <String>, ILocalDatePeriod
{
/**
* @return The non-<code>null</code> type of this item.
*/
@Nonnull
EVATType getType ();
/**
* @return The percentage of this VAT type. Must be between 0 and 100.
*/
@Nonnull
... | [
"public PurchaseVATCode() {\n this.setEmcLabel(\"Purchase VAT Code\");\n this.setMandatory(false);\n }",
"public void setVat(double vat) {\n this.vat = vat;\n }",
"public double getItemVat() {\r\n\t\treturn itemVAT;\r\n\t}",
"public void setVATNumber(final Address item, final String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of rotate method, of class GPSCoordinate. | @Test
public void testRotate() {
GPSCoordinate testCoordinatesRotate[] = {
new GPSCoordinate(0.0, 0.01), //SE shifted
new GPSCoordinate(0.0, 0.0), //SW shifted
new GPSCoordinate(0.01, 0.0), // NW shifted
new GPSCoordinate(0.01, 0.01), //NE shifted
new GPSCoordinate(0.0, 0.01),... | [
"@Test\n void rotate() {\n Vector2f v2 = v.rotate(180);\n assertEquals (-3.0f, Math.round(v2.getX()));\n assertEquals (-4.0f, Math.round(v2.getY()));\n }",
"public void rotate(Point P, int rotation) {\n\n\n }",
"@Test\n\tpublic void Rotate90Test(){\n\t\t\n\t\tRunGame game = new Run... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of addNodeNavigatorListener method and removeNodeNavigatorListener and notifyNodeNavigatorListeners | @Test
public void testAddRemoveNodeNavigatorListener() {
MyNodeNavigatorListener myNodeNavigatorListener = new MyNodeNavigatorListener();
assertEquals( 0, myNodeNavigatorListener.nodeLayoutChangedCount );
NodeNavigatorImpl nodeNavigatorImpl = new NodeNavigatorImpl();
nodeNavigatorIm... | [
"@Test\r\n\tpublic void testAddListener() {\r\n\t\t// workspace listener\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set whether or not the initial move has been passed. | void setInitialMovePassed(boolean initialMovePassed); | [
"void setInitialMoveTaken(boolean initialMoveTaken);",
"public void setFirstMove(boolean b) {\n firstMove = b;\n }",
"boolean getInitialMovePassed();",
"public void resetMove() {\n\t\tthis.moveMade = false;\n\t}",
"boolean getInitialMoveTaken();",
"void setValidMove(boolean valid){\n vali... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
register an end point for STOMP communication STOMP clients can send messages to /app/message | @Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/messages").withSockJS();
} | [
"@Override\n\tpublic void registerStompEndpoints(StompEndpointRegistry registry) {\n\t\tregistry.addEndpoint(\"/messages\");\n\n\t\t// Register additional fallback handling using sock-js\n\t\t// (http://myserver.com/ws/rest/messages)\n\t\tregistry.addEndpoint(\"/messages\").withSockJS();\n\n\t}",
"@Override\n\tpu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if order can be finalized | boolean canBeFinalized(Order order); | [
"private boolean allOrdersFinished() {\n for (TransportOrder order : kernel.getTCSObjects(TransportOrder.class)) {\n if (!order.getState().isFinalState()) {\n return false;\n }\n }\n return true;\n }",
"boolean isFinalized();",
"@Override\n public boolean needsToRunAfterFinalized()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return first matching document containing some of given tasks and having aspect notEditable property notEditable=true | private NodeRef getExistingDocumentNodeRef(List<Task> dvkTasks) {
// TODO: maybe check if all returned tasks belong to one document?
for (Task task : dvkTasks) {
NodeRef docRef = getTaskDocument(task);
if (Boolean.TRUE.equals(nodeService.getProperty(docRef, DocumentCommonModel.Pr... | [
"private Task getExistingTask(List<Task> dvkTasks) {\n Task task = null;\n for (Task tsk : dvkTasks) {\n NodeRef docRef = getTaskDocument(tsk);\n if (task == null || !nodeService.hasAspect(docRef, DocumentCommonModel.Aspects.NOT_EDITABLE)) {\n task = tsk;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of CrearArchivo method, of class RandomX. | @Test
public void testCrearArchivo() {
System.out.println("CrearArchivo");
String Ruta = "";
RandomX instance = null;
instance.CrearArchivo(Ruta);
// TODO review the generated test code and remove the default call to fail.
} | [
"@Test\n public void testLeerArchivo() {\n System.out.println(\"LeerArchivo\");\n String RutaArchivo = \"\";\n RandomX instance = null;\n Object[] expResult = null;\n Object[] result = instance.LeerArchivo(RutaArchivo);\n assertArrayEquals(expResult, result);\n //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
orders the columns and returns the sign Orders the columns of a tableau and returns the sign of the required permutation | public int orderCol(){
int result = 1;
for(LinkedList<Integer> l: this.tab){
result = result*order(l);
}
return result;
} | [
"DataFrame<R,C> sign();",
"public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new TransparentMouseEvent | public TransparentMouseEvent(boolean bool) {
super(EventType.TRANSPARENT_MOUSE.getType());
this.bool = bool;
} | [
"public void makeTransparent(){\n sign.changeColor(sign.getColor() + \"-\");\n frame.changeColor(frame.getColor() + \"-\");\n square.changeColor(square.getColor() + \"-\");\n }",
"public TransparencyDemo() {\r\n super();\r\n view3DButton.addItemListener(this);\r\n draw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the ejbFindMessages method. | public void test_ejbFindMessages() throws Exception {
Date now = new Date();
addMessage("1", "first category", "first content type", now, "first message");
addMessage("2", "second category", "second content type", now, "second message");
final Filter filter = new EqualToFilter("gui... | [
"protected Message[] ejbFindMessages(SearchCriteriaDTO criteria) throws PersistenceException {\n if (criteria == null) {\n throw new IllegalArgumentException(\"search criteria must not be null\");\n }\n\n return messageEJB.findMessages(criteria);\n }",
"public void test_ejbFindM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'CL_MAIL_GROUP' field. | public java.lang.CharSequence getCLMAILGROUP() {
return CL_MAIL_GROUP;
} | [
"public java.lang.CharSequence getCLMAILGROUP() {\n return CL_MAIL_GROUP;\n }",
"public void setCLMAILGROUP(java.lang.CharSequence value) {\n this.CL_MAIL_GROUP = value;\n }",
"public String getMcGgroup() {\n return mc_group;\n }",
"public String getGroup() {\n return group;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of nearby stops for the given location | public static ObaStop[] getNearbyStops(Location l) throws IOException {
ObaStopsForLocationResponse response = new ObaStopsForLocationRequest.Builder(l)
.setRadius(DEFAULT_SEARCH_RADIUS)
.build()
.call();
return response.getStops();
} | [
"List<LocatedObject> getLocatedObjects(double latitude, double longitude);",
"public List searchLocations(Location location);",
"public List<Location> getLocations();",
"private static List<Location> getNearestLocations(Location location) {\n final List<Location> locations = new LinkedList<Location>();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string idfa = 31; | java.lang.String getIdfa(); | [
"public String get(int absoluteAyaNum);",
"String getInt_lit();",
"public String nextAvalibleID()\r\n\t{\r\n\t\t//creates a blank string as all Id's have to be 3 digits and if it was an itger it would remove the leading 0's\r\n\t\tString id = \"\";\r\n\t\t//If the pointer is 0 then the id needs to be 001\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to send Test Reports in email after every suite to users It will send email in both passed and failed test cases except test cases skipped | @AfterSuite(description = "Sending Mail", enabled = true)
public void sendEMail() {
sendMail(fileDataReader.getExcelData(Constants.SHEET_CREDENTIALS_PATH, "MailIds", 1, 1),
fileDataReader.getExcelData(Constants.SHEET_CREDENTIALS_PATH, "MailIds", 1, 2));
} | [
"public void sendTestFailedNotification(TestSuite suite,\n\t\t\tAFTException applException) throws AFTException {\n\t\t// Read email notification properties...\n\t\t//\n\t\tLOGGER.info(\"---------Inside sendTestFailedNotification---------------------------\");\n\t\tint rowCounter = 0;\n\n\t\tString toAddress = Conf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a SpanTermQuery matching the named term's spans. | public SpanTermQuery(Term term) {
this.term = Objects.requireNonNull(term);
this.termStates = null;
} | [
"public SpanTermQuery(Term term) {\n this.term = term;\n }",
"public SpanTermQuery(Term term, TermStates termStates) {\n this.term = Objects.requireNonNull(term);\n this.termStates = termStates;\n }",
"public MtasSpanWeight(SpanQuery query, IndexSearcher searcher,\n Map<Term, TermContext> ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ expands on a node and gets scores for the node and its new children | private void expand(Node node, StateMachine machine, Role role) throws MoveDefinitionException, TransitionDefinitionException, GoalDefinitionException {
//avoid expanding a null node
if (node == null) {
//System.out.println("null node");
return;
}
//System.out.print("term: " + machin... | [
"public int scoreLeafNode();",
"public void evaluateChildren(Node node) {\n\t\tList<Node> children = node.getChildren();\n\t\tboolean isMAXPlayer = node.isMAX();\n\t\tfor (Node child : children) {\n\t\t\t// == 0 if at the last level or there are no children, i.e. the child is a winning node\n\t\t\tif (child.getMa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds the Total object. | public Builder total(Total total); | [
"public void buildTotalsPanel()\n\t{\n\t\ttotalsPanel = new JPanel();\n\t\t\n\t\t// Add a titled border for the Totals panel:\n\t\ttotalsPanel.setBorder(BorderFactory.createTitledBorder(\"Totals:\"));\n\t\t\n\t\t// Create buttons and text field objects to display the results:\n\t\tsubTotalLabel = new JLabel(\"Subto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the design pattern type. | public DesignPatternType getDesignPatternType() {
return this.designPatternType;
} | [
"public String getPatternType() {\n\t\treturn patternType;\n\t}",
"public String getPatternType() {\n return this.patternType;\n }",
"public int getPatternType ()\n {\n return _root.getInt ( PATTERN_TYPE, DEFAULT_PATTERN_TYPE );\n }",
"DSpecification getDType();",
"public java.lang.String get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cast to list PhoneNumbers. This method for cast to phoneNumbers for test, for task. | ArrayList<PhoneNumber> getPhoneNumbers() {
ArrayList<PhoneNumber> phoneNumbers = new ArrayList<>();
for (String phone : phones) {
phoneNumbers.add(new PhoneNumberImpl(phone));
}
return phoneNumbers;
} | [
"java.util.List<org.roylance.yaorm.TestingModel.Phone>\n getPhoneNumbersList();",
"public List<String> getPhoneNumbers() {\n return phoneNumbers;\n }",
"java.util.List<? extends org.roylance.yaorm.TestingModel.PhoneOrBuilder>\n getPhoneNumbersOrBuilderList();",
"public void getPhoneNum... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Input__NameAssignment_1" $ANTLR start "rule__Input__ValueAssignment_2" InternalBrowser.g:4286:1: rule__Input__ValueAssignment_2 : ( RULE_STRING ) ; | public final void rule__Input__ValueAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalBrowser.g:4290:1: ( ( RULE_STRING ) )
// InternalBrowser.g:4291:2: ( RULE_STRING )
{
// InternalBrowser.g:4291:2... | [
"public final void rule__Annotation__ValueAssignment_0_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9832:1: ( ( RULE_STRING ) )\n // InternalReflex.g:9833:2: ( RULE_STRING )\n {\n // Int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a plot in this PlotView's list at a given index. | public WebPlot getPlot(int i) {
WebPlot p= null;
if (_plots.size() > i) {
p= _plots.get(i);
}
return p;
} | [
"public JPanel getPanelAtIndex(int index) {\n \treturn panels.get(index);\n }",
"public Point getPoint(int index) {\n return points.get(index);\n }",
"Shape get(int index);",
"public Plot getPlot() \r\n\t{\r\n\t\treturn plot;\r\n\t}",
"public Plot getPlot() {\n return plot;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the platform browser restore action. | public void runPlatformBrowserRestore() {
invoke(ActionId.PLATFORM_BROWSER_RESTORE, Data.emptyData());
} | [
"public void restoreApplication() {\n /*\n * Note: on Windows, this is called from the Windows system tray\n * handler thread (created in the Windows DLL), and not from the\n * Swing Event handler thread. It is unsafe to call\n * GUIMediator.restoreView();\n * dire... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stop caching this player's packets. Preserves the alreadycached packets in memory. | public void stopCaching(Player player) {
this.caching.remove(player);
} | [
"public void stopUsingCache()\n {\n this.useCache = false;\n }",
"public void stopSweeper()\r\n\t{\r\n\t\tsynchronized (lock) {\r\n\t\t\tcache = null;\r\n\t\t\tlock.notify();\r\n\t\t}\r\n\t}",
"public static void stopCacheServer() {\n getBridgeServer().stop();\n }",
"void removeFromCache();",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleTypeFacet" $ANTLR start "entryRuleActionFacet" InternalGaml.g:1696:1: entryRuleActionFacet : ruleActionFacet EOF ; | public final void entryRuleActionFacet() throws RecognitionException {
int entryRuleActionFacet_StartIndex = input.index();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 117) ) { return ; }
// InternalGaml.g:1697:1: ( ruleActionFacet EOF )
// InternalGam... | [
"public final void entryRuleFacet() throws RecognitionException {\n int entryRuleFacet_StartIndex = input.index();\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 93) ) { return ; }\n // InternalGaml.g:1359:1: ( ruleFacet EOF )\n // InternalGaml.g:1360:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates how many laps a car has done by checking its old and new segment index. | public void updateLaps() {
int totSegs = (segments.size()-1)/2;
if (oldSeg == totSegs && curSeg == 0) {
if (!cheatedLap) {
laps++;
} else cheatedLap = false;
} else if (oldSeg == 0 && curSeg == totSegs){
cheatedLap = true;
}
} | [
"public void updateSegment() {\n\t\tint i = curSeg * 2;\n\t\tint iChange = 2;\n\t\tint seg = i;\n\t\toldSeg = curSeg;\n\t\t\n\t\t// This variable is needed to keep looking even though a segment change\n\t\t// has been found. This is needed since the car could possibly pass\n\t\t// through multiple segments in one f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test Case For Sort The Data of USCensusCSV By Population | @Test
public void givenUSCensusData_WhenSortedByPopulation_ReturnSortedResult() {
final String CSV_FILE_PATH = "src/test/resources/USCensusData.csv";
try {
usCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.US, CSV_FILE_PATH);
String sortedCensusData = usCensusAna... | [
"@Test\n public void givenTheUSCensusData_WhenSortedOnPopulationDensity_ShouldReturnSortedResult() {\n final String CSV_FILE_PATH = \"src/test/resources/USCensusData.csv\";\n try {\n usCensusAnalyzer.loadIndiaCensusData(US, US_FILE_PATH);\n String sortedCensusData = usCensusAn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
EDIT (DONE) / TASK: Allows the user to edit an item in the library. They will search by title for the item they wish to edit. PRECONDITION: There must be items in the library MODIFIES: An item in the arrayList that the user chooses to edit. POSTCONDITION: Whatever changes the user makes to that certain item will take p... | public void edit(String title){
char inpt;
Scanner e;
Scanner ttl;
String t;
boolean found = false;
Iterator<Item> i = items.iterator();
Item current = new Item();
while(i.hasNext()){
current = i.next();
//First we have to find the title ... | [
"protected abstract void editItem();",
"private void editTitle()\n {\n int index = getIndexFromUser(\"edit\");\n \n String newTitle;\n System.out.print(\"What did you want the new title to be?: \");\n newTitle = input.nextLine();\n\n shoppingList.editItemTitle(index-1,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shifts every dead block contained in a row < ROW one coordinate position down. Note that this will overwrite ROW. Live Tetrimino blocks are not shifted. If the input is 0, each element of row 0 will be set to 1. | private void dropDeadBlocks(int rowBorder) {
if (rowBorder < 0) {
throw new IllegalArgumentException("The provided row: " + rowBorder + " was negative");
}
if (rowBorder == 0) {
for (int i = 0; i < mGrid[0].length; i++) {
if (!mLiveTetriminoCoordi... | [
"public void dropAbove(int row)\r\n {\r\n // Loop from row (given row number) to 1 (2nd row from the top)\r\n for (int y = row; y >= 1; y--)\r\n {\r\n // Loop through each of the blocks on this row and cause them to\r\n // become the blocks from the above, thereby cop... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Maps a dto to an existed entity. | void mapToExistingEntity(D dto, @MappingTarget E entity); | [
"E mapDtoToEntity(D dto);",
"E mapToEntity(D dto);",
"E convertToEntity(D dto);",
"D mapEntityToDto(E entity);",
"public abstract T convertToEntity(D dto);",
"D mapToDTO(E entity);",
"private static DiaEntity basicDTO2Entity(DiaDTO dto) {\n if (dto != null) {\n DiaEntity entity = new D... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'updates' field. | public com.fretron.Model.Employee.Builder clearUpdates() {
updates = null;
updatesBuilder = null;
fieldSetFlags()[13] = false;
return this;
} | [
"public com.fretron.Model.Equipment.Builder clearUpdates() {\n updates = null;\n updatesBuilder = null;\n fieldSetFlags()[9] = false;\n return this;\n }",
"public org.ga4gh.models.CallSet.Builder clearUpdated() {\n updated = null;\n fieldSetFlags()[5] = false;\n return this;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Crea los directorios que nos hacen falta | public static void crearDirectorios() {
System.out.println("Creamos los directorios");
System.out.println("");
Path appstsv = Paths.get("./appstsv");
Path appsxml = Paths.get("./appsxml");
Path appsjson = Paths.get("./appsjson");
Path c = Paths.get("./copias");
Pa... | [
"private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void createDirectoryFolders() {\n final Path botDirectoryPath = Paths.get(SPXScriptUtil.getScriptDataPath(getMeta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor of back propagation algorithm with hidden layers and bias neuron | public BackpropagationAlgorithm(int inputs, double biasInput, Neuronet.HiddenLayerStruct[] hiddenLayerStructs, int outputs) {
init(inputs, biasInput, hiddenLayerStructs, outputs);
} | [
"public BackpropagationAlgorithm(int inputs, double biasInput, int outputs) {\n neuronet = new Neuronet(this, inputs, biasInput, outputs);\n }",
"private static Backpropagation createNetwork() {\n Backpropagation net = new Backpropagation();\n net.addLayer(new Layer(2));\n net.addLa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Lazy load precincts for each congressional district. Each precinct object will be the only copy for the algorithm run. Make sure the same objects are used in bidirectional mappings | private void mapPrecincts() {
Map<Integer, Precinct> allPrecincts = new HashMap<Integer, Precinct>();
Map<Integer, Precinct> currPrecincts;
for (CongressionalDistrict district : districts.values()) {
currPrecincts = district.getPrecincts(); // lazy loaded
if (currPrecincts == null) {
throw new Ill... | [
"private void mapNeighborPrecincts(Map<Integer, Precinct> allPrecincts) {\r\n\t\tMap<Integer, Region> currNeighbors;\r\n\t\tMap<Integer, Region> remappedNeighbors;\r\n\t\tPrecinct rmNeighbor;\r\n\t\tfor (Precinct precinct : allPrecincts.values()) {\r\n\t\t\tcurrNeighbors = precinct.getNeighborRegions(); // lazy loa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Funcion para acceder al valor de la "frutita" | public Point getFrutita() {
return frutita;
} | [
"public String obtenerFraccion() {\r\n\t\treturn \"La fraccion obtenida es: \" + this.numerador + \"/\" + this.denominador;\r\n\t}",
"public IFatura vendaToFatura();",
"java.lang.String getFmla();",
"public float siguiente(float frecuencia){ \n \n if (OnOff) {\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For the target which have not passed the pre check, service not submit a real task to running, but service will fake a failed task so that UI can display the failed message for this target. | private void gennerateFailedTask(DeployTargetDetail target){
target.setProgressMessage(target.getProgressMessage());
target.setStatus(DeployStatus.DEPLOY_FAILED.value());
deployFinishedWithError();
// target.setTaskstatus(TaskStatus.Error.getValue());
// String[] finalMessage = ProductDeployUtil.getFinalMessage... | [
"@Test\n public void runFailedTaskTest()\n {\n int time = 5;\n int checktime = 25; // have to check for fail status after the application did retries\n CcdpTaskRequest task = this.sendTaskRequest(\"MOCK_FAIL\", time);\n String taskId = task.getTaskId();\n \n CcdpUtils.pause(0.2);\n CcdpVMReso... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the names of all peerorganizations. | public Set getPeerOrganizationNames() throws SMSException {
Set getPeerSet = Collections.EMPTY_SET;
if (realmEnabled) {
try {
OrganizationConfigManager ocmParent =
getParentOrgConfigManager();
getPeerSet = ocmParent.getSubOrganizatio... | [
"@Override\r\n public ArrayList<String> allTowns() {\r\n ArrayList<String>townNames=new ArrayList<String>();\r\n for (Town town: graph.vertexSet())\r\n {\r\n townNames.add(town.getName());\r\n\r\n }\r\n Collections.sort(townNames);\r\n return townNames;\r\n\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get notes that are of the given topic | public gw.api.database.IQueryBeanResult<entity.Note> getNotes(typekey.NoteTopicType topic) {
return ((com.guidewire.pc.domain.policy.PolicyPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pc.domain.policy.PolicyPublicMethods")).getNotes(topic);
} | [
"public gw.api.database.IQueryBeanResult<entity.Note> getNotes(typekey.NoteTopicType topic) {\n return ((com.guidewire.pc.domain.policy.PolicyPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pc.domain.policy.PolicyPublicMethods\")).getNotes(topic);\n }",
"public String searchNews(Str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks the throttle latchand waits on it if we're throttling | private boolean checkThrottleLatch() {
CountDownLatch latch = throttleLatch.get();
if(latch!=null) {
try {
if(!latch.await(dropTimeout, TimeUnit.MILLISECONDS)) {
dropCounter.incrementAndGet();
return false;
}
} catch (Exception e) {
LOG.error("Thread was interrupted while waiting on thro... | [
"public boolean isThrottling() {\n\t\treturn throttleLatch.get()!=null;\n\t}",
"private boolean startThrottlingIfNot( ConnectionThrottle throttle ) {\n final boolean started = throttled.compareAndSet( false, true );\n if ( started ) {\n this.throttle = throttle;\n throttle.setAutoRead(fals... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test method removeAddresses(). Address is associated with multiple types, AssociationException expected. | public void testRemoveAddresses_AssociationException() throws Exception {
Address address = this.getAddress();
this.dao.addAddress(address, false);
this.dao.associate(address, 1, false);
this.executeUpdate("insert into address_relation (creation_user,modification_user,"
... | [
"void removeAddress() throws Exception;",
"public void testRemoveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a List of all TShirts in the database with a specific size. | @RequestMapping(value = "/tshirt/bySize/{size}", method = RequestMethod.GET)
@ResponseStatus(value = HttpStatus.OK)
public List<TShirt> getTShirtBySize(@PathVariable String size) {
return serviceLayer.getTShirtBySize(size);
} | [
"List<BasicShampoo> selectShampoosBySize(Size size);",
"@GetMapping\n public List<ShoeSize> getAllShoeSizes() {\n return ssService.getAllShoeSizes();\n }",
"List<BasicShampoo>\tselectShampoosBySizeOrLabel(Size size, Long id);",
"public List<TDeviceInfo> findWhereFlashsizeEquals(long flashsize) th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets Profile Phone Number 2. | public void setPhoneNumber2(String pPhoneNumber2) {
mPhoneNumber2 = pPhoneNumber2;
} | [
"public void setPhone2(String phone2) {\r\n this.phone2 = phone2;\r\n }",
"public void setPhone2(String Phone2) {\n\t\tif (Phone2 != null && Phone2.length() > 40) {\n\t\t\tlog.warning(\"Length > 40 - truncated\");\n\t\t\tPhone2 = Phone2.substring(0, 39);\n\t\t}\n\t\tset_Value(\"Phone2\", Phone2);\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add food to storage one from storages | public boolean addToStorage(Food food) {
boolean added = false;
for (Storage storage : storages) {
if (storage.addFood(food)) {
added = true;
break;
}
}
return added;
} | [
"public void addStorage(AbstractStorageOfFoods storage) {\n storages.add(storage);\n }",
"public void addFood(Food food) {\n\t\townedFood.merge(food, 1, Integer::sum);\n\t}",
"public void addToOrder(Food food){\n foods.add(food);\n price = price + food.getPrice();\n }",
"public void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'PreviousActualCallRef' field. Reference to the previous actual call. | public no.ruter.avro.entity.actual.call.key.EntityPartition.Builder setPreviousActualCallRef(java.lang.CharSequence value) {
validate(fields()[5], value);
this.PreviousActualCallRef = value;
fieldSetFlags()[5] = true;
return this;
} | [
"public void setPreviousActualCallRef(java.lang.CharSequence value) {\n this.PreviousActualCallRef = value;\n }",
"public java.lang.CharSequence getPreviousActualCallRef() {\n return PreviousActualCallRef;\n }",
"public java.lang.CharSequence getPreviousActualCallRef() {\n return PreviousActualCa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method sends the test started/stopped email notifications. | public void sendTestStartedNotification(int iStarted) throws AFTException {
// Read email notification properties...
//
try {
String toAddress = ConfigProperties.getInstance()
.getConfigProperty(ConfigProperties.EMAIL_NOTIF_TO_ADDR);
LOGGER.info("toAddress: [" + toAddress + "]");
if (toAddress.isEm... | [
"public void testSendNotification()\n {\n boolean sent = textSender.sendNotification(\"Test subject\");\n assertTrue(sent);\n }",
"private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }",
"public void startEmailAgents();",
"@Test\n public void shouldStartEmailTestServerForGive... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an InvalidEventFormatException instance. | public InvalidEventFormatException() {
super("An event needs to have this format:\n"
+ "\"task name\" /at \"event time\"");
} | [
"public InvalidFormatEventException() {\n super(KEYWORD_EVENT_EXCEPTION);\n }",
"public FormatException() {\n this(null, null);\n }",
"public FileFormatException() {\r\n super();\r\n }",
"public EventException() {\n super(\"OOPS!!! The description or time of an event cannot be e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get string for Logout menu item. | protected String getLogoutMenuItemText()
{
boolean userIDDefined =
( WordHoardSettings.getUserID() != null );
PrintfFormat logoutMenuItemFormat =
new PrintfFormat
(
WordHoardSettings.getString
(
"wordhoardMenuLogoutItem" ,
"Logout %s"
)
);
String logoutMenuItemText =
logout... | [
"public String menu_item_name() {\n\t\treturn driver.findElement(menu_item_logout).getText();\n\t}",
"public String getLogoutAction() {return entry.getEntryFieldValue(FIELD_LOGOUT_ACTION);}",
"public String getLogoutDestination() {return entry.getEntryFieldValue(FIELD_LOGOUT_DESTINATION);}",
"public Command g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generic method to encrypt the data depending on the type of encryption | public static byte[] Encrypt(byte[] data, String key, EncryptionType type){
return switch (type) {
case AES -> AESEncryption(data, key);
case RSA -> RSAEncryption(data, key);
case NONE -> data;
};
} | [
"public EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;",
"void encrypt(EncryptionStrength encryptionStrength);",
"public interface Cipher {\n /**\n * Encrypt the input data, given a key.\n *\n * @param input The data to encrypt\n * @param word The passphrase to encryp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets the email textView to have the current user's email | private void populateEmail() {
uEmail = getIntent().getExtras().getString("Email");
((TextView) findViewById(R.id.EmailBlank)).setText(uEmail);
} | [
"public void setUserNameEmailText() {\n mEmailTextView.setText(mCurrentUser.getEmail());\n mNameTextView.setText(mCurrentUser.getName());\n }",
"private void loadUserInformation(){\n FirebaseUser user = mAuth.getCurrentUser();\n\n String displayEmail = user.getEmail();\n emai... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |