code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void addEntry(NceConsistRosterEntry e){
if (log.isDebugEnabled()) {
log.debug("Add entry " + e);
}
int i=_list.size() - 1;
while (i >= 0) {
if (e.getId().toUpperCase().compareTo(_list.get(i).getId().toUpperCase()) > 0) {
break;
}
i--;
}
_list.add(i + 1,e);
setDirty(true);
fi... | Add a RosterEntry object to the in-memory Roster. |
public boolean isActive(int offset){
if (this.activeTimes == null) {
if (this.activePeriods == null) {
return true;
}
else {
int timeIndex=(SimClock.getIntTime() + this.activePeriodsOffset + offset) % (this.activePeriods[0] + this.activePeriods[1]);
if (timeIndex <= this.activePeriods[0]) {... | Returns true if node should be active after/before offset amount of time from now |
public Channel createReplicationChannel(){
CoreRemotingConnection connection=(CoreRemotingConnection)sessionFactory.getConnection();
return connection.getChannel(ChannelImpl.CHANNEL_ID.REPLICATION.id,-1);
}
| create a replication channel |
public MaxLengthValidator(@NonNull final CharSequence errorMessage,final int maxLength){
super(errorMessage);
setMaxLength(maxLength);
}
| Creates a new validator, which allows to validate texts to ensure, that they are not longer than a specific length. |
public boolean isFinal(){
return this.isDeclaredFinal();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public boolean batchFinished(){
if (getInputFormat() == null) {
throw new IllegalStateException("No input instance format defined");
}
if ((m_Indices == null) && (getInputFormat().classAttribute().isNumeric())) {
computeAverageClassValues();
setOutputFormat();
for (int i=0; i < getInputF... | Signify that this batch of input to the filter is finished. If the filter requires all instances prior to filtering, output() may now be called to retrieve the filtered instances. |
public static char[] toCharArray(short[] array){
char[] result=new char[array.length];
for (int i=0; i < array.length; i++) {
result[i]=(char)array[i];
}
return result;
}
| Coverts given shorts array to array of chars. |
public void incFunctionExecutionCalls(){
this._stats.incInt(_functionExecutionCallsId,1);
}
| Increments the "FunctionExecutionsCall" stat. |
public boolean systemShouldAdvance(){
return !isAtRest() || !wasAtRest();
}
| Check if this spring should be advanced by the system. * The rule is if the spring is currently at rest and it was at rest in the previous advance, the system can skip this spring |
@Override protected void initData(){
}
| Initialize the Activity data |
public int size(){
return children.size();
}
| Gets the number of children affected by the notification. |
public final static int quickCheckLineClip(int x1,int y1,int x2,int y2,int xleft,int xright,int ytop,int ybottom){
int pt1=_quick_code(x1,y1,xleft,xright,ytop,ybottom);
int pt2=_quick_code(x2,y2,xleft,xright,ytop,ybottom);
if ((pt1 & pt2) != 0) return -1;
else if ((pt1 | pt2) == 0) return 1;
else return... | Check if a line is completely inside or completely outside viewport. <p> |
FormatInformation readFormatInformation() throws FormatException {
if (parsedFormatInfo != null) {
return parsedFormatInfo;
}
int formatInfoBits1=0;
for (int i=0; i < 6; i++) {
formatInfoBits1=copyBit(i,8,formatInfoBits1);
}
formatInfoBits1=copyBit(7,8,formatInfoBits1);
formatInfoBits1=copyBit(8,8... | <p>Reads format information from one of its two locations within the QR Code.</p> |
private int measureShort(int measureSpec){
int result;
int specMode=MeasureSpec.getMode(measureSpec);
int specSize=MeasureSpec.getSize(measureSpec);
if (specMode == MeasureSpec.EXACTLY) {
result=specSize;
}
else {
result=(int)(2 * mRadius + getPaddingTop() + getPaddingBottom() + 1);
if (specMode ... | Determines the height of this view |
@Override public DecompoundedWord highestRank(ValueNode<DecompoundedWord> aParent,List<DecompoundedWord> aPath){
if (aPath != null) {
aPath.add(aParent.getValue());
}
List<DecompoundedWord> children=aParent.getChildrenValues();
if (children.size() == 0) {
return aParent.getValue();
}
children.add(aP... | Searches a a path throw the tree |
public static void removePlugin(String interfaceName,String name){
if (PLUGINS.get(interfaceName) != null) {
PLUGINS.get(interfaceName).remove(name);
}
}
| Remove a plugin. |
public void delete(List<InternalLog> logs) throws IOException {
final List<byte[]> rowkeys=RowkeyHelper.getRowkeysByLogs(logs);
deleteRowkeys(rowkeys);
}
| Batch delete |
public SimulatedTemperatureSensor(double initialTemp,Range<Double> tempRange,double deltaFactor){
Objects.requireNonNull(tempRange,"tempRange");
if (!tempRange.contains(initialTemp)) throw new IllegalArgumentException("initialTemp");
if (deltaFactor <= 0.0) throw new IllegalArgumentException("deltaFactor");
... | Create a temperature sensor. <p> No temperature scale is implied. </p> |
private static void completeInitialSetup(Map<String,String> properties){
SetupUtils.markSetupComplete();
ConfigPropertyUtils.saveProperties(BourneUtil.getSysClient(),properties);
complete();
}
| Completes initial setup with the given configuration properties. |
public Map<String,String> convertDataToStrings(Map<String,Object> data){
Map<String,String> results=new HashMap<>();
if (data != null) {
for ( String key : data.keySet()) {
Object object=data.get(key);
if (object instanceof WebAuthenticationDetails) {
WebAuthenticationDetails authenticati... | Internal conversion. This method will allow to save additional data. By default, it will save the object as string |
public ChunkedOutputStream(OutputStream stream,int bufferSize) throws IOException {
this.cache=new byte[bufferSize];
this.stream=stream;
}
| Wraps a stream and chunks the output. |
@Override protected void doGet(SlingHttpServletRequest request,SlingHttpServletResponse response) throws ServletException, IOException {
final PrintWriter writer=response.getWriter();
response.setCharacterEncoding(CharEncoding.UTF_8);
response.setContentType("application/json");
List<Resource> comments=commentS... | Return all comments on a GET request in order of newest to oldest. |
public void addToCrawler(final Collection<DigestURL> urls,final boolean asglobal){
Map<String,DigestURL> urlmap=new HashMap<String,DigestURL>();
for ( DigestURL url : urls) urlmap.put(ASCII.String(url.hash()),url);
for ( Map.Entry<String,DigestURL> e : urlmap.entrySet()) {
try {
if (this.index.getLo... | add url to Crawler - which itself loads the URL, parses the content and adds it to the index transparent alternative to "addToIndex" including, double in crawler check, display in crawl monitor but doesn't return results for a ongoing search |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:54:52.363 -0500",hash_original_method="43FA513912350854847003FDB290D6C5",hash_generated_method="0A756E4CE92F65496C52AC6E1848970C") public boolean hasQValue(){
return super.hasParameter(ParameterNames.Q);
}
| Return true if the q value has been set. |
public boolean shouldRenameColumn(String schema,String table){
if (shouldRenameSpecificColumn(schema,table)) return true;
else if (shouldRenameSpecificColumn("*",table)) return true;
else if (shouldRenameSpecificColumn(schema,"*")) return true;
else if (shouldRenameSpecificColumn("*","*")) return tru... | Check whether specific schema and table has requests to rename columns. Checks for asterisk matches too:<br/> schema.table<br/> *.table<br/> schema.*<br/> *.*<br/> |
public void rowSetPopulated(RowSetEvent event,int numRows) throws SQLException {
if (numRows < 0 || numRows < getFetchSize()) {
throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.numrows").toString());
}
if (size() % numRows == 0) {
RowSetEvent event_temp=new RowSetEvent(this);
event=e... | Notifies registered listeners that a RowSet object in the given RowSetEvent object has populated a number of additional rows. The <code>numRows</code> parameter ensures that this event will only be fired every <code>numRow</code>. <p> The source of the event can be retrieved with the method event.getSource. |
@Path("status") @POST @Consumes(MediaType.APPLICATION_JSON) @Produces({MediaType.APPLICATION_JSON,MediaType.TEXT_PLAIN}) public CLIOutputResponse update(final StatusRequest request) throws ApiException, IOException {
request.setProjectPath(getAbsoluteProjectPath(request.getProjectPath()));
return this.subversionApi... | Retrieve the status of the paths in the request or the working copy as a whole. |
protected void addMembers(List<RelationMember> newMembers,boolean atBeginning){
if (atBeginning) {
members.addAll(0,newMembers);
}
else {
members.addAll(newMembers);
}
}
| Adds multiple elements to the relation in the order in which they appear in the list. They can be either prepended or appended to the existing nodes. |
public static void deactivateToken(String tokenId) throws Exception {
PasswordStore.storePassword(tokenId,null);
LOG.trace("Deactivating token '{}'",tokenId);
execute(new ActivateToken(tokenId,false));
}
| Deactivates the token with the given ID. |
public Vertex processAssociation(Vertex text,Network network){
Vertex meaning=((Context)getBot().awareness().getSense(Context.class)).top(network);
if (meaning == null) {
return null;
}
text.addRelationship(Primitive.MEANING,meaning);
List<Relationship> words=text.orderedRelationships(Primitive.WORD);
i... | Associate the word to the current context selection. |
public static String xmlText(String text,boolean escapeNewline){
int length=text.length();
StringBuilder buff=new StringBuilder(length);
for (int i=0; i < length; i++) {
char ch=text.charAt(i);
switch (ch) {
case '<':
buff.append("<");
break;
case '>':
buff.append(">");
break;
case '&':
buff... | Escapes an XML text element. |
public Observable<Location> requestLocation(@NonNull String provider){
return requestLocation(provider,null);
}
| Try to get current location by specific provider Observable will emit ProviderDisabledException if provider is disabled |
public void valueChanged(ListSelectionEvent e){
if (m_mTab.getRowCount() == 0) return;
int rowTable=vTable.getSelectedRow();
int rowCurrent=m_mTab.getCurrentRow();
log.config("(" + m_mTab.toString() + ") Row in Table="+ rowTable+ ", in Model="+ rowCurrent);
if (rowTable == -1) {
if (rowCurrent >= 0) {
... | List Selection Listener (VTable) - row changed |
public static String jdkName(){
return jdkName;
}
| Gets JDK name. |
public Map<String,Object> processMetadata(SBJob job,Object value,SBOutputPort outputPort,Object outputBinding){
if (outputPort.getOutputBinding() != null) {
outputBinding=outputPort.getOutputBinding();
}
Map<String,Object> metadata=SBFileValueHelper.getMetadata(value);
String inputId=SBBindingHelper.getInhe... | Process metadata inheritance |
public boolean isEnabled(){
return enabled;
}
| Gets the value of the enabled property. |
public SemIm(SemPm semPm,SemIm oldSemIm,Parameters parameters){
if (semPm == null) {
throw new NullPointerException("Sem PM must not be null.");
}
if (params == null) {
throw new NullPointerException();
}
this.params=parameters;
this.semPm=new SemPm(semPm);
this.variableNodes=Collections.unmodifia... | Constructs a new SEM IM from the given SEM PM, using the old SEM IM and params object to guide the choice of parameter values. If old values are retained, they are gotten from the old SEM IM. |
private void showToast(@StringRes int resId){
hideToast();
mToast=Toast.makeText(this,resId,Toast.LENGTH_SHORT);
mToast.show();
}
| Show a toast text message. |
public boolean add(Object targetChild){
if (targetChild == null) throw new IllegalArgumentException();
if (children.containsKey(targetChild)) return false;
synchronized (BeanContext.globalHierarchyLock) {
if (children.containsKey(targetChild)) return false;
if (!validatePendingAdd(targetChild)) {
... | Adds/nests a child within this <tt>BeanContext</tt>. <p> Invoked as a side effect of java.beans.Beans.instantiate(). If the child object is not valid for adding then this method throws an IllegalStateException. </p> |
private int handleZ(String value,DoubleMetaphoneResult result,int index,boolean slavoGermanic){
if (charAt(value,index + 1) == 'H') {
result.append('J');
index+=2;
}
else {
if (contains(value,index + 1,2,"ZO","ZI","ZA") || (slavoGermanic && (index > 0 && charAt(value,index - 1) != 'T'))) {
result... | Handles 'Z' cases |
@Override public ImmutableSet<Entry<K,V>> entrySet(){
return super.entrySet();
}
| Returns an immutable set of the mappings in this map, sorted by the key ordering. |
protected Array(ArrayType type,List<Object> values){
m_values=new ArrayList<String>();
m_type=type;
for ( Object o : values) {
m_values.add(o.toString());
}
}
| Construct an array from the given values. |
private void readObject(){
}
| <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc --> |
public static void reverse(int[] list){
int temp;
for (int i=0, j=list.length - 1; i < list.length / 2; i++, j--) {
temp=list[i];
list[i]=list[j];
list[j]=temp;
}
}
| Method reverse reverses the array passed in the argument |
@Override public final double[] distributionForInstance(Instance instance) throws Exception {
return m_root.distributionForInstance(instance);
}
| Returns class probabilities for an instance. |
public boolean existsIgnoredSections(){
return containsIgnoredSections;
}
| Returns true if sortpom processing instructions exists |
private boolean showIfNoAdvanced(IPreferenceNode node){
if (node.getPage() instanceof PropertyPreferencePage) {
if (!((PropertyPreferencePage)node.getPage()).isAllAdvancedProperties()) {
return true;
}
}
if (ArrayUtils.isNotEmpty(node.getSubNodes())) {
for ( IPreferenceNode subNode : node.get... | Defines if node should be displayed if no advanced is selected. This method is recursive. |
public static void teardown() throws Exception {
client.removeBucket(bucketName);
}
| Tear down test setup. |
public boolean destroyGuacamoleSession(String authToken){
GuacamoleSession session=tokenSessionMap.remove(authToken);
if (session == null) return false;
session.invalidate();
return true;
}
| Invalidates a specific authentication token and its corresponding Guacamole session, effectively logging out the associated user. If the authentication token is not valid, this function has no effect. |
public boolean isOutside(IMovingAgent agent){
Point3d l=agent.getLocation();
return ((l.x < X_MIN) | (l.x >= X_MAX) | (l.y < Y_MIN)| (l.y >= Y_MAX)| (l.z < Z_MIN)| (l.z >= Z_MAX));
}
| Check if the center of the agent is outside the simulation bounds. For every bound on the axis it is checked if it is below the minimum or above or equal the maximum: the maximum value is outside. |
public boolean isToolsSyncTimeSupported(){
return toolsSyncTimeSupported;
}
| Gets the value of the toolsSyncTimeSupported property. |
@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:50.278 -0500",hash_original_method="0C810F8EA313238CAFFD85BD22D89FC5",hash_generated_method="AFD6F572F23AF378CFA4C5B1328320AA") protected GenericObject first(){
myListIterator=this... | This is the default list iterator.This will not handle nested list traversal. |
int encrypt(byte[] in,int inOff,int len,byte[] out,int outOff){
if ((len % blockSize) != 0) {
throw new ProviderException("Internal error in input buffering");
}
for (int i=len; i >= blockSize; i-=blockSize) {
embeddedCipher.encryptBlock(in,inOff,out,outOff);
inOff+=blockSize;
outOff+=blockSize;
... | Performs encryption operation. <p>The input plain text <code>in</code>, starting at <code>inOff</code> and ending at * <code>(inOff + len - 1)</code>, is encrypted. The result is stored in <code>out</code>, starting at <code>outOff</code>. |
static int findBestSampleSize(int actualWidth,int actualHeight,int desiredWidth,int desiredHeight){
double wr=(double)actualWidth / desiredWidth;
double hr=(double)actualHeight / desiredHeight;
double ratio=Math.min(wr,hr);
float n=1.0f;
while ((n * 2) <= ratio) {
n*=2;
}
return (int)n;
}
| Returns the largest power-of-two divisor for use in downscaling a bitmap that will not result in the scaling past the desired dimensions. |
public static String createVariableList(ModuleNode moduleNode){
if (moduleNode == null) {
return "";
}
StringBuffer buffer=new StringBuffer();
OpDeclNode[] variableDecls=moduleNode.getVariableDecls();
for (int i=0; i < variableDecls.length; i++) {
buffer.append(variableDecls[i].getName().toString());
... | Extract the variables from module node |
void update(){
double alpha=System.currentTimeMillis() / 1000.0 * 0.5;
float x=(float)Math.sin(alpha);
float z=(float)Math.cos(alpha);
lightPosition.set(lightDistance * x,3 + (float)Math.sin(alpha),lightDistance * z);
light.setPerspective((float)Math.toRadians(45.0f),1.0f,0.1f,60.0f).lookAt(lightPosition,ligh... | Update the camera MVP matrix. |
public SignatureVisitor visitInterface(){
return this;
}
| Visits the type of an interface implemented by the class. |
synchronized boolean releaseLock(int leaseIdToRelease,RemoteThread remoteThread,boolean decRecursion){
if (leaseIdToRelease == -1) return false;
if (this.destroyed) {
return true;
}
if (!isLeaseHeld(leaseIdToRelease) || !isLeaseHeldByCurrentOrRemoteThread(remoteThread)) {
return false;
}
else if ... | Releases the current lease on this lock token. Synchronizes on this lock token. |
final public MutableString replace(final char c){
return replace(0,Integer.MAX_VALUE,c);
}
| Replaces the content of this mutable string with the given character. |
@Override public String toString(){
return currencyCode;
}
| Returns this currency's ISO 4217 currency code. |
public boolean processIt(String processAction){
m_processMsg=null;
DocumentEngine engine=new DocumentEngine(this,getDocStatus());
return engine.processIt(processAction,getDocAction());
}
| Process document |
public static ObjectAnimator ofFloat(Object target,String propertyName,float... values){
ObjectAnimator anim=new ObjectAnimator(target,propertyName);
anim.setFloatValues(values);
return anim;
}
| Constructs and returns an ObjectAnimator that animates between float values. A single value implies that that value is the one being animated to. Two values imply a starting and ending values. More than two values imply a starting value, values to animate through along the way, and an ending value (these values will be... |
@Override public boolean overrides(){
return overrides;
}
| Returns true if the method overrides/implements a method in a superclass or interface |
private static boolean evalEnumOp(final IRepFilterBean filterBean,final Enum<?> value){
if (value == null) return false;
final Enum<?> fvalue=(Enum<?>)filterBean.getValue();
switch ((Operator)filterBean.getOperator()) {
case EQUAL:
return value == fvalue;
case GREATER_THAN:
return value.ordinal() > fvalue.o... | Evaluates the enum operator. |
public boolean isAscending(){
return ascending;
}
| Are we ordering in ascending order. False is descending. |
public Key max(){
final StringBuilder revEnd=new StringBuilder(get().length() + 1);
revEnd.append(get());
revEnd.append('\u9fa5');
return new Key(revEnd.toString());
}
| Construct a key that is after all keys prefixed by this key. |
public FindServersOnNetworkResponse FindServersOnNetwork(FindServersOnNetworkRequest req) throws ServiceFaultException, ServiceResultException {
return (FindServersOnNetworkResponse)channel.serviceRequest(req);
}
| Synchronous FindServersOnNetwork service request. |
@Override public String toString(){
if (eIsProxy()) return super.toString();
StringBuffer result=new StringBuffer(super.toString());
result.append(" (negated: ");
result.append(negated);
result.append(')');
return result.toString();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static double version(Context cx,Scriptable thisObj,Object[] args,Function funObj){
double result=cx.getLanguageVersion();
if (args.length > 0) {
double d=Context.toNumber(args[0]);
cx.setLanguageVersion((int)d);
}
return result;
}
| Get and set the language version. This method is defined as a JavaScript function. |
@org.vmmagic.pragma.Uninterruptible public int length(){
return count;
}
| Answers the size of this String. |
public DatasourceTransactionInterceptor(){
}
| Create a new TransactionInterceptor. <p>Transaction manager and transaction attributes still need to be set. |
@After public void tearDown(){
test=null;
}
| Removes references to shared objects so they can be garbage collected. |
public DESedeKeySpec(byte[] key,int offset) throws InvalidKeyException {
if (key.length - offset < 24) {
throw new InvalidKeyException("Wrong key size");
}
this.key=new byte[24];
System.arraycopy(key,offset,this.key,0,24);
}
| Creates a DESedeKeySpec object using the first 24 bytes in <code>key</code>, beginning at <code>offset</code> inclusive, as the key material for the DES-EDE key. <p> The bytes that constitute the DES-EDE key are those between <code>key[offset]</code> and <code>key[offset+23]</code> inclusive. |
public static float[] toFloatArray(Integer[] array){
float[] result=new float[array.length];
for (int i=0; i < array.length; i++) {
result[i]=array[i].floatValue();
}
return result;
}
| Coverts given ints array to array of floats. |
private Service blackOutService(final TripSchedule schedule){
if (schedule.headwaySeconds != null) {
warnings.add("We do not currently support retaining existing frequency entries when adjusting timetables.");
return null;
}
Service service=servicesCopy.get(schedule.serviceCode);
EnumSet blackoutDays=En... | Given a TripSchedule with service running on a set of days s, return a new Service object that represents service running on s - f, where f is the set of all days on which this modification's PatternTimetables define a frequency service during which the supplied schedule departs from its first stop. This new Service ob... |
public final void processInteriorEdge(ObjectReference target,Address slot,boolean root){
Address interiorRef=slot.loadAddress();
Offset offset=interiorRef.diff(target.toAddress());
ObjectReference newTarget=traceObject(target,root);
if (VM.VERIFY_ASSERTIONS) {
if (offset.sLT(Offset.zero()) || offset.sGT(Off... | Trace a reference during GC. This involves determining which collection policy applies and calling the appropriate <code>trace</code> method. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:03.737 -0500",hash_original_method="DC4E6AC867A43EED90FFB40A290359DB",hash_generated_method="88543127A25C62BC2023719A31B46817") public AssetFileDescriptor(ParcelFileDescriptor fd,long startOffset,long length){
if (length < 0 && st... | Create a new AssetFileDescriptor from the given values. |
public void addGameListener(GameListener listener){
if (gameListeners == null) {
gameListeners=new Vector<GameListener>();
}
gameListeners.addElement(listener);
}
| Adds the specified game listener to receive board events from this board. |
private void verifyIsRoot(){
if (hierarchyElements.size() != 0) {
throw new IllegalStateException("This is not the root. Can " + "only call addCounter() on the root node. Current node: " + hierarchy);
}
}
| verify that this node is the root |
public int[] Gen_columnIndices(android.database.Cursor cursor){
int[] result=new int[GEN_COUNT];
result[0]=cursor.getColumnIndex(GEN_FIELD__ID);
if (result[0] == -1) {
result[0]=cursor.getColumnIndex("_ID");
}
result[1]=cursor.getColumnIndex(GEN_FIELD_CONNECTION_ID);
result[2]=cursor.getColumnIndex(GEN_... | Return an array that gives the column index in the cursor for each field defined |
public static void xml(String xml){
printer.xml(xml);
}
| Formats the json content and print it |
@Override public void updateAsciiStream(int columnIndex,InputStream x) throws SQLException {
updateAsciiStream(columnIndex,x,-1);
}
| Updates a column in the current or insert row. |
public static String pad(String string,int n,String padding,boolean right){
if (n < 0) {
n=0;
}
if (n < string.length()) {
return string.substring(0,n);
}
else if (n == string.length()) {
return string;
}
char paddingChar;
if (padding == null || padding.length() == 0) {
paddingChar=' ';... | Pad a string. This method is used for the SQL function RPAD and LPAD. |
public static long deepMemoryUsageOfAll(Instrumentation inst,final Collection<? extends java.lang.Object> objs,final int referenceFilter) throws IOException {
long total=0L;
final Set<Integer> counted=new HashSet<Integer>(objs.size() * 4);
for ( final Object o : objs) {
total+=deepMemoryUsageOf0(inst,counted... | Returns an estimation, in bytes, of the memory usage of the given objects plus (recursively) objects referenced via non-static references from any of those objects. Which references are traversed depends on the VisibilityFilter passed in. If two or more of the given objects reference the same Object X, then the memor... |
public LocalDateTime addWrapFieldToCopy(int value){
return iInstant.withLocalMillis(iField.addWrapField(iInstant.getLocalMillis(),value));
}
| Adds to this field, possibly wrapped, in a copy of this LocalDateTime. A field wrapped operation only changes this field. Thus 31st January addWrapField one day goes to the 1st January. <p> The LocalDateTime attached to this property is unchanged by this call. |
@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:20.466 -0500",hash_original_method="912DB48513D0A0D8594B2E782158C138",hash_generated_method="4FAB49D11EF46D7525D217150469DD4C") public SIPClientTransaction createClientTransaction(SI... | Creates a client transaction that encapsulates a MessageChannel. Useful for implementations that want to subclass the standard |
private AFTPClient actionOpen() throws IOException, PageException {
required("server",server);
required("username",username);
required("password",password);
AFTPClient client=getClient();
writeCfftp(client);
return client;
}
| Opens a FTP Connection |
private void showFeedback(String feedback){
if (myHost != null) {
myHost.showFeedback(feedback);
}
else {
System.out.println(feedback);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
private Chunk readChunkHeaderAndFooter(long block){
Chunk header;
try {
header=readChunkHeader(block);
}
catch ( Exception e) {
return null;
}
if (header == null) {
return null;
}
Chunk footer=readChunkFooter((block + header.len) * BLOCK_SIZE);
if (footer == null || footer.id != header.id)... | Read a chunk header and footer, and verify the stored data is consistent. |
public static void writeSingleByte(OutputStream out,int b) throws IOException {
byte[] buffer=new byte[1];
buffer[0]=(byte)(b & 0xff);
out.write(buffer);
}
| Implements OutputStream.write(int) in terms of OutputStream.write(byte[], int, int). OutputStream assumes that you implement OutputStream.write(int) and provides default implementations of the others, but often the opposite is more efficient. |
public void invalidateHeaders(){
mHeaderProvider.invalidate();
}
| Invalidates cached headers. This does not invalidate the recyclerview, you should do that manually after calling this method. |
public void headObject(HeadObjectRequest headObjectRequest) throws OSSException, ClientException {
assertParameterNotNull(headObjectRequest,"headObjectRequest");
String bucketName=headObjectRequest.getBucketName();
String key=headObjectRequest.getKey();
assertParameterNotNull(bucketName,"bucketName");
ensureB... | Check if the object key exists under the specified bucket. |
protected static OptimisationStrategy lessPermissive(OptimisationStrategy left,OptimisationStrategy right){
if (left.ordinal() > right.ordinal()) return left;
return right;
}
| Returns the least aggressive optimization of the two given optimizations |
public static void overScrollBy(final PullToRefreshBase<?> view,final int deltaX,final int scrollX,final int deltaY,final int scrollY,final int scrollRange,final int fuzzyThreshold,final float scaleFactor,final boolean isTouchEvent){
final int deltaValue, currentScrollValue, scrollValue;
switch (view.getPullToRefresh... | Helper method for Overscrolling that encapsulates all of the necessary function. This is the advanced version of the call. |
public PNGPredictor(){
super(PNG);
}
| Creates a new instance of PNGPredictor |
public void update(List<Vec> docs){
update(docs,new FakeExecutor());
}
| Performs an update of the LDA topic distributions based on the given mini-batch of documents. |
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:47.544 -0500",hash_original_method="9D9110C540430F2A7712B1C42CF073E5",hash_generated_method="4ADF8EF58038DBFAB17BE2712E47AC52") public final void sendMessageDelayed(Message msg,long dela... | Enqueue a message to this state machine after a delay. |
public ServerSocketChannel(final Socket socket,final IHttpServerEventListener clientListener){
try {
this.mClientListener=clientListener;
this.mSocket=socket;
this.mInputStream=socket.getInputStream();
this.mOutputStream=socket.getOutputStream();
this.mHttpFrameParser=new HttpFrame();
}
catch (... | Initialize socket connection when the connection is available ( socket parameter wil block until it is opened). |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:35.874 -0500",hash_original_method="6458C2A82CD5BFA5489DF067AE915D84",hash_generated_method="61FDB7FB1F0A162C276160E6FF54B255") public final int matchData(String type,String scheme,Uri data){
final ArrayList<String> types=mDataTyp... | Match this filter against an Intent's data (type, scheme and path). If the filter does not specify any types and does not specify any schemes/paths, the match will only succeed if the intent does not also specify a type or data. <p>Be aware that to match against an authority, you must also specify a base scheme the aut... |
public static void main(final String[] args){
DOMTestCase.doMain(hc_nodeappendchildgetnodename.class,args);
}
| Runs this test from the command line. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.