code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public int optInt(int index){
return optInt(index,0);
}
| Get the optional int value associated with an index. Zero is returned if there is unknown value for the index, or if the value is not a number and cannot be converted to a number. |
public boolean isMinYSet(int scale){
return mMinY[scale] != MathHelper.NULL_VALUE;
}
| Returns if the minimum Y value was set. |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
@Override public boolean continueExecuting(){
return !this.petPathfinder.noPath() && this.thePet.getDistanceSqToEntity(this.theOwner) > this.maxDist * this.maxDist;
}
| Returns whether an in-progress EntityAIBase should continue executing |
@Override public byte[] serialize(Object o){
Serializable serializer=findResponsible(o.getClass());
return serializer.serialize(o);
}
| Serializes an given object to a binary representation by delegating the request to the responsible Serializer. |
public void exec(final String service,final String action,final String callbackId,final String rawArgs){
CordovaPlugin plugin=getPlugin(service);
if (plugin == null) {
Log.d(TAG,"exec() call to unknown plugin: " + service);
PluginResult cr=new PluginResult(PluginResult.Status.CLASS_NOT_FOUND_EXCEPTION);
... | Receives a request for execution and fulfills it by finding the appropriate Java class and calling it's execute method. PluginManager.exec can be used either synchronously or async. In either case, a JSON encoded string is returned that will indicate if any errors have occurred when trying to find or execute the class ... |
public boolean replaceIn(final StringBuilder source,final int offset,final int length){
if (source == null) {
return false;
}
final StrBuilder buf=new StrBuilder(length).append(source,offset,length);
if (substitute(buf,0,length) == false) {
return false;
}
source.replace(offset,offset + length,buf.t... | Replaces all the occurrences of variables within the given source builder with their matching values from the resolver. The builder is updated with the result. <p> Only the specified portion of the buffer will be processed. The rest of the buffer is not processed, but it is not deleted. |
public ObjectName manageSystemMember(DistributedMember distributedMember) throws AdminException, MalformedObjectNameException {
try {
SystemMember member=lookupSystemMember(distributedMember);
if (member == null) return null;
SystemMemberJmxImpl jmx=(SystemMemberJmxImpl)member;
ObjectName oname=ne... | Return the ObjectName for the SystemMemberMBean representing the specified distributed member or null if the member is not found. |
public SecurityProvidersAction(KseFrame kseFrame){
super(kseFrame);
putValue(LONG_DESCRIPTION,res.getString("SecurityProvidersAction.statusbar"));
putValue(NAME,res.getString("SecurityProvidersAction.text"));
putValue(SHORT_DESCRIPTION,res.getString("SecurityProvidersAction.tooltip"));
putValue(SMALL_ICON,new... | Construct action. |
void verifyExceptionCaptured(Class<? extends Throwable> expectedExceptionClass){
assertTrue("Excpected exception not thrown",exceptionEventCapture.hasCaptured());
Throwable caughtEx=exceptionEventCapture.getValue().getCause();
assertEquals(expectedExceptionClass,caughtEx.getClass());
exceptionEventCapture.reset... | Verify that the given exception event capture (as returned by getAndInitExceptionCapture) has thrown an exception of the given expectedExceptionClass. Resets the capture |
public boolean isSpltVoteAllwd(){
return spltVoteAllwd;
}
| Gets the value of the spltVoteAllwd property. |
private void pushRun(int runBase,int runLen){
this.runBase[stackSize]=runBase;
this.runLen[stackSize]=runLen;
stackSize++;
}
| Pushes the specified run onto the pending-run stack. |
public static int[] deviates(long[] values,long buffer,double factor){
if (values == null || values.length == 0) {
return new int[0];
}
long avg=average(values);
long minimumDiff=Math.max(buffer,(long)(avg * factor));
List<Integer> deviatedElements=new ArrayList<Integer>();
for (int i=0; i < values.leng... | Check if the array has deviating elements. <p/> Deviating elements are found by comparing each individual value against the average. |
@Override protected boolean hasFab(){
return false;
}
| Will hide the fab if false; the fab is still in the viewgroup and is used for various other tasks such as the snackbar |
void closeProducer() throws JMSException {
producer.close();
}
| Close producer |
private void writeQName(javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI=qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix=xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {... | method to handle Qnames |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:01:08.411 -0400",hash_original_method="81F38009176C270674E529671B18DCFB",hash_generated_method="D0BBF492D648E618C4FC0DEC9B6E17A1") public void push(){
for (int i=cursor; i < size; i++) {
if (buffer[i] != null) {
target.publ... | Triggers a push action to output all buffered records to the target handler, and the target handler will publish them. Then the buffer is cleared. |
private void parseRules(List<String> rules,NormalizeCharMap.Builder map){
for ( String rule : rules) {
Matcher m=rulePattern.matcher(rule);
if (!m.find()) throw new RuntimeException("Invalid Mapping Rule : [" + rule + "]");
String lhs=parseString(m.group(1).trim());
String rhs=parseString(m.group... | parses a list of MappingCharFilter style rules into a normalize char map |
public boolean isItemForce(){
return true;
}
| Returns true. |
public static void putShort(ByteBuffer bb,int value){
bb.putShort((short)(value & 0xffff));
}
| Put a short into the byte buffer unsigned. |
@Override public CompiledMethod specialCompile(NormalMethod source){
CompilationPlan plan=new CompilationPlan(source,optimizationPlan,null,options);
return OptimizingCompiler.compile(plan);
}
| Generate code to specialize a method in this context. Namely, invoke the opt compiler with the INVOKEE_THREAD_LOCAL option. |
@Override public boolean equals(final Object obj){
if (ActiveMQRAConnectionRequestInfo.trace) {
ActiveMQRALogger.LOGGER.trace("equals(" + obj + ")");
}
if (obj == null) {
return false;
}
if (obj instanceof ActiveMQRAConnectionRequestInfo) {
ActiveMQRAConnectionRequestInfo you=(ActiveMQRAConnection... | Indicates whether some other object is "equal to" this one. |
public final void fatalError(final String message,final Throwable throwable){
if (isFatalErrorEnabled()) {
output(Priority.FATAL_ERROR,message,throwable);
}
}
| Log a fatalError priority event. |
private List<Trade> findLargeTradesInParallel(List<Trade> trades){
List<Trade> bigTrades=trades.stream().parallel().filter(null).collect(Collectors.toList());
return bigTrades;
}
| Finding large trades - execution is run in parallel mode |
@Override public void onActivitySaveInstanceState(Activity activity,Bundle outState){
}
| Callback from Activity life-cycle, on main thread |
protected boolean hasCompressedThumbnail(){
return mThumbnail != null;
}
| Returns true it this header contains a compressed thumbnail. |
public void addTables(Collection<Table> tables){
for (Iterator<Table> it=tables.iterator(); it.hasNext(); ) {
addTable((Table)it.next());
}
}
| Adds the given tables. |
public static Workflow.Method rollbackCreateMetaVolumesMethod(URI systemURI,List<URI> volumeURIs){
return rollbackCreateVolumesMethod(systemURI,volumeURIs);
}
| Return a Workflow.Method for rollbackCreateMetaVolumes. |
public String optString(String key){
return this.optString(key,"");
}
| Get an optional string associated with a key. It returns an empty string if there is no such key. If the value is not a string and is not null, then it is converted to a string. |
@Override protected void verifyMatch(Object target,Object deserialized){
DailyCalendar targetCalendar=(DailyCalendar)target;
DailyCalendar deserializedCalendar=(DailyCalendar)deserialized;
assertNotNull(deserializedCalendar);
assertEquals(targetCalendar.getDescription(),deserializedCalendar.getDescription());
... | Verify that the target object and the object we just deserialized match. |
public static boolean isCglibProxy(Object object){
return ClassUtils.isCglibProxyClass(object.getClass());
}
| Check whether the given object is a CGLIB proxy. |
public static Properties extractMapping(String settingsFile){
try {
Document doc=XMLUtils.getXMLDocument(settingsFile);
Properties mapping=extractMapping(XMLUtils.getMainNode(doc));
return mapping;
}
catch ( RuntimeException e) {
log.warning("error extracting the settings: " + e);
return new P... | Extract the settings from the XML file. |
default void notifyBeforeInline(ResolvedJavaMethod methodToInline){
}
| Notification that a method is about to be inlined. |
public static boolean isLow(int c){
return (MIN_LOW <= c) && (c <= MAX_LOW);
}
| Tells whether or not the given UTF-16 value is a low surrogate. |
public static SharedPreferencesItem newInstance(@NonNull Bundle bundle){
SharedPreferencesItem sharedPreferencesItem=new SharedPreferencesItem();
sharedPreferencesItem.setArguments(bundle);
return sharedPreferencesItem;
}
| Instantiates new fragment. |
public static BodyDeclaration findNextSibling(BodyDeclaration member){
ASTNode parent=member.getParent();
if (parent instanceof TypeDeclaration) {
List<BodyDeclaration> elements=((TypeDeclaration)parent).bodyDeclarations();
for (int i=elements.size() - 2; i >= 0; i--) {
if (member.equals(elements.get(... | Returns the element after the give element. |
@RequestMapping(value={"/",""},method=RequestMethod.PUT) @ResponseBody public RestWrapper insert(@ModelAttribute("batch") @Valid Batch batch,BindingResult bindingResult,Principal principal){
RestWrapper restWrapper=null;
if (bindingResult.hasErrors()) {
BindingResultError bindingResultError=new BindingResultErr... | This method calls proc InsertBatch and adds a record in database. It also validates the values of the object passed. |
@Override public int sizeLimit(){
if (ConsistType == ADVANCED_CONSIST) {
return -1;
}
else if (ConsistType == CS_CONSIST) {
return 2;
}
else {
return 0;
}
}
| <p> Is there a size limit for this consist? </p> |
public void rollback(){
if (!mWriting) {
throw new IllegalStateException("no file to roll back");
}
mWriting=false;
mTemp.delete();
}
| Roll back changes. |
public static boolean isValidNmtoken(String nmtoken){
if (nmtoken.length() == 0) return false;
for (int i=0; i < nmtoken.length(); i++) {
char ch=nmtoken.charAt(i);
if (!isName(ch)) {
return false;
}
}
return true;
}
| Check to see if a string is a valid Nmtoken according to [7] in the XML 1.0 Recommendation |
public static URI normalize(URI uri) throws IOException {
try {
if (!F.eq(IgniteFileSystem.IGFS_SCHEME,uri.getScheme())) throw new IOException("Failed to normalize UIR because it has non IGFS scheme: " + uri);
HadoopIgfsEndpoint endpoint=new HadoopIgfsEndpoint(uri.getAuthority());
StringBuilder sb=new... | Normalize IGFS URI. |
public int format(int val,byte[] buf,int off,int len){
if (val == Integer.MIN_VALUE) {
if (len > ByteFormatter.NUMBER_BASE) {
return format("-2147483648",buf,off,len);
}
else {
truncationFiller(buf,off,len);
return off + len;
}
}
int pos=Math.abs(val);
int ndig=1;
int dmax=ByteF... | Format an int into an existing array. |
public static void clearUserData(@NonNull Context context){
PackageManager packageManager=context.getPackageManager();
try {
PackageInfo packageInfo=packageManager.getPackageInfo(context.getPackageName(),0);
File dataDir=new File(packageInfo.applicationInfo.dataDir);
File[] filesList=dataDir.listFiles()... | Clears the app's data directory, external storage directory and shared preferences, with the exceptions of downloaded videos and videos database. |
protected void drawLine(int lineIndex,Graphics g,int x,int y){
try {
Element line=getElement().getElement(lineIndex);
getDocument().getText(line.getStartOffset(),line.getEndOffset() - line.getStartOffset(),segment);
TabExpander tx=new MoeTabExpander(tabSize,x);
Utilities.drawTabbedText(segment,x,y,g,t... | Draw a line of text. |
protected DecimalLiteral(BigDecimal value){
this(value,XMLSchema.DECIMAL);
}
| Creates an xsd:decimal literal with the specified value. |
public <T>T createDto(Class<T> dtoInterface){
return getDtoProvider(dtoInterface).newInstance();
}
| Creates new instance of class which implements specified DTO interface. |
private void showFeedback(String message){
if (myHost != null) {
myHost.showFeedback(message);
}
else {
System.out.println(message);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
protected void onFieldBool(final Object obj,final Field field,final Bin annotation,final boolean value){
}
| Notification about boolean field. |
public DeltaSextadTest(ICovarianceMatrix cov){
if (cov == null) {
throw new NullPointerException();
}
this.cov=cov;
this.N=cov.getSampleSize();
this.variables=cov.getVariables();
}
| Constructs a test using the given covariance matrix. Fourth moment statistics are not caculated; it is assumed that the data are distributed as multivariate Gaussian. |
public DatastoreV1.Entity mockFlagEntity(String userId){
List<DatastoreV1.Property> properties=ImmutableList.of(makeProperty("userId",makeValue(userId)).build());
return DatastoreV1.Entity.newBuilder().setKey(makeKey(makeKey("Photo",12345).build(),"Flag",67890)).addAllProperty(properties).build();
}
| Returns a dummy Flag Entity with the userId passed. |
static Permissions createPermissions(Environment environment) throws IOException {
Permissions policy=new Permissions();
addClasspathPermissions(policy);
addFilePermissions(policy,environment);
return policy;
}
| returns dynamic Permissions to configured paths and bind ports |
public void addAssignedVirtualArray(String virtualArrayURI){
if (virtualArrayURI != null) {
if (_assignedVirtualArrays == null) {
setAssignedVirtualArrays(new StringSet());
_assignedVirtualArrays.add(virtualArrayURI);
}
else {
_assignedVirtualArrays.add(virtualArrayURI);
}
updateVir... | Adds the passed VirtualArray URI to the set of VirtualArrays assigned to the resource by the user. |
public Wine selectPrefix(String prefixName) throws CancelException {
this.prefixName=prefixName;
this.prefix=new com.playonlinux.wine.WinePrefix(playOnLinuxContext.makePrefixPathFromName(prefixName));
if (prefix.initialized()) {
wineVersion=new WineVersion(prefix.fetchVersion(),prefix.fetchDistribution(),setu... | Select the prefix. If the prefix already exists, this method load its parameters and the prefix will be set as initialized. |
public static MeshModel drawCube(MeshModel model,Cuboid cuboid,CubeTextureCoordinates textureCoordinates){
return drawCube(model,cuboid.min.getX(),cuboid.min.getY(),cuboid.min.getZ(),cuboid.max.getX(),cuboid.max.getY(),cuboid.max.getZ(),textureCoordinates);
}
| Binds the specified texture coordinates to the model for the specified cuboid for rendering |
public static void assertNotNull(Object object,String errorMessage){
if (verbose) {
log("assertNotNull(" + object + ", "+ errorMessage+ ")");
}
assertBool(object != null,errorMessage);
}
| Asserts that the given expression does not evaluate to null |
public static void defaultDatabaseSetUp(FBManager fbManager) throws Exception {
final GDSType gdsType=getGdsType();
if (gdsType == GDSType.getType("PURE_JAVA") || gdsType == GDSType.getType("NATIVE") || gdsType == GDSType.getType("OOREMOTE")) {
fbManager.setServer(DB_SERVER_URL);
fbManager.setPort(DB_SERVER... | Creates the default test database, and configures the passed in FBManager with the server and type of test. |
public void createDatabaseEntitiesForBusinessObjectDataNotificationRegistrationTesting(){
createDatabaseEntitiesForBusinessObjectDataNotificationRegistrationTesting(AbstractServiceTest.NAMESPACE,Arrays.asList(NotificationEventTypeEntity.EventTypesBdata.BUS_OBJCT_DATA_RGSTN.name(),NotificationEventTypeEntity.EventType... | Create and persist database entities required for testing. |
protected void sequence_MultiplicativeExpression(ISerializationContext context,MultiplicativeExpression semanticObject){
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject,N4JSPackage.Literals.MULTIPLICATIVE_EXPRESSION__LHS) == ValueTransient.YES) errorAcceptor.accept(diagnosticP... | Contexts: MultiplicativeExpression<Yield> returns MultiplicativeExpression MultiplicativeExpression returns MultiplicativeExpression MultiplicativeExpression.MultiplicativeExpression_1_0_0_0<Yield> returns MultiplicativeExpression MultiplicativeExpression.MultiplicativeExpression_1_0_0_0<AdditiveExpression.Yield> retur... |
public StreamingJsonBuilder(Writer writer,JsonGenerator generator){
this.writer=writer;
this.generator=generator;
}
| Instantiates a JSON builder with the given generator. |
public boolean isRangeCrosshairVisible(){
return this.rangeCrosshairVisible;
}
| Returns a flag indicating whether or not the range crosshair is visible. |
@Override public boolean provides(Class<?> type){
if (getDisabled()) {
return false;
}
if (type.equals(jmri.ProgrammerManager.class)) {
return (null != programmerManager);
}
if (type.equals(jmri.ThrottleManager.class)) {
return (null != throttleManager);
}
if (type.equals(jmri.PowerManager.cla... | Tells which managers this provides by class |
protected void deleteLinks(List<Link> links,String reason){
deleteLinks(links,reason,null);
}
| Removes links from memory and storage. |
public List<AuditEvent> convertToAuditEvent(Iterable<PersistentAuditEvent> persistentAuditEvents){
if (persistentAuditEvents == null) {
return Collections.emptyList();
}
List<AuditEvent> auditEvents=new ArrayList<>();
for ( PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) {
auditEvent... | Convert a list of PersistentAuditEvent to a list of AuditEvent |
@SuppressWarnings("unchecked") public TipperApplicator(final Tipper<? extends ASTNode> w){
super(w.myName());
tipper=(Tipper<ASTNode>)w;
clazz=w.myActualOperandsClass();
assert clazz != null : "Oops, cannot find kind of operands of " + w.myName();
}
| Instantiates this class |
protected void processVmCreate(SimEvent ev,boolean ack){
ContainerVm containerVm=(ContainerVm)ev.getData();
boolean result=getVmAllocationPolicy().allocateHostForVm(containerVm);
if (ack) {
int[] data=new int[3];
data[0]=getId();
data[1]=containerVm.getId();
if (result) {
data[2]=CloudSimTag... | Process the event for a User/Broker who wants to create a VM in this PowerDatacenter. This PowerDatacenter will then send the status back to the User/Broker. |
private SubjectType createSubject() throws DatatypeConfigurationException {
SubjectType subject=_assertionFactory.createSubjectType();
NameIDType nameId=_assertionFactory.createNameIDType();
nameId.setFormat(SUBJECT_NAME_ID_FORMAT);
nameId.setValue(_spec.getSubject().toString());
subject.setNameID(nameId);
... | Create subject according to the spec |
public boolean hasOrder(){
return order != null;
}
| Does the digraph have a topological order? |
@Override public void onPlaceSelected(Place place){
Log.i(TAG,"Place Selected: " + place.getName());
mPlaceDetailsText.setText(formatPlaceDetails(getResources(),place.getName(),place.getId(),place.getAddress(),place.getPhoneNumber(),place.getWebsiteUri()));
CharSequence attributions=place.getAttributions();
if ... | Callback invoked when a place has been selected from the PlaceAutocompleteFragment. |
public void execute(IDocument document) throws BadLocationException {
if (fLength == 0 && fText == null) return;
if (fOwner != null) document.removeDocumentListener(fOwner);
document.replace(fOffset,fLength,fText);
if (fOwner != null) document.addDocumentListener(fOwner);
}
| Executes the document command on the specified document. |
public static final UUID register(EvaluationStrategy strategy){
UUID key;
if (strategy instanceof UUIDable) {
key=((UUIDable)strategy).getUUID();
if (get(key) == null) {
registry.put(key,strategy);
}
}
else {
key=getKey(strategy);
if (key == null) {
key=UUID.randomUUID();
re... | Add a strategy to the registry and returns the registry key. If the strategy is already present, the operation simply returns the key with which it is currently registered. |
public static void copyFile(CarbonFile sourceLocation,String desTinationLocation) throws IOException {
InputStream inputStream=null;
OutputStream outputStream=null;
try {
inputStream=FileFactory.getDataInputStream(sourceLocation.getAbsolutePath(),FileFactory.getFileType(sourceLocation.getAbsolutePath()));
... | This method will be used for copy file from source to destination location |
public boolean execute(String action,JSONArray args,CallbackContext callbackContext) throws JSONException {
if (this.cordova.getActivity().isFinishing()) return true;
if (action.equals("beep")) {
this.beep(args.getLong(0));
}
else if (action.equals("alert")) {
this.alert(args.getString(0),args.getStr... | Executes the request and returns PluginResult. |
public Vector3 mul(float value){
return this.set(this.x * value,this.y * value,this.z * value);
}
| Multiplies all components of this vector by the given value |
@Deprecated private void initViewSize(Context context,AttributeSet attrs){
for (int i=0; i < attrs.getAttributeCount(); i++) {
String name=attrs.getAttributeName(i);
if ("layout_width".equals(name)) {
String value=attrs.getAttributeValue(i);
this.width=LockPatternUtil.changeSize(context,value);
... | init view size |
static public void showDepthWarning(String method){
PGraphics.showDepthWarning(method);
}
| Display a warning that the specified method is only available with 3D. |
public AdjacencyMatrix(){
this(false);
}
| Creates a new empty adjacency matrix. |
public static boolean addAlloySmelterRecipe(ItemStack aInput1,ItemStack aInput2,ItemStack aOutput1,int aDuration,int aEUt,boolean aAllowSecondaryInputEmpty){
if (aInput1 == null || (aInput2 == null && !aAllowSecondaryInputEmpty) || aOutput1 == null) return false;
aOutput1=GT_OreDictUnificator.get(true,aOutput1);
... | Induction Smelter Recipes and Alloy Smelter Recipes |
public Matrix(Reader r) throws Exception {
LineNumberReader lnr=new LineNumberReader(r);
String line;
int currentRow=-1;
while ((line=lnr.readLine()) != null) {
if (line.startsWith("%")) {
continue;
}
StringTokenizer st=new StringTokenizer(line);
if (!st.hasMoreTokens()) {
continue;
... | Reads a matrix from a reader. The first line in the file should contain the number of rows and columns. Subsequent lines contain elements of the matrix. (FracPete: taken from old weka.core.Matrix class) |
public static double clamp(double x,double min,double max){
if (x < min) return min;
if (x > max) return max;
return x;
}
| Clamps a <tt>double</tt> value to a given range. |
private void addAndRunTask(Runnable task){
mTaskEngine.execute(task);
}
| start a task |
public boolean isDrawn(){
return drawn;
}
| Checks if is drawn. |
final public void println(long v){
Writer out=this.out;
if (out == null) return;
print(v);
try {
out.write(_newline,0,_newline.length);
}
catch ( IOException e) {
log.log(Level.FINE,e.toString(),e);
}
}
| Prints a long followed by a newline. |
private static String readName(DataInputStream dis,byte data[]) throws IOException {
int c=dis.readUnsignedByte();
if ((c & 0xc0) == 0xc0) {
c=((c & 0x3f) << 8) + dis.readUnsignedByte();
HashSet<Integer> jumps=new HashSet<Integer>();
jumps.add(c);
return readName(data,c,jumps);
}
if (c == 0) {
... | Parse a domain name starting at the current offset and moving the input stream pointer past this domain name (even if cross references occure). |
public static boolean uninstallNormal(Context context,String packageName){
if (packageName == null || packageName.length() == 0) {
return false;
}
Intent i=new Intent(Intent.ACTION_DELETE,Uri.parse(new StringBuilder(32).append("package:").append(packageName).toString()));
i.addFlags(Intent.FLAG_ACTIVITY_NEW... | uninstall package normal by system intent |
public <D>D oneToManyWithoutControl(Class<D> destinationClass,final T source){
try {
return this.<D,T>getJMapper(relationalOneToManyMapper,destinationClass).getDestinationWithoutControl(source);
}
catch ( Exception e) {
return (D)this.destinationClassControl(e,destinationClass);
}
}
| This method returns a new instance of Target Class with this setting: <table summary =""> <tr> <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td> </tr><tr> <td><code>MappingType</code> of Destination</td><td><code>ALL_FIELDS</code></td> </tr><tr> <td><code>MappingType</code> of Source</td><td><code>A... |
final void consume(){
Flow.Subscriber<? super T> s;
int h=head;
if ((s=subscriber) != null) {
for (; ; ) {
long d=demand;
int c;
Object[] a;
int n;
long i;
Object x;
Thread w;
if (((c=ctl) & (ERROR | SUBSCRIBE | DISABLED)) != 0) {
if (!checkControl(s,c))... | Consumer loop, called from ConsumerTask, or indirectly when helping during submit. |
public static void startDeviceActivity(Context context,String path,String name,String city){
Intent intent=new Intent(context,UtilityService.class);
intent.setAction(UtilityService.ACTION_START_DEVICE_ACTIVITY);
String extraInfo;
if (Constants.START_ATTRACTION_PATH.equals(path)) {
extraInfo=name;
}
else ... | Trigger a message that asks the master device to start an activity. |
@RequestMapping(value=EXPECTED_PARTITION_VALUES_URI_PREFIX,method=RequestMethod.POST,consumes={"application/xml","application/json"}) @Secured(SecurityFunctions.FN_EXPECTED_PARTITION_VALUES_POST) public ExpectedPartitionValuesInformation createExpectedPartitionValues(@RequestBody ExpectedPartitionValuesCreateRequest re... | Creates a list of expected partition values for an existing partition key group. |
private IgfsNewLineRecordResolver resolver(){
return IgfsNewLineRecordResolver.NEW_LINE;
}
| Create resolver. |
public void removeTemplateFromCache(String name,Locale locale,String encoding) throws IOException {
removeTemplateFromCache(name,locale,encoding,true);
}
| Equivalent to <tt>removeTemplateFromCache(name, locale, encoding, true)</tt>. |
public boolean isEnabledGroupedChatList(){
return isEnabledGroupedChatList;
}
| Get If Grouped Chat List enabled |
public static Set<String> keys(JavaScriptObject obj){
if (obj != null) {
return new JSONObject(obj).keySet();
}
return Collections.emptySet();
}
| Get the names of defined properties on the object. The returned set iterates in the native iteration order, which may match the source order. |
public static TestParameterContainer evaluateTestTimes(long executionTime,String rampTimeString,String simulationTimeString) throws IllegalArgumentException {
boolean rampComplete=false;
long rampTime=0;
long simTime=0;
Builder builder=TestParameterContainer.builder();
if (StringUtils.isNotBlank(rampTimeStrin... | extracts the ramp and simulation time from the given values. |
public SerialLight(String systemName,String userName){
super(systemName,userName);
initializeLight(systemName);
}
| Create a Light object, with both system and user names. <P> 'systemName' was previously validated in SerialLightManager |
public static void main(String... a) throws Exception {
String fileName=a[0];
LineNumberReader in=new LineNumberReader(new BufferedReader(new FileReader(fileName)));
PrintWriter writer=new PrintWriter(new BufferedWriter(new FileWriter(fileName + ".lines.txt")));
StringBuilder buff=new StringBuilder();
for (St... | Usage: java ThreadDumpInliner threadDump.txt |
private static String unescapeSpace(String input){
return input.replace("~+~"," ");
}
| The standard R script escapes spaces to "~+~" in "-e" and "-f" commands. |
public boolean isHidingPiece(){
return isHidingPiece;
}
| Returns true if this square is hiding its piece, otherwise false. This is useful during drag operations when the board is refreshed. |
void assureIPConsistent(){
InterProcessLock lock=null;
try {
log.info("Assuring local site IPs are consistent with ZK ...");
lock=_coordinator.getCoordinatorClient().getLock(UPDATE_ZKIP_LOCK);
lock.acquire();
log.info("Got lock for updating local site IPs into ZK ...");
Site site=drUtil.getLocal... | Assure local site IP info is consistent with that in ZK. (DR/GEO procedures store IP info in ZK even for single site since Yoda.) |
public void initInfoWidgets(){
Debug.message("info","InformationDelegator.initInfoWidgets");
GridBagLayout gridbag=new GridBagLayout();
GridBagConstraints c=new GridBagConstraints();
setFont(new Font("Helvetica",Font.PLAIN,9));
setLayout(gridbag);
progressBar=new JProgressBar();
gridbag.setConstraints(pro... | If you want to subclass the InformationDelegator and have it handle messages differently, you can override this method to set the widgets you want. |
public static final Token newToken(int ofKind){
switch (ofKind) {
default :
return new Token();
}
}
| Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass of Token called IDToken that you want to create if ofKind is ID, simlpy add something... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.