code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void visitClassType(String name){
}
| Starts the visit of a signature corresponding to a class or interface type. |
void parseAttributeDeclaredValue(AttributeList atts) throws IOException {
if (ch == '(') {
atts.values=parseIdentifierList(true);
atts.type=NMTOKEN;
return;
}
if (!parseIdentifier(false)) {
error("invalid","attribute value");
return;
}
atts.type=AttributeList.name2type(getString(0));
ski... | Parse an attribute declared value. [145] 422:6 |
public PropertyItemProvider(AdapterFactory adapterFactory){
super(adapterFactory);
}
| This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public void onShiftValuesUpdated(ShiftValue shiftValue){
refreshButtonVisibility();
}
| We want to refresh all of our button's visibility when any of their ShiftValueEntries have changed |
public static float toFloat(String num,float defaultValue){
if (num != null) {
try {
return Float.parseFloat(num);
}
catch ( NumberFormatException e) {
logger.trace("",e);
}
}
return defaultValue;
}
| To float. |
public static byte[] decode(byte[] source) throws java.io.IOException {
byte[] decoded=null;
decoded=decode(source,0,source.length,Base64.NO_OPTIONS);
return decoded;
}
| Low-level access to decoding ASCII characters in the form of a byte array. <strong>Ignores GUNZIP option, if it's set.</strong> This is not generally a recommended method, although it is used internally as part of the decoding process. Special case: if len = 0, an empty array is returned. Still, if you need more speed ... |
boolean isAllReasons(){
return _reasons == allReasons._reasons ? true : false;
}
| Returns <code>true</code> if this reasons mask contains all possible reasons. |
@Override public Iterator<ValueGraphVertex> iterator(){
return vertices.iterator();
}
| Return an iterator over the vertices in this congruence class |
public boolean optBoolean(String key){
return this.optBoolean(key,false);
}
| Get an optional boolean associated with a key. It returns false if there is no such key, or if the value is not Boolean.TRUE or the String "true". |
@Override protected void onStart(){
super.onStart();
Log.d(TAG,"onStart() - the activity is about to become visible");
}
| Hook method called after onCreate() or after onRestart() (when the activity is being restarted from stopped state). Should re-acquire resources relinquished when activity was stopped (onStop()) or acquire those resources for the first time after onCreate(). |
public static boolean isMarkedToReformat(final ASTNode node){
if (node.getCopyableUserData(REFORMAT_KEY) == null || !isSuspendedNodesReformattingAllowed()) {
return false;
}
final NotNullFunction<ASTNode,Boolean> strategy=NODE_REFORMAT_STRATEGY.get();
return strategy == null || strategy.fun(node);
}
| Allows to answer if given node is configured to be reformatted. |
public AnnotationValues(Class<A> type,Map<String,AnnotationValue> values,LombokNode<?,?,?> ast){
this.type=type;
this.values=values;
this.ast=ast;
}
| Creates a new AnnotationValues. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:44.747 -0500",hash_original_method="8431B5C8F0968484F229748CA95CA0A8",hash_generated_method="4692BDE8D809837F0CF470CA97A7DFBA") private void unregisterObserverProxyLocked(){
... | Unregister the observer if it is already registered. |
public void initializeStatusResistancesList(final StatusResistancesList list){
this.resistances=list;
if (logger.isDebugEnabled() || Testing.DEBUG) {
logger.info("StatusResistantItem: Initializing status resistances");
if (this.resistances == null) {
logger.error("Could not initialize status resistanc... | Create or reset resistances to status types for this item. |
public BuilderForGossipSeedDiscoverer maxDiscoverAttempts(int maxDiscoverAttempts){
super.maxDiscoverAttempts=maxDiscoverAttempts;
return this;
}
| Sets the maximum number of attempts for discovery. |
protected void prepareConnection(URLConnection conn){
if (metadataEnabled) conn.setRequestProperty("Icy-MetaData","1");
}
| Prepares the connection. This method is called before a connection is opened. Actually sets "Icy-MetaData" header to "1" if metadata are enabled. |
public void addText(String txt){
log("addText('" + txt + "')",Project.MSG_VERBOSE);
this.command+=txt;
}
| Set an inline command to execute. NB: Properties are not expanded in this text. |
void addCell(Component cell,boolean isHeader,CellConstraint constraint){
if (isHeader) {
headers.addElement(cell);
}
currentRow.addElement(cell);
if (currentRow.size() > maxColumn) {
maxColumn=currentRow.size();
}
if (constraint != null) {
constraints.put(cell,constraint);
}
}
| Adds the given component as a cell to the end of the current row of the table |
public static boolean readBoolean(ByteBuffer buff){
return buff.get() == 1;
}
| Reads one byte as a boolean. Its value is true if 1 and false if 0 |
boolean insert(final byte[] key,final byte[] val){
if (key == null) throw new IllegalArgumentException();
if (parent == null) throw new IllegalArgumentException();
final int slotsOnPage=slotsOnPage();
final BucketPage copy=(BucketPage)copyOnWrite();
if (copy != this) {
return copy.insert(key,val);
}... | Insert the tuple into the buddy bucket. |
public static RefactoringStatus checkMethodName(String name,IJavaElement context){
RefactoringStatus status=checkName(name,JavaConventionsUtil.validateMethodName(name,context));
if (status.isOK() && !startsWithLowerCase(name)) return RefactoringStatus.createWarningStatus(RefactoringCoreMessages.Checks_method_name... | Checks if the given name is a valid Java method name. |
private void removeInstancesFromContainers(ArrayList<Container> containers,Map<Integer,List<InstanceId>> allocation,Map<String,Integer> componentsToScaleDown){
ArrayList<RamRequirement> ramRequirements=getRAMInstances(componentsToScaleDown);
for ( RamRequirement ramRequirement : ramRequirements) {
String compo... | Removes instances from containers during scaling down |
public boolean isComplete(){
String s=getParameter("stale");
if ("true".equalsIgnoreCase(s)) {
return false;
}
else {
return this.complete;
}
}
| Tests if the Digest authentication process has been completed. |
protected void clearEvents(){
sCInterface.clearEvents();
}
| This method resets the incoming events (time events included). |
public void unbox(final Type type){
Type t=NUMBER_TYPE;
Method sig=null;
switch (type.getSort()) {
case Type.VOID:
return;
case Type.CHAR:
t=CHARACTER_TYPE;
sig=CHAR_VALUE;
break;
case Type.BOOLEAN:
t=BOOLEAN_TYPE;
sig=BOOLEAN_VALUE;
break;
case Type.DOUBLE:
sig=DOUBLE_VALUE;
break;
case Type.FLOAT:
sig=FLOAT... | Generates the instructions to unbox the top stack value. This value is replaced by its unboxed equivalent on top of the stack. |
void importFilter(){
filterOpenFileChooser.setDialogTitle(L10N.getLocalString("dlg.importFilter_ttl","Import and merge filter..."));
boolean retry=true;
File f;
while (retry) {
retry=false;
int value=filterOpenFileChooser.showOpenDialog(mainFrame);
if (value != JFileChooser.APPROVE_OPTION) {
r... | This method is for when the user wants to open a file. |
protected boolean readConstantPool(DataInputStream d) throws IOException {
byte tag;
cp_info cp;
int i;
boolean skipone;
constant_pool=new cp_info[constant_pool_count];
skipone=false;
for (i=1; i < constant_pool_count; i++) {
if (skipone) {
skipone=false;
continue;
}
tag=(byte)d.re... | Reads in the constant pool from the given stream. |
public LinearLocation project(Coordinate pt){
return LocationIndexOfPoint.indexOf(linearGeom,pt);
}
| Computes the index for the closest point on the line to the given point. If more than one point has the closest distance the first one along the line is returned. (The point does not necessarily have to lie precisely on the line.) |
public Option addArgument(Option option,boolean required){
optionsIgnoreRequired.addOption((Option)option.clone());
option.setRequired(required);
options.addOption(option);
return option;
}
| Adds an option instance. It may be specified as being mandatory. |
public ElementRule(Class type,String description,String example){
this(type,description,example,1,1);
}
| Creates a required element rule. |
public final Iterator<KnowledgeEdge> forbiddenEdgesIterator(){
Set<KnowledgeEdge> edges=new HashSet<>();
for ( OrderedPair<Set<MyNode>> o : forbiddenRulesSpecs) {
final Set<MyNode> first=o.getFirst();
for ( MyNode s1 : first) {
final Set<MyNode> second=o.getSecond();
for ( MyNode s2 : s... | Iterator over the KnowledgeEdge's representing forbidden edges. |
protected void useBackGround(UserRunnerStatus userRunnerStatus){
Ansi buffer=Ansi.ansi();
buffer.a("Run task for project ").a(INTENSITY_BOLD).a(userRunnerStatus.getProject().name()).a(INTENSITY_BOLD_OFF).a("' has been submitted with runner ID ").a(INTENSITY_BOLD).a(userRunnerStatus.shortId()).a(INTENSITY_BOLD_OFF).... | Run has been launched, just inform the user that process has been launched. |
public static void paintBg(Graphics g,int x,int y,int w,int h,boolean enabled,NinePatch bg){
if (enabled) bg.draw((Graphics2D)g,x,y,w,h);
else __Icon9Factory__.getInstance().getTextFieldBgDisabled().draw((Graphics2D)g,x,y,w,h);
}
| Paint bg. |
protected int _rowRank(int rank){
return rowZero + rank * rowStride;
}
| Returns the absolute rank of the given relative rank. |
@Override public void run(){
amIActive=true;
String inputHeader=null;
String outputHeader=null;
int row, col, x, y;
double z;
float progress=0;
int a;
double sum;
int[] dX;
int[] dY;
double[] weights;
int numPixelsInFilter;
boolean reflectAtBorders=true;
double centreValue;
String directio... | Used to execute this plugin tool. |
public void addGroupChatInvitationRejected(String chatId,ContactId contact,String subject,Map<ContactId,ParticipantStatus> participants,GroupChat.ReasonCode reasonCode,long timestamp){
mMessagingLog.addGroupChat(chatId,contact,subject,participants,GroupChat.State.REJECTED,reasonCode,Direction.INCOMING,timestamp);
m... | Add and broadcast group chat invitation rejections. |
private void subtractDepth(int depthToSubtract,Collection<Transaction> transactions){
for ( Transaction tx : transactions) {
if (tx.getConfidence().getConfidenceType() == ConfidenceType.BUILDING) {
tx.getConfidence().setDepthInBlocks(tx.getConfidence().getDepthInBlocks() - depthToSubtract);
confidenc... | Subtract the supplied depth from the given transactions. |
public void removeComponentListener(final ComponentUpdateListener listener){
componentListeners.remove(listener);
}
| Removes a component listener from this instance. |
Trace(String[] args){
PrintWriter writer=new PrintWriter(System.out);
int inx;
for (inx=0; inx < args.length; ++inx) {
String arg=args[inx];
if (arg.charAt(0) != '-') {
break;
}
if (arg.equals("-output")) {
try {
writer=new PrintWriter(new FileWriter(args[++inx]));
}
cat... | Parse the command line arguments. Launch target VM. Generate the trace. |
public void runTest() throws Throwable {
Document doc;
NodeList elementList;
Node nameNode;
CharacterData child;
String childData;
doc=(Document)load("staff",true);
elementList=doc.getElementsByTagName("address");
nameNode=elementList.item(0);
child=(CharacterData)nameNode.getFirstChild();
child.del... | Runs the test case. |
public void header(String key,String... header){
headers.put(key,Arrays.asList(header));
}
| Set option header. |
public static void init(){
if (isInit) {
return;
}
isInit=true;
Bootstrap.register();
CubicChunks.LOGGER=LogManager.getLogger();
}
| Does whatever is needed to initialize minecraft and mod environment |
public WoodFilter(){
}
| Construct a WoodFilter. |
@SuppressWarnings("try") private void eliminateMoves(LIR lir){
try (Indent indent=Debug.logAndIndent("eliminate moves")){
AbstractBlockBase<?>[] blocks=lir.linearScanOrder();
for ( AbstractBlockBase<?> block : blocks) {
try (Indent indent2=Debug.logAndIndent("eliminate moves in block %d",block.getId(... | Deletes all move instructions where the target location already contains the source value. |
public ClientConfig withSocketFactory(SSLSocketFactory factory){
setSocketFactory(factory);
return this;
}
| Sets the SSLSocketFactory and returns the updated configuration. |
@SuppressWarnings("unchecked") public synchronized T dequeueTask() throws InterruptedException {
while (_data.isEmpty()) {
if (!_closedInput) wait();
else return (T)NO_MORE_TASKS;
}
T t=_data.removeFirst();
notify();
return t;
}
| Synchronized read and delete from the top of the FIFO queue. |
public void runTest() throws Throwable {
String namespaceURI="http://www.ecommerce.org/schema";
String qualifiedName="namespaceURI:x";
Document doc;
DocumentType docType;
DOMImplementation domImpl;
Document aNewDoc;
doc=(Document)load("staffNS",false);
docType=doc.getDoctype();
domImpl=doc.getImplemen... | Runs the test case. |
public void add(String string){
elements.add(string == null ? JsonNull.INSTANCE : new JsonPrimitive(string));
}
| Adds the specified string to self. |
private void resize(int rows,int cols){
DataBox _data=dataBox.like();
for (int i=0; i < _data.numRows(); i++) {
for (int j=0; j < _data.numCols(); j++) {
if (i < dataBox.numRows() && j < dataBox.numCols()) {
_data.set(i,j,dataBox.get(i,j));
}
else {
_data.set(i,j,null);
}
... | Resizes the data to the given dimensions. Data that does not fall within the new dimensions is lost, and positions in the redimensioned data that have no correlates in the old data are set to missing (that is, Double.NaN). |
public static byte[] hash(String input){
if (!TextUtils.isEmpty(input)) {
try {
byte[] inputBytes=input.getBytes("UTF-8");
return hash(inputBytes);
}
catch ( UnsupportedEncodingException e) {
Log.e(TAG,"problem hashing \"" + input + "\" "+ e.getMessage(),e);
}
}
return null;
}
| Created SHA256 of input |
public static void threadSwitch(RVMThread currentThread,AbstractRegisters restoreRegs){
if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED);
}
| Switch threads. The following registers are saved/restored <ul> <li>nonvolatile fpr registers <li>nonvolatile gpr registers <li>FRAME_POINTER register <li>THREAD_ID "register" </ul> |
public void addFragment(RootFragment from,RootFragment to,Bundle bundle){
addFragment(from,to,bundle,KEEP_CURRENT);
}
| Jump to the specified fragment with a parameter form |
public boolean isWifiEnabled(){
return getWifiState() == WIFI_STATE_ENABLED;
}
| Return whether Wi-Fi is enabled or disabled. |
public UCrop useSourceImageAspectRatio(){
mCropIntent.putExtra(EXTRA_ASPECT_RATIO_SET,true);
mCropIntent.putExtra(EXTRA_ASPECT_RATIO_X,0);
mCropIntent.putExtra(EXTRA_ASPECT_RATIO_Y,0);
return this;
}
| Set an aspect ratio for crop bounds that is evaluated from source image width and height. User won't see the menu with other ratios options. |
public int hashCode(){
if (hashcode == 0) {
int result=17;
result=37 * result + issuer.hashCode();
result=37 * result + serial.hashCode();
hashcode=result;
}
return hashcode;
}
| Returns a hash code value for this X509IssuerSerial. |
private void updateCrlInDb(String key,byte[] encoded) throws SQLException {
Connection c=null;
PreparedStatement s=null;
ResultSet rs=null;
try {
c=getDataSource().getConnection();
s=c.prepareStatement(sqlFindUpdate);
s.setBytes(1,encoded);
s.setString(2,key);
s.executeUpdate();
}
finall... | Update the cache with the CRL |
public void close() throws IOException {
if (closed) {
return;
}
closed=true;
input.close();
if (!done) {
try {
cipher.doFinal();
}
catch ( BadPaddingException|IllegalBlockSizeException ex) {
}
}
ostart=0;
ofinish=0;
}
| Closes this input stream and releases any system resources associated with the stream. <p> The <code>close</code> method of <code>CipherInputStream</code> calls the <code>close</code> method of its underlying input stream. |
public boolean canStoreType(Type child,Type parent){
if (child.equals(parent)) return true;
if (parent instanceof NullType) {
return false;
}
if (child instanceof NullType) {
return parent instanceof RefLikeType;
}
if (child instanceof RefType) {
if (parent instanceof RefType) {
return c... | Given an object of declared type child, returns true if the object can be stored in a variable of type parent. If child is an interface that is not a subinterface of parent, this method will return false even though some objects implementing the child interface may also implement the parent interface. |
static void accept(final AnnotationVisitor av,final String name,final Object value){
if (av != null) {
if (value instanceof String[]) {
String[] typeconst=(String[])value;
av.visitEnum(name,typeconst[0],typeconst[1]);
}
else if (value instanceof AnnotationNode) {
AnnotationNode an=(Anno... | Makes the given visitor visit a given annotation value. |
public SolrQuery addOrUpdateSort(String field,ORDER order){
return addOrUpdateSort(new SortClause(field,order));
}
| Updates or adds a single sort clause to the query. If the field is already used for sorting, the order of the existing field is modified; otherwise, it is added to the end. <p> |
public static Typeface androidNationItalic(Context context){
sAndroidNationItalic=getFontFromRes(R.raw.androidnation_i,context);
return sAndroidNationItalic;
}
| Android Nation-Italic font face |
public boolean equals(Object otherObject){
if (otherObject == null) {
return false;
}
if (!otherObject.getClass().equals(this.getClass())) {
return false;
}
DuplicateNameValueList other=(DuplicateNameValueList)otherObject;
if (nameValueMap.size() != other.nameValueMap.size()) {
return false;
}... | Compare if two NameValue lists are equal. |
public void stop(){
Debug.logInfo("Shutting down JobPoller.",module);
if (jobManagerPollerThread != null) {
jobManagerPollerThread.interrupt();
}
List<Runnable> queuedJobs=executor.shutdownNow();
for ( Runnable task : queuedJobs) {
try {
Job queuedJob=(Job)task;
queuedJob.deQueue();
}... | Stops the <code>JobPoller</code>. This method is called when OFBiz shuts down. The <code>JobPoller</code> cannot be restarted. |
public GroupTree findOrCreateGroup(String fullyQualifiedGroupName,OperatorDocBundle bundle){
String[] groupKeys=fullyQualifiedGroupName.split("\\.");
GroupTree group=this;
for (int i=0; i < groupKeys.length && group != null; i++) {
group=group.getOrCreateSubGroup(groupKeys[i],bundle);
}
return group;
}
| Finds or creates the group for the given fully qualified name (dot separated). |
@SuppressWarnings("unchecked") private void updateRepresentation(List<InvocationSequenceData> invocations){
sourceInvocations=invocations;
resetDisplayed=false;
MutableDouble duration=new MutableDouble(0d);
List<SqlStatementData> sqlList=new ArrayList<>();
InvocationSequenceDataHelper.collectSqlsInInvocations... | Updates the representation of the text form. |
public void shiftRightUnsigned() throws IOException {
print("shiftRightUnsigned",null);
}
| Description of the Method |
@Override public void terminateSession(String sessionid) throws org.apache.thrift.TException {
if (!msgQueues.containsKey(sessionid)) {
return;
}
SessionQueue pQueue=msgQueues.get(sessionid);
log.debug("terminateSession: SessionId: " + sessionid + "\n");
String data="FilterTimeout";
ByteBuffer bb=ByteBu... | The implementation for terminateSession() function. It removes the session to queue association. |
public boolean hasData(){
String[] hostList={"www.google.com","www.yahoo.com","www.bing.com","www.facebook.com","www.ask.com"};
try {
for (int i=0; i < hostList.length; ++i) {
String host=hostList[i];
Process p=Runtime.getRuntime().exec("ping -c 10 -w 100 " + host);
int status=p.waitFor();
... | Helper method used to test data connectivity by pinging a series of popular sites. |
public final double tx(double x){
final double width=this.width;
if (x >= 0 && x < width) return x;
x=x % width;
if (x < 0) x=x + width;
return x;
}
| Toroidal x |
public UrlWithScore(){
url=new Text();
score=new FloatWritable();
}
| Creates instance with empty url and zero score. |
public int size(){
return listeners.length;
}
| Returns the number of registered listeners. |
public DateMidnight(int year,int monthOfYear,int dayOfMonth,Chronology chronology){
super(year,monthOfYear,dayOfMonth,0,0,0,0,chronology);
}
| Constructs an instance from datetime field values using the specified chronology. The constructed object will have a local time of midnight. <p> If the chronology is null, <code>ISOChronology</code> in the default time zone is used. |
private void handleValidation(final HttpServerRequest req){
final Logger log=RequestLoggerFactory.getLogger(ValidationHandler.class,req);
final HttpClientRequest cReq=httpClient.request(req.method(),req.uri(),null);
cReq.setTimeout(TIMEOUT);
cReq.headers().setAll(req.headers());
cReq.headers().set(VALID_HEADE... | Performs validation. |
public void insert(Interval itemInterval,Object item){
int index=getSubnodeIndex(itemInterval,origin);
if (index == -1) {
add(item);
return;
}
Node node=subnode[index];
if (node == null || !node.getInterval().contains(itemInterval)) {
Node largerNode=Node.createExpanded(node,itemInterval);
sub... | Insert an item into the tree this is the root of. |
public RpfCoverageManager(RpfFrameProvider rfp){
frameProvider=rfp;
}
| Don't use this. |
public InitialAuthConfig(){
}
| For testing purposes |
public void onDestroy(){
}
| The final call you receive before your activity is destroyed. |
public void doOrthogonalLayout(){
m_graph.getSettings().getLayoutSettings().setDefaultGraphLayout(LayoutStyle.ORTHOGONAL);
m_graph.doLayout();
}
| Layouts the graph using an orthogonal layout. |
public static String handleFailedJavadocFetch(CoreException e){
IStatus status=e.getStatus();
if (JavaCore.PLUGIN_ID.equals(status.getPlugin())) {
Throwable cause=e.getCause();
int code=status.getCode();
if (code == IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC_TIMEOUT || (code == IJavaMode... | Handles the exception thrown from JDT Core when the attached Javadoc cannot be retrieved due to accessibility issues or location URL issue. This exception is not logged but the exceptions occurred due to other reasons are logged. |
public boolean provides(Class<?> type){
if (getDisabled()) {
return false;
}
return false;
}
| Tells which managers this provides by class |
public final boolean deletePhoto(final long photoId) throws AbelanaClientException, AbelanaClientException {
if (isConnectedToServerOrTryToConnect()) {
DeletePhotoRequest deletePhotoRequest=new DeletePhotoRequest();
deletePhotoRequest.photoId=photoId;
try {
StatusResponse statusResponse=mBlockingStu... | Deletes a photo. |
private static String doNormalize(String filename,char separator,boolean keepSeparator){
if (filename == null) {
return null;
}
int size=filename.length();
if (size == 0) {
return filename;
}
int prefix=getPrefixLength(filename);
if (prefix < 0) {
return null;
}
char[] array=new char[size ... | Internal method to perform the normalization. |
public final int depth(FileSystemEntry entry){
int d=0;
FileSystemEntry root=this;
while (entry != root) {
entry=entry.parent;
d++;
}
return d;
}
| Find depth of 'entry' in current element. |
public StreamTimestamp minus(int i,ChronoUnit unit){
return new StreamTimestamp(streamId,timestamp.minus(i,unit));
}
| This timestamp, but in the past. |
@Override public void translate(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment,instruction,instructions,"SMMLA");
translateAll(environment,instruction,"S... | SMMLA{R}{<cond>} <Rd>, <Rm>, <Rs>, <Rn> Operation: if ConditionPassed(cond) then value = Rm * Rs // Signed multiplication if R == 1 then Rd = ((Rn<<32) + value + 0x80000000)[63:32] else Rd = ((Rn<<32) + value)[63:32] |
@Override public void displayTalkCycle(Cycle cycle){
talkCycle=cycle;
if (alreadyInitializedRecyclerList) {
populateRecyclerList();
}
}
| Populate recycler view with updated cycle. |
private Context nextContext(){
Context next=new Context(context);
Options options=Options.instance(context);
Assert.checkNonNull(options);
next.put(Options.optionsKey,options);
Locale locale=context.get(Locale.class);
if (locale != null) next.put(Locale.class,locale);
Assert.checkNonNull(messages);
ne... | Get the context for the next round of processing. Important values are propagated from round to round; other values are implicitly reset. |
private boolean locateMismatchingDistributions(MsgData data) throws AdeException {
final double maxScore=-calcLogProb(data.m_maxNumAppearance,data.m_lambda);
return (maxScore >= m_badMessageCountScoreThreshold);
}
| Calculate the log probability of the log-normally distributed message. Determine if the value is greater than a threshold value to determine if it is a bad fit. |
@Deprecated public boolean hasServer(@NonNull Jedis jedis,@NonNull String serverId) throws ProcessingException {
return getServer(jedis,serverId) >= 0;
}
| Checks if the world of player (playerUuid) has a server.. |
public static boolean map(Address start,int size){
Clock.stop();
Object[] args={start.toString(),size};
Trace.trace(Item.MEMORY,"map(%s,%d)",args);
Address last=start.plus(size);
assert size % BYTES_IN_PAGE == 0;
assert start.toWord().and(Word.fromIntSignExtend(~PAGE_MASK)).EQ(Word.zero());
for (Address p... | Demand zero mmaps an area of virtual memory. |
public JsonObjectRequest(int method,String url,JSONObject jsonRequest,Listener<JSONObject> listener,ErrorListener errorListener){
super(method,url,(jsonRequest == null) ? null : jsonRequest.toString(),listener,errorListener);
}
| Creates a new request. |
private boolean waitForMessageWindow(MessageType type,short nodeId,long maxWait) throws InterruptedException {
if (!windowedTypes.contains(type)) return true;
long start=System.nanoTime();
MessageWindow mw=getMW(nodeId);
if (!mw.disconnected && mw.pending.get() >= MAX_PENDING_MESSAGES) {
mw.lock.lock();
... | Wait for a message window slow to be available for the given node and message type |
public boolean search(int[] A,int target){
if (A.length == 0) {
return false;
}
int start=0;
int end=A.length - 1;
int mid;
while (start + 1 < end) {
mid=start + (end - start) / 2;
if (A[mid] == target) {
return true;
}
if (A[start] < A[mid]) {
if (A[start] <= target && targe... | param A : an integer ratated sorted array and duplicates are allowed param target : an integer to be search return : a boolean |
void execute(final int opcode,final int arg,final ClassWriter cw,final Item item){
int t1, t2, t3, t4;
switch (opcode) {
case Opcodes.NOP:
case Opcodes.INEG:
case Opcodes.LNEG:
case Opcodes.FNEG:
case Opcodes.DNEG:
case Opcodes.I2B:
case Opcodes.I2C:
case Opcodes.I2S:
case Opcodes.GOTO:
case Opcodes.RETURN:
break... | Simulates the action of the given instruction on the output stack frame. |
public void writeEndOfClass(){
out.println("}");
}
| writes the closing of the class definition |
public static boolean deleteFile(String path){
if (StringUtils.isBlank(path)) {
return true;
}
File file=new File(path);
if (!file.exists()) {
return true;
}
if (file.isFile()) {
return file.delete();
}
if (!file.isDirectory()) {
return false;
}
for ( File f : file.listFiles()) {
... | delete file or directory <ul> <li>if path is null or empty, return true</li> <li>if path not exist, return true</li> <li>if path exist, delete recursion. return true</li> <ul> |
public CountRequest routing(String routing){
this.routing=routing;
return this;
}
| A comma separated list of routing values to control the shards the search will be executed on. |
boolean canRunInCurrentRunState(boolean periodic){
return isRunningOrShutdown(periodic ? continueExistingPeriodicTasksAfterShutdown : executeExistingDelayedTasksAfterShutdown);
}
| Returns true if can run a task given current run state and run-after-shutdown parameters. |
public boolean isDaylightSavings(){
return daylightSavings;
}
| Ruft den Wert der daylightSavings-Eigenschaft ab. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.