code
stringlengths
73
34.1k
label
stringclasses
1 value
public static Attributes lookupAttributes(LdapOperations ldapOperations, Name dn, String[] attributes) { return loopForAllAttributeValues(ldapOperations, dn, attributes).getCollectedAttributes(); }
java
public Object getObject() throws Exception { if (converterConfigList==null) { throw new FactoryBeanNotInitializedException("converterConfigList has not been set"); } ConverterManagerImpl result = new ConverterManagerImpl(); for (ConverterConfig converterConfig : conv...
java
public void setAttribute(Attribute attribute) { if (!updateMode) { originalAttrs.put(attribute); } else { updatedAttrs.put(attribute); } }
java
public LdapContext getInnermostDelegateLdapContext() { final LdapContext delegateLdapContext = this.getDelegateLdapContext(); if (delegateLdapContext instanceof DelegatingLdapContext) { return ((DelegatingLdapContext)delegateLdapContext).getInnermostDelegateLdapContext(); } ...
java
protected DirContext getContext(DirContextType dirContextType) { final DirContext dirContext; try { dirContext = (DirContext) this.keyedObjectPool.borrowObject(dirContextType); } catch (Exception e) { throw new DataAccessResourceFailureException("Failed to borrow DirContext from pool.", e); } if (dir...
java
public static String filterEncode(String value) { if (value == null) return null; // make buffer roomy StringBuilder encodedValue = new StringBuilder(value.length() * 2); int length = value.length(); for (int i = 0; i < length; i++) { char...
java
public static String nameEncode(String value) { if (value == null) return null; // make buffer roomy StringBuilder encodedValue = new StringBuilder(value.length() * 2); int length = value.length(); int last = length - 1; for (int i = 0; i < leng...
java
static public String nameDecode(String value) throws BadLdapGrammarException { if (value == null) return null; // make buffer same size StringBuilder decoded = new StringBuilder(value.length()); int i = 0; while (i < value.length()) { ...
java
public static String printBase64Binary(byte[] val) { Assert.notNull(val, "val must not be null!"); String encoded = DatatypeConverter.printBase64Binary(val); int length = encoded.length(); StringBuilder sb = new StringBuilder(length + length / RFC2849_MAX_BASE64_CHARS_PER_LINE)...
java
public static byte[] parseBase64Binary(String val) { Assert.notNull(val, "val must not be null!"); int length = val.length(); StringBuilder sb = new StringBuilder(length); for (int i = 0, len = length; i < len; i++) { char c = val.charAt(i); if(c == ...
java
protected Object invokeMethod(String method, Class<?> clazz, Object control) { Method actualMethod = ReflectionUtils.findMethod(clazz, method); return ReflectionUtils.invokeMethod(actualMethod, control); }
java
public Set<User> findAllMembers(Iterable<Name> absoluteIds) { return Sets.newLinkedHashSet(userRepo.findAll(toRelativeIds(absoluteIds))); }
java
private User updateUserStandard(LdapName originalId, User existingUser) { User savedUser = userRepo.save(existingUser); if(!originalId.equals(savedUser.getId())) { // The user has moved - we need to update group references. LdapName oldMemberDn = toAbsoluteDn(originalId); ...
java
protected ModificationItem getCompensatingModificationItem( Attributes originalAttributes, ModificationItem modificationItem) { Attribute modificationAttribute = modificationItem.getAttribute(); Attribute originalAttribute = originalAttributes .get(modificationAttribute.g...
java
public int compare(Object o1, Object o2) { List list1 = (List) o1; List list2 = (List) o2; for (int i = 0; i < list1.size(); i++) { if (list2.size() > i) { Comparable component1 = (Comparable) list1.get(i); Comparable component2 = (Comparable) list2.get(i); int componentsCompared = compone...
java
@Override public String getSqlWithValues() { final StringBuilder sb = new StringBuilder(); final String statementQuery = getStatementQuery(); // iterate over the characters in the query replacing the parameter placeholders // with the actual values int currentParameter = 0; for( int pos = 0; ...
java
protected static void doLogElapsed(int connectionId, long timeElapsedNanos, Category category, String prepared, String sql, String url) { doLog(connectionId, timeElapsedNanos, category, prepared, sql, url); }
java
protected static void doLog(int connectionId, long elapsedNanos, Category category, String prepared, String sql, String url) { // give it one more try if not initialized yet if (logger == null) { initialize(); if (logger == null) { return; } } final String format =...
java
private static boolean meetsThresholdRequirement(long timeTaken) { final P6LogLoadableOptions opts = P6LogOptions.getActiveInstance(); long executionThreshold = null != opts ? opts.getExecutionThreshold() : 0; return executionThreshold <= 0 || TimeUnit.NANOSECONDS.toMillis(timeTaken) > executio...
java
protected synchronized void bindDataSource() throws SQLException { // we'll check in the synchronized section again (to prevent unnecessary reinitialization) if (null != realDataSource) { return; } final P6SpyLoadableOptions options = P6SpyOptions.getActiveInstance(); // can be set when obje...
java
public void generateLogMessage() { if (lastRowLogged != currRow) { P6LogQuery.log(Category.RESULTSET, this); resultMap.clear(); lastRowLogged = currRow; } }
java
@Override public void setExclude(String exclude) { optionsRepository.setSet(String.class, EXCLUDE_LIST, exclude); // setting effective string optionsRepository.set(String.class, EXCLUDE, P6Util.joinNullSafe(optionsRepository.getSet(String.class, EXCLUDE_LIST), ",")); optionsRepository.setOrUnSet(Patte...
java
@Override protected Response serve() { invoke(); String s = ParseTime.getTimezone().getID(); JsonObject response = new JsonObject(); response.addProperty("tz", s); return Response.done(response); }
java
@Override public V get() { // check priorities - FJ task can only block on a task with higher priority! Thread cThr = Thread.currentThread(); int priority = (cThr instanceof FJWThr) ? ((FJWThr)cThr)._priority : -1; // was hitting this (priority=1 but _dt.priority()=0 for DRemoteTask) - not clear who inc...
java
protected int response( AutoBuffer ab ) { assert _tasknum==ab.getTask(); if( _done ) return ab.close(); // Ignore duplicate response packet int flag = ab.getFlag(); // Must read flag also, to advance ab if( flag == SERVER_TCP_SEND ) return ab.close(); // Ignore UDP packet for a TCP reply assert f...
java
private void accum_all(Chunk chks[], Chunk wrks, int nnids[]) { final DHistogram hcs[][] = _hcs; // Sort the rows by NID, so we visit all the same NIDs in a row // Find the count of unique NIDs in this chunk int nh[] = new int[hcs.length+1]; for( int i : nnids ) if( i >= 0 ) nh[i+1]++; ...
java
private void accum_all2(Chunk chks[], Chunk wrks, int nh[], int[] rows) { final DHistogram hcs[][] = _hcs; // Local temp arrays, no atomic updates. int bins[] = new int [nbins]; double sums[] = new double[nbins]; double ssqs[] = new double[nbins]; // For All Columns for( i...
java
public String setAndServe(String offset) { _offset.reset(); _offset.check(null,offset); _view .reset(); _view .check(null,"20"); _filter.reset(); return new Gson().toJson(serve()._response); }
java
public int addArgument(String str, String next) { int i = commandLineArgs.length; int consumed = 1; commandLineArgs = Arrays.copyOf(commandLineArgs, i + 1); /* * Flags have a null string as val and flag of true; Binding have non-empty * name, a non-null val (possibly ""), and a flag of false; ...
java
private int extract(Arg arg, Field[] fields) { int count = 0; for( Field field : fields ){ String name = field.getName(); Class cl = field.getType(); String opt = getValue(name); // optional value try{ if( cl.isPrimitive() ){ if( cl == Boolean.TYPE ){ boolea...
java
private void parse(String[] s) { commandLineArgs = new Entry[0]; for( int i = 0; i < s.length; ) { String next = (i+1<s.length)? s[i+1]: null; i += addArgument(s[i],next); } }
java
public float progress() { Freezable f = UKV.get(destination_key); if( f instanceof Progress ) return ((Progress) f).progress(); return 0; }
java
public static Job[] all() { List list = UKV.get(LIST); Job[] jobs = new Job[list==null?0:list._jobs.length]; int j=0; for( int i=0; i<jobs.length; i++ ) { Job job = UKV.get(list._jobs[i]); if( job != null ) jobs[j++] = job; } if( j<jobs.length ) jobs = Arrays.copyOf(jobs,j); retu...
java
public static boolean isRunning(Key job_key) { Job j = UKV.get(job_key); assert j!=null : "Job should be always in DKV!"; return j.isRunning(); }
java
public void remove() { end_time = System.currentTimeMillis(); if( state == JobState.RUNNING ) state = JobState.DONE; // Overwrite handle - copy end_time, state, msg replaceByJobHandle(); }
java
public static Job findJobByDest(final Key destKey) { Job job = null; for( Job current : Job.all() ) { if( current.dest().equals(destKey) ) { job = current; break; } } return job; }
java
public Job fork() { init(); H2OCountedCompleter task = new H2OCountedCompleter() { @Override public void compute2() { try { try { // Exec always waits till the end of computation Job.this.exec(); Job.this.remove(); } catch (Throwable t) { ...
java
public static void waitUntilJobEnded(Key jobkey, int pollingIntervalMillis) { while (true) { if (Job.isEnded(jobkey)) { return; } try { Thread.sleep (pollingIntervalMillis); } catch (Exception ignore) {} } }
java
public static <T extends FrameJob> T hygiene(T job) { job.source = null; return job; }
java
@Override protected Split ltSplit(int col, Data d, int[] dist, int distWeight, Random rand) { final int[] distL = new int[d.classes()], distR = dist.clone(); final double upperBoundReduction = upperBoundReduction(d.classes()); double maxReduction = -1; int bestSplit = -1; int totL = 0, totR = 0; ...
java
public boolean inetAddressOnNetwork(InetAddress ia) { int i = (_o1 << 24) | (_o2 << 16) | (_o3 << 8) | (_o4 << 0); byte[] barr = ia.getAddress(); if (barr.length != 4) { return false; } int j = (((int)barr[0] & 0xff) << 24) | (((int)barr[1] & 0...
java
public Lockable write_lock( Key job_key ) { Log.debug(Log.Tag.Sys.LOCKS,"write-lock "+_key+" by job "+job_key); return ((PriorWriteLock)new PriorWriteLock(job_key).invoke(_key))._old; }
java
public T delete_and_lock( Key job_key ) { Lockable old = write_lock(job_key); if( old != null ) { Log.debug(Log.Tag.Sys.LOCKS,"lock-then-clear "+_key+" by job "+job_key); old.delete_impl(new Futures()).blockForPending(); } return (T)this; }
java
public static void delete( Key k, Key job_key ) { if( k == null ) return; Value val = DKV.get(k); if( val == null ) return; // Or just nothing there to delete if( !val.isLockable() ) UKV.remove(k); // Simple things being deleted else ((Lockable)val.get()).delete(job_key,0.0f); // Lockab...
java
public void delete( Key job_key, float dummy ) { if( _key != null ) { Log.debug(Log.Tag.Sys.LOCKS,"lock-then-delete "+_key+" by job "+job_key); new PriorWriteLock(job_key).invoke(_key); } Futures fs = new Futures(); delete_impl(fs); if( _key != null ) DKV.remove(_key,fs); // Delete self...
java
public void update( Key job_key ) { Log.debug(Log.Tag.Sys.LOCKS,"update write-locked "+_key+" by job "+job_key); new Update(job_key).invoke(_key); }
java
public void unlock( Key job_key ) { if( _key != null ) { Log.debug(Log.Tag.Sys.LOCKS,"unlock "+_key+" by job "+job_key); new Unlock(job_key).invoke(_key); } }
java
static public DHistogram[] initialHist(Frame fr, int ncols, int nbins, DHistogram hs[], int min_rows, boolean doGrpSplit, boolean isBinom) { Vec vecs[] = fr.vecs(); for( int c=0; c<ncols; c++ ) { Vec v = vecs[c]; final float minIn = (float)Math.max(v.min(),-Float.MAX_VALUE); // inclusive vector min ...
java
public boolean isConstantResponse() { double m = Double.NaN; for( int b=0; b<_bins.length; b++ ) { if( _bins[b] == 0 ) continue; if( var(b) > 1e-14 ) return false; double mean = mean(b); if( mean != m ) if( Double.isNaN(m) ) m=mean; else if(Math.abs(m - mean) > 1e-6) retu...
java
static void lockCloud() { if( _cloudLocked ) return; // Fast-path cutout synchronized(Paxos.class) { while( !_commonKnowledge ) try { Paxos.class.wait(); } catch( InterruptedException ie ) { } _cloudLocked = true; } }
java
protected Vec[][] makeTemplates() { Vec anyVec = dataset.anyVec(); final long[][] espcPerSplit = computeEspcPerSplit(anyVec._espc, anyVec.length()); final int num = dataset.numCols(); // number of columns in input frame final int nsplits = espcPerSplit.length; // number of splits final String[][] do...
java
public static PSetupGuess guessSetup(byte [] bits){ InputStream is = new ByteArrayInputStream(bits); XlsParser p = new XlsParser(); CustomInspectDataOut dout = new CustomInspectDataOut(); try{p.streamParse(is, dout);}catch(Exception e){} return new PSetupGuess(new ParserSetup(ParserType.XLS,CsvParse...
java
public static Frame mmul(Frame x, Frame y) { MatrixMulJob mmj = new MatrixMulJob(Key.make("mmul" + ++cnt),Key.make("mmulProgress"),x,y); mmj.fork()._fjtask.join(); DKV.remove(mmj._dstKey); // do not leave garbage in KV mmj._z.reloadVecs(); return mmj._z; }
java
public T invokeOnAllNodes() { H2O cloud = H2O.CLOUD; Key[] args = new Key[cloud.size()]; String skey = "RunOnAll"+Key.rand(); for( int i = 0; i < args.length; ++i ) args[i] = Key.make(skey,(byte)0,Key.DFJ_INTERNAL_USER,cloud._memary[i]); invoke(args); for( Key arg : args ) DKV.remove(arg);...
java
@Override public boolean block() throws InterruptedException { while( !isDone() ) { try { get(); } catch(ExecutionException eex) { // skip the execution part Throwable tex = eex.getCause(); if( tex instanceof Error) throw ( Error)tex; if( tex instan...
java
private final void dcompute() {// Work to do the distribution // Split out the keys into disjointly-homed sets of keys. // Find the split point. First find the range of home-indices. H2O cloud = H2O.CLOUD; int lo=cloud._memary.length, hi=-1; for( Key k : _keys ) { int i = k.home(cloud); ...
java
private final void donCompletion( CountedCompleter caller ) { // Distributed completion assert _lo == null || _lo.isDone(); assert _hi == null || _hi.isDone(); // Fold up results from left & right subtrees if( _lo != null ) reduce2(_lo.get()); if( _hi != null ) reduce2(_hi.get()); if( _l...
java
protected JsonObject argumentsToJson() { JsonObject result = new JsonObject(); for (Argument a : _arguments) { if (a.specified()) result.addProperty(a._name,a.originalValue()); } return result; }
java
@Override protected void init() { super.init(); assert 0 <= ntrees && ntrees < 1000000; // Sanity check // Not enough rows to run if (source.numRows() - response.naCnt() <=0) throw new IllegalArgumentException("Dataset contains too many NAs!"); if( !classification && (!(response.isEnum() || ...
java
public static void build( final Key jobKey, final Key modelKey, final DRFParams drfParams, final Data localData, int ntrees, int numSplitFeatures, int[] rowsPerChunks) { Timer t_alltrees = new Timer(); Tree[] trees = n...
java
static void listJobs() throws Exception { HttpClient client = new HttpClient(); GetMethod get = new GetMethod(URL + "/Jobs.json"); int status = client.executeMethod(get); if( status != 200 ) throw new Exception(get.getStatusText()); Gson gson = new Gson(); JobsRes res = gson.fromJson(new I...
java
static void exportModel() throws Exception { HttpClient client = new HttpClient(); GetMethod get = new GetMethod(URL + "/2/ExportModel.json?model=MyInitialNeuralNet"); int status = client.executeMethod(get); if( status != 200 ) throw new Exception(get.getStatusText()); JsonObject response = (J...
java
public static void importModel() throws Exception { // Upload file to H2O HttpClient client = new HttpClient(); PostMethod post = new PostMethod(URL + "/Upload.json?key=" + JSON_FILE.getName()); Part[] parts = { new FilePart(JSON_FILE.getName(), JSON_FILE) }; post.setRequestEntity(new MultipartReque...
java
private void checkAndLimitFeatureUsedPerSplit(Frame fr) { int validCols = fr.numCols()-1; // for classIdx column if (validCols < _rfParams.num_split_features) { Log.info(Log.Tag.Sys.RANDF, "Limiting features from " + _rfParams.num_split_features + " to " + validCols + " because there...
java
private long getChunkId(final Frame fr) { Key[] keys = new Key[fr.anyVec().nChunks()]; for(int i = 0; i < fr.anyVec().nChunks(); ++i) { keys[i] = fr.anyVec().chunkKey(i); } for(int i = 0; i < keys.length; ++i) { if (keys[i].home()) return i; } return -99999; //throw n...
java
public static String JSON2HTML(String name) { if( name.length() < 1 ) return name; if(name == "row") { return name.substring(0,1).toUpperCase()+ name.replace("_"," ").substring(1); } return name.substring(0,1)+name.replace("_"," ").substring(1); }
java
public static PSetupGuess guessSetup(byte [] bytes){ // find the last eof int i = bytes.length-1; while(i > 0 && bytes[i] != '\n')--i; assert i >= 0; InputStream is = new ByteArrayInputStream(Arrays.copyOf(bytes,i)); SVMLightParser p = new SVMLightParser(new ParserSetup(ParserType.SVMLight, CsvP...
java
public static Unsafe getUnsafe() { // Not on bootclasspath if( UtilUnsafe.class.getClassLoader() == null ) return Unsafe.getUnsafe(); try { final Field fld = Unsafe.class.getDeclaredField("theUnsafe"); fld.setAccessible(true); return (Unsafe) fld.get(UtilUnsafe.class); } catch (E...
java
protected void bprop(float target) { assert (target != missing_real_value); if (params.loss != Loss.MeanSquare) throw new UnsupportedOperationException("Regression is only implemented for MeanSquare error."); final int row = 0; // Computing partial derivative: dE/dnet = dE/dy * dy/dnet = dE/dy *...
java
public double score_interpreter(final HashMap<String, Comparable> row ) { double score = _initialScore; for( int i=0; i<_rules.length; i++ ) score += _rules[i].score(row.get(_colNames[i])); return score; }
java
public static String getName( String pname, DataTypes type, StringBuilder sb ) { String jname = xml2jname(pname); // Emit the code to do the load return jname; }
java
private boolean set_cache( long cache ) { while( true ) { // Spin till get it long old = _cache; // Read once at the start if( !H2O.larger(cloud(cache),cloud(old)) ) // Rolling backwards? // Attempt to set for an older Cloud. Blow out with a failure; caller // should retry on a new Cloud...
java
public long cloud_info( H2O cloud ) { long x = _cache; // See if cached for this Cloud. This should be the 99% fast case. if( cloud(x) == cloud._idx ) return x; // Cache missed! Probaby it just needs (atomic) updating. // But we might be holding the stale cloud... // Figure out home Node in thi...
java
static public Key make(byte[] kb, byte rf) { if( rf == -1 ) throw new IllegalArgumentException(); Key key = new Key(kb); Key key2 = H2O.getk(key); // Get the interned version, if any if( key2 != null ) // There is one! Return it instead return key2; // Set the cache with desired replication f...
java
static public String rand() { UUID uid = UUID.randomUUID(); long l1 = uid.getLeastSignificantBits(); long l2 = uid. getMostSignificantBits(); return "_"+Long.toHexString(l1)+Long.toHexString(l2); }
java
static public Key make(String s, byte rf, byte systemType, H2ONode... replicas) { return make(decodeKeyName(s),rf,systemType,replicas); }
java
static public Key make(byte[] kb, byte rf, byte systemType, H2ONode... replicas) { // no more than 3 replicas allowed to be stored in the key assert 0 <=replicas.length && replicas.length<=3; assert systemType<32; // only system keys allowed // Key byte layout is: // 0 - systemType, from 0-31 //...
java
final public static Key makeSystem(String s) { byte[] kb= decodeKeyName(s); byte[] kb2 = new byte[kb.length+1]; System.arraycopy(kb,0,kb2,1,kb.length); kb2[0] = Key.BUILT_IN_KEY; return Key.make(kb2); }
java
protected void decorateActiveStep(final TutorStep step, StringBuilder sb) { sb.append("<h4>").append(step.summary()).append("</h4>"); sb.append(step.content()); }
java
@Override public void reduce(JStackCollectorTask that) { if( _result == null ) _result = that._result; else for (int i=0; i<_result.length; ++i) if (_result[i] == null) _result[i] = that._result[i]; }
java
public float[] predict( Map<String, Double> row, double data[], float preds[] ) { return predict(map(row,data),preds); }
java
private void emitLogHeader(Context context, String mapredTaskId) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); Text textId = new Text(mapredTaskId); for (Map.Entry<String, String> entry: conf) { StringBuilder sb = new StringBuilder(); sb.append(entr...
java
@Override protected Response serve() { if( src_key == null ) return RequestServer._http404.serve(); Vec v = src_key.anyVec(); if (v.isEnum()) { map = Arrays.asList(v.domain()).indexOf(str); } else if (v.masterVec() != null && v.masterVec().isEnum()) { map = Arrays.asList(v.masterVec().domain...
java
static public Value DputIfMatch( Key key, Value val, Value old, Futures fs) { return DputIfMatch(key, val, old, fs, false); }
java
static public void write_barrier() { for( H2ONode h2o : H2O.CLOUD._memary ) for( RPC rpc : h2o.tasks() ) if( rpc._dt instanceof TaskPutKey || rpc._dt instanceof Atomic ) rpc.get(); }
java
static public Value get( Key key, int len, int priority ) { while( true ) { // Read the Cloud once per put-attempt, to keep a consistent snapshot. H2O cloud = H2O.CLOUD; Value val = H2O.get(key); // Hit in local cache? if( val != null ) { if( len > val._max ) len = val._max; //...
java
private void zipDir(String dir2zip, ZipOutputStream zos) throws IOException { try { //create a new File object based on the directory we have to zip. File zipDir = new File(dir2zip); //get a listing of the directory content String[] dirList = zipDir.list(); byte[] readBuffer = ne...
java
@Override public float[] scoreKey( Object modelKey, String [] colNames, String domains[][], double[] row ) { Key key = (Key)modelKey; String sk = key.toString(); Value v = DKV.get(key); if (v == null) throw new IllegalArgumentException("Key "+sk+" not found!"); try { return scoreModel(v....
java
void incr1( int b, double y, double yy ) { Utils.AtomicDoubleArray.add(_sums,b,y); Utils.AtomicDoubleArray.add(_ssqs,b,yy); }
java
protected final String checkArguments(Properties args, RequestType type) { // Why the following lines duplicate lines from Request#92 - handling query? // reset all arguments for (Argument arg: _arguments) arg.reset(); // return query if in query mode if (type == RequestType.query) retur...
java
static public void basic_packet_handling( AutoBuffer ab ) throws java.io.IOException { // Randomly drop 1/10th of the packets, as-if broken network. Dropped // packets are timeline recorded before dropping - and we still will // respond to timelines and suicide packets. int drop = H2O.OPT_ARGS.random_u...
java
void push( int slots ) { assert 0 <= slots && slots < 1000; int len = _d.length; _sp += slots; while( _sp > len ) { _key= Arrays.copyOf(_key,len<<1); _ary= Arrays.copyOf(_ary,len<<1); _d = Arrays.copyOf(_d ,len<<1); _fcn= Arrays.copyOf(_fcn,len<<=1); _str= Arrays.copyOf(_...
java
void push_slot( int d, int n ) { assert d==0; // Should use a fcn's closure for d>1 int idx = _display[_tod-d]+n; push(1); _ary[_sp-1] = addRef(_ary[idx]); _d [_sp-1] = _d [idx]; _fcn[_sp-1] = addRef(_fcn[idx]); _str[_sp-1] = _str[idx]; assert _ary[0]==null...
java
void tos_into_slot( int d, int n, String id ) { // In a copy-on-modify language, only update the local scope, or return val assert d==0 || (d==1 && _display[_tod]==n+1); int idx = _display[_tod-d]+n; // Temporary solution to kill a UDF from global name space. Needs to fix in the future. if (_tod == ...
java
void tos_into_slot( int idx, String id ) { subRef(_ary[idx], _key[idx]); subRef(_fcn[idx]); Frame fr = _ary[_sp-1]; _ary[idx] = fr==null ? null : addRef(new Frame(fr)); _d [idx] = _d [_sp-1] ; _fcn[idx] = addRef(_fcn[_sp-1]); _str[idx] = ...
java
public Frame popXAry() { Frame fr = popAry(); for( Vec vec : fr.vecs() ) { popVec(vec); if ( vec.masterVec() != null ) popVec(vec.masterVec()); } return fr; }
java
public void poppush( int n, Frame ary, String key) { addRef(ary); for( int i=0; i<n; i++ ) { assert _sp > 0; _sp--; _fcn[_sp] = subRef(_fcn[_sp]); _ary[_sp] = subRef(_ary[_sp], _key[_sp]); } push(1); _ary[_sp-1] = ary; _key[_sp-1] = key; assert check_all_refcnts(); }
java
public Futures subRef( Vec vec, Futures fs ) { assert fs != null : "Future should not be null!"; if ( vec.masterVec() != null ) subRef(vec.masterVec(), fs); int cnt = _refcnt.get(vec)._val-1; if ( cnt > 0 ) { _refcnt.put(vec,new IcedInt(cnt)); } else { UKV.remove(vec._key,fs); _ref...
java
public S fillFrom( Properties parms ) { // Get passed-in fields, assign into Schema Class clz = getClass(); for( String key : parms.stringPropertyNames() ) { try { Field f = clz.getDeclaredField(key); // No such field error, if parm is junk int mods = f.getModifiers(); if( Modi...
java
public final boolean isNA(long i) { long x = i - (_start>0 ? _start : 0); if( 0 <= x && x < _len ) return isNA0((int)x); throw new ArrayIndexOutOfBoundsException(getClass().getSimpleName() + " " +_start+" <= "+i+" < "+(_start+_len)); }
java