input stringlengths 147 4.02k | output stringlengths 21 493 |
|---|---|
Generate a Java code for the following instruction: returns the full path of the immediate parent of the specified node . null if passed the root node or an invalid node concode_field_sep char ZNODE_PATH_SEPARATOR concode_elem_sep Logger LOG concode_field_sep void createSetData concode_elem_sep int checkExists concode_... | String function ( String arg0 ) { int loc0 = arg0 . lastIndexOf ( ZNODE_PATH_SEPARATOR ) ; return loc0 <= 0 ? null : arg0 . substring ( 0 , loc0 ) ; } |
Generate a Java code for the following instruction: returns the debug . concode_field_sep Object warn concode_elem_sep Object trace concode_elem_sep Object debug concode_elem_sep Throwable lastThrowable concode_elem_sep Object error concode_elem_sep Object info concode_elem_sep Object fatal concode_field_sep void debug... | Object function ( ) { return debug ; } |
Generate a Java code for the following instruction: sets the string to be contained . concode_field_sep String rowData concode_elem_sep char index concode_elem_sep int indexColor concode_field_sep void setIndexColor concode_elem_sep char getIndex concode_elem_sep void setIndex concode_elem_sep int getIndexColor concode... | void function ( String arg0 ) { rowData = arg0 ; } |
Generate a Java code for the following instruction: create a figure info instance . note that by default this info object is lazily populated . if you need an eagerly populated info object , use the concode_field_sep IFigure _figure concode_elem_sep FigureInfoState _state concode_elem_sep IWidgetLocator _locatorDelegat... | FigureReference function ( IFigure arg0 ) { return lazy ( arg0 ) ; } |
Generate a Java code for the following instruction: cache-aside find user account helper concode_field_sep CachingPolicy cachingPolicy concode_field_sep void initDb concode_elem_sep void initCacheCapacity concode_elem_sep String printCacheContent concode_elem_sep UserAccount find concode_elem_sep void save concode_elem... | UserAccount function ( String arg0 ) { UserAccount loc0 = CacheStore . get ( arg0 ) ; if ( loc0 != null ) { return loc0 ; } loc0 = DbManager . readFromDb ( arg0 ) ; if ( loc0 != null ) { CacheStore . set ( arg0 , loc0 ) ; } return loc0 ; } |
Generate a Java code for the following instruction: the position when headers/footers should be repeated on each page . concode_field_sep Integer normal concode_elem_sep Place place concode_elem_sep Integer repeated concode_elem_sep List<HtmlCell> content concode_field_sep Integer getNormal concode_elem_sep boolean pro... | Integer function ( ) { return repeated ; } |
Generate a Java code for the following instruction: key methods concode_field_sep AuctionEntry entry concode_elem_sep Integer Zero concode_elem_sep Map<String,Seller> sellers concode_field_sep int getSellerFeedback concode_elem_sep Currency getCurrentTotal concode_elem_sep Seller getSeller concode_elem_sep Currency get... | String function ( ) { return entry . getIdentifier ( ) ; } |
Generate a Java code for the following instruction: method to set the title for the picture frame concode_field_sep ImageIcon imageIcon concode_elem_sep JLabel label concode_elem_sep JFrame frame concode_elem_sep DigitalPicture picture concode_field_sep void setVisible concode_elem_sep void setPicture concode_elem_sep ... | void function ( String arg0 ) { frame . setTitle ( arg0 ) ; } |
Generate a Java code for the following instruction: get a read-only list of all the items on the top shelf concode_field_sep List<Potion> topShelf concode_elem_sep List<Potion> bottomShelf concode_elem_sep Logger LOGGER concode_field_sep List<Potion> getBottomShelf concode_elem_sep void enumerate concode_elem_sep void ... | List < Potion > function ( ) { return Collections . unmodifiableList ( this . topShelf ) ; } |
Generate a Java code for the following instruction: add an adapter to be returned by #getadapter class concode_field_sep T widget concode_elem_sep Map<Class<?>,Object> adapters concode_field_sep Object getAdapter concode_elem_sep T getWidget concode_elem_sep WidgetReference<T> create concode_elem_sep WidgetReference<T>... | void function ( Class < ? > arg0 , Object arg1 ) { if ( adapters == null ) adapters = new HashMap < Class < ? > , Object > ( ) ; adapters . put ( arg0 , arg1 ) ; } |
Generate a Java code for the following instruction: returns a typed sorted bag backed by the given bag . only objects of the specified type can be added to the bag . concode_field_sep Bag EMPTY_BAG concode_elem_sep Bag EMPTY_SORTED_BAG concode_field_sep Bag predicatedBag concode_elem_sep SortedBag synchronizedSortedBag... | SortedBag function ( SortedBag arg0 , Class arg1 ) { return TypedSortedBag . decorate ( arg0 , arg1 ) ; } |
Generate a Java code for the following instruction: returns the capacity of the array , which may be larger than the limit . concode_field_sep byte[] data concode_elem_sep int limit concode_elem_sep int position concode_field_sep int readUnsignedInt24 concode_elem_sep int readSynchSafeInt concode_elem_sep int readUnsig... | int function ( ) { return data == null ? 0 : data . length ; } |
Generate a Java code for the following instruction: put entity in cache with cache lock . concode_field_sep ReentrantLock lock concode_elem_sep LongSparseArray<Reference<T>> map concode_field_sep void unlock concode_elem_sep T get concode_elem_sep void clear concode_elem_sep void lock concode_elem_sep void putNoLock co... | void function ( long arg0 , @ NonNull T arg1 ) { lock . lock ( ) ; try { map . put ( arg0 , new WeakReference < T > ( arg1 ) ) ; } finally { lock . unlock ( ) ; } } |
Generate a Java code for the following instruction: retrieve all springconfig in the registry concode_field_sep SpringConfigRegistry INSTANCE concode_elem_sep Map<SpringConfig,String> mSpringConfigMap concode_field_sep void removeAllSpringConfig concode_elem_sep boolean addSpringConfig concode_elem_sep boolean removeSp... | Map < SpringConfig , String > function ( ) { return Collections . unmodifiableMap ( mSpringConfigMap ) ; } |
Generate a Java code for the following instruction: gets attribute handler cookieattributehandler for thegiven attribute . concode_field_sep Map<String,CookieAttributeHandler> attribHandlerMap concode_field_sep CookieAttributeHandler findAttribHandler concode_elem_sep void registerAttribHandler concode_elem_sep Collect... | CookieAttributeHandler function ( final String arg0 ) { final CookieAttributeHandler loc0 = findAttribHandler ( arg0 ) ; if ( loc0 == null ) { throw new IllegalStateException ( "srini_string" + arg0 + "srini_string" ) ; } else { return loc0 ; } } |
Generate a Java code for the following instruction: updates the last republish time by setting it to the current simulation time . a republish takes place if either this or another peer sends the data item to its neighbours . concode_field_sep long lastRepublish concode_elem_sep DHTObject value concode_elem_sep Compone... | void function ( ) { lastRepublish = Simulator . getCurrentTime ( ) ; } |
Generate a Java code for the following instruction: writes a complex type , that also implements backtoxmlwritable . concode_field_sep Element curRootNode concode_field_sep void writeTime concode_elem_sep void writeBack concode_elem_sep void writeBackToXML concode_elem_sep String getWrittenBackDoc concode_elem_sep void... | void function ( String arg0 , BackToXMLWritable arg1 ) { if ( arg1 == null ) return ; Element loc0 = curRootNode . addElement ( arg0 ) ; loc0 . addAttribute ( "srini_string" , arg1 . getClass ( ) . getName ( ) ) ; arg1 . writeBackToXML ( new BackWriter ( loc0 ) ) ; } |
Generate a Java code for the following instruction: computes the dotproduct of our sliding windows and weights vectors . todo jaimeyap : i could make this a general purpose dotproduct function , but for now , this is more performant . trivial to add later . concode_field_sep int eventDepth concode_elem_sep GraphModel g... | double function ( double [ ] arg0 , double [ ] arg1 ) { assert ( ( arg0 . length == 3 ) && ( arg1 . length == 3 ) ) ; return ( arg0 [ 2 ] * arg1 [ 2 ] ) + ( arg0 [ 1 ] * arg1 [ 1 ] ) + ( arg0 [ 0 ] * arg1 [ 0 ] ) ; } |
Generate a Java code for the following instruction: test method for org.jboss.security.config.securityconfiguration #getkeystoreurl . concode_field_sep PlaceHolder placeHolder concode_field_sep void testGetCipherAlgorithm concode_elem_sep void testSetIterationCount concode_elem_sep void testGetSalt concode_elem_sep voi... | void function ( ) { SecurityConfiguration . getKeyStoreURL ( ) ; } |
Generate a Java code for the following instruction: sets the current principal name to the invocation context . principal name is stored to the context under the serversecurityinterceptor #delegated_user_key key . concode_field_sep PlaceHolder placeHolder concode_field_sep Object handleInvocationResult | void function ( EJBClientInvocationContext arg0 ) { Principal loc0 = SecurityContextAssociation . getPrincipal ( ) ; if ( loc0 != null ) { Map < String , Object > loc1 = arg0 . getContextData ( ) ; loc1 . put ( ServerSecurityInterceptor . DELEGATED_USER_KEY , loc0 . getName ( ) ) ; } arg0 . sendRequest ( ) ; } |
Generate a Java code for the following instruction: fetches the message belonging to the key . concode_field_sep String STYLE_NOTPARSED concode_elem_sep String UNSUPPORTED_CHARSET concode_elem_sep String A_SETLOCALGOTO concode_elem_sep String NO_SIBLING concode_elem_sep String OWN_CONTEXT_404 concode_elem_sep String AD... | String function ( final String arg0 ) { return bundle . getString ( arg0 ) ; } |
Generate a Java code for the following instruction: compare 2 arrays only at the first level concode_field_sep boolean[] TRUE concode_elem_sep int PRIME_NUMER concode_elem_sep int SEED concode_elem_sep String[] EMPTY_STRING_ARRAY concode_elem_sep boolean[] FALSE concode_elem_sep int[] EMPTY_INT_ARRAY concode_elem_sep b... | boolean function ( Object [ ] arg0 , Object [ ] arg1 ) { if ( arg0 == arg1 ) return true ; if ( arg0 == null || arg1 == null ) return false ; int loc0 = arg0 . loc0 ; if ( loc0 != arg1 . loc0 ) return false ; for ( int loc1 = 0 ; loc1 < loc0 ; loc1 ++ ) { if ( ! arg0 [ loc1 ] . equals ( arg1 [ loc1 ] ) ) return false ;... |
Generate a Java code for the following instruction: gets the closure . concode_field_sep boolean iDoLoop concode_elem_sep Predicate iPredicate concode_elem_sep Closure iClosure concode_elem_sep long serialVersionUID concode_field_sep Predicate getPredicate concode_elem_sep boolean isDoLoop concode_elem_sep Closure getI... | Closure function ( ) { return iClosure ; } |
Generate a Java code for the following instruction: gets the predicate in use . concode_field_sep boolean iDoLoop concode_elem_sep Predicate iPredicate concode_elem_sep Closure iClosure concode_elem_sep long serialVersionUID concode_field_sep Closure getClosure concode_elem_sep boolean isDoLoop concode_elem_sep Closure... | Predicate function ( ) { return iPredicate ; } |
Generate a Java code for the following instruction: validate that the schemas provided can mutually read data written by each other according to the default avro schema resolution rules . concode_field_sep PlaceHolder placeHolder concode_field_sep void canRead | void function ( Schema arg0 , Schema arg1 ) { canRead ( arg0 , arg1 ) ; canRead ( arg1 , arg0 ) ; } |
Generate a Java code for the following instruction: determines if an item is a folder . concode_field_sep String view concode_elem_sep String pluginId concode_elem_sep String name concode_elem_sep Image icon concode_elem_sep String description concode_elem_sep String id concode_elem_sep String mainType concode_elem_sep... | boolean function ( ) { return ( mainType == null && view == null ) ; } |
Generate a Java code for the following instruction: calculate the greatest common divisor . concode_field_sep String PROMPT concode_field_sep void main | int function ( int arg0 , int arg1 ) { if ( arg0 < 0 ) { arg0 = - arg0 ; } if ( arg1 < 0 ) { arg1 = - arg1 ; } while ( arg1 != 0 ) { int loc0 = arg0 % arg1 ; arg0 = arg1 ; arg1 = loc0 ; } return arg0 ; } |
Generate a Java code for the following instruction: returns a memberref for the field concode_field_sep ClassEditor editor concode_elem_sep boolean isDeleted concode_elem_sep boolean isDirty concode_elem_sep String name concode_elem_sep FieldInfo fieldInfo concode_elem_sep Type type concode_elem_sep Object constantValu... | MemberRef function ( ) { return ( new MemberRef ( this . declaringClass ( ) . type ( ) , this . nameAndType ( ) ) ) ; } |
Generate a Java code for the following instruction: liefert die darstellung fuer den null-wert . concode_field_sep char zero concode_elem_sep char minus concode_elem_sep String regexp concode_elem_sep Charset charset concode_elem_sep int pointer concode_elem_sep Receiver receiver concode_elem_sep Sender sender concode_... | char function ( ) { return zero ; } |
Generate a Java code for the following instruction: creates a light-weight dialog to present a refactoringstatus tothe user . the following values are returned from the dialogs open method : org.eclipse.jface.dialogs.idialogconstants #ok_id idialogconstants #ok_id : if the user has pressed the continue button . org.ecl... | Dialog function ( RefactoringStatus arg0 , Shell arg1 , String arg2 ) { return new RefactoringStatusDialog ( arg0 , arg1 , arg2 , false , true ) ; } |
Generate a Java code for the following instruction: sets value of the coreconnectionpnames #so_keepalive parameter . concode_field_sep PlaceHolder placeHolder concode_field_sep void setSoReuseaddr concode_elem_sep int getLinger concode_elem_sep void setTcpNoDelay concode_elem_sep void setConnectionTimeout concode_elem_... | void function ( final HttpParams arg0 , final boolean arg1 ) { Args . notNull ( arg0 , "srini_string" ) ; arg0 . setBooleanParameter ( CoreConnectionPNames . SO_KEEPALIVE , arg1 ) ; } |
Generate a Java code for the following instruction: removes the mapping for this key from this map if it is present . concode_field_sep Map _values concode_elem_sep Map _register concode_field_sep WidgetLocator add concode_elem_sep String getKey concode_elem_sep Set getEntries concode_elem_sep boolean containsKey conco... | WidgetLocator function ( String arg0 ) { WidgetLocator loc0 = get ( arg0 ) ; _values . remove ( loc0 ) ; return ( WidgetLocator ) _register . remove ( arg0 ) ; } |
Generate a Java code for the following instruction: not used within junit . clients should simply instantiate errorreportingrunner themselves concode_field_sep PlaceHolder placeHolder concode_field_sep Request filterWith concode_elem_sep Request filterWith concode_elem_sep Runner getRunner concode_elem_sep Request meth... | Request function ( Class < ? > arg0 , Throwable arg1 ) { return runner ( new ErrorReportingRunner ( arg0 , arg1 ) ) ; } |
Generate a Java code for the following instruction: null object to empty string nullstrtoempty null = '' '' ; nullstrtoempty '' '' = '' '' ; nullstrtoempty `` aa '' = `` aa '' ; concode_field_sep PlaceHolder placeHolder concode_field_sep Long[] transformLongArray concode_elem_sep long[] transformLongArray concode_elem_... | String function ( Object arg0 ) { return ( arg0 == null ? "srini_string" : ( arg0 instanceof String ? ( String ) arg0 : arg0 . toString ( ) ) ) ; } |
Generate a Java code for the following instruction: this method removes a given contact from the leaf set . concode_field_sep PastryNode owningNode concode_elem_sep LinkedList<PastryContact> cwNodes concode_elem_sep LinkedList<PastryContact> ccwNodes concode_elem_sep long lastChanged concode_elem_sep int maxSize concod... | boolean function ( PastryContact arg0 ) { boolean loc0 = false ; if ( cwNodes . contains ( arg0 ) ) loc0 = cwNodes . remove ( arg0 ) ; if ( ccwNodes . contains ( arg0 ) ) loc0 = ccwNodes . remove ( arg0 ) || loc0 ; if ( loc0 ) lastChanged = Simulator . getCurrentTime ( ) ; return loc0 ; } |
Generate a Java code for the following instruction: key click method that delegates to swt robot concode_field_sep Point pointT concode_elem_sep abbot.swt.Robot _robot concode_field_sep void doKeyDown concode_elem_sep void doKeyUp concode_elem_sep void mouseMove concode_elem_sep void mouseMove concode_elem_sep void key... | void function ( final char arg0 ) { final abbot . swt . Robot loc0 = getAbbotRobot ( ) ; Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { loc0 . keyPress ( ( int ) arg0 ) ; loc0 . keyRelease ( ( int ) arg0 ) ; } } ) ; } |
Generate a Java code for the following instruction: gets the enable state of the dialog field . concode_field_sep String fLabelText concode_elem_sep IDialogFieldListener fDialogFieldListener concode_elem_sep Label fLabel concode_elem_sep boolean fEnabled concode_field_sep Label getLabelControl concode_elem_sep boolean ... | boolean function ( ) { return fEnabled ; } |
Generate a Java code for the following instruction: validate that the specified argument character sequence is neither null nor a length of zero no characters ; otherwise throwing an exception with the specified message . validate.notempty mystring , `` the string must not be empty '' ; concode_field_sep PlaceHolder pl... | T function ( T arg0 , String arg1 , Object ... arg2 ) { if ( arg0 == null ) { throw new IllegalArgumentException ( String . format ( arg1 , arg2 ) ) ; } if ( arg0 . length ( ) == 0 ) { throw new IllegalArgumentException ( String . format ( arg1 , arg2 ) ) ; } return arg0 ; } |
Generate a Java code for the following instruction: sets the component . concode_field_sep Component component concode_elem_sep GridBagConstraints constraints concode_field_sep GridBagConstraints getConstraints concode_elem_sep void setConstraints concode_elem_sep Component getComponent | void function ( Component arg0 ) { this . component = arg0 ; } |
Generate a Java code for the following instruction: returns the editpartfactory that the graphicalviewer will use . concode_field_sep GraphicalViewer viewer concode_elem_sep ActionRegistry actionRegistry concode_elem_sep KeyHandler sharedKeyHandler concode_elem_sep IEditorSite editorSite concode_field_sep GraphicalView... | EditPartFactory function ( ) { return new SchemaEditPartFactory ( ) ; } |
Generate a Java code for the following instruction: return the context attribute key under which we will store the request locale . concode_field_sep String localeKey concode_field_sep void setLocaleKey concode_elem_sep boolean execute concode_elem_sep Locale getLocale | String function ( ) { return ( this . localeKey ) ; } |
Generate a Java code for the following instruction: grabs input focus . concode_field_sep Composite controlPanel concode_elem_sep Composite parent concode_elem_sep Menu backMenu concode_elem_sep ToolItem pauseItem concode_elem_sep Spinner timerSpinner concode_elem_sep Object[] tabBackground concode_elem_sep GraphicsTab... | void function ( ) { tabList . setFocus ( ) ; } |
Generate a Java code for the following instruction: return true iff this quadrant is adjacent to the boundary of an image in the given direction . concode_field_sep PlaceHolder placeHolder concode_field_sep Quadrant reflect concode_elem_sep QuadTreeNode child | boolean function ( int arg0 ) { return ( arg0 == QuadTreeNode . NORTH || arg0 == QuadTreeNode . WEST ) ; } |
Generate a Java code for the following instruction: add an property . concode_field_sep String configurationName concode_elem_sep Map<String,String> properties concode_field_sep String getProperty concode_elem_sep ValidatorConfiguration addAttribute concode_elem_sep String getConfigurationName concode_elem_sep int hash... | ValidatorConfiguration function ( String arg0 , Object arg1 ) { properties . put ( arg0 , String . valueOf ( arg1 ) ) ; return this ; } |
Generate a Java code for the following instruction: does the given identifier belong to a new instance ? concode_field_sep IdentifierValue NONE concode_elem_sep IdentifierValue UNDEFINED concode_elem_sep Logger LOG concode_elem_sep IdentifierValue NULL concode_elem_sep Serializable value concode_elem_sep IdentifierValu... | Boolean function ( Object arg0 ) { LOG . tracev ( "srini_string" , value ) ; return arg0 == null || arg0 . equals ( value ) ; } |
Generate a Java code for the following instruction: test d1 and d2 for d1 > d2 . if d1 is equal to d2 using the current ratio , this returns false . concode_field_sep double max_ratio concode_elem_sep double min_ratio concode_elem_sep boolean off concode_field_sep boolean isElemMatch concode_elem_sep int compare concod... | boolean function ( double arg0 , double arg1 ) { return ( ( arg0 > arg1 ) && ne ( arg0 , arg1 ) ) ; } |
Generate a Java code for the following instruction: method used for copying styles from one chunk to another . could be deprecated if the content of a chunk can be overwritten . concode_field_sep FontProvider fontProvider concode_elem_sep List<String> BOLD concode_elem_sep CssUtils utils concode_field_sep boolean isBol... | void function ( final Chunk arg0 , final Chunk arg1 ) { arg1 . setFont ( arg0 . getFont ( ) ) ; arg1 . setAttributes ( arg0 . getAttributes ( ) ) ; arg1 . setCharacterSpacing ( arg0 . getCharacterSpacing ( ) ) ; arg1 . setHorizontalScaling ( arg0 . getHorizontalScaling ( ) ) ; arg1 . setHorizontalScaling ( arg0 . getHo... |
Generate a Java code for the following instruction: extract text from a specified page using an extraction strategy . concode_field_sep PlaceHolder placeHolder concode_field_sep placeholderType placeHolder | String function ( PdfReader arg0 , int arg1 , TextExtractionStrategy arg2 ) { return getTextFromPage ( arg0 , arg1 , arg2 , new HashMap < String , ContentOperator > ( ) ) ; } |
Generate a Java code for the following instruction: test a requestdispatcher forward that fails to commit the tx . concode_field_sep String STATUS_ACTIVE concode_elem_sep Logger log concode_field_sep void testIncludeNoCommit concode_elem_sep WebArchive statusDeployment concode_elem_sep void testIncludeCommit concode_el... | void function ( @ ArquillianResource ( TxControlServlet . class ) URL arg0 ) { testURL ( arg0 , false , false ) ; } |
Generate a Java code for the following instruction: set the state of the current tag concode_field_sep String text concode_elem_sep Charset charset concode_elem_sep StateController controller concode_elem_sep XMLParserMemory memory concode_elem_sep List<XMLParserListener> listeners concode_elem_sep TagState tagState co... | void function ( final TagState arg0 ) { this . tagState = arg0 ; } |
Generate a Java code for the following instruction: make sure that the provided keystore will be reusable . concode_field_sep String REVIEW_MESSAGE concode_field_sep InputStream streamKeystore concode_elem_sep void verifyKeystoreContent concode_elem_sep void verifyKeystoreContent concode_elem_sep KeyStore loadKeystore ... | Object function ( AppleServer arg0 , Object arg1 ) { if ( arg1 instanceof InputStream ) arg1 = loadKeystore ( arg0 , arg1 , false ) ; return arg1 ; } |
Generate a Java code for the following instruction: parse a matrix from a reader . concode_field_sep int blocksize concode_elem_sep GenMatrix<C> ZERO concode_elem_sep int DEFAULT_BSIZE concode_elem_sep GenMatrix<C> ONE concode_elem_sep Logger logger concode_elem_sep RingFactory<C> coFac concode_elem_sep float density c... | GenMatrix < C > function ( Reader arg0 ) { throw new RuntimeException ( "srini_string" ) ; } |
Generate a Java code for the following instruction: this method is used in #parsetemplate string to determine what member specificvariables are expected in a template . concode_field_sep String OBJECT_SYSTEM_HASHCODE_VARIABLE concode_elem_sep String[] VARIABLES concode_elem_sep String[] beginning concode_elem_sep Strin... | String [ ] function ( ) { return ToStringTemplateParser . MEMBER_RELATED_VARIABLE ; } |
Generate a Java code for the following instruction: convert characters in a java string to the escaped form that must be used in . properties files . concode_field_sep char[] HEX_DIGITS concode_field_sep int getHexDigitValue concode_elem_sep String unescapeBackslashes concode_elem_sep boolean containsInvalidEscapeSeque... | String function ( String arg0 , boolean arg1 , boolean arg2 , boolean arg3 ) { StringBuffer loc0 = new StringBuffer ( arg0 . loc1 ( ) ) ; int loc1 = arg0 . loc1 ( ) ; for ( int loc2 = 0 ; loc2 < loc1 ; loc2 ++ ) { char loc3 = arg0 . charAt ( loc2 ) ; loc0 . append ( escape ( loc3 , arg1 , arg2 , arg3 ) ) ; } return loc... |
Generate a Java code for the following instruction: create a singleton hazelcastinstance server @bean . concode_field_sep String CLUSTER_HOST concode_elem_sep Logger LOG concode_elem_sep String MASTER_SERVER concode_elem_sep HazelcastInstance hazelcastInstance concode_elem_sep int CLUSTER_PORT concode_field_sep Hazelca... | HazelcastInstance function ( ) { HazelcastInstance loc0 = InstanceHelper . makeServer ( Constants . HAZELCAST_INSTANCE_NAME , CLUSTER_PORT ) ; LOG . trace ( "srini_string" , loc0 ) ; return loc0 ; } |
Generate a Java code for the following instruction: returns a text only if it is in given language concode_field_sep boolean fromContent concode_elem_sep Map<String,Map<String,Integer>> cooccurrences concode_elem_sep boolean fromAbstract concode_elem_sep List<KeywordCandidate> keywordCandidates concode_elem_sep String ... | String function ( String arg0 , String arg1 ) { LanguageIdentifierBean loc0 ; try { loc0 = new LanguageIdentifierBean ( ) ; return ( arg1 . equals ( loc0 . classify ( arg0 ) ) ) ? arg0 : "srini_string" ; } catch ( CeonGeneralException loc1 ) { throw new IOException ( loc1 ) ; } } |
Generate a Java code for the following instruction: reset the simulator , so that it can be configured again for another simulation run without to restart the java virtual machine . this is especially usefull for junit tests . concode_field_sep Simulator singleton concode_elem_sep Logger log concode_elem_sep long seed ... | void function ( ) { checkRunning ( ) ; monitor = new DefaultMonitor ( ) ; scenario = null ; scheduler = new Scheduler ( true ) ; seed = 0 ; } |
Generate a Java code for the following instruction: creates a parenttree of all parent tag objects of a given tag concode_field_sep PlaceHolder placeHolder concode_field_sep List<String> getParentTree | List < Tag > function ( final Tag arg0 , final List < Tag > arg1 ) { List < Tag > loc0 = new ArrayList < Tag > ( ) ; Tag loc1 = arg0 . getParent ( ) ; while ( loc1 != null && ! ( loc1 . getName ( ) . equals ( HTML . Tag . HTML ) ) ) { loc0 . add ( loc1 ) ; loc1 = loc1 . getParent ( ) ; } return loc0 ; } |
Generate a Java code for the following instruction: random vector . concode_field_sep GenVector<C> ZERO concode_elem_sep Logger logger concode_elem_sep RingFactory<C> coFac concode_elem_sep float density concode_elem_sep int cols concode_elem_sep List<GenVector<C>> BASIS concode_elem_sep Random random concode_elem_sep ... | GenVector < C > function ( int arg0 , float arg1 ) { return random ( arg0 , arg1 , random ) ; } |
Generate a Java code for the following instruction: does the line start with the given string ? concode_field_sep String inlineMarkupDelimiters concode_elem_sep int sectionLevel concode_elem_sep boolean erased concode_elem_sep boolean inBlock concode_elem_sep boolean listStart concode_elem_sep List<Boolean> valid conco... | boolean function ( String arg0 ) { for ( int loc0 = 0 ; loc0 < arg0 . length ( ) ; loc0 ++ ) { if ( charAt ( loc0 ) != arg0 . charAt ( loc0 ) ) { return false ; } } return true ; } |
Generate a Java code for the following instruction: inserts one or more documents . this method is equivalent to a call to the bulkwrite method . the documents will be inserted in the order provided , stopping on the first failed insertion . concode_field_sep MongoClient client concode_elem_sep MongoCollection<Document... | void function ( List < Document > arg0 , boolean arg1 ) { InsertManyOptions loc0 = new InsertManyOptions ( ) ; if ( ! arg1 ) { loc0 . arg1 ( false ) ; } collection . insertMany ( arg0 , loc0 ) ; } |
Generate a Java code for the following instruction: creates a student object using the given studentcontactfile.the studentcontactfile should be an xml file containing the marshaled form of a contact object . concode_field_sep PlaceHolder placeHolder concode_field_sep Instructor readInstructor concode_elem_sep void mai... | Student function ( File arg0 , JAXBContext arg1 ) { Unmarshaller loc0 = arg1 . createUnmarshaller ( ) ; Student loc1 = new Student ( ) ; Contact loc2 = ( Contact ) loc0 . unmarshal ( arg0 ) ; loc1 . setContact ( loc2 ) ; return loc1 ; } |
Generate a Java code for the following instruction: get key type znode . concode_field_sep String ENCRYPTION_KEY_NO_ZNODE_NAME concode_elem_sep String KEY_VERSION_ZNODE_NAME concode_elem_sep String PRINCIPAL_NAME_ZNODE_NAME concode_elem_sep String baseZNode concode_elem_sep String CREATED_TIME_ZNODE_NAME concode_elem_s... | String function ( String arg0 , String arg1 ) { return ZKUtil . joinZNode ( getKeysZNode ( arg0 ) , arg1 ) ; } |
Generate a Java code for the following instruction: reverses all 32 bits of the provided integer value . concode_field_sep PlaceHolder placeHolder concode_field_sep int gcd concode_elem_sep long gcd concode_elem_sep BigInteger gcd concode_elem_sep void main concode_elem_sep int scm concode_elem_sep long scm concode_ele... | int function ( int arg0 ) { return reverseBits ( arg0 , 32 ) ; } |
Generate a Java code for the following instruction: deletes an existing entry in the appropriate properties concode_field_sep Properties dvdProperties concode_elem_sep Properties cdProperties concode_elem_sep Properties bookProperties concode_field_sep void edit concode_elem_sep Properties getProperties concode_elem_se... | void function ( String arg0 , String arg1 ) { getProperties ( arg0 ) . remove ( arg1 ) ; System . out . println ( arg0 + "srini_string" + arg1 + "srini_string" ) ; } |
Generate a Java code for the following instruction: reads the contents of a file to a string . concode_field_sep PlaceHolder placeHolder concode_field_sep String unEscapeURL concode_elem_sep URL toURL concode_elem_sep char[] copyOfRange concode_elem_sep boolean isSurrogatePair concode_elem_sep boolean isSurrogatePair c... | String function ( final String arg0 ) { return readFileToString ( new File ( arg0 ) ) ; } |
Generate a Java code for the following instruction: creates a new criteria concode_field_sep List<Criteria> criteriaChain concode_elem_sep ValueNode left concode_elem_sep ValueNode right concode_elem_sep RelationalOperator criteriaType concode_field_sep Criteria lt concode_elem_sep Criteria type concode_elem_sep String... | Criteria function ( String arg0 , String arg1 , String arg2 ) { Criteria loc0 = new Criteria ( ValueNode . toValueNode ( arg0 ) ) ; loc0 . criteriaType = RelationalOperator . fromString ( arg1 ) ; loc0 . arg2 = ValueNode . toValueNode ( arg2 ) ; return loc0 ; } |
Generate a Java code for the following instruction: a simple main method that prints the version and exits concode_field_sep PlaceHolder placeHolder concode_field_sep String getSpecification concode_elem_sep String getImplementation | void function ( String [ ] arg0 ) { System . out . println ( "srini_string" + getSpecification ( ) ) ; System . out . println ( "srini_string" + getImplementation ( ) ) ; } |
Generate a Java code for the following instruction: end date of the period for which the account statement is issued . concode_field_sep BankToCustomerStatementV02 bankToCustomerStatement concode_elem_sep Document document concode_elem_sep GroupHeader42 groupHeader concode_elem_sep AccountStatement2 stmt concode_field_... | Date function ( ) { return stmt . getFrToDt ( ) . getToDtTm ( ) . toGregorianCalendar ( ) . getTime ( ) ; } |
Generate a Java code for the following instruction: get paras map concode_field_sep Map<String,String> requestProperties concode_elem_sep int readTimeout concode_elem_sep int connectTimeout concode_elem_sep Map<String,String> parasMap concode_elem_sep String url concode_field_sep Map<String,String> getRequestProperties... | Map < String , String > function ( ) { return parasMap ; } |
Generate a Java code for the following instruction: returns a super type hierarchy that contains the given type . the returned hierarchy may actually be based on a subtype of the requested type . therefore , queries such as itypehierarchy #getallclasses or itypehierarchy #getrootinterfaces may return more types than th... | ITypeHierarchy function ( IType arg0 ) { return getTypeHierarchy ( arg0 , null ) ; } |
Generate a Java code for the following instruction: empties the contents of the stack . concode_field_sep ArrayLongList list concode_field_sep long pop concode_elem_sep int search concode_elem_sep int size concode_elem_sep long get concode_elem_sep long push concode_elem_sep boolean empty concode_elem_sep long peek con... | void function ( ) { list . clear ( ) ; } |
Generate a Java code for the following instruction: unprotected method . concode_field_sep PlaceHolder placeHolder concode_field_sep String role1 concode_elem_sep String role2 | String function ( ) { return RESULT ; } |
Generate a Java code for the following instruction: set the width for this box . concode_field_sep int type concode_elem_sep Box parent concode_elem_sep float height concode_elem_sep boolean DEBUG concode_elem_sep float shift concode_elem_sep Box elderParent concode_elem_sep Color foreground concode_elem_sep float widt... | void function ( float arg0 ) { width = arg0 ; } |
Generate a Java code for the following instruction: search for one word in phrase . the search is not case sensitive . this method will check that the given goal is not a substring of a longer string so , for example , `` i know '' does not contain `` no '' . the search begins at the beginning of the string . concode_f... | int function ( String arg0 , String arg1 ) { return findKeyword ( arg0 , arg1 , 0 ) ; } |
Generate a Java code for the following instruction: biginteger random . concode_field_sep java.math.BigInteger val concode_elem_sep BigInteger ONE concode_elem_sep BigInteger ZERO concode_elem_sep Random random concode_field_sep boolean isField concode_elem_sep boolean isCommutative concode_elem_sep BigInteger gcd conc... | BigInteger function ( int arg0 ) { return ONE . random ( arg0 , random ) ; } |
Generate a Java code for the following instruction: get this object as a datetime using isochronology in the same zone . concode_field_sep PlaceHolder placeHolder concode_field_sep MutableDateTime toMutableDateTime concode_elem_sep MutableDateTime toMutableDateTime concode_elem_sep MutableDateTime toMutableDateTime con... | DateTime function ( ) { return new DateTime ( getMillis ( ) , ISOChronology . getInstance ( getZone ( ) ) ) ; } |
Generate a Java code for the following instruction: return the image associated with the receiver . concode_field_sep Image image concode_elem_sep DialogImage ERROR concode_elem_sep DialogImage WARNING concode_elem_sep String printName concode_elem_sep DialogImage INFO concode_elem_sep DialogImage QUESTION concode_fiel... | Image function ( ) { return image ; } |
Generate a Java code for the following instruction: closes this server . concode_field_sep boolean stop concode_field_sep void processMessage concode_elem_sep void runServer concode_elem_sep void main | void function ( ) { synchronized ( this ) { stop = true ; this . notify ( ) ; } } |
Generate a Java code for the following instruction: creates a new hessian 2.0 deserializer . concode_field_sep SerializerFactory _serializerFactory concode_elem_sep SerializerFactory _defaultSerializerFactory concode_elem_sep Logger log concode_elem_sep HessianFreeList<HessianInput> _freeHessianInput concode_elem_sep H... | Hessian2Input function ( InputStream arg0 ) { Hessian2Input loc0 = new Hessian2Input ( arg0 ) ; loc0 . setSerializerFactory ( _serializerFactory ) ; return loc0 ; } |
Generate a Java code for the following instruction: create an instance of activelock concode_field_sep QName _SyncToken_QNAME concode_elem_sep QName _Dst_QNAME concode_elem_sep QName _SyncLevel_QNAME concode_elem_sep QName _Status_QNAME concode_elem_sep QName _Depth_QNAME concode_elem_sep QName _Responsedescription_QNA... | Activelock function ( ) { return new Activelock ( ) ; } |
Generate a Java code for the following instruction: returns the language names call-back used in this report . concode_field_sep ILanguageNames languageNames concode_elem_sep String outputEncoding concode_field_sep void setOutputEncoding concode_elem_sep void setLanguageNames concode_elem_sep IReportVisitor createVisit... | ILanguageNames function ( ) { return languageNames ; } |
Generate a Java code for the following instruction: execute an authenticated request and return the response . concode_field_sep String IF_NONE_MATCH concode_elem_sep String GITHUB concode_elem_sep ObjectMapper mapper concode_elem_sep URL GITHUB_URL concode_elem_sep Repository repository concode_field_sep String getIss... | HttpResponse function ( Request arg0 ) { arg0 . addHeader ( "srini_string" , "srini_string" + repository . getToken ( ) ) ; Response loc0 = arg0 . execute ( ) ; return loc0 . returnResponse ( ) ; } |
Generate a Java code for the following instruction: gets the current size of the undoqueue . concode_field_sep int MAX_QUEUE_SIZE concode_elem_sep Document doc concode_elem_sep UndoableList queue concode_elem_sep int cursor concode_field_sep void add concode_elem_sep boolean isRedoable concode_elem_sep void prefsTrim c... | int function ( ) { return queue . size ( ) ; } |
Generate a Java code for the following instruction: checks if some value is valid for a certain key . concode_field_sep PdfName NONFULLSCREENPAGEMODE_PREFERENCES[] concode_elem_sep int pageLayoutAndMode concode_elem_sep PdfName DIRECTION_PREFERENCES[] concode_elem_sep int viewerPreferencesMask concode_elem_sep PdfName ... | boolean function ( PdfName arg0 , PdfName [ ] arg1 ) { for ( int loc0 = 0 ; loc0 < arg1 . length ; loc0 ++ ) { if ( arg1 [ loc0 ] . equals ( arg0 ) ) { return true ; } } return false ; } |
Generate a Java code for the following instruction: dispatches an event depending on it 's type . concode_field_sep Map<Class<? extends Event>,Handler<? extends Event>> handlers concode_field_sep void registerHandler | void function ( E arg0 ) { Handler < E > loc0 = ( Handler < E > ) handlers . get ( arg0 . getClass ( ) ) ; if ( loc0 != null ) { loc0 . onEvent ( arg0 ) ; } } |
Generate a Java code for the following instruction: return the child that represents this quadrant of the given node . concode_field_sep PlaceHolder placeHolder concode_field_sep Quadrant reflect concode_elem_sep boolean adjacent | QuadTreeNode function ( QuadTreeNode arg0 ) { return arg0 . getNorthEast ( ) ; } |
Generate a Java code for the following instruction: length of red and white parts . concode_field_sep GenPolynomial<GenPolynomial<C>> red concode_elem_sep GenPolynomial<GenPolynomial<C>> green concode_elem_sep GenPolynomial<GenPolynomial<C>> white concode_field_sep List<GenPolynomial<C>> getRedCoefficients concode_elem... | int function ( ) { int loc0 = red . length ( ) + white . length ( ) ; return loc0 ; } |
Generate a Java code for the following instruction: invokes #add object for each element in the given collection . concode_field_sep Object _current concode_elem_sep int _total concode_elem_sep DefaultMapBag _parent concode_elem_sep Map _map concode_elem_sep int _mods concode_elem_sep Iterator _support concode_field_se... | boolean function ( Collection arg0 ) { boolean loc0 = false ; Iterator loc1 = arg0 . iterator ( ) ; while ( loc1 . hasNext ( ) ) { boolean loc2 = add ( loc1 . next ( ) ) ; loc0 = loc0 || loc2 ; } return loc0 ; } |
Generate a Java code for the following instruction: advance the animation . concode_field_sep GraphicsExample example concode_field_sep void createControlPanel concode_elem_sep String getText concode_elem_sep String getCategory concode_elem_sep void paint concode_elem_sep void dispose concode_elem_sep boolean isAnimate... | void function ( int arg0 , int arg1 ) { } |
Generate a Java code for the following instruction: gets all codecs which can decode the specified format . concode_field_sep Registry instance concode_field_sep Codec[] getCodecs concode_elem_sep Codec[] getDecoders concode_elem_sep String[] getCodecClasses concode_elem_sep Codec[] getEncoders concode_elem_sep void un... | String [ ] function ( Format arg0 ) { return getCodecClasses ( null , arg0 ) ; } |
Generate a Java code for the following instruction: get the specified section . concode_field_sep Optional<String> fileName concode_elem_sep long serialVersionUID concode_elem_sep boolean built concode_elem_sep Set<PreprocessorRule> preprocessorRules concode_elem_sep List<Section> sections concode_elem_sep RedPenTokeni... | Section function ( int arg0 ) { return sections . get ( arg0 ) ; } |
Generate a Java code for the following instruction: gets a string from an asn1primitive concode_field_sep PlaceHolder placeHolder concode_field_sep String getOCSPURL concode_elem_sep String getCRLURL concode_elem_sep String getTSAURL concode_elem_sep CRL getCRL concode_elem_sep CRL getCRL concode_elem_sep ASN1Primitive... | String function ( ASN1Primitive arg0 ) { ASN1TaggedObject loc0 = ( ASN1TaggedObject ) arg0 ; return new String ( ASN1OctetString . getInstance ( loc0 , false ) . getOctets ( ) , "srini_string" ) ; } |
Generate a Java code for the following instruction: gets a chunk with a symbol character . concode_field_sep PlaceHolder placeHolder concode_field_sep char getCorrespondingSymbol concode_elem_sep int index | Chunk function ( char arg0 , Font arg1 ) { char loc0 = SpecialSymbol . getCorrespondingSymbol ( arg0 ) ; if ( loc0 == ' ' ) { return new Chunk ( String . valueOf ( arg0 ) , arg1 ) ; } Font loc1 = new Font ( FontFamily . SYMBOL , arg1 . getSize ( ) , arg1 . getStyle ( ) , arg1 . getColor ( ) ) ; String loc2 = String . v... |
Generate a Java code for the following instruction: create an instance of a summarystatistics concode_field_sep long serialVersionUID concode_field_sep double getStandardDeviation concode_elem_sep StatisticalSummary getSummary concode_elem_sep double getMax concode_elem_sep long getN concode_elem_sep void clear concode... | SummaryStatistics function ( Class arg0 ) { return ( SummaryStatistics ) arg0 . newInstance ( ) ; } |
Generate a Java code for the following instruction: factory method to create a set from a map . concode_field_sep long serialVersionUID concode_elem_sep Object dummyValue concode_elem_sep Map map concode_field_sep boolean add concode_elem_sep boolean containsAll concode_elem_sep boolean isEmpty concode_elem_sep void cl... | Set function ( Map arg0 , Object arg1 ) { if ( arg0 == null ) { throw new IllegalArgumentException ( "srini_string" ) ; } return new MapBackedSet ( arg0 , arg1 ) ; } |
Generate a Java code for the following instruction: get one single phenotype where the field given has the value given . concode_field_sep Joiner OR_QUERY_JOINER concode_elem_sep Path path concode_elem_sep SolrClient server concode_elem_sep CoreContainer cores concode_elem_sep boolean autocommit concode_elem_sep String... | Phenotype function ( String arg0 , String arg1 ) { List < Phenotype > loc0 = getPhenotypesByField ( arg0 , arg1 , true ) ; if ( loc0 . size ( ) == 0 ) { return Phenotype . NULL ; } return loc0 . get ( 0 ) ; } |
Generate a Java code for the following instruction: double the capacity of the internal array . concode_field_sep int size concode_elem_sep SimulationEvent[] items concode_elem_sep int collaps concode_field_sep int size concode_elem_sep boolean more concode_elem_sep void reset concode_elem_sep void insert concode_elem_... | void function ( ) { SimulationEvent [ ] loc0 = new SimulationEvent [ this . items . length * 2 ] ; System . arraycopy ( this . items , 0 , loc0 , 0 , this . size ) ; this . collaps = this . items . length / 4 ; this . items = loc0 ; } |
Generate a Java code for the following instruction: random node form group concode_field_sep double DEFAULT_DOWN_BANDWIDTH concode_elem_sep GnpSubnet subnet concode_elem_sep GnpPosition gnpPosition concode_elem_sep double DEFAULT_UP_BANDWIDTH concode_elem_sep int experimentSize concode_elem_sep double downBandwidth con... | GnpNetLayer function ( String arg0 ) { IPv4NetID loc0 = createNewID ( ) ; return newNetLayer ( loc0 ) ; } |
Generate a Java code for the following instruction: get plugin version . concode_field_sep PreauthPluginMeta pluginMeta concode_elem_sep KrbContext context concode_field_sep void init concode_elem_sep void tryFirst concode_elem_sep boolean process concode_elem_sep String getName concode_elem_sep List<EncryptionType> ge... | int function ( ) { return pluginMeta . getVersion ( ) ; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.