code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
@Override public IBinder onBind(Intent intent){
if (AccountManager.ACTION_AUTHENTICATOR_INTENT.equals(intent.getAction())) {
return mAuthenticator.getIBinder();
}
if (sLogger.isActivated()) {
sLogger.error("Bound with unknown intent: ".concat(intent.toString()));
}
return null;
}
| When binding to the service, return an interface to Authenticator Service. |
public static void clickView(InstrumentationTestCase test,View v){
int[] xy=new int[2];
v.getLocationOnScreen(xy);
final int viewWidth=v.getWidth();
final int viewHeight=v.getHeight();
final float x=xy[0] + (viewWidth / 2.0f);
float y=xy[1] + (viewHeight / 2.0f);
Instrumentation inst=test.getInstrumentati... | Simulate touching the center of a view and releasing. |
public void useDialogForExpirationDateEntry(Activity activity,boolean useDialog){
mExpirationDateDialog=ExpirationDateDialog.create(activity,this);
mUseExpirationDateDialog=useDialog;
setShowKeyboardOnFocus(!mUseExpirationDateDialog);
setCursorVisible(!mUseExpirationDateDialog);
}
| Used to enable or disable entry of the expiration date using a dialog. Defaults to using the dialog. |
public static void writeDocument(Document document,String encoding,OutputStream out,Writer writer,boolean omitXMLDeclaration) throws IOException, XMLException {
if (writer == null) {
writer=new OutputStreamWriter(out,encoding);
}
transformer.setOutputProperty(OutputKeys.ENCODING,encoding);
transformer.setOu... | Writes the XML representation of a Document object. |
public void doFilter(final ServletRequest request,final ServletResponse response,final FilterChain chain) throws IOException, ServletException {
UrlRewriter urlRewriter=getUrlRewriter(request,response,chain);
final HttpServletRequest hsRequest=(HttpServletRequest)request;
final HttpServletResponse hsResponse=(Htt... | The main method called for each request that this filter is mapped for. |
public static byte[] decodeWebSafe(byte[] source) throws Base64DecoderException {
return decodeWebSafe(source,0,source.length);
}
| Decodes web safe Base64 content in byte array format and returns the decoded data. Web safe encoding uses '-' instead of '+', '_' instead of '/' |
public void clear(){
map.clear();
}
| Removes all of the mappings from this map. The map will be empty after this call returns. <p/> <p>This method is not atomic: the map may not be empty after returning if there were concurrent writes. |
@Override public Object copy(){
PrecomputedKernelMatrixKernel newK=new PrecomputedKernelMatrixKernel();
newK.setKernelMatrix(m_KernelMatrix);
newK.setKernelMatrixFile(m_KernelMatrixFile);
newK.m_Counter=m_Counter;
return newK;
}
| Return a shallow copy of this kernel |
public void replaceBytes(int offset,int len,byte[] bytes){
model.replaceBytes(offset,len,bytes);
}
| Replaces a range of bytes. |
void close(){
trace.debug("log close");
if (pageOut != null) {
pageOut.close();
pageOut=null;
}
writeBuffer=null;
}
| Close without further writing. |
public static void logError(ILog log,Throwable exception,String message){
log(log,IStatus.ERROR,IStatus.OK,message,exception);
}
| Log the specified error. |
private boolean onCheckCanLoadMore(){
return mLoadMoreEnabled && !canChildScrollDown() && mHasFooterView&& mLoadMoreTriggerOffset > 0;
}
| check if it can load more |
public void printWrapped(PrintWriter pw,int width,String text){
printWrapped(pw,width,0,text);
}
| Print the specified text to the specified PrintWriter. |
public RegisterOperand makeTemp(TypeReference type){
return new RegisterOperand(getReg(type),type);
}
| Make a temporary register operand to hold values of the specified type (a new register is allocated). |
public QueueListNode(T payload){
this.payload=payload;
}
| Creates a new queue list node with the given data payload. |
static public Map<URI,List<Initiator>> makeHostInitiatorsMap(Collection<Initiator> initiators){
Map<URI,List<Initiator>> hostInitiatorsMap=new HashMap<URI,List<Initiator>>();
for ( Initiator initiator : initiators) {
URI host=initiator.getHost();
if (NullColumnValueGetter.isNullURI(host)) {
host=Stor... | Returns a map from Host URI to the List<Initiator> list of initiators on that host. We process by host in the outer-most loop so that if ports have to be shared, they are shared across different hosts. |
public void verifyValidity(OCSPResp response,X509Certificate subject,X509Certificate issuer,Date atDate) throws Exception {
log.debug("verifyValidity(subject: {}, issuer: {}, atDate: {})",new Object[]{subject.getSubjectX500Principal().getName(),issuer.getSubjectX500Principal().getName(),atDate});
SingleResp singleR... | Verifies certificate with respect to OCSP response but does not check the status of the OCSP response. |
public void addServiceName(String name){
if (name != null) {
this.serviceNameSet.add(name);
}
}
| Adds a service name to this context. |
public void runTest() throws Throwable {
Document doc;
NodeList elementList;
Element addrNode;
Attr addrAttr;
doc=(Document)load("staffNS",true);
elementList=doc.getElementsByTagName("address");
addrNode=(Element)elementList.item(3);
addrAttr=addrNode.getAttributeNode("xmlns");
{
boolean success=fal... | Runs the test case. |
@Override public void serviceAdded(ServiceEvent event){
mJmdns.requestServiceInfo(event.getType(),event.getName(),1);
}
| Handlers for ServiceListener |
private boolean unclusteredPartial1(int v1,int v2,int v3,int v4){
if (this.scoreTestMode) {
return tetradTest.oneFactorTest(v1,v2,v3,v4);
}
else {
return tetradTest.tetradScore3(v1,v2,v3,v4);
}
}
| ****************************************************** STATISTICAL TESTS |
public void clear(){
count=0;
}
| Remove all entries from the list. |
private void lockScreen(){
if (mScreenOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) setRequestedOrientation(14);
else setRequestedOrientation(getScreenOrientation());
mScreenOrientationLock=getScreenOrientation();
}
showI... | Lock screen rotation |
void addBodyDeclarations(List<? extends Tree> bodyDeclarations,BracesOrNot braces,FirstDeclarationsOrNot first0){
if (bodyDeclarations.isEmpty()) {
if (braces.isYes()) {
builder.space();
tokenBreakTrailingComment("{",plusTwo);
builder.blankLineWanted(BlankLineWanted.NO);
builder.open(ZERO)... | Add a list of declarations. |
public void testCreateStandaloneConfigurationWithDeployables(){
ConfigurationElement configElement=new ConfigurationElement();
configElement.setType(ConfigurationType.STANDALONE.getType());
configElement.setHome("somewhere");
DeployableElement warElement=new DeployableElement();
warElement.setType(DeployableT... | Test the creation of a standalone configuration with some deployables. |
public static void printDeck(Card[] cards){
for (int i=0; i < cards.length; i++) {
System.out.println(cards[i]);
}
}
| Displays the given deck of cards. |
public CertificateParsingException(String message){
super(message);
}
| Constructs a CertificateParsingException with the specified detail message. A detail message is a String that describes this particular exception. |
final public void disable_tracing(){
}
| Disable tracing. |
public void update(){
for (int i=0, n=networkListeners.size(); i < n; i++) {
networkListeners.get(i).setUpdateComplete(false);
}
for (int i=0, n=updateManager.getActionList().size(); i < n; i++) {
updateManager.getActionList().get(i).invoke();
}
if (fireUpdates) {
fireSynapsesUpdated(synapseList);... | The core update function of the neural network. Calls the current update function on each neuron, decays all the neurons, and checks their bounds. |
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:32:40.317 -0500",hash_original_method="DC0208EAD79A0BCADD603C831599A0E0",hash_generated_method="DC0208EAD79A0BCADD603C831599A0E0") void updateCachedTextfield(){
mWebView... | Update the cache to reflect the current text. |
public final static boolean isHexDigit(char c){
return (c >= '0' && c <= '9') || ((c >= 'a') && (c <= 'f')) || ((c >= 'A') && (c <= 'F'));
}
| Indicates whether the given character is the hexadecimal digit. |
private boolean resourceIsProject(IResource resource){
if (resource == null) {
return false;
}
IProject proj=resource.getProject();
boolean out=(proj == resource);
return out;
}
| Is this resource a project? |
public int compareTo(Entry that){
if (that == null) {
String msg=Logging.getMessage("nullValue.EntryIsNull");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
return this.lastUsed < that.lastUsed ? -1 : this.lastUsed == that.lastUsed ? 0 : 1;
}
| Compares this texture atlas entry's last used timestamp to that of the specified entry. This returns -1 if this entry's last used time is earlier than the specified entry's, 0 if the two entries have the same last used time, and 1 if this entry's last used time is later than the specified entry's. |
public void init(){
LOG.d(TAG,"init()");
this.onPause(false);
this.onDestroy();
pluginMap.clear();
this.startupPlugins();
}
| Init when loading a new HTML page into webview. |
private LayoutManager createLayout(){
return new TitlePaneLayout();
}
| Returns the <code>LayoutManager</code> that should be installed on the <code>MetalTitlePane</code>. |
public static void samCat(boolean inputIsGzipped,OutputStream destination,boolean deleteIntermediate,File... inputFiles) throws IOException {
final byte[] buff=new byte[FileUtils.BUFFERED_STREAM_SIZE];
final OneShotTimer timer=new OneShotTimer("samCat");
for (int i=0; i < inputFiles.length; i++) {
final long ... | Cats multiple gzipped SAM files together |
public VoltageScorer(Hypergraph<V,E> g,Function<? super E,? extends Number> edge_weights,Collection<V> sources,Collection<V> sinks){
super(g,edge_weights);
Map<V,Double> unit_voltages=new HashMap<V,Double>();
for ( V v : sources) unit_voltages.put(v,new Double(1.0));
this.source_voltages=unit_voltages;
thi... | Creates an instance with the specified graph, edge weights, source vertices (each of whose 'voltages' are tied to 1), and sinks. |
public Entry createEntry(){
EntryImpl entry=new EntryImpl();
return entry;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public TopicConnectionFactory lookupTopicConnectionFactory(String name) throws JMSException, NamingException {
return lookupTopicConnectionFactoryFromJNDI(name == null ? Config.parms.getString("cf") : name);
}
| <b>JMS 1.0.2</b> Calls the JNDI-specific version of this method. This method is expected to be overidden by vendor-specific subclasses. |
protected boolean checkExpiration(Token tokenObj,boolean updateLastAccess){
if (!tokenObj.getInactive()) {
long timeNow=getCurrentTimeInMins();
long timeLastAccess=tokenObj.getLastAccessTime();
long timeIdleTimeExpiry=timeLastAccess + (_maxLifeValuesHolder.getMaxTokenIdleTimeInMins()) + (_maxLifeValuesHol... | Check to see if the token passed in is still usable, if not, delete it from db and return false if still usable, update the lastAccessTime |
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
if (xmlWriter.getPrefix(namespace) == null) {
xmlWriter.writeNamespace(prefix,namespace);
x... | Util method to write an attribute with the ns prefix |
public boolean isEmployee(){
Object oo=get_Value(COLUMNNAME_IsEmployee);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Employee. |
public void addMacro(String name,String value) throws LexerException {
cpp.addMacro(name,value);
}
| Defines the given name as a macro. This is a convnience method. |
public BigDecimal readF2Dot14(int index){
throw new UnsupportedOperationException();
}
| Reads the F2DOT14 at the given index. |
public void updateMarcaBloqueo(String udocID,int marca){
StringBuffer qual=new StringBuffer(DBUtils.WHERE).append(DBUtils.generateEQTokenField(ID_FIELD,udocID));
Map colToUpdate=Collections.singletonMap(MARCAS_BLOQUEO_FIELD,String.valueOf(marca));
updateFields(qual.toString(),colToUpdate,TABLE_NAME);
}
| Permite establecer la marca de bloqueo de una unidad documental |
private void sanityCheckAssertNumerics(){
assertNumerics("Null?",null,null);
assertNumerics("large a",new Double(2.3005390038169265E9),new Double(2.300539003816927E9));
assertNumerics("large b",new Double(1.2722582464444444E9),new Double(1.2722582464444442E9));
assertNumerics("small",new Double(2.30053900381692... | test the test |
public void updateLong(int columnIndex,long x) throws SQLException {
checkUpdatable();
getField(columnIndex).setLong(x);
}
| Updates the designated column with a <code>long</code> value. The <code>updateXXX</code> methods are used to update column values in the current row or the insert row. The <code>updateXXX</code> methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are call... |
public void clearValores(){
valores.clear();
}
| Elimina todos las valores de la lista. |
protected void processFile(String fileName,String systemId) throws ValidationException, ParserConfigurationException, SAXException, IOException, SchedulerException, ClassNotFoundException, ParseException, XPathException {
prepForProcessing();
log.info("Parsing XML file: " + fileName + " with systemId: "+ systemId);... | Process the xmlfile named <code>fileName</code> with the given system ID. |
public PackagingUnit(LoadUnit lu,UnitType qty){
Assert.notNull(lu);
Assert.notNull(qty);
assignInitialValues(lu);
this.quantity=qty;
this.product=lu.getProduct();
}
| Create a new PackagingUnit. |
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:42.923 -0500",hash_original_method="4D1AAFD088944D073F1D6AEA9907E5AD",hash_generated_method="7B46C8F09C7254045F5048910CD6EB03") static IndexOutOfBoundsException throwIn... | This method was extracted to encourage VM to inline callers. TODO: when we have a VM that can actually inline, move the test in here too! |
public Task uploadAndAttachIso(String vmId,String inputFileName) throws IOException {
String path=String.format("%s/%s/attach_iso",getBasePath(),vmId);
HttpResponse response=this.restClient.upload(path,inputFileName,ImmutableMap.<String,String>of());
this.restClient.checkResponse(response,HttpStatus.SC_CREATED);
... | Uploads the iso pointed to by the inputFileName and attaches it to specified vm. |
private void updateProgress(String progressLabel,int progress){
if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) {
myHost.updateProgress(progressLabel,progress);
}
previousProgress=progress;
previousProgressLabel=progressLabel;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public UploadObject(int id){
this.id=id;
}
| This method was generated by MyBatis Generator. This method corresponds to the database table upload |
@Override protected EClass eStaticClass(){
return UmplePackage.eINSTANCE.getAnonymous_derivedAttribute_2_();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private void updateProperties(String svcId) throws Exception {
PropertyInfoExt diffProperties=new PropertyInfoExt(targetPropInfo.getDiffProperties(localTargetPropInfo));
PropertyInfoExt override_properties=new PropertyInfoExt(localRepository.getOverrideProperties().getAllProperties());
log.info("Step3a: Updating ... | Update properties |
private long retrieveRowCount(Database conn,Table table,long fromPk,long tillPk) throws SQLException {
long count=-1;
String countOn="*";
String where="";
Key pk=table.getPrimaryKey();
if (pk != null) {
if (pk.getColumns().size() == 1) {
String pkName=pk.getColumns().get(0).getName();
countOn=... | Retrieve count of rows of a particular table. If fromPk and tillPk are defined, then rows are counted in-between those PK values. |
public void insert(final AbstractInsnNode location,final InsnList insns){
if (insns.size == 0) {
return;
}
size+=insns.size;
AbstractInsnNode ifirst=insns.first;
AbstractInsnNode ilast=insns.last;
AbstractInsnNode next=location.next;
if (next == null) {
last=ilast;
}
else {
next.prev=ilast;... | Inserts the given instructions after the specified instruction. |
public static void encodeFileToFile(String infile,String outfile){
String encoded=Base64.encodeFromFile(infile);
java.io.OutputStream out=null;
try {
out=new java.io.BufferedOutputStream(new java.io.FileOutputStream(outfile));
out.write(encoded.getBytes("US-ASCII"));
}
catch ( java.io.IOException ex) ... | Reads <tt>infile</tt> and encodes it to <tt>outfile</tt>. |
public static MemberExistsResult fieldExists(String fieldName,JavacNode node){
node=upToTypeNode(node);
if (node != null && node.get() instanceof JCClassDecl) {
for ( JCTree def : ((JCClassDecl)node.get()).defs) {
if (def instanceof JCVariableDecl) {
if (((JCVariableDecl)def).name.contentEquals... | Checks if there is a field with the provided name. |
public ResponseHeaders combine(ResponseHeaders network) throws IOException {
RawHeaders result=new RawHeaders();
result.setStatusLine(headers.getStatusLine());
for (int i=0; i < headers.length(); i++) {
String fieldName=headers.getFieldName(i);
String value=headers.getValue(i);
if ("Warning".equals(fi... | Combines this cached header with a network header as defined by RFC 2616, 13.5.3. |
public String createRandomFile(String location){
Random randomGenerator=new Random();
SimpleDateFormat dateFormat=new SimpleDateFormat("yyyyMMddHHmmssS");
Date date=new Date();
final String filePath=location + dateFormat.format(date) + randomGenerator.nextInt(10);
Log.i(TAG,">>>>>>>>>>>>>>>>createRandomFile ... | This method creates a Directory and filename |
public void bootstrapNetwork(Network network){
Vertex classification=network.createVertex(Primitive.CLASSIFICATION);
Vertex relation=network.createVertex(Primitive.RELATIONSHIP);
Vertex compoundRelation=network.createVertex(Primitive.COMPOUND_RELATIONSHIP);
Vertex concept=network.createVertex(Primitive.CONCEPT)... | Defines a generic network for classifying things. |
void computeScroll(){
if (!overScroller.computeScrollOffset()) {
isScrollingFast=false;
return;
}
int distanceX=overScroller.getCurrX() - view.getScrollX();
int distanceY=overScroller.getCurrY() - view.getScrollY();
int dX=(int)calculateDx(distanceX);
int dY=(int)calculateDy(distanceY);
boolean st... | Computes the current scroll using a OverScroller instance and the time lapsed from the previous call. Also controls if the view is performing a fast scroll after a fling gesture. |
public SVGWriter(){
}
| Creates a new SVGWriter with default settings |
private void throwSingleValuedException() throws IOException {
throw new IOException("Single-value attribute " + oid + " ("+ getName()+ ")"+ " has multiple values.");
}
| Throw an exception when there are multiple values for a single-valued attribute. |
@Override public boolean eIsSet(int featureID){
switch (featureID) {
case GamlPackage.FUNCTION__ACTION:
return action != null;
case GamlPackage.FUNCTION__PARAMETERS:
return parameters != null;
case GamlPackage.FUNCTION__ARGS:
return args != null;
case GamlPackage.FUNCTION__TYPE:
return type != null;
}
return supe... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public Car(org.jdom2.Element e){
super(e);
loaded=true;
org.jdom2.Attribute a;
if ((a=e.getAttribute(Xml.PASSENGER)) != null) {
_passenger=a.getValue().equals(Xml.TRUE);
}
if ((a=e.getAttribute(Xml.HAZARDOUS)) != null) {
_hazardous=a.getValue().equals(Xml.TRUE);
}
if ((a=e.getAttribute(Xml.CABOO... | Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-cars.dtd |
public void cross(){
cross(ANIMATION_DURATION_MS);
}
| Transition to "X" |
public LoginDialog(final Frame owner,final StendhalClient client){
super(owner,true);
this.client=client;
initializeComponent();
WindowUtils.closeOnEscape(this);
}
| Create a new LoginDialog. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:45.754 -0500",hash_original_method="1C9916E491D93B6DAF758D3D738C6EEB",hash_generated_method="15A1411ACDA23E1A918918FF0CDDBE57") public boolean isStreaming(){
return false;
}
| Tells that this entity is not streaming. |
@Override protected void copyRow(final Key key,final Value value,final Context context) throws IOException, InterruptedException {
compositeKey.setGroup(childTableName);
compositeKey.setKey(key);
compositeVal.setKey(key);
compositeVal.setValue(value);
context.write(compositeKey,compositeVal);
}
| Copy a row directly -- just pass it through to the map output. |
public static boolean hasTranslucentNavigationBar(Context context){
@SuppressLint("InlinedApi") @SuppressWarnings("UnnecessaryFullyQualifiedName") Boolean translucentNav=ThemeUtil.getBooleanValue(context,android.R.attr.windowTranslucentNavigation);
return translucentNav != null && translucentNav;
}
| Checks whether the current theme declares the navigation bar to be translucent. This does not check whether a navigation bar is even displayed on the screen. |
protected boolean isSignificantlyBetter(double newUtility,double utility){
return false;
}
| Primitive operation which is used to stop iterative deepening search in situations where a clear best action exists. This implementation returns always false. |
public void init(){
setInit(true);
}
| Initialize the TurbineWeather Service. |
public static String normalizeMimeType(String type){
if (type == null) {
return null;
}
type=type.trim().toLowerCase(Locale.US);
final int semicolonIndex=type.indexOf(';');
if (semicolonIndex != -1) {
type=type.substring(0,semicolonIndex);
}
return type;
}
| Normalize a MIME data type. <p>A normalized MIME type has white-space trimmed, content-type parameters removed, and is lower-case. This aligns the type with Android best practices for intent filtering. <p>For example, "text/plain; charset=utf-8" becomes "text/plain". "text/x-vCard" becomes "text/x-vcard". <p>All MIME t... |
public void initialize(Map conf,TopologyContext context){
}
| Initialize members. |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-18 21:46:52.617 -0400",hash_original_method="EEAFA1105ED04DD7E614744D210BB1BA",hash_generated_method="B81DD5AB449E12F988064BBF1FA0C514") @Override public CharSequence convertToString(Cursor cursor){
if (cursor == n... | Gets the text to show in the query field when a suggestion is selected. |
public void addFloat(int o,float x,double d){
if (force_defaults || x != d) {
addFloat(x);
slot(o);
}
}
| Add a `float` to a table at `o` into its vtable, with value `x` and default `d`. |
protected boolean updateReplacementString(Document document,char trigger,int offset,ImportRewrite impRewrite) throws CoreException, BadLocationException {
if (impRewrite != null && fFullyQualifiedTypeName != null) {
String replacementString=getReplacementString();
String qualifiedType=fFullyQualifiedTypeName;... | Updates the replacement string. |
@Override public void prepare(String changedSelector){
AgentAppFrame.SelectionState selState=frame.getSelection();
NQueensBoard board=null;
switch (selState.getIndex(NQueensFrame.ENV_SEL)) {
case 0:
board=new NQueensBoard(4);
break;
case 1:
board=new NQueensBoard(8);
break;
case 2:
board=new NQueensBoard(16);... | Creates an n-queens environment and clears the current search agent. |
public final int yylength(){
return zzMarkedPos - zzStartRead;
}
| Returns the length of the matched text region. |
public static String joinOnPipe(Map<String,String> toJoin){
return joinOnDelimiter(toJoin,PIPE);
}
| Convert properties to a string representation. |
public boolean printDialog() throws HeadlessException {
if (GraphicsEnvironment.isHeadless()) {
throw new HeadlessException();
}
if (attributes == null) {
attributes=new HashPrintRequestAttributeSet();
}
attributes.add(new Copies(getCopies()));
attributes.add(new JobName(getJobName(),null));
boole... | Presents the user a dialog for changing properties of the print job interactively. |
public static ByteArrayOutputStream encode(String plaintext) throws IOException, MessagingException {
ByteArrayOutputStream out=new ByteArrayOutputStream();
byte[] in=plaintext.getBytes();
ByteArrayOutputStream inStream=new ByteArrayOutputStream();
inStream.write(in,0,in.length);
if ((in.length % 3) == 1) {
... | Encode String to base64 |
private void savePanelState(SparseArray<Parcelable> icicles){
PanelFeatureState[] panels=mPanels;
if (panels == null) {
return;
}
for (int curFeatureId=panels.length - 1; curFeatureId >= 0; curFeatureId--) {
if (panels[curFeatureId] != null) {
icicles.put(curFeatureId,panels[curFeatureId].onSaveIn... | Invoked when the panels should freeze their state. |
@Override public void restoreEntity(BackupDataInputStream data){
if (!restoreSuccessful) {
return;
}
int dataSize=data.size();
if (mBuffer.length < dataSize) {
mBuffer=new byte[dataSize];
}
try {
int bytesRead=data.read(mBuffer,0,dataSize);
if (DEBUG) Log.d(TAG,"read " + bytesRead + " of... | Restore launcher configuration from the restored data stream. It assumes that the keys will arrive in lexical order. So if the journal was present in the backup, it should arrive first. |
public static void availableStoragePortsJson(String id){
List<StoragePortInfo> items=Lists.newArrayList();
CachedResources<StorageSystemRestRep> storageSystems=StorageSystemUtils.createCache();
Map<URI,String> networks=NetworkUtils.getNetworkNames();
List<StoragePortRestRep> storagePorts=StoragePortUtils.getSto... | Renders the list of storage ports that are available to be assigned to the given virtual array. |
public static boolean await(Condition cond,long time,TimeUnit unit) throws IgniteInterruptedCheckedException {
try {
return cond.await(time,unit);
}
catch ( InterruptedException e) {
Thread.currentThread().interrupt();
throw new IgniteInterruptedCheckedException(e);
}
}
| Awaits for condition. |
public static void main(String[] args){
TestRelativeLinks tester=new TestRelativeLinks();
run(tester,ARGS,TEST,NEGATED_TEST);
tester.printSummary();
}
| The entry point of the test. |
public void fillWithColor(View view,FakerColorComponent component){
validateNotNullableView(view);
validateNotNullableFakerComponent(component);
view.setBackgroundColor(component.randomColor());
}
| Fill view with a random color |
private void runTasks(){
ClassLoader systemClassLoader=ClassLoader.getSystemClassLoader();
ThreadPoolBase pool=_pool;
Thread thread=this;
Outbox outbox=outbox();
boolean isWake=false;
setName(_name);
while (!_isClose) {
RunnableItem taskItem=pool.poll(isWake);
isWake=false;
if (taskItem != nul... | Main thread loop. |
private static Element appendTextElement(Node parent,String namespaceURI,String localName,String text){
Element child=appendElement(parent,namespaceURI,localName);
child.addChild(Element.TEXT,text);
return child;
}
| Adds an element to the given parent, with the specified text as the element value |
@Override public void pool(){
this.allowLearning=null;
}
| Reset state when instance is pooled. |
public void insertUserDisplayenInTextEditor(String text){
if (null != text) {
if (TextUtils.isEmpty(mEditText.getText())) {
mEditText.append(sanitizeDisplayname(text) + ": ");
}
else {
mEditText.getText().insert(mEditText.getSelectionStart(),sanitizeDisplayname(text) + " ");
}
}
}
| Insert a text in the message editor. |
public static void main(String[] args){
runFilter(new ClassBalancer(),args);
}
| runs the filter with the given arguments |
public JEditorCurrency(){
}
| Creates a new instance of JEditorCurrency |
public Wallet(NetworkParameters params,KeyCrypter keyCrypter){
this(params);
this.keyCrypter=checkNotNull(keyCrypter);
MultiBitWalletExtension multibitWalletExtension=new MultiBitWalletExtension();
extensions.put(multibitWalletExtension.getWalletExtensionID(),multibitWalletExtension);
setVersion(MultiBitWalle... | Create a wallet with a keyCrypter to use in encrypting and decrypting keys. |
public void sample(Integer iteration){
sampled=iteration;
}
| Set this element as sampled in <tt>iteration</tt>. |
void shutdown(){
if (shutdownHandler != null) {
shutdownHandler.shutdown();
}
}
| Shut down this server. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.