code
stringlengths 10
174k
| nl
stringlengths 3
129k
|
---|---|
public CharacterClass createCharacterClass(){
CharacterClassImpl characterClass=new CharacterClassImpl();
return characterClass;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override protected void register(DeployerFactory deployerFactory){
deployerFactory.registerDeployer("tomee1x",DeployerType.INSTALLED,TomeeCopyingInstalledLocalDeployer.class);
deployerFactory.registerDeployer("tomee1x",DeployerType.REMOTE,Tomee1xRemoteDeployer.class);
deployerFactory.registerDeployer("tomee7x",DeployerType.INSTALLED,TomeeCopyingInstalledLocalDeployer.class);
deployerFactory.registerDeployer("tomee7x",DeployerType.REMOTE,Tomee7xRemoteDeployer.class);
}
| Register deployer. |
public Object clone(){
UnknownDoubleQuantileEstimator copy=(UnknownDoubleQuantileEstimator)super.clone();
if (this.sampler != null) copy.sampler=(WeightedRandomSampler)copy.sampler.clone();
return copy;
}
| Returns a deep copy of the receiver. |
public void addKeyBinding(KeyStroke keyStroke,ActionListener action){
Object o=bindings.get(keyStroke);
if (o instanceof Map) {
((Map)o).put(keyStroke,action);
}
else {
bindings.put(keyStroke,action);
}
}
| add a action listener for a specific key stroke |
public Proposal(String replacementString,int replacementOffset,int replacementLength,int cursorPosition){
this(replacementString,replacementOffset,replacementLength,cursorPosition,null,null);
}
| Creates a new completion proposal based on the provided information. The replacement string is considered being the display string too. All remaining fields are set to <code>null</code>. |
public static byte[] decodeFromFile(String filename) throws java.io.IOException {
byte[] decodedData=null;
Base64.InputStream bis=null;
try {
java.io.File file=new java.io.File(filename);
byte[] buffer=null;
int length=0;
int numBytes=0;
if (file.length() > Integer.MAX_VALUE) {
throw new java.io.IOException("File is too big for this convenience method (" + file.length() + " bytes).");
}
buffer=new byte[(int)file.length()];
bis=new Base64.InputStream(new java.io.BufferedInputStream(new java.io.FileInputStream(file)),Base64.DECODE);
while ((numBytes=bis.read(buffer,length,4096)) >= 0) {
length+=numBytes;
}
decodedData=new byte[length];
System.arraycopy(buffer,0,decodedData,0,length);
}
catch ( java.io.IOException e) {
throw e;
}
finally {
try {
bis.close();
}
catch ( Exception e) {
}
}
return decodedData;
}
| Convenience method for reading a base64-encoded file and decoding it. <p>As of v 2.3, if there is a error, the method will throw an java.io.IOException. <b>This is new to v2.3!</b> In earlier versions, it just returned false, but in retrospect that's a pretty poor way to handle it.</p> |
private void initProduct(long key,ServiceAccessType type){
product.setKey(key);
product.setProductId("ProductId");
product.setTemplate(product);
TechnicalProduct tp=new TechnicalProduct();
tp.setAccessType(type);
product.setTechnicalProduct(tp);
}
| initialize product object |
private void startDraining(boolean overflow){
byteBuffer.flip();
if (overflow && byteBuffer.remaining() == 0) {
byteBuffer=ByteBuffer.allocate(byteBuffer.capacity() * 2);
}
else {
draining=true;
}
}
| Flips the buffer output buffer so we can start reading bytes from it. If we are starting to drain because there was overflow, and there aren't actually any characters to drain, then the overflow must be due to a small output buffer. |
public synchronized byte[] toByteArray(){
int remaining=count;
if (remaining == 0) {
return EMPTY_BYTE_ARRAY;
}
byte newbuf[]=new byte[remaining];
int pos=0;
for ( byte[] buf : buffers) {
int c=Math.min(buf.length,remaining);
System.arraycopy(buf,0,newbuf,pos,c);
pos+=c;
remaining-=c;
if (remaining == 0) {
break;
}
}
return newbuf;
}
| Gets the curent contents of this byte stream as a byte array. The result is independent of this stream. |
private void tred2(){
for (int j=0; j < n; j++) {
d[j]=V[n - 1][j];
}
for (int i=n - 1; i > 0; i--) {
double scale=0.0;
double h=0.0;
for (int k=0; k < i; k++) {
scale=scale + Math.abs(d[k]);
}
if (scale == 0.0) {
e[i]=d[i - 1];
for (int j=0; j < i; j++) {
d[j]=V[i - 1][j];
V[i][j]=0.0;
V[j][i]=0.0;
}
}
else {
for (int k=0; k < i; k++) {
d[k]/=scale;
h+=d[k] * d[k];
}
double f=d[i - 1];
double g=Math.sqrt(h);
if (f > 0) {
g=-g;
}
e[i]=scale * g;
h=h - f * g;
d[i - 1]=f - g;
for (int j=0; j < i; j++) {
e[j]=0.0;
}
for (int j=0; j < i; j++) {
f=d[j];
V[j][i]=f;
g=e[j] + V[j][j] * f;
for (int k=j + 1; k <= i - 1; k++) {
g+=V[k][j] * d[k];
e[k]+=V[k][j] * f;
}
e[j]=g;
}
f=0.0;
for (int j=0; j < i; j++) {
e[j]/=h;
f+=e[j] * d[j];
}
double hh=f / (h + h);
for (int j=0; j < i; j++) {
e[j]-=hh * d[j];
}
for (int j=0; j < i; j++) {
f=d[j];
g=e[j];
for (int k=j; k <= i - 1; k++) {
V[k][j]-=(f * e[k] + g * d[k]);
}
d[j]=V[i - 1][j];
V[i][j]=0.0;
}
}
d[i]=h;
}
for (int i=0; i < n - 1; i++) {
V[n - 1][i]=V[i][i];
V[i][i]=1.0;
double h=d[i + 1];
if (h != 0.0) {
for (int k=0; k <= i; k++) {
d[k]=V[k][i + 1] / h;
}
for (int j=0; j <= i; j++) {
double g=0.0;
for (int k=0; k <= i; k++) {
g+=V[k][i + 1] * V[k][j];
}
for (int k=0; k <= i; k++) {
V[k][j]-=g * d[k];
}
}
}
for (int k=0; k <= i; k++) {
V[k][i + 1]=0.0;
}
}
for (int j=0; j < n; j++) {
d[j]=V[n - 1][j];
V[n - 1][j]=0.0;
}
V[n - 1][n - 1]=1.0;
e[0]=0.0;
}
| Symmetric Householder reduction to tridiagonal form. |
public void computeLocalVariablePositions(int initOffset){
this.offset=initOffset;
this.maxOffset=initOffset;
int ilocal=0, maxLocals=this.localIndex;
while (ilocal < maxLocals) {
LocalVariableBinding local=this.locals[ilocal];
if (local == null || ((local.tagBits & TagBits.IsArgument) == 0)) break;
local.resolvedPosition=this.offset;
if ((local.type == TypeBinding.LONG) || (local.type == TypeBinding.DOUBLE)) {
this.offset+=2;
}
else {
this.offset++;
}
if (this.offset > 0xFF) {
problemReporter().noMoreAvailableSpaceForArgument(local,local.declaration);
}
ilocal++;
}
if (this.extraSyntheticArguments != null) {
for (int iarg=0, maxArguments=this.extraSyntheticArguments.length; iarg < maxArguments; iarg++) {
SyntheticArgumentBinding argument=this.extraSyntheticArguments[iarg];
argument.resolvedPosition=this.offset;
if ((argument.type == TypeBinding.LONG) || (argument.type == TypeBinding.DOUBLE)) {
this.offset+=2;
}
else {
this.offset++;
}
if (this.offset > 0xFF) {
problemReporter().noMoreAvailableSpaceForArgument(argument,(ASTNode)this.referenceContext);
}
}
}
this.computeLocalVariablePositions(ilocal,this.offset);
}
| Compute variable positions in scopes given an initial position offset ignoring unused local variables. <p/> Deal with arguments here, locals and subscopes are processed in BlockScope method |
private String createFullMessageText(String senderName,String receiverName,String text){
if (senderName.equals(receiverName)) {
return "You mutter to yourself: " + text;
}
else {
return senderName + " tells you: " + text;
}
}
| creates the full message based on the text provided by the player |
public String format(int number){
return "" + number;
}
| Format an integer number for this locale |
private void deleteHelper(EnumerationContext ctx,ServiceDocumentQueryResult results){
if (results.documentCount == 0) {
checkLinkAndFinishDeleting(ctx,results.nextPageLink);
return;
}
List<Operation> operations=new ArrayList<>();
results.documents.values().forEach(null);
if (operations.isEmpty()) {
checkLinkAndFinishDeleting(ctx,results.nextPageLink);
return;
}
OperationJoin.create(operations).setCompletion(null).sendWith(this);
}
| This helper function deletes all compute states in one deletion page every iteration. For each compute state, its associated disks will also be deleted. After deletion, it will check if there is a next deletion page. If there is, it will delete that page recursively. If there are nothing to delete, it will jump to the finished stage of the whole enumeration. |
private void attemptLogin(){
mUserNameView.setError(null);
mPasswordView.setError(null);
String username=mUserNameView.getText().toString();
String password=mPasswordView.getText().toString();
boolean cancel=false;
View focusView=null;
if (TextUtils.isEmpty(password)) {
mPasswordView.setError(getString(R.string.error_field_required));
focusView=mPasswordView;
cancel=true;
}
if (TextUtils.isEmpty(username)) {
mUserNameView.setError(getString(R.string.error_field_required));
focusView=mUserNameView;
cancel=true;
}
if (cancel) {
focusView.requestFocus();
}
else {
showProgress();
FetLifeApiIntentService.startApiCall(this,FetLifeApiIntentService.ACTION_APICALL_LOGON_USER,username,password,Boolean.toString(passwordPreferenceCheckBox.isChecked()));
}
}
| Attempts to sign in or register the account specified by the login form. If there are form errors (invalid username, missing fields, etc.), the errors are presented and no actual login attempt is made. |
protected void firePropertyChange(String propertyName,Object oldValue,Object newValue){
if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals(newValue))) {
return;
}
changeSupport.firePropertyChange(propertyName,oldValue,newValue);
}
| Supports reporting bound property changes. This method can be called when a bound property has changed and it will send the appropriate <code>PropertyChangeEvent</code> to any registered <code>PropertyChangeListeners</code>. |
public void init(int address){
slice=pool.buffers[address >> ByteBlockPool.BYTE_BLOCK_SHIFT];
assert slice != null;
upto=address & ByteBlockPool.BYTE_BLOCK_MASK;
offset0=address;
assert upto < slice.length;
}
| Set up the writer to write at address. |
@Override public Object eInvoke(int operationID,EList<?> arguments) throws InvocationTargetException {
switch (operationID) {
case TypesPackage.TGETTER___GET_MEMBER_TYPE:
return getMemberType();
case TypesPackage.TGETTER___GET_MEMBER_AS_STRING:
return getMemberAsString();
}
return super.eInvoke(operationID,arguments);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
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) {
prefix=generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix,namespaceURI);
xmlWriter.setPrefix(prefix,namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
}
else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
}
}
else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
}
}
| method to handle Qnames |
public static Version resolveVersion(MinecraftDirectory minecraftDir,String version) throws IOException {
Objects.requireNonNull(minecraftDir);
Objects.requireNonNull(version);
if (doesVersionExist(minecraftDir,version)) {
try {
return getVersionParser().parseVersion(resolveVersionHierarchy(version,minecraftDir),PlatformDescription.current());
}
catch ( JSONException e) {
throw new IOException("Couldn't parse version json: " + version,e);
}
}
else {
return null;
}
}
| Resolves the version. |
@DSComment("Potential intent to trigger other processing") @DSSafe(DSCat.INTENT_EXCHANGE) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:09.521 -0500",hash_original_method="49B5D5019DC4C58D3432134ADBF206CE",hash_generated_method="6A4551931679F7F4C88D98B48A5B93F2") public Intent putExtras(Intent src){
if (src.mExtras != null) {
mExtras.putAll(src.mExtras);
}
return this;
}
| Copy all extras in 'src' in to this intent. |
public boolean isSecure(){
return this.firstTransactionSecure;
}
| Returns true if this Dialog is secure i.e. if the request arrived over TLS, and the Request-URI contained a SIPS URI, the "secure" flag is set to TRUE. |
public Board(int width,int height){
this.width=width;
this.height=height;
data=new IHex[width * height];
}
| Creates a new board of the specified dimensions. All hexes in the board will be null until otherwise set. |
public void testFloatSortMissingFirst() throws Exception {
checkSortMissingFirst("floatdv_missingfirst","-1.3","4.2");
}
| float with sort missing always first |
public static float dpToPixel(Resources res,int dp){
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,dp,res.getDisplayMetrics());
}
| Convert DP units to pixels |
private int supplementalHash(int h){
h^=(h >>> 20) ^ (h >>> 12);
return h ^ (h >>> 7) ^ (h >>> 4);
}
| Ensure the hashing is evenly distributed |
public EmptyResponse(){
requestFileName="getstate.query";
responseFile="empty.query";
}
| Constructs the test case. |
public static Map<String,List<Point>> readOneToMany(final InputStream stream){
if (stream == null) {
return Collections.emptyMap();
}
final HashMap<String,List<Point>> mapping=new HashMap<>();
try (InputStreamReader inputStreamReader=new InputStreamReader(stream);LineNumberReader reader=new LineNumberReader(inputStreamReader)){
String current=reader.readLine();
while (current != null) {
if (current.trim().length() != 0) {
readMultiple(current,mapping);
}
current=reader.readLine();
}
}
catch ( final IOException ioe) {
ClientLogger.logError(ioe);
System.exit(0);
}
finally {
try {
stream.close();
}
catch ( final IOException e) {
ClientLogger.logError(e);
}
}
return mapping;
}
| Returns a map of the form String -> Collection of points. |
public SimpleConstant(String name,boolean booleanValue){
if (name == null) {
throw new IllegalArgumentException("name must not be null");
}
this.type=ExpressionType.BOOLEAN;
this.name=name;
this.stringValue=null;
this.doubleValue=0;
this.booleanValue=booleanValue;
this.dateValue=null;
}
| Creates a Constant with the given characteristics. |
public boolean isSkip(){
return skip;
}
| Should the execution be skipped? |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:25.373 -0500",hash_original_method="1543F2E70FF0D503FC0C174797134204",hash_generated_method="1543F2E70FF0D503FC0C174797134204") Values(Values fromParent){
this.table=fromParent.table.clone();
this.mask=fromParent.mask;
this.size=fromParent.size;
this.tombstones=fromParent.tombstones;
this.maximumLoad=fromParent.maximumLoad;
this.clean=fromParent.clean;
inheritValues(fromParent);
}
| Used for InheritableThreadLocals. |
@Deprecated public Task<VolumeRestRep> changeVirtualArray(URI id,VirtualArrayChangeParam input){
return putTask(input,getIdUrl() + "/varray",id);
}
| Changes the virtual array for the given block volume. <p> API Call: <tt>PUT /block/volumes/{id}/varray</tt> |
public void resolveMethodReferences(){
for ( PseudoOp op : contents) {
if (op instanceof ResolvableOp) {
((ResolvableOp)op).resolve();
}
}
}
| Resolve all the method references in this method's instructions, by replacing proxy references with the real compiled method. |
public static void simpleDataExchange(Socket s1,Socket s2) throws Exception {
InputStream i1=s1.getInputStream();
InputStream i2=s2.getInputStream();
OutputStream o1=s1.getOutputStream();
OutputStream o2=s2.getOutputStream();
startSimpleWriter("SimpleWriter-1",o1,100);
startSimpleWriter("SimpleWriter-2",o2,200);
simpleRead(i2,100);
simpleRead(i1,200);
}
| performs a simple exchange of data between the two sockets and throws an exception if there is any problem. |
public boolean isEnabled(){
if (isAvailable()) {
return mBluetoothAdapter.isEnabled();
}
return false;
}
| Is current device's bluetooth opened. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
public static Map<String,Router> guessRouters(TransitSchedule schedule,Network network){
Map<String,Set<String>> modeAssignments=new HashMap<>();
for ( TransitLine transitLine : schedule.getTransitLines().values()) {
for ( TransitRoute transitRoute : transitLine.getRoutes().values()) {
Set<String> usedNetworkModes=MapUtils.getSet(transitRoute.getTransportMode(),modeAssignments);
List<Link> links=getLinksFromIds(network,getTransitRouteLinkIds(transitRoute));
for ( Link link : links) {
usedNetworkModes.addAll(link.getAllowedModes());
}
}
}
Map<Set<String>,Router> modeDependentRouters=new HashMap<>();
for ( Set<String> networkModes : modeAssignments.values()) {
if (!modeDependentRouters.containsKey(networkModes)) {
modeDependentRouters.put(networkModes,FastAStarRouter.createModeSeparatedRouter(network,networkModes));
}
}
Map<String,Router> routers=new HashMap<>();
for ( Map.Entry<String,Set<String>> e : modeAssignments.entrySet()) {
routers.put(e.getKey(),modeDependentRouters.get(e.getValue()));
}
return routers;
}
| Creates mode dependent routers based on the actual network modes used. |
public void clearActive(){
end=array.length;
}
| Clears the active region of the string. Further operations are not restricted to part of the input. |
protected boolean isAdministrador(String idUsuario,String idLibro) throws HibernateException {
boolean result=false;
boolean isAdministrador=isAdministradorLibro(idUsuario,idLibro);
result=isAdministrador;
if (!isAdministrador) {
boolean isCreadorLibro=isCreadorLibro(idUsuario,idLibro);
result=isCreadorLibro;
}
return result;
}
| un usuario se considerea administrador del libro si es adminitrador o bien es creador del libro |
public BaggingMLdupTest(String name){
super(name);
}
| Initializes the test. |
@Override public String toString(){
if (!isValid()) return null;
TransformerData transformerData=Ruqus.getTransformerData();
switch (type) {
case NORMAL:
return Phrase.from("{field} {transformer_v_name}").put("field",Ruqus.visibleFieldFromField(realmClass,field)).put("transformer_v_name",transformerData.visibleNameOf(transformer)).format() + ReadableStringUtils.argsToString(fieldType,transformer,args);
case NO_ARGS:
case BEGIN_GROUP:
case END_GROUP:
case OR:
case NOT:
return transformerData.visibleNameOf(transformer);
default :
return super.toString();
}
}
| Return a human-readable string which describes this condition without regard to any other conditions. Since the returned string is intended to be standalone, it should not be used as part of a larger human-readable query string. |
public void zoneNullRollback(String stepId){
WorkflowStepCompleter.stepSucceded(stepId);
}
| Performs a null rollback if desired. |
public static Object decodeToObject(String encodedObject) throws java.io.IOException, java.lang.ClassNotFoundException {
return decodeToObject(encodedObject,NO_OPTIONS,null);
}
| Attempts to decode Base64 data and deserialize a Java Object within. Returns <tt>null</tt> if there was an error. |
protected boolean haveSharedCellsRaw(ObjectMatrix2D other){
if (other instanceof SelectedDenseObjectMatrix2D) {
SelectedDenseObjectMatrix2D otherMatrix=(SelectedDenseObjectMatrix2D)other;
return this.elements == otherMatrix.elements;
}
else if (other instanceof DenseObjectMatrix2D) {
DenseObjectMatrix2D otherMatrix=(DenseObjectMatrix2D)other;
return this.elements == otherMatrix.elements;
}
return false;
}
| Returns <tt>true</tt> if both matrices share common cells. More formally, returns <tt>true</tt> if <tt>other != null</tt> and at least one of the following conditions is met <ul> <li>the receiver is a view of the other matrix <li>the other matrix is a view of the receiver <li><tt>this == other</tt> </ul> |
public void onContractDetails(Contract contract) throws BrokerModelException {
try {
if (m_client.isConnected()) {
if (!m_contractRequests.containsKey(contract.getId())) {
contract.setIdContractIB(null);
m_contractRequests.put(contract.getId(),contract);
TWSBrokerModel.logContract(TWSBrokerModel.getIBContract(contract));
m_client.reqContractDetails(contract.getId(),TWSBrokerModel.getIBContract(contract));
}
}
else {
throw new BrokerModelException(contract.getId(),3080,"Not conected to TWS contract data cannot be retrieved");
}
}
catch ( Exception ex) {
throw new BrokerModelException(contract.getId(),3090,"Error broker data Symbol: " + contract.getSymbol() + " Msg: "+ ex.getMessage());
}
}
| Method onContractDetails. |
public MenuExecAction(AppView app,String icon,String keytext,String sMyView){
putValue(Action.SMALL_ICON,new ImageIcon(JPrincipalApp.class.getResource(icon)));
putValue(Action.NAME,AppLocal.getIntString(keytext));
putValue(AppUserView.ACTION_TASKNAME,sMyView);
m_App=app;
m_sMyView=sMyView;
}
| Creates a new instance of MenuExecAction |
public static MediaType create(String type,String subtype){
return create(type,subtype,ImmutableListMultimap.<String,String>of());
}
| Creates a new media type with the given type and subtype. |
public static ZipFileIndexCache instance(Context context){
ZipFileIndexCache instance=context.get(ZipFileIndexCache.class);
if (instance == null) context.put(ZipFileIndexCache.class,instance=new ZipFileIndexCache());
return instance;
}
| Get a context-specific instance of a cache. |
private void removeEmptyRates(){
final List<OverheadRate> emptyRateObjs=new LinkedList<OverheadRate>();
for ( final OverheadRate overheadRate : overheadRates) if (overheadRate.getPercentage() == 0.0 && (overheadRate.getLumpsumAmount() == null || overheadRate.getLumpsumAmount().getValue() == 0.0) && (overheadRate.getValidity() == null || overheadRate.getValidity().getStartDate() == null || overheadRate.getValidity().getEndDate() == null)) emptyRateObjs.add(overheadRate);
overheadRates.removeAll(emptyRateObjs);
}
| This method removes any empty over head rate from the list of over head rates. |
Object adjustValue(Object value,Map attributes,Object field,int direction) throws BadLocationException, ParseException {
return null;
}
| Subclasses supporting incrementing must override this to handle the actual incrementing. <code>value</code> is the current value, <code>attributes</code> gives the field the cursor is in (may be null depending upon <code>canIncrement</code>) and <code>direction</code> is the amount to increment by. |
private static int testForCompenstation(){
int failures=0;
double base=1.0;
double increment=Math.ulp(base) / 2.0;
int count=1_000_001;
double expectedSum=base + (increment * (count - 1));
double expectedAvg=expectedSum / count;
Supplier<DoubleStream> ds=null;
DoubleSummaryStatistics stats=ds.get().collect(null,null,null);
failures+=compareUlpDifference(expectedSum,stats.getSum(),3);
failures+=compareUlpDifference(expectedAvg,stats.getAverage(),3);
failures+=compareUlpDifference(expectedSum,ds.get().sum(),3);
failures+=compareUlpDifference(expectedAvg,ds.get().average().getAsDouble(),3);
failures+=compareUlpDifference(expectedSum,ds.get().boxed().collect(Collectors.summingDouble(null)),3);
failures+=compareUlpDifference(expectedAvg,ds.get().boxed().collect(Collectors.averagingDouble(null)),3);
return failures;
}
| Compute the sum and average of a sequence of double values in various ways and report an error if naive summation is used. |
public boolean isInSpace(String namespace){
return this.namespace.equals(namespace);
}
| Is this property in the given namespace? |
public static final void rescheduleMissedAlarms(ContentResolver cr,Context context,AlarmManager manager){
long now=System.currentTimeMillis();
long ancient=now - DateUtils.DAY_IN_MILLIS;
String[] projection=new String[]{ALARM_TIME};
Cursor cursor=cr.query(CalendarAlerts.CONTENT_URI,projection,WHERE_RESCHEDULE_MISSED_ALARMS,(new String[]{Long.toString(now),Long.toString(ancient),Long.toString(now)}),SORT_ORDER_ALARMTIME_ASC);
if (cursor == null) {
return;
}
if (DEBUG) {
Log.d(TAG,"missed alarms found: " + cursor.getCount());
}
try {
long alarmTime=-1;
while (cursor.moveToNext()) {
long newAlarmTime=cursor.getLong(0);
if (alarmTime != newAlarmTime) {
if (DEBUG) {
Log.w(TAG,"rescheduling missed alarm. alarmTime: " + newAlarmTime);
}
scheduleAlarm(context,manager,newAlarmTime);
alarmTime=newAlarmTime;
}
}
}
finally {
cursor.close();
}
}
| Searches the CalendarAlerts table for alarms that should have fired but have not and then reschedules them. This method can be called at boot time to restore alarms that may have been lost due to a phone reboot. TODO move to provider |
public static void install(Globals globals){
globals.undumper=instance;
}
| Install this class as the standard Globals.Undumper for the supplied Globals |
public static Level stringToLevel(String level){
Level result;
if (level.equalsIgnoreCase("ALL")) result=ALL;
else if (level.equalsIgnoreCase("CONFIG")) result=CONFIG;
else if (level.equalsIgnoreCase("FINE")) result=FINE;
else if (level.equalsIgnoreCase("FINER")) result=FINER;
else if (level.equalsIgnoreCase("FINEST")) result=FINEST;
else if (level.equalsIgnoreCase("INFO")) result=INFO;
else if (level.equalsIgnoreCase("OFF")) result=OFF;
else if (level.equalsIgnoreCase("SEVERE")) result=SEVERE;
else if (level.equalsIgnoreCase("WARNING")) result=WARNING;
else result=ALL;
return result;
}
| turns the string representing a level, e.g., "FINE" or "ALL" into the corresponding level (case-insensitive). The default is ALL. |
public static void cleanupCache(){
for ( SoftReference<ReplaceableBitmapDrawable> reference : sImageCache.values()) {
final ReplaceableBitmapDrawable drawable=reference.get();
if (drawable != null) drawable.setCallback(null);
}
}
| Removes all the callbacks from the drawables stored in the memory cache. This method must be called from the onDestroy() method of any activity using the cached drawables. Failure to do so will result in the entire activity being leaked. |
public BERSequence(ASN1Encodable obj){
super(obj);
}
| create a sequence containing one object |
public URL(String protocol,String host,String file) throws MalformedURLException {
this(protocol,host,-1,file,null);
}
| Creates a new URL of the given component parts. The URL uses the protocol's default port. |
public int compareTo(UUID uuid){
if (uuid == this) {
return 0;
}
if (this.mostSigBits != uuid.mostSigBits) {
return this.mostSigBits < uuid.mostSigBits ? -1 : 1;
}
if (this.leastSigBits != uuid.leastSigBits) {
return this.leastSigBits < uuid.leastSigBits ? -1 : 1;
}
return 0;
}
| <p> Compares this UUID to the specified UUID. The natural ordering of UUIDs is based upon the value of the bits from most significant to least significant. |
@Override public void addHandler(Handler handler){
synchronized (this) {
ClassLoader loader=Thread.currentThread().getContextClassLoader();
if (loader == null) {
loader=_systemClassLoader;
}
boolean hasLoader=false;
for (int i=_loaders.size() - 1; i >= 0; i--) {
WeakReference<ClassLoader> ref=_loaders.get(i);
ClassLoader refLoader=ref.get();
if (refLoader == null) _loaders.remove(i);
if (refLoader == loader) hasLoader=true;
if (isParentLoader(loader,refLoader)) addHandler(handler,refLoader);
}
if (!hasLoader) {
_loaders.add(new WeakReference<ClassLoader>(loader));
addHandler(handler,loader);
EnvLoader.addClassLoaderListener(this,loader);
}
HandlerEntry ownHandlers=_ownHandlers.get();
if (ownHandlers == null) {
ownHandlers=new HandlerEntry(this);
_ownHandlers.set(ownHandlers);
}
ownHandlers.addHandler(handler);
}
}
| Adds a handler. |
private synchronized void resumeTrackDataHub(){
trackDataHub=((TrackDetailActivity)getActivity()).getTrackDataHub();
trackDataHub.registerTrackDataListener(this,EnumSet.of(TrackDataType.TRACKS_TABLE,TrackDataType.WAYPOINTS_TABLE,TrackDataType.SAMPLED_IN_TRACK_POINTS_TABLE,TrackDataType.SAMPLED_OUT_TRACK_POINTS_TABLE,TrackDataType.PREFERENCE));
}
| Resumes the trackDataHub. Needs to be synchronized because the trackDataHub can be accessed by multiple threads. |
private void expand(int i){
if (count + i <= buf.length) {
return;
}
byte[] newbuf=mPool.getBuf((count + i) * 2);
System.arraycopy(buf,0,newbuf,0,count);
mPool.returnBuf(buf);
buf=newbuf;
}
| Ensures there is enough space in the buffer for the given number of additional bytes. |
public WhitenedPCA(int dims){
this(1e-4,dims);
}
| Creates a new WhitenedPCA transform |
public void removePrefix(String s){
prefix.removeElement(s);
update();
}
| Removes the prefix. |
public Object runSafely(Catbert.FastStack stack) throws Exception {
SeriesInfo si=getSeriesInfo(stack);
if (si == null) return new Integer(0);
return new Integer(si.getImageCount());
}
| Returns the number of images available that correspond to this SeriesInfo |
public TwoClassStats(double tp,double fp,double tn,double fn){
setTruePositive(tp);
setFalsePositive(fp);
setTrueNegative(tn);
setFalseNegative(fn);
}
| Creates the TwoClassStats with the given initial performance values. |
public Ping(){
this.hasNonce=false;
}
| Create a Ping without a nonce value. Only use this if the remote node has a protocol version <= 60000 |
public static Bitmap resizeImage(Bitmap originalBitmap,int w,int h){
if (originalBitmap == null) {
return null;
}
int width=originalBitmap.getWidth();
int height=originalBitmap.getHeight();
if (width <= w && height <= h) {
return originalBitmap;
}
float screenRatio=(float)w / h;
float ratio=(float)width / height;
if (screenRatio >= ratio) {
width=(int)(h * ratio);
height=h;
}
else {
height=(int)(w / ratio);
width=w;
}
return Bitmap.createScaledBitmap(originalBitmap,width,height,true);
}
| Resize image by width and height |
public int method(int i,float f,Main main,final int iFinal){
return 0;
}
| Method. <p> If you forget to document a param or a non-void return you will get a warning. <p> If you add a param that is not in the signature, it gives an error. <p> |
public RequestHandle post(Context context,String url,Header[] headers,RequestParams params,String contentType,ResponseHandlerInterface responseHandler){
HttpEntityEnclosingRequestBase request=new HttpPost(getURI(url));
if (params != null) request.setEntity(paramsToEntity(params,responseHandler));
if (headers != null) request.setHeaders(headers);
return sendRequest(httpClient,httpContext,request,contentType,responseHandler,context);
}
| Perform a HTTP POST request and track the Android Context which initiated the request. Set headers only for this request |
public static <T>List<T> tuple(T... objects){
return Collections.unmodifiableList(list(objects));
}
| Like Py.list(), but returns an immutable sequence. <p> Named after the same concept in Python, which in turn was named after the pre-existing mathematical concept of a "tuple" |
public boolean isSetParams(){
return this.params != null;
}
| Returns true if field params is set (has been assigned a value) and false otherwise |
public void createStack(PropertyHandler ph) throws HeatException, APPlatformException {
logger.debug("HeatProcessor.createStack() stackname: " + ph.getStackName());
HeatClient heatClient=createHeatClient(ph);
String template=getTemplate(ph,"create");
String id=String.valueOf((ph.getSettings().getSubscriptionId() + ph.getSettings().getOrganizationId()).hashCode());
if (!ph.getStackName().endsWith(id)) {
ph.setStackName(ph.getStackName() + id);
}
CreateStackRequest request=(CreateStackRequest)new CreateStackRequest(ph.getStackName()).withTemplate(template).withParameters(ph.getTemplateParameters());
try {
Stack created=heatClient.createStack(request);
ph.setStackId(created.getId());
}
catch ( HeatException ex) {
try {
ph.setStackId(getStackDetails(ph).getId());
}
catch ( HeatException ex2) {
throw ex;
}
}
}
| Creates a stack. If the given stack name is not unique a random number will be attached. |
@Override protected void determineLabelPositions(DrawContext dc){
LatLon center=this.circle.getCenter();
double distance=this.circle.getRadius() * 1.1;
Angle radius=Angle.fromRadians(distance / dc.getGlobe().getRadius());
LatLon eastEdge=LatLon.greatCircleEndPosition(center,Angle.POS90,radius);
this.labels.get(0).setPosition(new Position(eastEdge,0));
}
| Determine the appropriate position for the graphic's labels. |
public static String generatePop(final ITranslationEnvironment environment,final long offset,final OperandSize size,final String target,final List<ReilInstruction> instructions) throws IllegalArgumentException {
Preconditions.checkNotNull(environment,"Error: Argument environment can't be null");
Preconditions.checkNotNull(size,"Error: Argument size can't be null");
Preconditions.checkNotNull(instructions,"Error: Argument instructions can't be null");
final OperandSize archSize=environment.getArchitectureSize();
final OperandSize resultSize=TranslationHelpers.getNextSize(archSize);
final String loadedValue=target == null ? environment.getNextVariableString() : target;
instructions.add(ReilHelpers.createLdm(offset,archSize,"esp",size,loadedValue));
final String tempEsp=environment.getNextVariableString();
final String truncateMask=String.valueOf(TranslationHelpers.getAllBitsMask(archSize));
final String stackValue=String.valueOf(size.getByteSize());
instructions.add(ReilHelpers.createAdd(offset + 1,archSize,"esp",archSize,stackValue,resultSize,tempEsp));
instructions.add(ReilHelpers.createAnd(offset + 2,resultSize,tempEsp,archSize,truncateMask,archSize,"esp"));
return loadedValue;
}
| Generates code that pops a value off the stack |
@Override public void init(CanvasRenderer canvasRenderer){
canvasRenderer.getRenderer().setBackgroundColor(backgroundColor);
}
| Initialize this Scene |
private void validateTagCreateRequest(TagCreateRequest tagCreateRequest){
Assert.notNull(tagCreateRequest,"A tag create request must be specified.");
tagHelper.validateTagKey(tagCreateRequest.getTagKey());
if (tagCreateRequest.getParentTagKey() != null) {
tagHelper.validateTagKey(tagCreateRequest.getParentTagKey());
}
tagCreateRequest.setDisplayName(alternateKeyHelper.validateStringParameter("display name",tagCreateRequest.getDisplayName()));
tagDaoHelper.validateCreateTagParentKey(tagCreateRequest);
}
| Validate the tag create request. |
public boolean isProcessed(){
Object oo=get_Value(COLUMNNAME_Processed);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Processed. |
public GF2mVector toExtensionFieldVector(GF2mField field){
int m=field.getDegree();
if ((length % m) != 0) {
throw new ArithmeticException("conversion is impossible");
}
int t=length / m;
int[] result=new int[t];
int count=0;
for (int i=t - 1; i >= 0; i--) {
for (int j=field.getDegree() - 1; j >= 0; j--) {
int q=count >>> 5;
int r=count & 0x1f;
int e=(v[q] >>> r) & 1;
if (e == 1) {
result[i]^=1 << j;
}
count++;
}
}
return new GF2mVector(field,result);
}
| Rewrite this vector as a vector over <tt>GF(2<sup>m</sup>)</tt> with <tt>t</tt> elements. |
public void testRetention() throws Exception {
int retain=3;
StorageAgent agent=this.configureStorageService("testRetention",retain);
assertEquals("Initial backups should be 0",0,agent.list().length);
int size=1000;
int[] backupSizes=new int[50];
for (int i=0; i < backupSizes.length; i++) {
size=size + 10;
backupSizes[i]=size;
BackupSpecification backupSpecStore=createBackup("testRetention",size);
agent.store(backupSpecStore);
StorageSpecification[] availableSpecs=agent.list();
if (i < retain) {
assertEquals("URI list size must match number of backups",i + 1,availableSpecs.length);
}
else {
assertEquals("URI list size must match retained number of backups",retain,availableSpecs.length);
}
int offset=(i < retain) ? 0 : i - retain + 1;
for (int j=0; j <= i && j < 3; j++) {
StorageSpecification spec=availableSpecs[j];
assertEquals("URI file size must match order i=" + i + " j="+ j+ " offset="+ offset,backupSizes[j + offset],spec.getFileLength(0));
}
}
agent.release();
}
| Test limits on file retention: the stored backups should always be the last N backups where where N is the retention size, and backups should be properly ordered within that range. |
private LatLong internalPoint(){
LatLong A=points.get(0);
LatLong B=points.get(1);
LatLong C=points.get(2);
LatLong sample=new LatLong(B);
sample.moveTowards(A,10);
sample.moveTowards(C,10);
return sample;
}
| Create a sample point which is definitely inside the polygon, not on the perimeter. |
public void print(java.lang.String s){
return;
}
| Print a string. If the argument is null then the string "null" is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. |
public int size(){
return count;
}
| Returns the total number of bytes written to this stream so far. |
private void updateProgress(int progress){
if (myHost != null && progress != previousProgress) {
myHost.updateProgress(progress);
}
previousProgress=progress;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public void scanFiles(File base) throws JasperException {
Stack<String> dirs=new Stack<String>();
dirs.push(base.toString());
if (extensions == null) {
extensions=new ArrayList<String>();
extensions.add("jsp");
extensions.add("jspx");
}
while (!dirs.isEmpty()) {
String s=dirs.pop();
File f=new File(s);
if (f.exists() && f.isDirectory()) {
String[] files=f.list();
String ext;
for (int i=0; (files != null) && i < files.length; i++) {
File f2=new File(s,files[i]);
if (f2.isDirectory()) {
dirs.push(f2.getPath());
}
else {
String path=f2.getPath();
String uri=path.substring(uriRoot.length());
ext=files[i].substring(files[i].lastIndexOf('.') + 1);
if (extensions.contains(ext) || jspConfig.isJspPage(uri)) {
pages.add(path);
}
}
}
}
}
}
| Locate all jsp files in the webapp. Used if no explicit jsps are specified. |
public void connectAndBind(String host,int port,BindType bindType,String systemId,String password,String systemType,TypeOfNumber addrTon,NumberingPlanIndicator addrNpi,String addressRange,long timeout) throws IOException {
connectAndBind(host,port,new BindParameter(bindType,systemId,password,systemType,addrTon,addrNpi,addressRange),timeout);
}
| Open connection and bind immediately with specified timeout. The default timeout is 1 minutes. |
void writeHeader(PrintWriter out){
for ( Statement s : nativeHeaders) {
out.println(s.asString());
}
if (JavaParser.REF_COUNT_STATIC) {
out.println("#define STRING(s) STRING_REF(s)");
}
else {
out.println("#define STRING(s) STRING_PTR(s)");
}
out.println();
for ( ClassObj c : classes.values()) {
out.println("class " + toC(c.className) + ";");
}
for ( ClassObj c : classes.values()) {
for ( FieldObj f : c.staticFields.values()) {
StringBuilder buff=new StringBuilder();
buff.append("extern ");
if (f.isFinal) {
buff.append("const ");
}
buff.append(f.type.asString());
buff.append(" ").append(toC(c.className + "." + f.name));
buff.append(";");
out.println(buff.toString());
}
for ( ArrayList<MethodObj> list : c.methods.values()) {
for ( MethodObj m : list) {
if (m.isIgnore) {
continue;
}
if (m.isStatic) {
out.print(m.returnType.asString());
out.print(" " + toC(c.className + "_" + m.name) + "(");
int i=0;
for ( FieldObj p : m.parameters.values()) {
if (i > 0) {
out.print(", ");
}
out.print(p.type.asString() + " " + p.name);
i++;
}
out.println(");");
}
}
}
out.print("class " + toC(c.className) + " : public ");
if (c.superClassName == null) {
if (c.className.equals("java.lang.Object")) {
out.print("RefBase");
}
else {
out.print("java_lang_Object");
}
}
else {
out.print(toC(c.superClassName));
}
out.println(" {");
out.println("public:");
for ( FieldObj f : c.instanceFields.values()) {
out.print(" ");
out.print(f.type.asString() + " " + f.name);
out.println(";");
}
out.println("public:");
for ( ArrayList<MethodObj> list : c.methods.values()) {
for ( MethodObj m : list) {
if (m.isIgnore) {
continue;
}
if (m.isStatic) {
continue;
}
if (m.isConstructor) {
out.print(" " + toC(c.className) + "(");
}
else {
out.print(" " + m.returnType.asString() + " "+ m.name+ "(");
}
int i=0;
for ( FieldObj p : m.parameters.values()) {
if (i > 0) {
out.print(", ");
}
out.print(p.type.asString());
out.print(" " + p.name);
i++;
}
out.println(");");
}
}
out.println("};");
}
ArrayList<String> constantNames=New.arrayList(stringConstantToStringMap.keySet());
Collections.sort(constantNames);
for ( String c : constantNames) {
String s=stringConstantToStringMap.get(c);
if (JavaParser.REF_COUNT_STATIC) {
out.println("ptr<java_lang_String> " + c + " = STRING(L\""+ s+ "\");");
}
else {
out.println("java_lang_String* " + c + " = STRING(L\""+ s+ "\");");
}
}
}
| Write the C++ header. |
private void updateToggleButton(Action action,Icon icon,Icon iconRover,Icon iconPressed){
toggleButton.setAction(action);
toggleButton.setIcon(icon);
toggleButton.setRolloverIcon(iconRover);
toggleButton.setPressedIcon(iconPressed);
toggleButton.setText(null);
}
| Updates the toggle button to contain the Icon <code>icon</code>, and Action <code>action</code>. |
public void clearAllBreakpoints(){
for ( SourceInfo si : urlToSourceInfo.values()) {
si.removeAllBreakpoints();
}
}
| Clears all breakpoints. |
void maybeStartFlow(){
synchronized (this) {
if (runState == IDLE || runState == PAUSED_AT_GO_LAZY) {
runState=RUNNING;
lastDirectiveIndex=-1;
restartNeeded=false;
}
else {
if (runState == CANCEL_REQUESTED) {
restartNeeded=true;
}
return;
}
}
intermediateValue=currentValue;
runFlowFrom(0,false);
}
| Called on the worker looper thread. Starts the data processing flow if it's not running. This also cancels the lazily-executed part of the flow if the run state is "paused at lazy". |
public void populate(IChunkProvider p_73153_1_,int p_73153_2_,int p_73153_3_){
BlockFalling.fallInstantly=true;
int k=p_73153_2_ * 16;
int l=p_73153_3_ * 16;
BiomeGenBase biomegenbase=this.worldObj.getBiomeGenForCoords(k + 16,l + 16);
this.rand.setSeed(this.worldObj.getSeed());
long i1=this.rand.nextLong() / 2L * 2L + 1L;
long j1=this.rand.nextLong() / 2L * 2L + 1L;
this.rand.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed());
boolean flag=false;
boolean populationFlag=((WorldProviderPlanet)worldObj.provider).getDimensionProperties(k,l).hasRivers();
if (populationFlag) MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_,worldObj,rand,p_73153_2_,p_73153_3_,flag));
if (this.mapFeaturesEnabled) {
}
biomegenbase.decorate(this.worldObj,this.rand,k,l);
if (TerrainGen.populate(p_73153_1_,worldObj,rand,p_73153_2_,p_73153_3_,flag,ANIMALS)) {
SpawnerAnimals.performWorldGenSpawning(this.worldObj,biomegenbase,k + 8,l + 8,16,16,this.rand);
}
k+=8;
l+=8;
if (zmaster587.advancedRocketry.api.Configuration.allowTerraforming && worldObj.provider.getClass() == WorldProviderPlanet.class) {
if (DimensionManager.getInstance().getDimensionProperties(worldObj.provider.dimensionId).isTerraformed()) {
Chunk chunk=worldObj.getChunkFromChunkCoords(p_73153_2_,p_73153_3_);
PlanetEventHandler.modifyChunk(worldObj,(WorldProviderPlanet)worldObj.provider,chunk);
}
}
if (populationFlag) MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(p_73153_1_,worldObj,rand,p_73153_2_,p_73153_3_,flag));
BlockFalling.fallInstantly=false;
}
| Populates chunk with ores etc etc |
public static ImdnDocument parseDeliveryReport(String xml) throws SAXException, ParserConfigurationException, ParseFailureException {
InputSource input=new InputSource(new ByteArrayInputStream(xml.getBytes()));
ImdnParser parser=new ImdnParser(input).parse();
return parser.getImdnDocument();
}
| Parse a delivery report |
public static String findOptionValue(String optionName,List<String> args,boolean remove){
int idx=args.indexOf(optionName);
if (idx >= 0 && idx < args.size() - 2 && !args.get(idx + 1).startsWith("-")) {
if (remove) {
args.remove(idx);
return args.remove(idx);
}
else {
return args.get(idx + 1);
}
}
return null;
}
| Finds the value for an option that requires value. Can remove it from the original list if needed. |
private void validateFechaDevolucion(HttpServletRequest request,ConsultaUnidadesDocumentalesForm consultaUnidadesDocumentalesForm,ActionErrors errors){
if (!new CustomDate(consultaUnidadesDocumentalesForm.getFechaFormatoFin(),consultaUnidadesDocumentalesForm.getFechaAFin(),consultaUnidadesDocumentalesForm.getFechaMFin(),consultaUnidadesDocumentalesForm.getFechaDFin(),consultaUnidadesDocumentalesForm.getFechaSFin()).validate() || !new CustomDate(consultaUnidadesDocumentalesForm.getFechaFinFormatoIni(),consultaUnidadesDocumentalesForm.getFechaFinAIni(),consultaUnidadesDocumentalesForm.getFechaFinMIni(),consultaUnidadesDocumentalesForm.getFechaFinDIni(),consultaUnidadesDocumentalesForm.getFechaFinSIni()).validate() || !new CustomDate(consultaUnidadesDocumentalesForm.getFechaFinFormatoFin(),consultaUnidadesDocumentalesForm.getFechaFinAFin(),consultaUnidadesDocumentalesForm.getFechaFinMFin(),consultaUnidadesDocumentalesForm.getFechaFinDFin(),consultaUnidadesDocumentalesForm.getFechaFinSFin()).validate()) {
errors.add(ActionErrors.GLOBAL_MESSAGE,new ActionError(Constants.ERROR_DATE,Messages.getString(SolicitudesConstants.LABEL_FECHA_DEVOLUCION,request.getLocale())));
}
}
| Valida la fecha de devolucion |
public NbtTagInt(){
}
| Construct new NbtTagInt without name and 0 as value. |
public double filter(double x){
double s0=x - a1 * s1 - a2 * s2;
double retval=(double)(b0 * s0 + b1 * s1 + b2 * s2);
s2=s1;
s1=s0;
return retval;
}
| Filters a single input sample (single-step filtering). |
public String addOpts(String opts){
applicationUtils.checkApplicationSelected();
Map<String,String> parameters=new HashMap<>();
parameters.put("applicationName",applicationUtils.getCurrentApplication().getName());
parameters.put("jvmOptions",opts);
parameters.put("jvmRelease",applicationUtils.getCurrentApplication().getJvmRelease());
parameters.put("jvmMemory",applicationUtils.getCurrentApplication().getServer().getJvmMemory().toString());
try {
restUtils.sendPutCommand(authenticationUtils.finalHost + "/server/configuration/jvm",authenticationUtils.getMap(),parameters).get("body");
}
catch ( ManagerResponseException e) {
throw new CloudUnitCliException("Couldn't add JVM option",e);
}
return "Add java options to " + applicationUtils.getCurrentApplication().getName() + " application successfully";
}
| Add an option for JVM |
static public void assertNull(String message,Object object){
assertTrue(message,object == null);
}
| Asserts that an object is null. If it is not an AssertionFailedError is thrown with the given message. |
public static CommandResult execCommand(List<String> commands,boolean isRoot,boolean isNeedResultMsg){
return execCommand(commands == null ? null : commands.toArray(new String[]{}),isRoot,isNeedResultMsg);
}
| execute shell commands |
protected void cacheCtClass(String classname,CtClass c,boolean dynamic){
if (dynamic) {
super.cacheCtClass(classname,c,dynamic);
}
else {
if (repository.isPrune()) c.prune();
softcache.put(classname,c);
}
}
| Cache a class |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.