code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static boolean checkRootPermission(){
return execCommand("echo root",true,false).result == 0;
}
| check whether has root permission |
private String createNewReview(TaskData taskData,AppraisePluginReviewClient client) throws CoreException {
boolean canRequestReview=client.canRequestReview(taskData);
if (!canRequestReview) {
throw new CoreException(Status.CANCEL_STATUS);
}
String taskId=null;
try {
Review review=buildReviewFromTaskDa... | Helper method for creating a new review and writing it out. |
public TokenizerChain(CharFilterFactory[] charFilters,TokenizerFactory tokenizer,TokenFilterFactory[] filters){
charFilters=null == charFilters ? EMPTY_CHAR_FITLERS : charFilters;
filters=null == filters ? EMPTY_TOKEN_FITLERS : filters;
if (null == tokenizer) {
throw new NullPointerException("TokenizerFactory... | Creates a new TokenizerChain. |
public void playStream(Stream stream){
if (player.isPlaying()) {
player.stop();
}
player.reset();
try {
state=State.PREPARING;
List<String> keys=Arrays.asList(getResources().getStringArray(R.array.api_keys));
String key=keys.get((new Random()).nextInt(keys.size()));
player.setDataSource(this... | Start play a stream |
public Config(Properties props){
this.props=props;
if (Boolean.valueOf(props.getProperty("print.props",DEFAULT_PRINT_PROPS)).booleanValue()) {
printProps();
}
}
| Create config without algorithm - useful for a programmatic perf test. |
public void finish() throws Exception {
}
| <p>No finish processing is required.</p> |
public String preserveOrderTipText(){
return "If enabled, no randomization is occurring and the order in the data is preserved.";
}
| Describes this property. |
public boolean include(Column col,String name){
return true;
}
| Always returns true, accepting all columns. |
protected void addSubScopesPropertyDescriptor(Object object){
itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),getResourceLocator(),getString("_UI_ExecutionScope_subScopes_feature"),getString("_UI_PropertyDescriptor_description","_UI_Executio... | This adds a property descriptor for the Sub Scopes feature. <!-- begin-user-doc --> <!-- end-user-doc --> |
public static Double toDouble(String str) throws PageException {
return new Double(toDoubleValue(str));
}
| cast a Object to a Double Object (reference Type) |
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 boolean isForInfOnly(){
return forInfOnly;
}
| Gets the value of the forInfOnly property. |
protected RelNode convertColumnList(SqlInsert call,RelNode sourceRel){
RelDataType sourceRowType=sourceRel.getRowType();
final RexNode sourceRef=rexBuilder.makeRangeReference(sourceRowType,0,false);
final List<String> targetColumnNames=new ArrayList<>();
final List<RexNode> columnExprs=new ArrayList<>();
coll... | Creates a source for an INSERT statement. <p>If the column list is not specified, source expressions match target columns in order. <p>If the column list is specified, Source expressions are mapped to target columns by name via targetColumnList, and may not cover the entire target table. So, we'll make up a full row, u... |
public void rollbackDeleteCG(URI cgURI,String deleteStepId,String stepId){
try {
WorkflowStepCompleter.stepExecuting(stepId);
log.info("Updated workflow step to executing");
Object rbDataObj=workflowService.loadStepData(deleteStepId);
if (rbDataObj == null) {
log.info("CG was not deleted, nothin... | Method call when we need to rollback the deletion of a consistency group. |
public Change(int line0,int line1,int deleted,int inserted,@Nullable Change old){
this.line0=line0;
this.line1=line1;
this.inserted=inserted;
this.deleted=deleted;
link=old;
}
| Cons an additional entry onto the front of an edit script OLD. LINE0 and LINE1 are the first affected lines in the two files (origin 0). DELETED is the number of lines deleted here from file 0. INSERTED is the number of lines inserted here in file 1. If DELETED is 0 then LINE0 is the number of the line before which the... |
void write(ByteCodeWriter out) throws IOException {
out.write(ConstantPool.CP_NAME_AND_TYPE);
out.writeShort(_nameIndex);
out.writeShort(_descriptorIndex);
}
| Writes the contents of the pool entry. |
public static void hideToast(){
if (null != toast) {
toast.cancel();
}
}
| Hide the toast, if any. |
private void hideConversationScope(){
conversationContext.setParameterName("conversationID");
}
| "Hide" conversation scope by replacing its default "cid" parameter name by something unpredictable. |
public static boolean flipCoin(final double propability){
return rand.nextDouble() <= propability;
}
| Flip a coin to decide between true and false based on a probability |
protected void handleDefaultSelection(SelectionEvent event){
fireApplyEditorValue();
deactivate();
}
| Handles a default selection event from the text control by applying the editor value and deactivating this cell editor. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:26.720 -0500",hash_original_method="9AC5D8EF15BD7837ACD785C0772615A1",hash_generated_method="822B8590C95F1D5952E9B876AE6B37EF") public final void checkAccess(){
}
| Does nothing. |
public static AuditDto transformToDto(Audit audit){
if (audit == null) {
throw new WebApplicationException("Null entity object cannot be converted to Dto object.",Status.INTERNAL_SERVER_ERROR);
}
AuditDto auditDto=new AuditDto();
try {
BeanUtils.copyProperties(auditDto,audit);
auditDto.setEntityId(a... | Converts the audit entity to DTO. |
static int[] calculateSerial(int[][] sizes,ResizeConstraint[] resConstr,Float[] defPushWeights,int startSizeType,int bounds){
float[] lengths=new float[sizes.length];
float usedLength=0.0f;
for (int i=0; i < sizes.length; i++) {
if (sizes[i] != null) {
float len=sizes[i][startSizeType] != NOT_SET ? size... | Takes a number on min/preferred/max sizes and resize constraints and returns the calculated sizes which sum should add up to <code>bounds</code>. Whether the sum will actually equal <code>bounds</code> is dependent om the pref/max sizes and resize constraints. |
public void updateUI(){
setUI((ToolBarUI)UIManager.getUI(this));
if (getLayout() == null) {
setLayout(new DefaultToolBarLayout(getOrientation()));
}
invalidate();
}
| Notification from the <code>UIFactory</code> that the L&F has changed. Called to replace the UI with the latest version from the <code>UIFactory</code>. |
public void comment(char ch[],int start,int length) throws org.xml.sax.SAXException {
if (ch == null || start < 0 || length >= (ch.length - start) || length < 0) return;
append(m_doc.createComment(new String(ch,start,length)));
}
| Report an XML comment anywhere in the document. This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read). |
private void addAllChildren(List<ParseTreeNode> children){
children.forEach(null);
}
| Adds all children. |
@DSSink({DSSinkKind.SYNCHRONIZATION_DATA}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:45.546 -0500",hash_original_method="69DA3E1B323882B9D4B744C6E35751A3",hash_generated_method="60004DC4003AFFE42822995754840E35") public Message sendMessageSynchronously(int what,int arg1){
... | Send the Message synchronously. |
@Override public void onChangedRemoved(final RPObject object,final RPObject changes){
if (isUser(object)) {
if (changes.has("adminlevel")) {
adminlevel=0;
}
if (changes.has("name")) {
name=null;
}
if (changes.has("sheep")) {
sheepID=0;
}
if (changes.hasMap("features")) {
... | An object removed attribute(s). |
public File createCsvSwitchListFile(String name){
return createFile(getDefaultCsvSwitchListName(name),false);
}
| Store the CSV switch list for a location |
private char insert(char p,char[] key,int start,char val){
int len=strlen(key,start);
if (p == 0) {
p=freenode++;
eq[p]=val;
length++;
hi[p]=0;
if (len > 0) {
sc[p]=0xFFFF;
lo[p]=(char)kv.alloc(len + 1);
strcpy(kv.getArray(),lo[p],key,start);
}
else {
sc[p]=0;
... | The actual insertion function, recursive version. |
private void unregisterDelegate(String delegateName){
if (LOG.isTraceEnabled()) {
LOG.trace("unregisterDelegate: {}",delegateName);
}
delegateMap.remove(delegateName);
}
| Removes a Delegate. |
public void testBug28256() throws Exception {
try {
this.conn.setReadOnly(true);
this.stmt.execute("(SELECT 1) UNION (SELECT 2)");
this.conn.prepareStatement("(SELECT 1) UNION (SELECT 2)").execute();
if (versionMeetsMinimum(4,1)) {
((com.mysql.jdbc.Connection)this.conn).serverPrepareStatement("(... | Tests fix for BUG#28256 - When connection is in read-only mode, queries that are parentheized incorrectly identified as DML. |
public void testPessimisticOffheap() throws Exception {
testTransaction(cacheOffheap,PESSIMISTIC,KEY_1,wrap(1));
}
| Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction. |
public static Text valueOf(long l,int radix){
TextBuilder tb=new TextBuilder();
return tb.append(l,radix).toText();
}
| Returns the radix representation of the specified <code>long</code> argument. |
private void showFeedback(String message){
if (myHost != null) {
myHost.showFeedback(message);
}
else {
System.out.println(message);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
private void updateActions(final INaviAddressSpace addressSpace){
m_loadAddressSpaceAction.setEnabled(!addressSpace.isLoaded());
}
| Updates the menu actions depending on the state of the given address space. |
static void parseInterface(String line,BufferedReader reader,PhysicalNode data){
String addressKey="ip address";
String descriptionKey="description";
String switchportKey="switchport";
String switchportVlanKey="vlan";
String subInterfaceDelimeter=".";
String bitBucket="Null";
line=SubParser.after(line,INT... | Expects the below block, interface GigabitEthernet0/0/0 description link to Router3 ip address 10.1.3.1 255.255.255.0 negotiation auto |
public static byte[] expand(byte[] field,int newSize,boolean keepData){
if (field == null || field.length < newSize) {
byte[] newArray=new byte[newSize];
if (keepData && field != null) {
System.arraycopy(field,0,newArray,0,field.length);
}
return newArray;
}
return field;
}
| This method will return a new allocated array of size newSize if newSize is greater than field.length. It will return the same array otherwise Only if keepData is set to true, the data of the array will be copied to the new allocated array |
public AWTException(String msg){
super(msg);
}
| Constructs an instance of <code>AWTException</code> with the specified detail message. A detail message is an instance of <code>String</code> that describes this particular exception. |
public void displayDialog(String msg){
MaterialDialog.Builder madb=new MaterialDialog.Builder(mContext);
madb.title(R.string.error);
madb.icon(mContext.getResources().getDrawable(R.drawable.ic_warning_grey600_24dp));
madb.content(msg);
madb.positiveColor(R.color.theme_primary);
madb.positiveText(R.string.ok... | Display dialog |
@Override public void run(int connId,String[] args){
int dice=2;
int sides=6;
try {
if (args.length > 1) {
int d=args[1].indexOf('d');
dice=Integer.parseInt(args[1].substring(0,d));
sides=Integer.parseInt(args[1].substring(d + 1));
}
}
catch ( NumberFormatException ex) {
server.s... | Run this command with the arguments supplied |
public GOST3410Parameters generateParameters(){
BigInteger[] pq=new BigInteger[2];
BigInteger q=null, p=null, a=null;
int x0, c;
long x0L, cL;
if (typeproc == 1) {
x0=init_random.nextInt();
c=init_random.nextInt();
switch (size) {
case 512:
procedure_A(x0,c,pq,512);
break;
case 1024:
proce... | which generates the p , q and a values from the given parameters, returning the GOST3410Parameters object. |
private QuitAction(){
super("Quit",new ImageIcon(CMain.class.getResource("data/cancel.png")));
}
| Creates a new action controller for the Quit button. |
public void writeU16At(int val,int where){
check(val,16);
if (where > pos - 2) throw new IllegalArgumentException("cannot write past " + "end of data");
array[where++]=(byte)((val >>> 8) & 0xFF);
array[where++]=(byte)(val & 0xFF);
}
| Writes an unsigned 16 bit value to the specified position in the stream. |
public void test_getBitsFromByteArray_zeroLength(){
assertEquals(0,BytesUtil.getBits(new byte[0],0,0));
}
| You can request a zero length slice starting at bit zero of a zero length byte[]. |
public static void mruAddByEntityName(String entityName,GenericEntity pk,Map<String,LifoSet<Object>> lookupCaches){
String cacheEntityName=entityName;
LifoSet<Object> lkupCache=lookupCaches.get(cacheEntityName);
if (lkupCache == null) {
lkupCache=new LifoSet<Object>();
lookupCaches.put(cacheEntityName,lku... | Makes an entry in the "most recently used" cache. It picks the cache by the entity name and builds a signature from the primary key values. |
public DDFRecord readRecord(){
if (poRecord == null) {
poRecord=new DDFRecord(this);
}
if (poRecord.read()) {
return poRecord;
}
else {
return null;
}
}
| Read one record from the file, and return to the application. The returned record is owned by the module, and is reused from call to call in order to preserve headers when they aren't being re-read from record to record. |
public void reset(ActionMapping mapping,HttpServletRequest request){
super.reset(mapping,request);
}
| Inicia el formulario. |
public static int dehexchar(char c){
if (c >= '0' && c <= '9') {
return c - '0';
}
if (c >= 'A' && c <= 'F') {
return c - ('A' - 10);
}
if (c >= 'a' && c <= 'f') {
return c - ('a' - 10);
}
return -1;
}
| Get the hex value of a character (base16). |
@Override public ExprCfg parse(){
return new ExprCfgTop(parseInterpolate(),_string);
}
| Parses the expression string. |
public CppLine(double x1,double y1,double x2,double y2,double length,double angle){
this.x1=x1;
this.y1=y1;
this.x2=x2;
this.y2=y2;
this.length=length;
this.angle=angle;
}
| Creates a line from the parameters gotten from array. Note this takes length and angle as parameters to ensure that generated code calculates length and angle properly. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:01:21.261 -0400",hash_original_method="0A1C1768846EB684D4983B5FA0FE432E",hash_generated_method="133FB815D550EF807B30CBCE8CF1C7B5") private V doPut(K kkey,V value,boolean onlyIfAbsent){
Comparable<? super K> key=comparable(kkey);
fo... | Main insertion method. Adds element if not present, or replaces value if present and onlyIfAbsent is false. |
public static boolean isImported(JCCompilationUnit compilationUnit,TypeSymbol type){
for ( JCImport i : compilationUnit.getImports()) {
if (i.isStatic()) {
continue;
}
if (i.qualid.type.tsym == type) {
return true;
}
}
return false;
}
| Tells if the given type is imported in the given compilation unit. |
public static <A,B,C,D,T>T provideSingleton(Class<T> desiredObjectClass,A a,B b,C c,D d){
return providerHelper(desiredObjectClass,createProvider(getFactory(desiredObjectClass),a,b,c,d));
}
| Provides the desired object. The object returned will be created the first time this method is called, and all subsequent calls will return a cached instance of the same object, unless the same method is called with different factory object parameters. Throws a NoFactoryException if no factory is registered for the c... |
public void end(String namespace,String name) throws Exception {
}
| <p>No end processing is required.</p> |
public byte[] substr(final byte[] key,final int start,final int end){
checkIsInMulti();
client.substr(key,start,end);
return client.getBinaryBulkReply();
}
| Return a subset of the string from offset start to offset end (both offsets are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So -1 means the last char, -2 the penultimate and so forth. <p> The function handles out of range requests without raising an error,... |
public Executor withProgressListener(ProgressListener listener){
progress.addProgressListener(listener);
return this;
}
| Adds the given progress listener to receive periodic progress reports. |
public void insertRow(Value[] row) throws SQLException {
StatementBuilder buff=new StatementBuilder("INSERT INTO ");
appendTableName(buff);
buff.append('(');
appendColumnList(buff,false);
buff.append(")VALUES(");
buff.resetCount();
for (int i=0; i < columnCount; i++) {
buff.appendExceptFirst(",");
... | Insert a new row into the database. |
public void testNullCallBack() throws IOException {
String reqdata="Request Data";
Request request=Request.newBuilder().setStrData(reqdata).build();
socket.withNoResponse(true);
FakeCallback callback=callRpc(request,null);
verifyRequestToSocket(request);
assertTrue(callback.invoked);
assertNull(callback.r... | RPC invokes callback with null. |
public static Builder builder(){
return new Builder(new ReconfigureResponse());
}
| Returns a new reconfigure response builder. |
private Object executeBetween(PageContext pc,SQL sql,Query qr,ZExpression expression,int row) throws PageException {
Object left=executeExp(pc,sql,qr,expression.getOperand(0),row);
Object right1=executeExp(pc,sql,qr,expression.getOperand(1),row);
Object right2=executeExp(pc,sql,qr,expression.getOperand(2),row);
... | execute a between operation |
public void addUndoPoint(){
((ArffTableModel)getModel()).addUndoPoint();
}
| adds an undo point to the undo history |
public ChunkedHashStore(final TransformationStrategy<? super T> transform) throws IOException {
this(transform,null,null);
}
| Creates a chunked hash store with given transformation strategy. |
public static void load(String relPath,boolean cleanCache) throws ServletException {
int iLastPathSep=relPath.lastIndexOf("/");
String domain=relPath.substring(iLastPathSep + 1);
File dir=new File(CONFIG_DIR + File.separator + "domains"+ (iLastPathSep < 0 ? "" : File.separator + relPath.substring(0,iLastPathSep))... | Loads configuration-files for domain specified by relPath. Locks entire configuration for read, and updated domain for write. |
public boolean intersect(Rectangle rect){
GeneralPath intersectionScratchPath=createPathFromPool();
try {
Shape result=ShapeUtil.intersection(rect,this,intersectionScratchPath);
if (result != null) {
this.setPath(intersectionScratchPath,null);
return true;
}
reset();
return false;
... | Sets the current path to the intersection of itself and the provided rectangle. |
protected AbstractBalloon(String text){
if (text == null) {
String message=Logging.getMessage("nullValue.StringIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
this.setText(text);
}
| Create a balloon with text. |
public <S>T manyToOne(T destination,final S source,final MappingType mtDestination,final MappingType mtSource){
try {
return this.<T,S>getJMapper(relationalManyToOneMapper,source).getDestination(destination,source,mtDestination,mtSource);
}
catch ( Exception e) {
return logAndReturnNull(e);
}
}
| This Method returns the configured instance given in input enriched with data contained in source given in input<br> with this setting: <table summary =""> <tr> <td><code>NullPointerControl</code></td><td><code>ALL</code></td> </tr><tr> <td><code>MappingType</code> of Destination</td><td>mtDestination</td> </tr><tr> <t... |
public String queryType(){
return qryType;
}
| Gets query type. |
public List<NamedRelatedResourceRep> listVolumes(URI id){
NamedVolumesList response=getVolumeByApplication(id);
return defaultList(response.getVolumes());
}
| Get volumes associated with an application |
public static int compute7(int y){
y^=y << 6;
y^=y >>> 21;
y^=(y << 7);
return y;
}
| Marsaglia xorshift (6, 21, 7) |
void writeFrame(byte[] bytes,int offset,int length) throws IOException {
synchronized (spdyWriter) {
spdyWriter.out.write(bytes,offset,length);
}
}
| Writes a complete data frame. |
public Object runSafely(Catbert.FastStack stack) throws Exception {
MediaFile mf=getMediaFile(stack);
return Boolean.valueOf(mf != null && mf.isTV());
}
| Returns true if this MediaFile represents recorded television content |
private void jbInit() throws Exception {
panel.setLayout(panelLayout);
getContentPane().add(panel);
textPane.setPreferredSize(new Dimension(350,300));
textPane.setReadWrite(false);
textPane.setMargin(new Insets(2,2,2,2));
panel.add(textPane,BorderLayout.CENTER);
this.getContentPane().add(confirmPanel,Bord... | Static Init |
public VirtualInvokeExpr newVirtualInvokeExpr(Local base,SootMethodRef method,Value arg){
return new JVirtualInvokeExpr(base,method,Arrays.asList(new Value[]{arg}));
}
| Constructs a NewVirtualInvokeExpr(Local base, SootMethodRef method, List of Immediate) grammar chunk. |
public FactoryConfigurationError(String msg){
super(msg);
this.exception=null;
}
| Create a new <code>FactoryConfigurationError</code> with the <code>String </code> specified as an error message. |
public void reset(){
if (_refs != null) {
_refs.clear();
_refCount=0;
}
_classRefs.clear();
_typeRefs=null;
_offset=0;
_isPacket=false;
_isUnshared=false;
}
| Resets all counters and references |
@Override protected TurnCandidateHarvest createHarvest(HostCandidate hostCandidate){
return new TurnCandidateHarvest(this,hostCandidate);
}
| Creates a new <tt>TurnCandidateHarvest</tt> instance which is to perform TURN harvesting of a specific <tt>HostCandidate</tt>. |
public int size(){
return addrs.size();
}
| Retrieves the number of addresses in this reference. |
public void notifyMovement(final ActiveEntity entity,final int oldX,final int oldY,final int newX,final int newY){
Rectangle2D oeArea;
Rectangle2D neArea;
boolean oldIn;
boolean newIn;
oeArea=entity.getArea(oldX,oldY);
neArea=entity.getArea(newX,newY);
for ( final MovementListener l : movementListeners) ... | Notify anything interested that an entity moved. |
@Override public EnterFromDateToToDateActivity.TimeObject add(long time,int val){
Calendar c=Calendar.getInstance();
c.setTimeInMillis(time);
c.add(Calendar.MONTH,val);
return timeObjectFromCalendar(c);
}
| add "val" months to the month object that contains "time" and returns the new TimeObject |
public TLongIterator(TLongHash hash){
super(hash);
_hash=hash;
}
| Creates a TLongIterator for the elements in the specified collection. |
@GridifySetToValue(gridName="GridifySetToValueTarget",threshold=2,splitSize=2) @Override public long findMaximumInIterator(Iterator<Long> input){
assert input != null;
assert input.hasNext();
System.out.println(">>>");
System.out.println("Find maximum in iterator: " + input);
System.out.println(">>>");
long... | Find maximum value in Iterator. |
public Trap newTrap(SootClass exception,Unit beginStmt,Unit endStmt,Unit handlerStmt){
return new JTrap(exception,beginStmt,endStmt,handlerStmt);
}
| Constructs a new JTrap for the given exception on the given Stmt range with the given Stmt handler. |
@Override public int hashCode(){
int hash=((time.toSecondOfDay() + (timeEndOfDay ? 1 : 0)) << 15) + (month.ordinal() << 11) + ((dom + 32) << 5)+ ((dow == null ? 7 : dow.ordinal()) << 2)+ (timeDefinition.ordinal());
return hash ^ standardOffset.hashCode() ^ offsetBefore.hashCode()^ offsetAfter.hashCode();
}
| Returns a suitable hash code. |
public Vec4[] clip(Vec4 pa,Vec4 pb){
if (pa == null || pb == null) {
throw new IllegalArgumentException("Point Is Null");
}
if (pa.equals(pb)) return null;
Line line=Line.fromSegment(pa,pb);
double ldotv=this.n.dot3(line.getDirection());
if (ldotv == 0) {
double ldots=this.n.dot4(line.getOrigin())... | Clip a line segment to this plane. |
public Map attributes(){
return attributes;
}
| Returns a <code>Map</code> of the attributes of the node or an empty <code>Map</code> if the node does not have any attributes. |
public void onMainActivityStart(){
try {
TraceEvent.begin("GoogleServicesManager.onMainActivityStart");
boolean accountsChanged=SigninHelper.checkAndClearAccountsChangedPref(mContext);
mSigninHelper.validateAccountSettings(accountsChanged);
}
finally {
TraceEvent.end("GoogleServicesManager.onMainA... | Called once during initialization and then again for every start (warm-start). Responsible for checking if configuration has changed since Chrome was last launched and updates state accordingly. |
private void writeObject(final java.io.ObjectOutputStream out) throws IOException {
out.writeInt(level.intValue());
}
| Serialize the state of the object. |
public void visitTryCatchBlock(Label start,Label end,Label handler,String type){
if (mv != null) {
mv.visitTryCatchBlock(start,end,handler,type);
}
}
| Visits a try catch block. |
public boolean controlRunTrain(int idx){
if (log.isDebugEnabled()) {
log.debug("controlRunTrain= " + idx + " runMode= "+ _runMode+ " - warrant= "+ getDisplayName());
}
boolean ret=true;
int oldIndex=-MODE_MANUAL;
if (_engineer == null) {
switch (idx) {
case HALT:
case RESUME:
case RETRY:
ret=false;
... | Pause and resume auto-running train or abort any allocation state _engineer.abort() calls setRunMode(MODE_NONE,...) which calls deallocate all. |
public List(A head,List<A> tail){
this.tail=tail;
this.head=head;
}
| Construct a list given its head and tail. |
public static String toString(List<HostAddress> addrs){
String str="";
for (int i=0; i < addrs.size(); i++) {
if (addrs.get(i).type != null) {
str+="address=(host=" + addrs.get(i).host + ")(port="+ addrs.get(i).port+ ")(type="+ addrs.get(i).type+ ")";
}
else {
boolean isIPv6=addrs.get(i).host !... | ToString implementation of addresses. |
ByteVector put12(final int b,final int s){
int length=this.length;
if (length + 3 > data.length) {
enlarge(3);
}
byte[] data=this.data;
data[length++]=(byte)b;
data[length++]=(byte)(s >>> 8);
data[length++]=(byte)s;
this.length=length;
return this;
}
| Puts a byte and a short into this byte vector. The byte vector is automatically enlarged if necessary. |
public void addCustomParseFilter(ParseFilter filter){
validateParameterNonNull(filter,"filter");
this.customParseFilters.add(filter);
}
| Adds a custom parse filter that would be used during the spidering. <p/> This method should be used to customize the Spider from any other extension of ZAP. The filters added will be loaded whenever starting any scan. |
MutableBigInteger(int[] val){
value=val;
intLen=val.length;
}
| Construct a new MutableBigInteger with the specified value array up to the length of the array supplied. |
private static LIRInstruction first(List<LIRInstruction> seq){
return seq.get(0);
}
| Gets the first element from a LIR instruction sequence. |
public NonDominatedSortingSelection(int popSize){
this.popSize=popSize;
}
| Creates a new NSGA-II selection. |
private void addToInputEvent(Method inputEvent,Method outputEvent){
if (inputEvent == null || outputEvent == null) return;
if (!eventBlocks.containsKey(inputEvent)) eventBlocks.put(inputEvent,new ArrayList<Method>());
if (eventBlocks.get(inputEvent).contains(outputEvent)) return;
eventBlocks.get(inputEven... | Add the outputevent to the input event's api call list. Don't group methods. Don't add if the output event is already in the list as determined by .equals(). |
public boolean hasSubscriptionManagerRole(){
return getUserRoles().contains(UserRoleType.SUBSCRIPTION_MANAGER);
}
| Checks whether the user is a subscription manager.. |
private static void removeTextNodes(final INaviView view,final ImmutableList<INaviViewNode> nodes){
final Set<INaviViewNode> toDelete=new HashSet<INaviViewNode>();
for ( final INaviViewNode node : nodes) {
for ( final INaviViewNode parent : node.getParents()) {
if (parent instanceof INaviTextNode) {
... | Removes text nodes from the deleted nodes. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.