code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public boolean isReadOnly(){
return projectDescription.getPermissions() != null && projectDescription.getPermissions().size() == 1 && "read".equalsIgnoreCase(projectDescription.getPermissions().get(0));
}
| Indicate that current user has only read rights for this project. |
public DataFile2EntityXml(){
}
| Creates a new instance of DataFile2EntityXml |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:43.211 -0500",hash_original_method="D70623C6F3F3546E610A0761808ACD51",hash_generated_method="7153314C2BD4370663FC9A00A6B9E867") static void exhaustInputStream(final InputStream inStream) throws IOException {
byte buffer[]=new byte... | Exhaust an input stream, reading until EOF has been encountered. <p>Note that this function is intended as a non-public utility. This is a little weird, but it seemed silly to make a utility class for this one function, so instead it is just static and shared that way.</p> |
private void bes(Graph graph){
TetradLogger.getInstance().log("info","** BACKWARD EQUIVALENCE SEARCH");
initializeArrowsBackward(graph);
while (!sortedArrows.isEmpty()) {
Arrow arrow=sortedArrows.first();
sortedArrows.remove(arrow);
Node x=arrow.getA();
Node y=arrow.getB();
if (!graph.isAdjace... | Backward equivalence search. |
public SymbolTableEntryOriginal basicGetDelegationBaseType(){
return delegationBaseType;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void zoomToPoint(float scale,PointF imagePoint,PointF viewPoint){
FLog.v(TAG,"zoomToPoint");
calculateZoomToPointTransform(mActiveTransform,scale,imagePoint,viewPoint,LIMIT_ALL);
onTransformChanged();
}
| Zooms to the desired scale and positions the image so that the given image point corresponds to the given view point. |
public Label(double... c){
this(coordToString(c),AbstractDrawer.DEFAULT_COLOR,c);
}
| show coord itself |
private static Query[] createQueries(List<Object> qs,Analyzer a){
QueryParser qp=new QueryParser(DocMaker.BODY_FIELD,a);
List<Object> queries=new ArrayList<>();
for (int i=0; i < qs.size(); i++) {
try {
Object query=qs.get(i);
Query q=null;
if (query instanceof String) {
q=qp.parse((... | Parse the strings containing Lucene queries. |
public ClusterMetricsSnapshot(ClusterGroup p){
assert p != null;
Collection<ClusterNode> nodes=p.nodes();
int size=nodes.size();
curJobWaitTime=Long.MAX_VALUE;
lastUpdateTime=0;
maxActiveJobs=0;
curActiveJobs=0;
avgActiveJobs=0;
maxWaitingJobs=0;
curWaitingJobs=0;
avgWaitingJobs=0;
maxRejectedJo... | Create metrics for given cluster group. |
@SneakyThrows public static X509Certificate readCertificate(InputStream is){
return (X509Certificate)CERT_FACTORY.generateCertificate(is);
}
| Reads X509Certificate object from given input stream. |
protected ServiceRefImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public PasswordEditText(Context context,AttributeSet attrs){
this(context,attrs,R.attr.mdPasswordEditTextStyle);
}
| Create a PasswordEditText view through XML inflation using settings from provided attributes and from the style assigned to the theme attribute mdPasswordEditTextStyle. |
private static String sanitizePath(String rawPath){
if (rawPath == null) {
return null;
}
return rawPath.replaceFirst("^~",System.getProperty("user.home"));
}
| Ensures a usable file path when the user specifies a tilde for the home path. |
public boolean contains(JComponent a,int b,int c){
boolean returnValue=((ComponentUI)(uis.elementAt(0))).contains(a,b,c);
for (int i=1; i < uis.size(); i++) {
((ComponentUI)(uis.elementAt(i))).contains(a,b,c);
}
return returnValue;
}
| Invokes the <code>contains</code> method on each UI handled by this object. |
public static void read(final URL shpFile,GeomVectorField field,final Bag masked,Class<?> masonGeometryClass) throws FileNotFoundException, IOException, Exception {
if (shpFile == null) {
throw new IllegalArgumentException("shpFile is null; likely file not found");
}
if (!MasonGeometry.class.isAssignableFrom(... | Populate field from the shape file given in fileName |
public int size(){
unparcel();
return mMap.size();
}
| Returns the number of mappings contained in this Bundle. |
public SquareHighlighter(ChessBoard board){
this.board=board;
for (int i=0; i < 64; i++) {
decorators[i]=new HighlightDecorator(board.getSquare(i));
}
for (int i=0; i < 13; i++) {
if (board.getPieceJailSquares()[i] != null) {
dropSquareDecorators[i]=new HighlightDecorator(board.getPieceJailSquares... | Constructs a SquareHighlighter tied to the specified chess board. |
public NPCGroupsXMLLoader(final String uri){
try {
this.uri=new URI(uri);
}
catch ( URISyntaxException e) {
logger.error(e,e);
}
}
| Create an xml based loader of NPC groups. |
public UseableEntity2DView(){
this.action=ActionType.USE;
}
| creates a new UseableEntity2DView |
public void displayGroupList(int arg0,String arg1){
_log.debug("displayGroupList: " + arg0 + " "+ arg1);
}
| Method displayGroupList. |
private boolean checkDoubleForEquality(double expected,double actual){
if (expected == actual) {
return true;
}
if (Double.isNaN(expected) && !Double.isNaN(actual)) {
return false;
}
if (!Double.isNaN(expected) && Double.isNaN(actual)) {
return false;
}
final double MAX_RELATIVE_ERROR=0.000000... | Returns true if equality has been found; false otherwise. Note that this function is NOT perfect, passing in values very close to zero where one is positive and the other is negative will fail the check, despite them being very close together. But in this case that should not be too much of a problem. |
@Override public Object clone() throws CloneNotSupportedException {
return super.clone();
}
| Returns a clone of the entity. |
public void clear(){
m_trie=new Trie(m_trie.isCaseSensitive());
super.clear();
}
| Removes all search hits and clears out the index. |
public boolean hasListeners(String listenerTypeName){
synchronized (monData) {
if (!monData.hasListeners()) return false;
ListenerType type=getListenerType(listenerTypeName);
if (type == null) return false;
else return type.hasListeners();
}
}
| Returns true if this listenertype ('max', 'min', 'value', 'maxactive') has any listeners at all |
public ImageSize scaleDown(int sampleSize){
return new ImageSize(width / sampleSize,height / sampleSize);
}
| Scales down dimensions in <b>sampleSize</b> times. Returns new object. |
public static List<VisibleActionGroup> renderActionGroup(@NotNull ActionGroup group,PresentationFactory presentationFactory,ActionManager actionManager,PerspectiveManager perspectiveManager){
Presentation presentation=presentationFactory.getPresentation(group);
ActionEvent event=new ActionEvent(presentation,actionM... | Returns the list of visible action group. |
public void accessKeySVG12(float offset,String keyName){
}
| Invoked when an SVG 1.2 accessKey value timing specifier is parsed. |
public StdTypeList withFirst(Type type){
int sz=size();
StdTypeList result=new StdTypeList(sz + 1);
result.set0(0,type);
for (int i=0; i < sz; i++) {
result.set0(i + 1,getOrNull0(i));
}
return result;
}
| Returns a new instance, which is the same as this instance, except that it has an additional type prepended to the original. |
private void initGrain(){
for (int i=0; i < 10; i++) {
output=getOutput();
nfsr=shift(nfsr,getOutputNFSR() ^ lfsr[0] ^ output);
lfsr=shift(lfsr,getOutputLFSR() ^ output);
}
initialised=true;
}
| 160 clocks initialization phase. |
public final boolean isListed(final BlacklistType blacklistType,final DigestURL url){
if (url == null) {
throw new IllegalArgumentException("url may not be null");
}
if (url.getHost() == null) {
return false;
}
HandleSet urlHashCache=getCacheUrlHashsSet(blacklistType);
if (urlHashCache == null) {
... | Checks whether the given entry is listed in given blacklist type. |
public N4ClassExpression createN4ClassExpression(){
N4ClassExpressionImpl n4ClassExpression=new N4ClassExpressionImpl();
return n4ClassExpression;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private Pair<VirtualFile,VirtualFile> prepareFileInBothRepositories() throws IOException {
cd(myRepository);
String aFile="A.txt";
touch(aFile,"basic");
hg("add " + aFile);
hg("commit -m 'create file' ");
hg("update");
myRepository.refresh(false,true);
final VirtualFile parentFile=myRepository.findChild... | Creates a file with initial content in the parent repository, pulls & updates it to the child repository. |
public PrintWriter out(){
return out;
}
| Writer for normal messages. |
public T pop(){
if (size() > 0) {
return remove(size() - 1);
}
return null;
}
| Remove the object at the top of the stack and returns it. |
public DoubleNode<E> prev(){
return prev;
}
| Return previous. |
public CompositeOutputStream(OutputStream... out){
final Set<OutputStream> newSet=new HashSet<OutputStream>();
for ( OutputStream stream : out) {
newSet.add(stream);
}
this.streams=newSet;
}
| Constructs a new instance of CompositeOutputStream with zero or more OutputStreams. |
protected void writeDataDescriptor(ZipEntry ze) throws IOException {
if (ze.getMethod() != DEFLATED || raf != null) {
return;
}
writeOut(DD_SIG.getBytes());
writeOut((new ZipLong(entry.getCrc())).getBytes());
writeOut((new ZipLong(entry.getCompressedSize())).getBytes());
writeOut((new ZipLong(entry.getS... | Writes the data descriptor entry |
public void configure(){
SpecificTrafficController tc=new SpecificTrafficController(this.getSystemConnectionMemo());
this.getSystemConnectionMemo().setTrafficController(tc);
tc.setAdapterMemo(this.getSystemConnectionMemo());
this.getSystemConnectionMemo().configureManagers();
tc.connectPort(this);
this.getS... | set up all of the other objects to simulate operation with an command station. |
private void addStepToForgetVolumes(Workflow workflow,URI vplexSystemURI,List<URI> volumeURIs,String waitFor){
List<VolumeInfo> nativeVolumeInfoList=getNativeVolumeInfo(volumeURIs);
workflow.createStep(VOLUME_FORGET_STEP,String.format("Forget Volumes:%n%s",BlockDeviceController.getVolumesMsg(_dbClient,volumeURIs)),... | Adds a step in the passed workflow to tell the VPLEX system with the passed URI to forget about the backend storage volumes with the passed URIs. |
public void modelCheck() throws Exception {
boolean recovered=this.recover();
try {
if (!this.checkAssumptions()) return;
if (!this.doInit(false)) return;
}
catch ( Throwable e) {
if (this.errState != null) {
MP.printError(EC.TLC_INITIAL_STATE,new String[]{e.getMessage(),this.errState.... | This method does model checking on a TLA+ spec. All the visited states are stored in the variable theFPSet. |
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
| Returns a clone of the dataset. |
public void begin(Attributes attributes) throws Exception {
UIComponent uic=(UIComponent)digester.peek();
if (log.isTraceEnabled()) {
log.trace("component: " + uic.getId());
}
AttributesImpl attrs=new AttributesImpl(attributes);
for (int i=0; i < attrs.getLength(); i++) {
String qName=attributes.getQN... | This method is invoked when the beginning of the matched Xml element is encountered ; |
private void validateCapabilities(Context context,Context.Capabilities[] required) throws IllegalStateException {
String missing=Stream.of(required).filter(null).map(null).collect(Collectors.joining(", "));
if (StringUtils.isNotBlank(missing) || context == null) {
throw new IllegalStateException("missing requir... | Ensure that the required capabilities are defined. |
public ToStringBuilder append(final String fieldName,final byte value){
style.append(buffer,fieldName,value);
return this;
}
| <p>Append to the <code>toString</code> an <code>byte</code> value.</p> |
public boolean equals(Object o){
if (o == this) return true;
if (!(o instanceof MBeanFeatureInfo)) return false;
MBeanFeatureInfo p=(MBeanFeatureInfo)o;
return (Objects.equals(p.getName(),getName()) && Objects.equals(p.getDescription(),getDescription()) && Objects.equals(p.getDescriptor(),getDescriptor()));... | Compare this MBeanFeatureInfo to another. |
public static double random(double min,double max){
double next=RANDOM.nextDouble();
return min + (next * max) - (next * min);
}
| Returns a pseudo random <code>double</code> value in the range <code>[min, max]</code> (fast and thread-safe without synchronization). |
public TypeAliasItemProvider(AdapterFactory adapterFactory){
super(adapterFactory);
}
| This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> |
public static Test suite(){
return (new TestSuite(ViewParametersITCase.class));
}
| Return the tests included in this test suite. |
@Override protected T doSwitch(int classifierID,EObject theEObject){
switch (classifierID) {
case OrientedPackage.COMPONENT:
{
Component component=(Component)theEObject;
T result=caseComponent(component);
if (result == null) result=defaultCase(theEObject);
return result;
}
case Oriente... | Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. <!-- begin-user-doc --> <!-- end-user-doc --> |
public DummyStatisticsFactory(){
}
| Creates a new instance of DummyStatisticsFactory |
private void collectExternalDependenciesFromIvyXmlFile(File ivyXmlFile) throws XPathExpressionException, IOException, SAXException {
String module=getModuleName(ivyXmlFile);
log("Collecting external dependencies from: " + ivyXmlFile.getPath(),verboseLevel);
Document document=documentBuilder.parse(ivyXmlFile);
S... | Collect external dependencies from the given ivy.xml file, constructing property values containing <dependency> snippets, which will be filtered (substituted) when copying the POM for the module corresponding to the given ivy.xml file. |
public boolean isInvoiced(){
Object oo=get_Value(COLUMNNAME_IsInvoiced);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Invoiced. |
public TDoubleObjectHashMap(){
_hashingStrategy=this;
}
| Creates a new <code>TDoubleObjectHashMap</code> instance with the default capacity and load factor. |
public static void gluPerspective(GL10 gl,double fovy,double aspect,double zNear,double zFar){
double top=zNear * Math.tan(fovy * (Math.PI / 360.0));
double bottom=-top;
double left=bottom * aspect;
double right=top * aspect;
gl.glFrustumf((float)left,(float)right,(float)bottom,(float)top,(float)zNear,(float)... | Set up a perspective projection matrix |
protected List<Chunk> parseChunkSpec(String delimitedChunkDefinitions,String delimitedTokenText,List<MutableToken> untypedTokens){
List<Chunk> chunks=new ArrayList<>();
String[] chunkDefinitions=delimitedChunkDefinitions.split("\\|");
for (int i=0; i < chunkDefinitions.length; i++) {
chunks.add(parseChunk(chu... | Parse List of Chunks from pipe-delimited chunk definitions |
public Vector4d add(double x,double y,double z,double w){
this.x+=x;
this.y+=y;
this.z+=z;
this.w+=w;
return this;
}
| Add <tt>(x, y, z, w)</tt> to this. |
public OrganizationAlreadyExistsException(){
}
| Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized. |
public City(){
super(KEY);
}
| Constructs an instance using the default key. |
public static boolean isSameLength(final int[] array1,final int[] array2){
if (array1 == null && array2 != null && array2.length > 0 || array2 == null && array1 != null && array1.length > 0 || array1 != null && array2 != null && array1.length != array2.length) {
return false;
}
return true;
}
| <p>Checks whether two arrays are the same length, treating <code>null</code> arrays as length <code>0</code>.</p> |
public void printStackTrace(PrintWriter s){
super.printStackTrace(s);
if (reason != null) {
s.print("at ");
reason.printStackTrace(s);
}
}
| Print a stack trace for this exception with a given <code>PrintWriter</code>. |
private void updateProgress(int progress){
if (myHost != null && progress != previousProgress) {
myHost.updateProgress(progress);
}
previousProgress=progress;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public void transformSelectedNodes(TransformerImpl transformer) throws TransformerException {
final XPathContext xctxt=transformer.getXPathContext();
final int sourceNode=xctxt.getCurrentNode();
DTMIterator sourceNodes=m_selectExpression.asIterator(xctxt,sourceNode);
try {
final Vector keys=(m_sortElems == ... | Perform a query if needed, and call transformNode for each child. |
public AbstractInsnNode[] toArray(){
int i=0;
AbstractInsnNode elem=first;
AbstractInsnNode[] insns=new AbstractInsnNode[size];
while (elem != null) {
insns[i]=elem;
elem.index=i++;
elem=elem.next;
}
return insns;
}
| Returns an array containing all of the instructions in this list. |
@Override public TestFsm registerFsm(final String sessionId){
if (debugEnabled) {
LOGGER.debug("Registering new FSM with '" + sessionId + "' session ID...");
}
final TestFsm fsm=getSession(sessionId);
if (debugEnabled) {
LOGGER.debug("FSM has been successfully registered with '" + sessionId + "' session... | Creates a new FSM with the unique session ID argument and registers it into the cache. |
public static String normalizeSubject(String subj,String prefix){
StringBuilder subject=new StringBuilder(subj);
int prefixLength=prefix.length();
int index=subject.indexOf(prefix);
if (index != 0) {
if (index > 0) {
subject.delete(index,index + prefixLength);
}
subject.insert(0,prefix);
}
... | <p>This takes the subject string and reduces (normailzes) it. Multiple "Re:" entries are reduced to one, and capitalized. The prefix is always moved/placed at the beginning of the line, and extra blanks are reduced, so that the output is always of the form:</p> <code> <prefix> + <one-optional-"Re:"*gt; + <... |
@Override public Pair<OperandSize,String> generate(final ITranslationEnvironment environment,final long offset,final List<ReilInstruction> instructions) throws InternalTranslationException {
Preconditions.checkNotNull(environment,"Error: Argument environment can't be null");
Preconditions.checkNotNull(instructions,... | Generates code for the NotBelow condition. |
public URLInputReader(java.net.URL url) throws IOException {
if (Debug.debugging("binaryfile")) {
Debug.output("URLInputReader created from URL ");
}
inputURL=url;
reopen();
name=url.getProtocol() + "://" + url.getHost()+ url.getFile();
}
| Construct a URLInputReader from a URL. |
public ST createStringTemplateInternally(CompiledST impl){
ST st=createStringTemplate(impl);
if (trackCreationEvents && st.debugState != null) {
st.debugState.newSTEvent=null;
}
return st;
}
| Differentiate so we can avoid having creation events for regions, map operations, and other implicit "new ST" events during rendering. |
@Override public Map toMap(ResultSet rs) throws SQLException {
Map result=new CaseInsensitiveHashMap();
ResultSetMetaData rsmd=rs.getMetaData();
int cols=rsmd.getColumnCount();
for (int i=1; i <= cols; i++) {
result.put(rsmd.getColumnName(i),rs.getObject(i));
}
return result;
}
| Convert a <code>ResultSet</code> row into a <code>Map</code>. This implementation returns a <code>Map</code> with case insensitive column names as keys. Calls to <code>map.get("COL")</code> and <code>map.get("col")</code> return the same value. |
public static DrawerLayout.LayoutParams processDrawerLayoutParams(DrawerBuilder drawer,DrawerLayout.LayoutParams params){
if (params != null) {
if (drawer.mDrawerGravity != null && (drawer.mDrawerGravity == Gravity.RIGHT || drawer.mDrawerGravity == Gravity.END)) {
params.rightMargin=0;
if (Build.VERSI... | helper to extend the layoutParams of the drawer |
public static void e(String tag,String msg){
if (sLevel > LEVEL_ERROR) {
return;
}
Log.e(tag,msg);
}
| Send an ERROR log message |
@Override public boolean canChangeSecondaryFacing(){
return !hasActiveFieldArtillery();
}
| Infantry can face freely (except when dug in) |
public acronym addElement(Element element){
addElementToRegistry(element);
return (this);
}
| Adds an Element to the element. |
public String[] processName(String qName,String[] parts,boolean isAttribute){
String[] name=currentContext.processName(qName,isAttribute);
if (name == null) return null;
System.arraycopy(name,0,parts,0,3);
return parts;
}
| Process a raw XML 1.0 name. <p>This method processes a raw XML 1.0 name in the current context by removing the prefix and looking it up among the prefixes currently declared. The return value will be the array supplied by the caller, filled in as follows:</p> <dl> <dt>parts[0]</dt> <dd>The Namespace URI, or an empty s... |
private static boolean hasSpecializedHandlerIntents(Context context,Intent intent){
try {
PackageManager pm=context.getPackageManager();
List<ResolveInfo> handlers=pm.queryIntentActivities(intent,PackageManager.GET_RESOLVED_FILTER);
if (handlers == null || handlers.isEmpty()) {
return false;
}
... | Used to check whether there is a specialized handler for a given intent. |
@Override public void releaseToRefresh(){
}
| relase to fresh listener |
private void close() throws IOException {
try {
if (m_state != null) {
m_state.close();
}
}
finally {
reset();
}
}
| Close the file (does not flush). |
public boolean isSetKey(){
return this.key != null;
}
| Returns true if field key is set (has been assigned a value) and false otherwise |
@Override public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeObject(conservativeApproximation);
out.writeObject(progressiveApproximation);
}
| Calls the super method and writes the conservative and progressive approximation of the knn distances of this entry to the specified stream. |
public Property basicGetEventProperty(){
return eventProperty;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void stop(){
paused=true;
}
| Called by the browser or applet viewer to inform this applet that it should stop its execution. <p/> Unfortunately, there are no guarantees from the Java spec when or if stop() will be called (i.e. on browser quit, or when moving between web pages), and it's not always called. |
private Configuration(Parcel source){
readFromParcel(source);
}
| Construct this Configuration object, reading from the Parcel. |
public void dropTables(DatabaseSession session,JPAMSchemaManager schemaManager,boolean build){
buildConstraints(schemaManager,build);
boolean shouldLogExceptionStackTrace=session.getSessionLog().shouldLogExceptionStackTrace();
int level=session.getSessionLog().getLevel();
if (shouldLogExceptionStackTrace) {
... | Drop the tables from the database. |
@Override public void startDocument() throws SAXException {
try {
writer.write("<!DOCTYPE html>\n");
}
catch ( IOException e) {
throw (SAXException)new SAXException(e).initCause(e);
}
}
| Must be called first. |
@DSSafe(DSCat.SAFE_OTHERS) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:08.708 -0500",hash_original_method="84FF645EE0B76DB0D5B552F9A7A0DC94",hash_generated_method="2C9F9172277FBCC77F44B8EB9FF01C29") public java.util.Iterator<HDR> iterator(){
return this.hlist.listIterator()... | Return the iterator to the imbedded list. |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:01:24.391 -0400",hash_original_method="3492963B9799FA768D7650AC10A0F976",hash_generated_method="05FA181A353EB1D2A8C6F63EB83AD424") public String toString(){
int iMax=array.length - 1;
if (iMax == -1) retu... | Returns the String representation of the current values of array. |
private BlockTable[] readBlockTableEntries(final int blockTableEntires) throws IOException {
final int size=blockTableEntires * BlockTable.BLOCK_TABLE_STRUCTURE_SIZE;
final ByteBuffer blockTablesBuffer=AlgorithmUtil.decryptData(readFullBuffer(size),size,BLOCK_TABLE_DECRYPTION_KEY);
final BlockTable[] blockTables=... | Reads the block table entries from the input. |
public void addRule(Rule rule){
if (rules.size() <= 0) {
this.arity=rule.getArity();
this.sourceTokens=rule.getFrench();
}
if (rule.getArity() != this.arity) {
return;
}
rules.add(rule);
sorted=false;
rule.setFrench(this.sourceTokens);
}
| Adds a rule to this collection. |
@SuppressWarnings("unchecked") private UpdateBatchResult updateWithBatch(final ClusterNode node,final boolean hasNear,final GridNearAtomicUpdateRequest req,final GridNearAtomicUpdateResponse res,final List<GridDhtCacheEntry> locked,final GridCacheVersion ver,@Nullable GridDhtAtomicUpdateFuture dhtFut,final CI2<GridNear... | Updates locked entries using batched write-through. |
public final double sampleActive(){
return _activeCount.get();
}
| Sample the active count |
public synchronized int status(){
return this.status;
}
| Returns the status of the service. |
private void installSnapshot(){
Snapshot currentSnapshot=state.getSnapshotStore().currentSnapshot();
if (currentSnapshot != null && currentSnapshot.index() > log.compactor().snapshotIndex() && currentSnapshot.index() == lastApplied && stateMachine instanceof Snapshottable) {
LOGGER.info("{} - Installing snapsho... | Installs a snapshot of the state machine state if necessary. <p> Snapshots are installed only if there's a local snapshot stored with a version equal to the last applied index. |
public final boolean postDelayed(Runnable r,long delayMillis){
return mExec.postDelayed(wrapRunnable(r),delayMillis);
}
| Causes the Runnable r to be added to the message queue, to be run after the specified amount of time elapses. The runnable will be run on the thread to which this handler is attached. |
public void onTaskFinish(HadoopTaskInfo info,long ts){
if (info.type() == HadoopTaskType.REDUCE && lastShuffleMsg != null) {
evts.add(new T2<>(eventName("SHUFFLE",reducerNum,"start"),firstShuffleMsg));
evts.add(new T2<>(eventName("SHUFFLE",reducerNum,"finish"),lastShuffleMsg));
lastShuffleMsg=null;
}
... | Adds event of the task finish. |
public static Ignite start(IgniteConfiguration cfg,@Nullable ApplicationContext springCtx) throws IgniteCheckedException {
return IgnitionEx.start(cfg,new GridSpringResourceContextImpl(springCtx));
}
| Starts grid with given configuration. |
public final synchronized int maxPV(){
if (computerPlayer == null) return 1;
return computerPlayer.getMaxPV();
}
| Return maximum number of PVs supported by engine. |
public void reverse(){
byte tmp;
int limit=size / 2;
int j=size - 1;
byte[] theElements=elements;
for (int i=0; i < limit; ) {
tmp=theElements[i];
theElements[i++]=theElements[j];
theElements[j--]=tmp;
}
}
| Reverses the elements of the receiver. Last becomes first, second last becomes second first, and so on. |
public static String toClassName(String descriptor){
int arrayDim=0;
int i=0;
char c=descriptor.charAt(0);
while (c == '[') {
++arrayDim;
c=descriptor.charAt(++i);
}
String name;
if (c == 'L') {
int i2=descriptor.indexOf(';',i++);
name=descriptor.substring(i,i2).replace('/','.');
i=i2;... | Converts to a Java class name from a descriptor. |
public Integer loadIdValue(DbOutputStatement statement,Integer idx) throws Exception {
int index=idx.intValue();
if (_logger.isDebugEnabled()) _logger.debug("loadIdValue");
_id=statement.getLongInteger(index++);
return new Integer(index);
}
| Recupera de la base de datos el identificador del usuario. |
public boolean isPersonalArchivo(){
if (ListUtils.isNotEmpty(getCustodyArchiveList())) {
return true;
}
return false;
}
| Compruba si el usuario es Personal de Archivo |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.