code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public synchronized void deleteManagedResource(ManagedResource res){
String resourceId=res.getResourceId();
ManagedResourceRegistration existingReg=registry.registered.get(resourceId);
int numObservers=existingReg.observers.size();
if (numObservers > 0) {
String errMsg=String.format(Locale.ROOT,"Cannot dele... | Deletes a managed resource if it is not being used by any Solr components. |
public boolean isUpdate(){
boolean is;
if (m_editFlag == FolderEditFlag.UPDATE) is=true;
else is=false;
return is;
}
| Devuelve <tt>true</tt> si el nodo ha sido modificado |
public Object jjtAccept(SyntaxTreeBuilderVisitor visitor,Object data) throws VisitorException {
return visitor.visit(this,data);
}
| Accept the visitor. |
public MaterialRange(){
super(Document.get().createElement("form"));
getElement().setAttribute("action","#");
lblError.setVisible(false);
paragraph.setStyleName("range-field");
input.setType(InputType.RANGE);
paragraph.add(input);
thumb.getElement().setClassName("thumb");
Span value=new Span();
value.... | Creates a range |
protected IntLiteralImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
protected Object readResolve() throws ObjectStreamException {
try {
return IgnitionEx.localIgnite().cluster().nodeLocalMap();
}
catch ( IllegalStateException e) {
throw U.withCause(new InvalidObjectException(e.getMessage()),e);
}
finally {
stash.remove();
}
}
| Reconstructs object on unmarshalling. |
public TableIterator iterator(){
return iterator(rows());
}
| Return a TableIterator over the rows of this table. |
public void putAllInLocalMonitoringRegion(Map<String,FederationComponent> objectMap){
if (localMonitoringRegion != null && !localMonitoringRegion.isDestroyed()) {
localMonitoringRegion.putAll(objectMap);
}
}
| uses putAll operation of region |
public static Validator<CharSequence> phoneNumber(@NonNull final Context context){
return new PhoneNumberValidator(context,R.string.default_error_message);
}
| Creates and returns a validator, which allows to validate texts to ensure, that they represent valid phone numbers. Phone numbers, which are only consisting of numbers are allowed as well as international phone numbers, e.g. +49 1624812382. Empty texts are also accepted. |
Builder reencodeForUri(){
for (int i=0, size=encodedPathSegments.size(); i < size; i++) {
String pathSegment=encodedPathSegments.get(i);
encodedPathSegments.set(i,canonicalize(pathSegment,PATH_SEGMENT_ENCODE_SET_URI,true,true,false,true));
}
if (encodedQueryNamesAndValues != null) {
for (int i=0, size... | Re-encodes the components of this URL so that it satisfies (obsolete) RFC 2396, which is particularly strict for certain components. |
public ServiceCall<Void> deleteDialog(final String dialogId){
Validator.isTrue((dialogId != null) && !dialogId.isEmpty(),"dialogId cannot be null or empty");
final Request request=RequestBuilder.delete(String.format(PATH_DIALOG,dialogId)).build();
return createServiceCall(request,ResponseConverterUtils.getVoid())... | Deletes a dialog. |
public static void hideKeyboard(Activity activity,IBinder windowToken){
InputMethodManager mgr=(InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.hideSoftInputFromWindow(windowToken,0);
}
| This method is used to hide a keyboard after a user has finished typing the url. |
static void errorExpectedInput(String systemID,int lineNr,String expectedString) throws XMLParseException {
throw new XMLParseException(systemID,lineNr,"Expected: " + expectedString);
}
| Throws an XMLParseException to indicate that an expected string is not encountered. |
private static DownscaleQuality addConstant(String type){
init();
if (constList.containsKey(type)) {
throw new RuntimeException("Type strings for DownscaleQuality should be unique; " + type + " is declared twice");
}
DownscaleQuality q=new DownscaleQuality(type);
constList.put(type,q);
return q;
}
| Create and add constant instance |
public void stop(){
try {
_dataManager.setListener(null);
_dataManager.setConnectionStateListener(null);
}
catch ( Exception ex) {
_log.error(ex.getMessage(),ex);
}
}
| Stop the service. |
protected BufferedImage readImage(URL fileUrl){
try {
return ImageIO.read(fileUrl);
}
catch ( Exception e) {
String msg=Logging.getMessage("generic.ExceptionAttemptingToReadImageFile",this.getImageSource().toString());
Logging.logger().log(java.util.logging.Level.SEVERE,msg,e);
this.imageInitializ... | Reads and returns the specified image URL as a BufferedImage. |
public KeyIdentifierGenerator(PublicKey publicKey){
this.publicKey=publicKey;
}
| Construct KeyIdentifierGenerator. |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
public static double angle(Coordinate p){
return Math.atan2(p.y,p.x);
}
| Returns the angle that the vector from (0,0) to p, relative to the positive X-axis. The angle is normalized to be in the range ( -Pi, Pi ]. |
private void initDrawing(Drawing d){
LinkedList<InputFormat> inputFormats=new LinkedList<InputFormat>();
LinkedList<OutputFormat> outputFormats=new LinkedList<OutputFormat>();
DOMStorableInputOutputFormat ioFormat=new DOMStorableInputOutputFormat(new PertFactory());
inputFormats.add(ioFormat);
outputFormats.a... | Configure Drawing object to support copy and paste. |
public GuacamoleException(String message,Throwable cause){
super(message,cause);
}
| Creates a new GuacamoleException with the given message and cause. |
public void itemStateChanged(ItemEvent event){
Object source=event.getItemSelectable();
GUIPreferences guip=GUIPreferences.getInstance();
if (source.equals(keepGameLog)) {
gameLogFilename.setEnabled(keepGameLog.isSelected());
stampFormatLabel.setEnabled(stampFilenames.isSelected());
gameLogFilenameLab... | Handle the player clicking checkboxes. <p/> Implements the <code>ItemListener</code> interface. |
protected final IntConstantOperand CAU16(int i){
return IC(PPCMaskUpper16(i));
}
| Calculate Upper 16 Bits |
public void pause(){
paused=true;
}
| Stop mirroring stdin |
public final int addAndGet(int delta){
for (; ; ) {
int current=get();
int next=current + delta;
if (compareAndSet(current,next)) return next;
}
}
| Atomically adds the given value to the current value. |
private void checkAlterInstantConverters() throws SecurityException {
SecurityManager sm=System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new JodaTimePermission("ConverterManager.alterInstantConverters"));
}
}
| Checks whether the user has permission 'ConverterManager.alterInstantConverters'. |
public void insert(int offset,double[] values,int valOffset,int len){
if (offset == _pos) {
add(values,valOffset,len);
return;
}
ensureCapacity(_pos + len);
System.arraycopy(_data,offset,_data,offset + len,_pos - offset);
System.arraycopy(values,valOffset,_data,offset,len);
_pos+=len;
}
| Inserts a slice of the array of <tt>values</tt> into the list at <tt>offset</tt>. All values including and to the right of <tt>offset</tt> are shifted to the right. |
@AfterClass public static void tearDownClass() throws Exception {
}
| Cleanup after testing. |
private void initializeMBean(){
this.mbeanName="GemFire:type=DistributionLocator,id=" + MBeanUtil.makeCompliantMBeanNameProperty(getId());
this.objectName=MBeanUtil.createMBean(this,MBeanUtil.lookupManagedBean(this));
}
| Create and register the MBean to manage this resource |
public void saveRep(Repository rep,ObjectId idTransformation,ObjectId idStep) throws KettleException {
try {
rep.saveStepAttribute(idTransformation,idStep,"TableName",this.tabelName);
rep.saveStepAttribute(idTransformation,idStep,"factDimLensString",factDimLensString);
rep.saveStepAttribute(idTransformati... | Save the steps data into a Kettle repository |
public static ArrayList<String> fileLines(String fin){
File file=new File(fin);
BufferedReader br;
FileReader fr;
ArrayList<String> lines=new ArrayList<String>();
try {
fr=new FileReader(file);
br=new BufferedReader(fr);
String line;
try {
while ((line=br.readLine()) != null) {
i... | Synopsis [ ] read file lines to ArrayList<String> |
public static TypeContainer createTypeContainer(IType baseType) throws JavaModelException {
boolean isSync=true;
IType pairedType=null;
if (RemoteServiceUtilities.isSyncInterface(baseType)) {
isSync=true;
pairedType=RemoteServiceUtilities.resolveAsyncType(baseType);
}
else if (RemoteServiceUtilities.... | Creates and populates a container for the given GWT RPC interface. |
public MathFunction(MetaFunction meta){
super(meta.size());
this.meta=meta;
}
| Use MathFormula.newFunction(...) |
public static void main(String... a) throws Exception {
TestBase.createCaller().init().test();
}
| Run just this test. |
public Response onCommand(SMTPSession session,Request request){
return NOT_SUPPORTED;
}
| handles HELP command |
public static Uri generatorUri(String fileUri,String scheme){
Uri uri=new Uri.Builder().scheme(scheme).path(fileUri).build();
return uri;
}
| Generator uri |
int read() throws IOException {
return _is.read();
}
| Parses a byte |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:54:54.342 -0500",hash_original_method="D42EEF06048E7D77F00EA781D2005D33",hash_generated_method="343763C1113C4F113A0A68A2E7C4805B") public String encodeBody(){
return Integer.toString(expires);
}
| Return canonical form. |
@Override public <N extends SpatialComparable>List<List<N>> partition(List<N> spatialObjects,int minEntries,int maxEntries){
List<List<N>> partitions=new ArrayList<>();
List<N> objects=new ArrayList<>(spatialObjects);
while (!objects.isEmpty()) {
StringBuilder msg=new StringBuilder();
int splitAxis=choose... | Partitions the specified feature vectors where the split axes are the dimensions with maximum extension. |
public boolean teardown(){
mTeardownRequested.set(true);
if (mBluetoothPan != null) {
for ( BluetoothDevice device : mBluetoothPan.getConnectedDevices()) {
mBluetoothPan.disconnect(device);
}
}
return true;
}
| Disable connectivity to a network TODO: do away with return value after making MobileDataStateTracker async |
public void unsetEpsilon(){
epsilon=0.0;
}
| Reset the epsilon value. |
protected void discoverInLock(String targetId){
DiscoveredSystemObject target=modelClient.findById(URI.create(targetId));
if (target == null) {
LOG.error("Could not find: " + targetId);
throw ComputeSystemControllerException.exceptions.targetNotFound(targetId);
}
ComputeSystemDiscoveryAdapter adapter=ge... | Performs the discovery, within a lock. |
public OMRangeRings(){
}
| Used for UndoEvents. Otherwise, don't use this unless you set all other parameters befitting an OMGraphic of such resplendent information. |
private Workflow.Method rollbackMethodNullMethod(){
return new Workflow.Method("rollbackMethodNull");
}
| Creates a rollback workflow method that does nothing, but allows rollback to continue to prior steps back up the workflow chain. |
public synchronized void removeChannels(Set<String> channels){
removeChannelsFromHistory(channels);
removeChannelsFromFavorites(channels);
}
| Remove this Set of channels from favorites and history. |
public final void testNegateWithContextAndResourceIdParameters(){
assertNotNull(Validators.negate(getContext(),android.R.string.cancel,Validators.notEmpty("foo")));
}
| Tests the functionality of the negate-method, which expects a context and a resource id as parameters. |
public void calculateSelection(){
m_noSelected=0;
BigDecimal selectedAmt=new BigDecimal(0.0);
int rows=miniTable.getRowCount();
for (int i=0; i < rows; i++) {
IDColumn id=(IDColumn)miniTable.getModel().getValueAt(i,idColIndex);
if (id.isSelected()) {
BigDecimal amt=(BigDecimal)miniTable.getModel()... | Calculate selected rows. - add up selected rows |
public void saveSize(){
m_History.setProperty(WIDTH,"" + getSize().width);
m_History.setProperty(HEIGHT,"" + getSize().height);
saveHistory();
}
| obtains the size of the panel and saves it in the history. |
synchronized static public void end(String name){
if (mFinalPrefix.get() != null) {
name=mFinalPrefix.get() + name;
}
final Pair<Long,String> key=new Pair<Long,String>(Thread.currentThread().getId(),name);
final Long lastTime=mInstance.mThreadMeasures.remove(key);
if (lastTime == null) {
mInstance.mEn... | Stop measuring the specified measure name and update statistics |
public <E extends Enum<E>>E optEnum(Class<E> clazz,int index,E defaultValue){
try {
Object val=this.opt(index);
if (JSONObject.NULL.equals(val)) {
return defaultValue;
}
if (clazz.isAssignableFrom(val.getClass())) {
@SuppressWarnings("unchecked") E myE=(E)val;
return myE;
}
r... | Get the enum value associated with a key. |
public HttpDiscovery(NetworkParameters params,Details details){
this(params,details,new OkHttpClient());
}
| Constructs a discovery object that will read data from the given HTTP[S] URI and, if a public key is provided, will check the signature using that key. |
public static <T>T[] expand(T[] field,int newSize,boolean keepData){
if (field == null) {
throw new IllegalArgumentException("argument field must not be null");
}
if (field.length < newSize) {
Class<?> componentType=field.getClass().getComponentType();
@SuppressWarnings("unchecked") T[] newArray=(T[])... | This method will return a new allocated array of size newSize if newSize is greater than field.length. It will return the same array otherwise Only if keepData is set to true, the data of the array will be copied to the new allocated array |
public void addObserver(NotificationObserver observer){
if (!observers.contains(observer)) {
observers.add(observer);
}
}
| Add a notification's observer. |
public void testGetType(){
assertEquals("The type of X509CRL should be X.509",tbt_crl.getType(),"X.509");
}
| getType() method testing. Tests that getType() method returns the value "X.509" |
StyledString createTypeProposalLabel(CompletionProposal typeProposal){
char[] signature;
if (fContext != null && fContext.isInJavadoc()) signature=Signature.getTypeErasure(typeProposal.getSignature());
else signature=typeProposal.getSignature();
char[] fullName=Signature.toCharArray(signature);
return crea... | Creates a display label for a given type proposal. The display label consists of: <ul> <li>the simple type name (erased when the context is in javadoc)</li> <li>the package name</li> </ul> <p> Examples: A proposal for the generic type <code>java.util.List<E></code>, the display label is: <code>List<E> - java.util... |
public static WriteStreamOld openWrite(CharBuffer cb){
com.caucho.v5.vfs.VfsStringWriter s=new com.caucho.v5.vfs.VfsStringWriter(cb);
WriteStreamOld os=new WriteStreamOld(s);
try {
os.setEncoding("utf-8");
}
catch ( Exception e) {
}
return os;
}
| Creates a write stream to a CharBuffer. This is the standard way to write to a string. |
protected void broadcastReadyState(boolean readyForCapture){
if (mReadyStateChangedListener != null) {
mReadyStateChangedListener.onReadyStateChanged(readyForCapture);
}
}
| If set, tells the ready state changed listener the new state. |
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. |
protected void appendQuotedString(String str){
appendQuotedString(str.getBytes());
}
| Append quoted string to mMessage. This implementation doesn't check the validity of parameter, since it assumes that the values are validated in the GenericPdu setter methods. |
public SignerId(byte[] subjectKeyId){
this(null,null,subjectKeyId);
}
| Construct a signer ID with the value of a public key's subjectKeyId. |
public void unlockUnidadesDocumentales(String[] unidadDocumentalIDs) throws ActionNotAllowedException {
checkPermission(AppPermissions.BLOQUEO_DESBLOQUEO_UNIDADES_DOCUMENTALES);
iniciarTransaccion();
int nUdocs=unidadDocumentalIDs.length;
StringBuffer udocsUnlocked=new StringBuffer();
fondos.vos.UnidadDocumen... | Permite desbloquear las unidades documentales seleccionadas |
protected boolean isTrafficClassChanged(){
return true;
}
| Returns <tt>true</tt> if and only if the <tt>trafficClass</tt> property has been changed by its setter method. The system call related with the property is made only when this method returns <tt>true</tt>. By default, this method always returns <tt>true</tt> to simplify implementation of subclasses, but overriding th... |
public TableModelEvent(TableModel source,int row){
this(source,row,row,ALL_COLUMNS,UPDATE);
}
| This row of data has been updated. To denote the arrival of a completely new table with a different structure use <code>HEADER_ROW</code> as the value for the <code>row</code>. When the <code>JTable</code> receives this event and its <code>autoCreateColumnsFromModel</code> flag is set it discards any TableColumns that ... |
public Object runSafely(Catbert.FastStack stack) throws Exception {
Playlist p=(Playlist)stack.pop();
MediaFile[] burnFiles=p.getMediaFiles();
return Burner.getGlobalBurner().burnFilesToCD(burnFiles);
}
| Instructs the CD burning engine inside SageTV to start prepping the specified Playlist to be burned to a CD, and then perform the actual burn. NOTE: Currently this is only supported on the Linux operating system |
void constantLock(){
Class thing=Thread.class;
synchronized (Thread.class) {
}
}
| Exercises bug 3215458. |
public JarFileLister(ZipFile zipFile,DependenciesListener builder,ClassFileReader reader,ProgressListener progress){
this.zipFile=zipFile;
this.builder=builder;
this.reader=reader;
this.progress=progress;
}
| Create a new JarFileLister, to list files in file, and call callbacks of listener. |
public static Status empty(){
return NONE;
}
| Creates an empty status (i.e. one with no message shown for the user). |
void addRocLine(RocPoint point,RocFilter filter){
final SortedMap<Double,RocPoint> points=mRocs.get(filter);
if (points.containsKey(point.mThreshold)) {
points.get(point.mThreshold).add(point);
}
else {
points.put(point.mThreshold,new RocPoint(point));
}
}
| add single result to ROC |
public void testLoadLocations_HidesSpinner(){
mController.init();
mController.attachFragmentUi(mMockFragmentUi);
mFakeSyncManager.setSyncing(false);
LocationTree locationTree=FakeAppLocationTreeFactory.build();
mFakeEventBus.post(new AppLocationTreeFetchedEvent(locationTree));
verify(mMockFragmentUi).setBus... | Tests that the spinner is hidden after locations are loaded. |
void transfer(Entry[] newTable){
Entry[] src=table;
int newCapacity=newTable.length;
for (int j=0; j < src.length; j++) {
Entry e=src[j];
if (e != null) {
src[j]=null;
do {
Entry next=e.next;
int i=indexFor(e.hash,newCapacity);
e.next=newTable[i];
newTable[i]=e;... | Transfers all entries from current table to newTable. |
public static TimeSpan toTimespan(Object o,TimeSpan defaultValue){
try {
return toTimespan(o);
}
catch ( PageException e) {
return defaultValue;
}
}
| cast a Object to a TimeSpan Object (alias for toTimeSpan) |
public Comment createComment(String data){
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
| Unimplemented. See org.w3c.dom.Document |
public int size(){
return this.values.size();
}
| Return the number of AttributeTypeAndValue objects in this RDN, |
public static String rightPad(String str,int size,String delim){
size=(size - str.length()) / delim.length();
if (size > 0) {
str+=repeat(delim,size);
}
return str;
}
| <p> Right pad a String with a specified string. </p> <p/> <p> The String is padded to the size of <code>n</code>. </p> |
protected DOMException createDOMException(short type,String key,Object[] args){
return element.createDOMException(type,key,args);
}
| Create a DOMException. |
@Override public void translate(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment,instruction,instructions,"SADD8");
translateAll(environment,instruction,"S... | SADD8{<cond>} <Rd>, <Rn>, <Rm> Operation: if ConditionPassed(cond) then sum = Rn[7:0] + Rm[7:0] // Signed addition Rd[7:0] = sum[7:0] GE[0] = if sum >= 0 then 1 else 0 sum = Rn[15:8] + Rm[15:8] // Signed addition Rd[15:8] = sum[7:0] GE[1] = if sum >= 0 then 1 else 0 sum = Rn[23:16] + Rm[23:16] // Signed addition Rd[23:... |
public static int ceilLog(int a){
int log=0;
int i=1;
while (i < a) {
i<<=1;
log++;
}
return log;
}
| Compute the smallest integer that is greater than or equal to the logarithm to the base 2 of the given integer. |
public void makePath(String path,byte[] data,CreateMode createMode,boolean retryOnConnLoss) throws KeeperException, InterruptedException {
makePath(path,data,createMode,null,retryOnConnLoss);
}
| Creates the path in ZooKeeper, creating each node as necessary. e.g. If <code>path=/solr/group/node</code> and none of the nodes, solr, group, node exist, each will be created. |
public int toX(int v){
return v % N + 1;
}
| Returns x coordinate for given vertex. For example if N = 10, and V = 12, returns 2. |
public NotificationChain basicSetStatement(Statement newStatement,NotificationChain msgs){
Statement oldStatement=statement;
statement=newStatement;
if (eNotificationRequired()) {
ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,N4JSPackage.LABELLED_STATEMENT__STATEMENT,oldStatement,... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public Expression makeReference(Environment env,LocalMember target){
UplevelReference r=noteReference(env,target);
if (r != null) {
return r.makeLocalReference(env,this);
}
else if (idThis.equals(target.getName())) {
return new ThisExpression(0,target);
}
else {
return new IdentifierExpression(0... | Implement a reference (usually an uplevel one). Call noteReference() first, to make sure the reference lists are up to date. <p> The resulting expression tree does not need checking; it can be code-generated right away. If the reference is not uplevel, the result is an IDENT or THIS. |
public void deleteFile(File file){
int fileType;
if (file.isDirectory()) fileType=FOLDER;
else fileType=FILE;
AsyncDeleteTask task=new AsyncDeleteTask(getActivity(),this,file,fileType);
task.execute();
}
| Deletes the specified file. |
@Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case SGenPackage.FEATURE_PARAMETER__DEPRECATED:
setDeprecated((Boolean)newValue);
return;
case SGenPackage.FEATURE_PARAMETER__COMMENT:
setComment((String)newValue);
return;
case SGenPackage.FEATURE_PARAMETER__FEATURE_TYPE:
setFeatureT... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public static void createActionableEvent(DbClient dbClient,EventUtils.EventCode eventCode,URI tenant,String name,String description,String warning,DataObject resource,Collection<URI> affectedResources,String approveMethod,Object[] approveParameters,String declineMethod,Object[] declineParameters){
ActionableEvent dup... | Creates an actionable event and persists to the database |
@Override public boolean supportsCatalogsInTableDefinitions(){
debugCodeCall("supportsCatalogsInTableDefinitions");
return true;
}
| Returns whether the catalog name in CREATE TABLE is supported. |
public boolean visit(ASTNode node){
return true;
}
| Visits the given AST node. <p> The default implementation does nothing and return true. Subclasses may reimplement. </p> |
public void triangulate(PolygonSet ps){
_triangulations.clear();
_triangulations.addAll(ps.getPolygons());
start();
}
| Triangulate a PolygonSet |
public static IMethod findSimilarMethod(IMethod method,IType type) throws JavaModelException {
return findSimilarMethod(method,type.getMethods());
}
| Finds a method in a type. This searches for a method with the same name and signature. Parameter types are only compared by the simple name, no resolving for the fully qualified type name is done |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:30.041 -0500",hash_original_method="68812395544991B9645F8BA0B34BB709",hash_generated_method="D75FF2A976BD2B6C1FC29FDB97556890") public synchronized final Scheme unregister(String name){
if (name == null) throw new IllegalArgumen... | Unregisters a scheme. |
public void sort(){
Map<String,PsiMethod> methods=getMethodsMap();
Map<String,PsiMethod> sortedMethods=null;
LifecycleFactory lifecycleFactory=new LifecycleFactory();
Lifecycle lifecycle=lifecycleFactory.createLifecycle(mPsiClass,methods);
if (lifecycle != null && !methods.isEmpty()) {
sortedMethods=lifec... | Formats the activity/fragment lifecycle methods |
public Location linearLocation(double azimuthDegrees,double distanceRadians,Location result){
if (result == null) {
throw new IllegalArgumentException(Logger.logMessage(Logger.ERROR,"Location","linearLocation","missingResult"));
}
if (distanceRadians == 0) {
result.latitude=this.latitude;
result.longi... | Computes the location on the linear path starting at this location and traversing with the specified azimuth and angular distance. This function uses a flat-earth approximation proximal to this location. |
private byte[] crypt_raw(byte password[],byte salt[],int log_rounds){
int cdata[]=(int[])bf_crypt_ciphertext.clone();
int clen=cdata.length;
byte ret[];
long rounds=roundsForLogRounds(log_rounds);
init_key();
ekskey(salt,password);
for (long i=0; i < rounds; i++) {
key(password);
key(salt);
}
... | Perform the central password hashing step in the bcrypt scheme |
public TestDiscrete test(){
TestDiscrete results=new TestDiscrete();
results.addNull("O");
for (Token t=(Token)parser.next(); t != null; t=(Token)parser.next()) {
Vector<Token> vector=new Vector<>();
for (; t.next != null; t=(Token)parser.next()) vector.add(t);
vector.add(t);
int N=vector.size... | This method runs the tester, packaging the results in a <code>TestDiscrete</code> object. |
public GridConcurrentWeakHashSet(Collection<E> c){
this(c.size());
addAll(c);
}
| Constructs a new set containing the elements in the specified collection, with default load factor and an initial capacity sufficient to contain the elements in the specified collection. |
@After public void tearDown(){
if (clearTempFiles) {
TestSupport.cleanAll();
}
}
| Tears down the test fixture. (Called after every test case method.) |
public synchronized void removeExecutionStageListener(ExecutionStageListener l){
if (m_ExecutionStageListeners == null) m_ExecutionStageListeners=new HashSet<>();
m_ExecutionStageListeners.remove(l);
}
| Removes the execution stage listener. |
@NoInline public static void writeHex(long value){
if (runningVM) {
sysCall.sysConsoleWriteLong(value,2);
}
else {
writeHexNotRunningVM(value);
}
}
| Low level print to console. |
public static boolean isValidFileNameCharacter(char c){
for ( char ch : FORBIDDEN_SYMBOLS_IN_FILE_NAME) {
if (ch == c) {
return false;
}
}
return true;
}
| Checks is the character valid for file name |
public void plot(AbstractDrawer draw){
if (!visible) return;
TeXFormula formula=new TeXFormula(label);
TeXIcon icon=formula.createTeXIcon(TeXConstants.STYLE_DISPLAY,size);
icon.setTeXIconColor(plotColor);
Graphics2D g2=draw.getGraphics();
g2.setColor(plotColor);
JLabel jl=new JLabel();
jl.setForegroun... | see Text for formatted text output |
public static int compute2(int x){
int loops=(x >>> 4) & 7;
while (loops-- > 0) {
x=(x * 2147483647) % 16807;
}
return x;
}
| Computes a linear congruential random number a random number of times. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.