code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static boolean isValid(){
return getInstance().isValid();
}
| Returns true, if the global configuration is valid and can be used for security-critical tasks. Configuration is considered to be valid if all the files of all the instances are up-to-date (not expired). |
public void plus(){
plus(ANIMATION_DURATION_MS);
}
| Transition to "+" |
public static void evaluateGateONOFFRatio(Gate g){
double lowest_on_rpu=Double.MAX_VALUE;
double highest_off_rpu=Double.MIN_VALUE;
for (int i=0; i < g.get_logics().size(); ++i) {
Double rpu=g.get_outrpus().get(i);
if (g.get_logics().get(i) == 1) {
if (lowest_on_rpu > rpu) {
lowest_on_rpu=rpu... | find ON_lowest and OFF_highest as worst-case scenario |
public String globalInfo(){
return "This is ARAM.";
}
| Returns a string describing this classifier |
public static boolean isExpressionStatement(JCExpression tree){
switch (tree.getTag()) {
case PREINC:
case PREDEC:
case POSTINC:
case POSTDEC:
case ASSIGN:
case BITOR_ASG:
case BITXOR_ASG:
case BITAND_ASG:
case SL_ASG:
case SR_ASG:
case USR_ASG:
case PLUS_ASG:
case MINUS_ASG:
case MUL_ASG:
case DIV_ASG:
case MOD_ASG:
c... | Return true if the tree corresponds to an expression statement |
public static Motion createLinearMotion(int sourceValue,int destinationValue,int duration){
Motion l=new Motion(sourceValue,destinationValue,duration);
l.motionType=LINEAR;
return l;
}
| Creates a linear motion starting from source value all the way to destination value |
public void print(NumberFormat format,int width){
print(new PrintWriter(System.out,true),format,width);
}
| Print the matrix to stdout. Line the elements up in columns. Use the format object, and right justify within columns of width characters. Note that is the matrix is to be read back in, you probably will want to use a NumberFormat that is set to US Locale. |
boolean isHandshakeFinished(){
return handshakeFinished;
}
| Checks if SSL handshake is finished. |
@SuppressWarnings("unchecked") ReservoirItemsSketch<T> copy(){
final T[] dataCopy=Arrays.copyOf((T[])data_,currItemsAlloc_);
return new ReservoirItemsSketch<>(reservoirSize_,encodedResSize_,currItemsAlloc_,itemsSeen_,rf_,dataCopy);
}
| Used during union operations to ensure we do not overwrite an existing reservoir. Creates a <en>shallow</en> copy of the reservoir. |
public boolean queryDRSMigrationCapabilityForPerformance(String srcUniqueId,String dstUniqueId,String entityType) throws InvalidArgument, NotFound, InvalidSession, StorageFault {
final String methodName="queryDRSMigrationCapabilityForPerformance(): ";
log.info(methodName + "Entry with srcUniqueId[" + srcUniqueId+ "... | Returns true if DRS migration capability is supported; false otherwise |
public static void startGooglePlayServicesRefresh(Context context){
try {
context.startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("http://play.google.com/store/apps/details?id=com.google.android.gms")));
}
catch ( Exception e) {
e.printStackTrace();
}
}
| Starts Google Play Services in Play application. |
public String toString(){
return Long.toString(getValue());
}
| Obtains the string representation of this object. |
@Override public SparseEdge createEdge(){
return new SparseEdge();
}
| Creates and returns an orphaned SparseEdge. |
public static Goal fromString(String text){
if (text != null) {
for ( final Goal goal : Goal.values()) {
if (text.equalsIgnoreCase(goal.goal)) {
return goal;
}
}
}
return null;
}
| From string. |
@Override public void translate(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment,instruction,instructions,"UMAAL");
translateAll(environment,instruction,"U... | UMAAL{<cond>} <RdLo>, <RdHi>, <Rm>, <Rs> Operation: if ConditionPassed(cond) then result = Rm * Rs + RdLo + RdHi // Unsigned multiplication and additions RdLo = result[31:0] RdHi = result[63:32] |
public void remove(String btxn){
synchronized (processors) {
processors.remove(btxn);
}
}
| This method removes the business transaction configuration. |
public void testSoftSignInFailSilently() throws Exception {
final HttpURLConnection logInConn=mock(HttpURLConnection.class);
setupResponseCodeAndOutputStream(logInConn);
MockWebCloudClient cloud=createWebCloudClient(logInConn);
WebCloudNetworkClient networkClient=mock(WebCloudNetworkClient.class);
cloud.setNe... | soft sign-in should try to sign in with an existing session ID, then fail silently |
private boolean isWatched(int index){
return hasWatches() ? watch[index] : false;
}
| Is the given word being watched ? |
static public void forceCreationOfNewIndex(){
forceCreationOfNewIndex(false);
}
| Force creation of a new user index without incrementing version |
public String readAll(){
if (!scanner.hasNextLine()) return "";
String result=scanner.useDelimiter(EVERYTHING_PATTERN).next();
scanner.useDelimiter(WHITESPACE_PATTERN);
return result;
}
| Read and return the remainder of the input as a string. |
public synchronized int read() throws IOException {
int n=read(temp,0,1);
if (n != 1) return -1;
return temp[0] & 0xFF;
}
| Read a byte from the connection. |
public ObjectFactory(){
}
| Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: sernet.verinice.model.auth |
@Override public void IFNULL(String className,String methName,int branchIndex,Object p){
env.topFrame().operandStack.pushNullRef();
IF_ACMPEQ(className,methName,branchIndex,p,null);
}
| http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2. doc6.html#ifnull |
public boolean isSynchronous(){
return mode == DispatchMode.SYNCHRONOUS;
}
| Convenience method to check if the tracker is in synchronous mode. |
public boolean verify(PublicKey pubKey,String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException {
Signature sig;
try {
if (provider == null) {
sig=Signature.getInstance(getSignatureName(sigAlgId));
}
else {
sig=Signature.getInstance(getS... | verify the request using the passed in public key and the provider.. |
@SuppressWarnings("rawtypes") public List<Vertex> findAllQuery(String query,Map parameters,int pageSize,int page){
return new ArrayList<Vertex>();
}
| Return all vertices matching the query. Currently unable to process in memory. |
public SQLiteTableBuilder(SQLiteDatabase database,String tableName){
if (database == null) {
throw new IllegalArgumentException("Database cannot be null.");
}
else if (TextUtils.isEmpty(tableName)) {
throw new IllegalArgumentException("Table name cannot be empty.");
}
else if (!tableName.matches(REG... | Creates a new instance for creating a table with the given name in the specified database. |
@Override protected void translateCore(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions){
final IOperandTreeNode registerOperand1=instruction.getOperands().get(0).getRootNode().getChildren().get(0);
final IOperandTreeNode registerOperand2=instruction.... | BFI{<c>}{<q><Rd>, <Rn>, #<lsb>, #<width> <lsb>+<width>-1 = msbit if ConditionPassed() then EncodingSpecificOperations(); if msbit >= lsbit then R[d]<msbit:lsbit> = R[n]<(msbit-lsbit):0>; // Other bits of R[d] are unchanged else UNPREDICTABLE; |
public static boolean isFunctionalType(TypeSymbol type){
String name=type.getQualifiedName().toString();
return name.startsWith("java.util.function.") || name.equals(Runnable.class.getName()) || (type.isInterface() && (hasAnnotationType(type,FunctionalInterface.class.getName()) || hasAnonymousFunction(type)));
}
| Returns true if the given type symbol corresponds to a functional type (in the TypeScript way). |
public static boolean mkdir(String dir){
if (!exists(dir)) {
return (new File(dir)).mkdirs();
}
else {
return isDirectory(dir);
}
}
| Create a directory, if it does not exist. |
private JMenuItem addDemoToMenu(JMenu menu,Class<?> demoClass){
JMenuItem item=new JMenuItem(demoClass.getSimpleName());
JMenu subMenu=null;
String packageName=demoClass.getPackage().getName();
Component[] menuComps=menu.getMenuComponents();
int i;
for (i=0; i < menuComps.length; i++) {
JMenu comp=(JMen... | Adds a new demo (agent application or console application) to the specified menu. |
protected void checkRowExists(String sql) throws Exception {
Statement s=this.conn.createStatement();
ResultSet rs=s.executeQuery(sql);
assertTrue("Row should exist",rs.next());
rs.close();
s.close();
}
| Run the given query and assert that the result contains at least one row. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:58:38.153 -0500",hash_original_method="C51C4513003EDC9EA86A76A3037140C3",hash_generated_method="5B515AB13D4AEF801140CC12D011B3CB") public void reset(){
adnLikeFiles.clear();
mUsimPhoneBookManager.reset();
clearWaiters();
clearU... | Called from SIMRecords.onRadioNotAvailable and SIMRecords.handleSimRefresh. |
public String toString(){
return this.getClass().getName() + "(" + alpha+ ","+ lambda+ ")";
}
| Returns a String representation of the receiver. |
private boolean _check_arguments(InstalledApp app,String request_source,String action){
if (app == null || request_source == null || action == null) {
Log.v(MainActivity.TAG,"WebService was invoked with no targetApp and/or source argument!");
return false;
}
if (!action.equals(ACTION_DOWNLOAD_APK) && !act... | Checks whether the intent arguments are valid and whether the version check should proceed. |
public void deleteAll(){
synchronized (this) {
try {
RefCounted<SolrIndexSearcher> holder=uhandler.core.openNewSearcher(true,true);
holder.decref();
}
catch ( Exception e) {
SolrException.log(log,"Error opening realtime searcher for deleteByQuery",e);
}
if (map != null) map.cle... | currently for testing only |
@Override protected boolean isSupportedOperation(Operation operation){
String operationSupportedVer=operation.getSupportedVersion();
if (_keyMap.containsKey(Constants.VERSION) && null != operationSupportedVer) {
String versionFromKeyMap=(String)_keyMap.get(Constants.VERSION);
String[] versionFromContextFile... | Returns true if the supportedVersion option is specified in Operation bean false in other cases. |
public static ConstantNode forChar(char i,StructuredGraph graph){
return unique(graph,createPrimitive(JavaConstant.forInt(i)));
}
| Returns a node for a char constant. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:30.564 -0500",hash_original_method="EB10FD63A8403F00F4E59BED9E510DF9",hash_generated_method="2C4F8F4C8B306CD83B3F5D269A2D4EFC") private static int secondaryHash(int h){
h^=... | Applies a supplemental hash function to a given hashCode, which defends against poor quality hash functions. This is critical because HashMap uses power-of-two length hash tables, that otherwise encounter collisions for hashCodes that do not differ in lower or upper bits. |
private final UpdateReturnState enhancedHashInsert(long[] hashTable,long hash){
int arrayMask=(1 << lgArrLongs_) - 1;
int stride=(2 * (int)((hash >> lgArrLongs_) & STRIDE_MASK)) + 1;
int curProbe=(int)(hash & arrayMask);
long curTableHash=hashTable[curProbe];
while ((curTableHash != hash) && (curTableHash != ... | Enhanced Knuth-style Open Addressing, Double Hash insert. The insertion process will overwrite an already existing, dirty (over-theta) value if one is found in the search. If an empty cell is found first, it will be inserted normally. |
public ArgumentParser(final String[] args,final boolean enableShortOptions){
this.args=new ArrayList<String>();
this.enableShortOptions=enableShortOptions;
parse(args);
}
| Constructs a new <code>ArgumentParser</code> with the specified behaviour regarding shortOptions. |
public String returnVolumeHLU(URI volumeURI){
String hlu=ExportGroup.LUN_UNASSIGNED_DECIMAL_STR;
if (_volumes != null) {
String temp=_volumes.get(volumeURI.toString());
hlu=(temp != null) ? temp : ExportGroup.LUN_UNASSIGNED_DECIMAL_STR;
}
return hlu;
}
| Returns the HLU for the specified Volume/BlockObject |
public NoSuchMethodException(String s){
super(s);
}
| Constructs a <code>NoSuchMethodException</code> with a detail message. |
@Override public final boolean isDirty(){
return dirty;
}
| Returns true if this page is dirty, false otherwise. |
public static boolean isEncryptedFilesystemEnabled(){
return SystemProperties.getBoolean(SYSTEM_PROPERTY_EFS_ENABLED,false);
}
| Returns whether the Encrypted File System feature is enabled on the device or not. |
public static synchronized void loadLibrary(String shortName) throws UnsatisfiedLinkError {
if (sSoSources == null) {
if ("http://www.android.com/".equals(System.getProperty("java.vendor.url"))) {
assertInitialized();
}
else {
System.loadLibrary(shortName);
return;
}
}
try {
loa... | Load a shared library, initializing any JNI binding it contains. |
public void testBug12970() throws Exception {
if (versionMeetsMinimum(5,0,8)) {
String tableName="testBug12970";
createTable(tableName,"(binary_field BINARY(32), varbinary_field VARBINARY(64))");
try {
this.rs=this.conn.getMetaData().getColumns(this.conn.getCatalog(),null,tableName,"%");
asser... | Tests fix for BUG#12970 - java.sql.Types.OTHER returned for binary and varbinary columns. |
public MBeanAttributeInfo(String name,String type,String description,boolean isReadable,boolean isWritable,boolean isIs){
this(name,type,description,isReadable,isWritable,isIs,(Descriptor)null);
}
| Constructs an <CODE>MBeanAttributeInfo</CODE> object. |
public void addAll(List<Fragment> aSplits){
splits.addAll(aSplits);
}
| Adds a list of split elements. |
public static final byte[] inflateBestEffort(byte[] in,int sizeLimit){
ByteArrayOutputStream outStream=new ByteArrayOutputStream(EXPECTED_COMPRESSION_RATIO * in.length);
Inflater inflater=new Inflater(true);
InflaterInputStream inStream=new InflaterInputStream(new ByteArrayInputStream(in),inflater);
byte[] buf=... | Returns an inflated copy of the input array, truncated to <code>sizeLimit</code> bytes, if necessary. If the deflated input has been truncated or corrupted, a best-effort attempt is made to inflate as much as possible. If no data can be extracted <code>null</code> is returned. |
public static void toggleHideyBar(View decorView){
int uiOptions=decorView.getSystemUiVisibility();
int newUiOptions=uiOptions;
boolean isImmersiveModeEnabled=((uiOptions | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) == uiOptions);
if (isImmersiveModeEnabled) {
}
else {
}
if (Build.VERSION.SDK_INT >= 14) {
... | Detects and toggles immersive mode (also known as "hidey bar" mode). |
public <P,Q>String testSuperSuperMethod(int x1,int x2){
return null;
}
| Test 23 passes. |
public static void assertEqualsAndHash(Object one,Object two){
assertEquals(one,two);
assertEquals(two,one);
assertEquals(one.hashCode(),two.hashCode());
}
| Asserts that two objects are equal according to their equals() method. Also asserts that their hash codes are the same. |
public void shutdownImmediately(){
setPowerOffCount(1);
try {
checkPowerOff();
}
catch ( DbException e) {
}
closeFiles();
}
| Immediately close the database. |
public FIXMessage create(){
return new FIXMessage(config.getMaxFieldCount(),config.getFieldCapacity());
}
| Create a message container. |
public static void println(String s){
System.out.println(s);
}
| Prints a string to System.out with a newline |
public static Map<String,String> extractDimColsDataTypeValues(String colDataTypes){
Map<String,String> mapOfColNameDataType=new HashMap<String,String>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
if (null == colDataTypes || colDataTypes.isEmpty()) {
return mapOfColNameDataType;
}
String[] colArray=colDat... | This will extract the high cardinality count from the string. |
public PatternFitModel(Simulation simulation,GeneralAlgorithmRunner algorithmRunner,Parameters params){
if (params == null) {
throw new NullPointerException("Parameters must not be null");
}
this.parameters=params;
DataModelList dataModels=simulation.getDataModelList();
this.dataModelList=dataModels;
Li... | Compares the results of a PC to a reference workbench by counting errors of omission and commission. The counts can be retrieved using the methods <code>countOmissionErrors</code> and <code>countCommissionErrors</code>. |
private boolean discardUpstreamMediaChunks(int queueLength){
if (mediaChunks.size() <= queueLength) {
return false;
}
long startTimeUs=0;
long endTimeUs=mediaChunks.getLast().endTimeUs;
BaseMediaChunk removed=null;
while (mediaChunks.size() > queueLength) {
removed=mediaChunks.removeLast();
star... | Discard upstream media chunks until the queue length is equal to the length specified. |
public String toString(){
if (isNodeSet()) {
return "XMLSignatureInput/NodeSet/" + inputNodeSet.size() + " nodes/"+ getSourceURI();
}
if (isElement()) {
return "XMLSignatureInput/Element/" + subNode + " exclude "+ excludeNode+ " comments:"+ excludeComments+ "/"+ getSourceURI();
}
try {
return "XML... | Method toString |
RuleBasedBreakIterator(String datafile) throws IOException, MissingResourceException {
readTables(datafile);
}
| Constructs a RuleBasedBreakIterator according to the datafile provided. |
public void clearExpiration(){
builder.expirationTime(null);
builder.expirationTimeInterval(null);
}
| Clears both expiration values, indicating that the notification should never expire. |
void doSimStep(final double now){
int inLinksCounter=0;
double inLinksCapSum=0.0;
for ( PTQLink link : this.inLinksArrayCache) {
if (!link.isNotOfferingVehicle()) {
this.tempLinks[inLinksCounter]=link;
inLinksCounter++;
inLinksCapSum+=link.getLink().getCapacity(now);
}
}
if (inLinks... | Moves vehicles from the inlinks' buffer to the outlinks where possible.<br> The inLinks are randomly chosen, and for each link all vehicles in the buffer are moved to their desired outLink as long as there is space. If the front most vehicle in a buffer cannot move across the node because there is no free space on its ... |
public void popRTFContext(){
int previous=m_last_pushed_rtfdtm.pop();
if (null == m_rtfdtm_stack) return;
if (m_which_rtfdtm == previous) {
if (previous >= 0) {
boolean isEmpty=((SAX2RTFDTM)(m_rtfdtm_stack.elementAt(previous))).popRewindMark();
}
}
else while (m_which_rtfdtm != previous) {
... | Pop the RTFDTM's context mark. This discards any RTFs added after the last mark was set. If there is no RTF DTM, there's nothing to pop so this becomes a no-op. If pushes were issued before this was called, we count on the fact that popRewindMark is defined such that overpopping just resets to empty. Complicating fact... |
@Override public void onDetach(){
synchronized (mThread) {
mProgressBar=null;
mReady=false;
mThread.notify();
}
super.onDetach();
}
| This is called right before the fragment is detached from its current activity instance. |
private static int bitLength(int[] val,int len){
if (len == 0) return 0;
return ((len - 1) << 5) + bitLengthForInt(val[0]);
}
| Calculate bitlength of contents of the first len elements an int array, assuming there are no leading zero ints. |
public DefaultMosaicTransferFeeCalculator(){
this(null);
}
| Creates a default mosaic transfer fee calculator. |
public static void prepareToDraw(){
GLES20.glUseProgram(sProgramHandle);
Util.checkGlError("glUseProgram");
GLES20.glEnableVertexAttribArray(sPositionHandle);
Util.checkGlError("glEnableVertexAttribArray");
GLES20.glVertexAttribPointer(sPositionHandle,COORDS_PER_VERTEX,GLES20.GL_FLOAT,false,VERTEX_STRIDE,sOut... | Performs setup common to all BasicAlignedRects. |
public ReflectiveOperationException(String message){
super(message);
}
| Constructs a new exception with the given detail message. |
public void updateToolbar(){
toolBar.update();
}
| Update the elements of the main tool bar. |
public static void printTLCBug(int errorCode,String[] parameters){
recorder.record(errorCode,(Object[])parameters);
DebugPrinter.print("entering printTLCBug(int, String[]) with errorCode " + errorCode);
ToolIO.out.println(getMessage(TLCBUG,errorCode,parameters));
DebugPrinter.print("leaving printTLCBug(int, Str... | Prints parameterized TLC BUG message |
private int findNearestPair(double key,double secondaryKey){
int low=0;
int high=m_NumValues;
int middle=0;
while (low < high) {
middle=(low + high) / 2;
double current=m_CondValues[middle];
if (current == key) {
double secondary=m_Values[middle];
if (secondary == secondaryKey) {
... | Execute a binary search to locate the nearest data value |
public EventNode next() throws Exception {
EventNode next=peek;
if (next == null) {
next=read();
}
else {
peek=null;
}
return next;
}
| This is used to take the next node from the document. This will scan through the document, ignoring any comments to find the next relevant XML event to acquire. Typically events will be the start and end of an element, as well as any text nodes. |
@Override public int size(){
return (this.blob == null) ? 0 : this.blob.size();
}
| ask for the number of entries |
public boolean isReadOnly(){
Object oo=get_Value(COLUMNNAME_IsReadOnly);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Read Only. |
@Override public void release(){
this.converterId=null;
}
| <p>Release references to any acquired resources. |
@Override public boolean has(Pattern pattern){
final Matcher matcher=pattern.matcher(rest());
return matcher.find() && matcher.start() == 0;
}
| This method will determine whether the indicated pattern can be found at this point in the document or not |
@Override public void run(){
amIActive=true;
String inputHeader=null;
String outputHeader=null;
double zConvFactor=1;
if (args.length <= 0) {
showFeedback("Plugin parameters have not been set.");
return;
}
inputHeader=args[0];
outputHeader=args[1];
zConvFactor=Double.parseDouble(args[2]);
if... | Used to execute this plugin tool. |
private Retry processResponseHeaders() throws IOException {
Proxy selectedProxy=httpEngine.connection != null ? httpEngine.connection.getRoute().getProxy() : client.getProxy();
final int responseCode=getResponseCode();
switch (responseCode) {
case HTTP_PROXY_AUTH:
if (selectedProxy.type() != Proxy.Type.HTTP) {
... | Returns the retry action to take for the current response headers. The headers, proxy and target URL or this connection may be adjusted to prepare for a follow up request. |
public DateTime withDayOfMonth(int dayOfMonth){
return withMillis(getChronology().dayOfMonth().set(getMillis(),dayOfMonth));
}
| Returns a copy of this datetime with the day of month field updated. <p> DateTime is immutable, so there are no set methods. Instead, this method returns a new instance with the value of day of month changed. |
public static boolean equals(int[] left,int[] right){
if (left == null) {
return right == null;
}
if (right == null) {
return false;
}
if (left == right) {
return true;
}
if (left.length != right.length) {
return false;
}
for (int i=0; i < left.length; i++) {
if (left[i] != right[i... | Compare the contents of this array to the contents of the given array. |
private void testIsoYearJanuary1thFriday() throws Exception {
assertEquals(2009,getIsoYear(parse("2009-12-28")));
assertEquals(2009,getIsoYear(parse("2009-12-29")));
assertEquals(2009,getIsoYear(parse("2009-12-30")));
assertEquals(2009,getIsoYear(parse("2009-12-31")));
assertEquals(2009,getIsoYear(parse("2010... | January 1st is a Friday therefore 1st - 3rd of January belong to the previous year. |
public String poll() throws InterruptedException {
return poll(DEFAULT_TIMEOUT);
}
| Returns the changes received by other sessions for the shared diagram. The method returns an empty XML node if no change was received within 10 seconds. |
public void close() throws SQLException {
Object mutex=this;
MySQLConnection conn=null;
if (this.owner != null) {
conn=this.owner.connection;
if (conn != null) {
mutex=conn.getConnectionMutex();
}
}
boolean hadMore=false;
int howMuchMore=0;
synchronized (mutex) {
while (next() != null)... | We're done. |
public static boolean canTranslate(String unlocalizedString){
if (I18n.hasKey(unlocalizedString)) return true;
else {
if (UNLOCALIZED_STRINGS.size() < 100 && !UNLOCALIZED_STRINGS.contains(unlocalizedString)) UNLOCALIZED_STRINGS.add(unlocalizedString);
return false;
}
}
| Use this function if you want the string to be logged in debug mode |
@Bean public BuildInformation buildInformation(){
BuildInformation buildInformation=new BuildInformation();
buildInformation.setBuildDate(environment.getProperty("build.date"));
buildInformation.setBuildNumber(environment.getProperty("build.number"));
buildInformation.setBuildOs(environment.getProperty("build.o... | Gets the build information. |
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:36.433 -0500",hash_original_method="C84307F15A2AB40D2A9CA51D74C5FD0F",hash_generated_method="ED5D513DE4FFFE667446D5431C83A8D7") synchronized void unparcel(){
}
| If the underlying data are stored as a Parcel, unparcel them using the currently assigned class loader. |
public void clear(){
int h=head;
int t=tail;
if (h != t) {
head=tail=0;
int i=h;
int mask=elements.length - 1;
do {
elements[i]=null;
i=(i + 1) & mask;
}
while (i != t);
}
}
| Removes all of the elements from this deque. The deque will be empty after this call returns. |
Vset check(Environment env,Context ctx,Vset vset,Hashtable exp){
checkLabel(env,ctx);
if (args.length > 0) {
vset=reach(env,vset);
CheckContext newctx=new CheckContext(ctx,this);
Environment newenv=Context.newEnvironment(env,newctx);
for (int i=0; i < args.length; i++) {
vset=args[i].checkBloc... | Check statement |
public static void releaseThreadPool(){
mExecutorService=null;
}
| This executor will be shutdown if it is no longer referenced and has no threads. |
@VisibleForTesting protected Process startExecutorProcess(int container){
return ShellUtils.runASyncProcess(getExecutorCommand(container),new File(LocalContext.workingDirectory(config)),Integer.toString(container));
}
| Start executor process via running an async shell process |
private String createEndMissionXml(){
return "</mission>";
}
| A helper function to create an XML string representing the end of a mission. |
public void or() throws IOException {
writeCode(OR);
}
| SWFActions interface |
public SVGTextFigure(){
this("Text");
}
| Creates a new instance. |
public void removeUserType(){
if (uriParms != null) uriParms.delete(USER);
}
| Set the user type. |
@Override public void writeToNBT(NBTTagCompound tag){
try {
super.writeToNBT(tag);
}
catch ( RuntimeException e) {
}
NBTTagCompound data=new NBTTagCompound();
data.setDouble("energy",energyStored);
tag.setTag("IC2BasicSink",data);
}
| Forward for the base TileEntity's writeToNBT(), used for saving the state. |
public void randomize(List<CellIndex> cellIndices){
Random rand=new Random();
int range=getUpperBound() - getLowerBound();
for ( CellIndex cellIndex : cellIndices) {
int row=cellIndex.row;
int col=cellIndex.col;
double value=(rand.nextDouble() * range) + getLowerBound();
setLogicalValue(row,col,v... | Randomize neurons within specified bounds. |
protected void dispatchQueuedEvents(){
if (isDispatching.get()) {
return;
}
isDispatching.set(true);
try {
while (true) {
EventWithHandler eventWithHandler=eventsToDispatch.get().poll();
if (eventWithHandler == null) {
break;
}
if (eventWithHandler.handler.isValid()) {
... | Drain the queue of events to be dispatched. As the queue is being drained, new events may be posted to the end of the queue. |
public MyHashMap(){
this(DEFAULT_INITIAL_CAPACITY,DEFAULT_MAX_LOAD_FACTOR);
}
| Construct a map with the default capacity and load factor |
public GT_MetaGenerated_Item_X32(String aUnlocalized,OrePrefixes... aGeneratedPrefixList){
super(aUnlocalized,(short)32000,(short)766);
mGeneratedPrefixList=Arrays.copyOf(aGeneratedPrefixList,32);
for (int i=0; i < 32000; i++) {
OrePrefixes tPrefix=mGeneratedPrefixList[i / 1000];
if (tPrefix == null) ... | Creates the Item using these Parameters. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.