code
stringlengths 10
174k
| nl
stringlengths 3
129k
|
---|---|
public void start() throws BaleenException {
if (!isRunning()) {
LOGGER.debug("Starting pipeline {}",name);
try {
if (engine.isProcessing()) {
LOGGER.info("Resuming pipeline {}",name);
engine.resume();
}
else {
LOGGER.info("Beginning processing on pipeline {}",name);
engine.process();
}
metrics.getCounter("started").inc();
}
catch ( ResourceInitializationException e) {
throw new BaleenException("Error starting pipeline",e);
}
}
else {
LOGGER.debug("Pipeline {} is already running, and so cannot be started",name);
}
}
| Start the pipeline processing. |
public XACacheLoaderTxn(String str){
this.tableName=str;
}
| Creates a new instance of XACacheLoaderTxn |
public static TestConfiguration buildDefaultConfiguration(String testSourcePath,Iterable<File> testSourceFiles,Iterable<String> processors,List<String> options,boolean shouldEmitDebugInfo){
String classPath=getDefaultClassPath();
File outputDir=getOutputDirFromProperty();
TestConfigurationBuilder builder=getDefaultConfigurationBuilder(testSourcePath,outputDir,classPath,testSourceFiles,processors,options,shouldEmitDebugInfo);
return builder.validateThenBuild(true);
}
| This is the default configuration used by Checker Framework JUnit tests. |
public RenderableLayer(){
}
| Creates a new <code>RenderableLayer</code> with a null <code>delegateOwner</code> |
public static MethodScope make(Method m){
return new MethodScope(m);
}
| Factory method. Takes a <tt>Method</tt> object and creates a scope for it. |
@Override public ResultSet executeQuery() throws SQLException {
try {
int id=getNextId(TraceObject.RESULT_SET);
if (isDebugEnabled()) {
debugCodeAssign("ResultSet",TraceObject.RESULT_SET,id,"executeQuery()");
}
batchIdentities=null;
synchronized (session) {
checkClosed();
closeOldResultSet();
ResultInterface result;
boolean scrollable=resultSetType != ResultSet.TYPE_FORWARD_ONLY;
boolean updatable=resultSetConcurrency == ResultSet.CONCUR_UPDATABLE;
try {
setExecutingStatement(command);
result=command.executeQuery(maxRows,scrollable);
}
finally {
setExecutingStatement(null);
}
resultSet=new JdbcResultSet(conn,this,result,id,closedByResultSet,scrollable,updatable,cachedColumnLabelMap);
}
return resultSet;
}
catch ( Exception e) {
throw logAndConvert(e);
}
}
| Executes a query (select statement) and returns the result set. If another result set exists for this statement, this will be closed (even if this statement fails). |
public void delete(Project project){
if (!security.hasRight(AccessRight.DELETE_PROJECT) && !security.isOwner(project)) {
messages.warn("You do not have permission to delete this project.");
}
else {
try {
new ProjectDao().delete(project);
messages.info("Project " + project.getName() + " has been removed.");
projectEvent.fire(new ModifiedProjectMessage(project,this));
}
catch ( Exception e) {
}
}
}
| deletes a project |
public static void logResult(ResultObject resultObject){
logResult(resultObject,out);
}
| Writes the result string from the given result object in the result file. |
public void add(final Object eKey,final Object element){
if ((!_elements.containsKey(eKey)) && (getType() != TYPE_UNSYNCHRONIZED_MOV)) {
_elementOrder.add(eKey);
}
_elements.put(eKey,element);
}
| Adds element with the key into the Ordered List. |
private boolean cleanupStaleProtectionSetVolumes(URI protectionSetURI){
ProtectionSet protectionSet=dbClient.queryObject(ProtectionSet.class,protectionSetURI);
boolean protectionSetRemoved=false;
if (protectionSet != null) {
StringSet protectionSetVolumes=protectionSet.getVolumes();
StringSet volumesToRemove=new StringSet();
if (protectionSetVolumes != null) {
Iterator<String> volumesItr=protectionSetVolumes.iterator();
while (volumesItr.hasNext()) {
String volumeUriStr=volumesItr.next();
Volume volume=dbClient.queryObject(Volume.class,URI.create(volumeUriStr));
if (volume == null) {
volumesToRemove.add(volumeUriStr);
log.info("Removing stale Volume {} referenced by ProtectionSet {}.",volumeUriStr,protectionSet.getId());
}
}
if (protectionSetVolumes.size() == volumesToRemove.size()) {
log.info("ProtectionSet {} has no volume references so it is being removed.",protectionSet.getId());
dbClient.markForDeletion(protectionSet);
protectionSetRemoved=true;
}
else {
protectionSetVolumes.removeAll(volumesToRemove);
dbClient.persistObject(protectionSet);
}
}
}
return protectionSetRemoved;
}
| Cleans up stale ProtectionSet volume references. Meaning, volumes referenced by the ProtectionSet that no longer exist in the DB will be removed. Also, if the ProtectionSet ends up containing zero volumes after this operation, the ProtectionSet itself will be removed from the DB. |
public void testDoubleSignedZero() throws IOException {
Directory dir=newDirectory();
RandomIndexWriter writer=new RandomIndexWriter(random(),dir);
Document doc=new Document();
doc.add(new DoubleDocValuesField("value",+0D));
doc.add(newStringField("value","+0",Field.Store.YES));
writer.addDocument(doc);
doc=new Document();
doc.add(new DoubleDocValuesField("value",-0D));
doc.add(newStringField("value","-0",Field.Store.YES));
writer.addDocument(doc);
doc=new Document();
IndexReader ir=writer.getReader();
writer.close();
IndexSearcher searcher=newSearcher(ir);
Sort sort=new Sort(new SortField("value",SortField.Type.DOUBLE));
TopDocs td=searcher.search(new MatchAllDocsQuery(),10,sort);
assertEquals(2,td.totalHits);
assertEquals("-0",searcher.doc(td.scoreDocs[0].doc).get("value"));
assertEquals("+0",searcher.doc(td.scoreDocs[1].doc).get("value"));
ir.close();
dir.close();
}
| Tests sorting on type double with +/- zero |
public static void vibrate(Context context,int vibrateMilliSec){
Vibrator v=(Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE);
v.vibrate(vibrateMilliSec);
}
| Vibrates the device. |
public static void main(String[] args) throws IOException {
Source source;
if (args.length == 0) {
source=Source.newBuilder(new InputStreamReader(System.in)).name("<stdin>").mimeType(SLLanguage.MIME_TYPE).build();
}
else {
source=Source.newBuilder(new File(args[0])).build();
}
executeSource(source,System.in,System.out);
}
| The main entry point. |
public boolean isGroupChatAutoAccepted(){
return readBoolean(RcsSettingsData.AUTO_ACCEPT_GROUP_CHAT);
}
| Is group chat invitation auto accepted |
public static double beta(double a,double b){
double try_x;
double try_y;
do {
try_x=Math.pow(raw(),1 / a);
try_y=Math.pow(raw(),1 / b);
}
while ((try_x + try_y) > 1);
return try_x / (try_x + try_y);
}
| Generate a random number from a beta random variable. |
public String toEPL(EPStatementFormatter formatter){
StringWriter writer=new StringWriter();
toEPL(formatter,writer);
return writer.toString();
}
| Rendering using the provided formatter. |
public VerletParticle3D(ReadonlyVec3D v,float w){
this(v.x(),v.y(),v.z(),w);
}
| Creates particle with weight w at the position of the passed in vector |
public AsyncHttpClient(int httpPort,int httpsPort){
this(false,httpPort,httpsPort);
}
| Creates a new AsyncHttpClient. |
public static void komlToBinary(String koml,String binary) throws Exception {
Object o;
checkKOML();
o=KOML.read(koml);
if (o == null) throw new Exception("Failed to deserialize object from XML file '" + koml + "'!");
writeBinary(binary,o);
}
| converts a KOML file into a binary one |
protected Location(LocationPK locationId){
Assert.notNull(locationId,"Creation of Location with locationId null");
this.locationId=locationId;
}
| Create a new Location with the business key. |
@Override protected void onPause(){
super.onPause();
if (mPreview != null) {
mPreview.stop();
}
}
| Stops the camera. |
protected void mergeFeatures(KMLAbstractContainer sourceContainer){
List<KMLAbstractFeature> featuresListCopy=new ArrayList<KMLAbstractFeature>(this.getFeatures().size());
Collections.copy(featuresListCopy,this.getFeatures());
for ( KMLAbstractFeature sourceFeature : sourceContainer.getFeatures()) {
String id=sourceFeature.getId();
if (!WWUtil.isEmpty(id)) {
for ( KMLAbstractFeature existingFeature : featuresListCopy) {
String currentId=existingFeature.getId();
if (!WWUtil.isEmpty(currentId) && currentId.equals(id)) this.getFeatures().remove(existingFeature);
}
}
this.getFeatures().add(sourceFeature);
}
}
| Merge a list of incoming features with the current list. If an incoming feature has the same ID as an existing one, replace the existing one, otherwise add the incoming one. |
public ChooserIntentBuilder priority(String... packageNames){
mIntent.putExtra(BottomSheetChooserActivity.EXTRA_PRIORITY_PACKAGES,new ArrayList<>(Arrays.asList(packageNames)));
return this;
}
| Sets the items which should be listed first in the chooser. First item in the list will be shown first. If history is enabled, history items will appear before the priority items. |
public static _ItemType fromString(final String value) throws SOAPSerializationException {
return (_ItemType)Enumeration.fromString(value,_ItemType.VALUES_TO_INSTANCES);
}
| Gets the specific enumeration value in this class appropriate for the given XML attribute value. If no value is known, null is returned (_DEFAULT is not used; that value is for when the attribute is not present). |
public void registerElementNode(double version,String uri,String localName,Class<? extends FXGNode> nodeClass){
scanner.registerElementNode(version,uri,localName,nodeClass);
}
| Registers a custom FXGNode for a particular type of element encountered while parsing an FXG document. This method must be called prior to parsing. |
@SuppressWarnings("deprecation") private View makeAndAddView(int position,int childrenBottomOrTop,boolean flow,boolean selected){
View child;
int childrenLeft;
if (!mDataChanged) {
child=mRecycler.getActiveView(position);
if (child != null) {
if (ViewDebug.TRACE_RECYCLER) {
ViewDebug.trace(child,ViewDebug.RecyclerTraceType.RECYCLE_FROM_ACTIVE_HEAP,position,getChildCount());
}
childrenLeft=getItemLeft(position);
setupChild(child,position,childrenBottomOrTop,flow,childrenLeft,selected,true);
return child;
}
}
onItemAddedToList(position,flow);
childrenLeft=getItemLeft(position);
child=obtainView(position,mIsScrap);
setupChild(child,position,childrenBottomOrTop,flow,childrenLeft,selected,mIsScrap[0]);
return child;
}
| Obtain the view and add it to our list of children. The view can be made fresh, converted from an unused view, or used as is if it was in the recycle bin. |
private byte[] generateNonce(){
byte[] nonce=new byte[32];
SecureRandom secureRandom=new SecureRandom();
secureRandom.nextBytes(nonce);
return nonce;
}
| For simplicity, we generate the nonce in the client. However, it should be generated on the server for anti-replay protection. |
public void withdraw(double amount){
if (amount < getBalance()) {
setBalance(getBalance() - amount);
}
else System.out.println("Error! Savings account overdrawn transtaction rejected");
}
| Decrease balance by amount |
public static int orientationIndex(Coordinate p1,Coordinate p2,Coordinate q){
int index=orientationIndexFilter(p1,p2,q);
if (index <= 1) return index;
DD dx1=DD.valueOf(p2.x).selfAdd(-p1.x);
DD dy1=DD.valueOf(p2.y).selfAdd(-p1.y);
DD dx2=DD.valueOf(q.x).selfAdd(-p2.x);
DD dy2=DD.valueOf(q.y).selfAdd(-p2.y);
return dx1.selfMultiply(dy2).selfSubtract(dy1.selfMultiply(dx2)).signum();
}
| Returns the index of the direction of the point <code>q</code> relative to a vector specified by <code>p1-p2</code>. |
public static byte[] accDecoderPktOpsMode(int addr,int active,int outputChannel,int cvNum,int data){
if (addr < 1 || addr > 511) {
log.error("invalid address " + addr);
throw new IllegalArgumentException();
}
if (active < 0 || active > 1) {
log.error("invalid active (C) bit " + addr);
return null;
}
if (outputChannel < 0 || outputChannel > 7) {
log.error("invalid output channel " + addr);
return null;
}
if (cvNum < 1 || cvNum > 1023) {
log.error("invalid CV number " + cvNum);
return null;
}
if (data < 0 || data > 255) {
log.error("invalid data " + data);
return null;
}
int lowAddr=addr & 0x3F;
int highAddr=((~addr) >> 6) & 0x07;
int lowCVnum=(cvNum - 1) & 0xFF;
int highCVnum=((cvNum - 1) >> 8) & 0x03;
byte[] retVal=new byte[6];
retVal[0]=(byte)(0x80 | lowAddr);
retVal[1]=(byte)(0x80 | (highAddr << 4) | (active << 3)| outputChannel & 0x07);
retVal[2]=(byte)(0xEC | highCVnum);
retVal[3]=(byte)(lowCVnum);
retVal[4]=(byte)(0xFF & data);
retVal[5]=(byte)(retVal[0] ^ retVal[1] ^ retVal[2]^ retVal[3]^ retVal[4]);
return retVal;
}
| From the NMRA RP: Basic Accessory Decoder Packet address for operations mode programming 10AAAAAA 0 1AAACDDD 0 1110CCVV 0 VVVVVVVV 0 DDDDDDDD Where DDD is used to indicate the output whose CVs are being modified and C=1. If CDDD= 0000 then the CVs refer to the entire decoder. The resulting packet would be {preamble} 10AAAAAA 0 1AAACDDD 0 (1110CCVV 0 VVVVVVVV 0 DDDDDDDD) 0 EEEEEEEE 1 Accessory Decoder Address (Configuration Variable Access Instruction) Error Byte |
static private byte[] toBytes(Vector octs){
ByteArrayOutputStream bOut=new ByteArrayOutputStream();
for (int i=0; i != octs.size(); i++) {
try {
DEROctetString o=(DEROctetString)octs.elementAt(i);
bOut.write(o.getOctets());
}
catch ( ClassCastException e) {
throw new IllegalArgumentException(octs.elementAt(i).getClass().getName() + " found in input should only contain DEROctetString");
}
catch ( IOException e) {
throw new IllegalArgumentException("exception converting octets " + e.toString());
}
}
return bOut.toByteArray();
}
| convert a vector of octet strings into a single byte string |
public static double computeArea(Point a,Point b){
if (a.getTimestamp() == b.getTimestamp()) {
return 0;
}
if (a.getTimestamp() > b.getTimestamp()) {
return computeArea(b,a);
}
final double x1=a.getTimestamp();
final double x2=b.getTimestamp();
final double y1=a.getValue();
final double y2=b.getValue();
if (sameSign(y1,y2)) {
final double area=areaPositivePoints(x1,Math.abs(y1),x2,Math.abs(y2));
return Math.copySign(area,y1);
}
else {
final double interceptsX=computeInterceptsX(x1,x2,y1,y2);
final double area1=areaPositivePoints(x1,Math.abs(y1),interceptsX,0);
final double area2=areaPositivePoints(interceptsX,0,x2,Math.abs(y2));
return Math.copySign(area1,y1) + Math.copySign(area2,y2);
}
}
| Compute the area that two data points form with the X-axis. The area is positive above the X-axis and negative below. |
public static CommitLogBucket loadBucket(Key<CommitLogBucket> bucketKey){
CommitLogBucket bucket=ofy().load().key(bucketKey).now();
return bucket == null ? new CommitLogBucket.Builder().setBucketNum(bucketKey.getId()).build() : bucket;
}
| Returns the loaded bucket for the given key, or a new object if the bucket doesn't exist. |
private void selectAttributeSetInstance(){
int m_warehouse_id=getM_Warehouse_ID();
int m_product_id=getM_Product_ID();
if (m_product_id <= 0) return;
MProduct product=MProduct.get(getCtx(),m_product_id);
MWarehouse wh=MWarehouse.get(getCtx(),m_warehouse_id);
String title=product.get_Translation(MProduct.COLUMNNAME_Name) + " - " + wh.get_Translation(MWarehouse.COLUMNNAME_Name);
PAttributeInstance pai=new PAttributeInstance(m_frame,title,m_warehouse_id,0,m_product_id,0);
if (pai.getM_AttributeSetInstance_ID() != -1) {
fAttrSetInstance_ID.setText(pai.getM_AttributeSetInstanceName());
fAttrSetInstance_ID.setValue(new Integer(pai.getM_AttributeSetInstance_ID()));
}
else {
fAttrSetInstance_ID.setValue(Integer.valueOf(0));
}
}
| filter by Attribute Set Instance |
public void reallocateMigratingInContainers(){
for ( Container container : getContainersMigratingIn()) {
if (!getContainerList().contains(container)) {
getContainerList().add(container);
}
if (!getContainerScheduler().getContainersMigratingIn().contains(container.getUid())) {
getContainerScheduler().getContainersMigratingIn().add(container.getUid());
}
getContainerRamProvisioner().allocateRamForContainer(container,container.getCurrentRequestedRam());
getContainerBwProvisioner().allocateBwForContainer(container,container.getCurrentRequestedBw());
getContainerScheduler().allocatePesForContainer(container,container.getCurrentRequestedMips());
setSize(getSize() - container.getSize());
}
}
| Reallocate migrating in containers. |
public Matrix(Matrix copy){
if (copy == null) {
return;
}
scaleX=copy.scaleX;
scaleY=copy.scaleY;
skew0=copy.skew0;
skew1=copy.skew1;
translateX=copy.translateX;
translateY=copy.translateY;
}
| Copy another matrix |
public void actionPerformed(ActionEvent e){
DataModel dataModel=getDataEditor().getSelectedDataModel();
DataSet dataSet=(DataSet)dataModel;
List<Node> variables=new LinkedList<>();
for (int j=0; j < dataSet.getNumColumns(); j++) {
variables.add(dataSet.getVariable(j));
}
DataSet newDataSet=new ColtDataSet(0,variables);
int newRow=-1;
ROWS: for (int i=0; i < dataSet.getNumRows(); i++) {
for (int j=0; j < dataSet.getNumColumns(); j++) {
Node variable=dataSet.getVariable(j);
if (((Variable)variable).isMissingValue(dataSet.getObject(i,j))) {
continue ROWS;
}
}
newRow++;
for (int j=0; j < dataSet.getNumColumns(); j++) {
newDataSet.setObject(newRow,j,dataSet.getObject(i,j));
}
}
DataModelList list=new DataModelList();
list.add(newDataSet);
getDataEditor().reset(list);
getDataEditor().selectFirstTab();
}
| Performs the action of loading a session from a file. |
public final double rootRelativeSquaredError(){
if (m_NoPriors) {
return Double.NaN;
}
return 100.0 * rootMeanSquaredError() / rootMeanPriorSquaredError();
}
| Returns the root relative squared error if the class is numeric. |
public MatFileFilter(String[] names){
this();
for ( String name : names) {
addArrayName(name);
}
}
| Create filter instance and add array names. |
public static void create(Context context,int id,CharSequence title,CharSequence content,int smallIcon,boolean ongoing,boolean autoCancel,PendingIntent pendingIntent){
create(context,id,title,content,null,smallIcon,smallIcon,ongoing,autoCancel,Notification.VISIBILITY_PUBLIC,pendingIntent);
}
| Create Notification |
protected void clearEditInfo(){
m_editFlag=FolderEditFlag.NONE;
}
| Limpia el flag de estado del nodo |
public void move(java.awt.event.MouseEvent e){
}
| Called to set the OffsetGrabPoint to the current mouse location, and update the OffsetGrabPoint with all the other GrabPoint locations, so everything can shift smoothly. Should also set the OffsetGrabPoint to the movingPoint. Should be called only once at the beginning of the general movement, in order to set the movingPoint. After that, redraw(e) should just be called, and the movingPoint will make the adjustments to the graphic that are needed. |
public void addProtocolLines(String scriptName,Reader reader,ProtocolInteractor session) throws Exception {
final BufferedReader bufferedReader;
if (reader instanceof BufferedReader) {
bufferedReader=(BufferedReader)reader;
}
else {
bufferedReader=new BufferedReader(reader);
}
doAddProtocolLines(session,scriptName,bufferedReader);
}
| Reads ProtocolElements from the supplied Reader and adds them to the ProtocolSession. |
public static _Fields findByThriftIdOrThrow(int fieldId){
_Fields fields=findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
| Find the _Fields constant that matches fieldId, throwing an exception if it is not found. |
private static void encodePatterns(IPath[] patterns,String tag,Map parameters){
if (patterns != null && patterns.length > 0) {
StringBuffer rule=new StringBuffer(10);
for (int i=0, max=patterns.length; i < max; i++) {
if (i > 0) rule.append('|');
rule.append(patterns[i]);
}
parameters.put(tag,String.valueOf(rule));
}
}
| Encode some patterns into XML parameter tag |
public synchronized AddressbookEntry remove(String name){
AddressbookEntry removedEntry=entries.remove(StringUtil.toLowerCase(name));
if (removedEntry != null) {
saveOnChange();
}
return removedEntry;
}
| Removes the entry for the given name. |
public WrongExpectedVersionException(String message){
super(message);
}
| Creates a new instance with the specified error message. |
public Filter removeAttribute(String attribute){
try {
remove(attribute);
}
catch ( NullPointerException exc) {
}
return (this);
}
| Get rid of a current filter. |
public static double entropyConditionedOnRows(double[][] train,double[][] test,double numClasses){
double returnValue=0, trainSumForRow, testSumForRow, testSum=0;
for (int i=0; i < test.length; i++) {
trainSumForRow=0;
testSumForRow=0;
for (int j=0; j < test[0].length; j++) {
returnValue-=test[i][j] * Math.log(train[i][j] + 1);
trainSumForRow+=train[i][j];
testSumForRow+=test[i][j];
}
testSum=testSumForRow;
returnValue+=testSumForRow * Math.log(trainSumForRow + numClasses);
}
return returnValue / (testSum * log2);
}
| Computes conditional entropy of the columns given the rows of the test matrix with respect to the train matrix. Uses a Laplace prior. Does NOT normalize the entropy. |
public SAML2StatusCodeInvalidException(){
}
| Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized. |
public static FillMode parseFillMode(FXGNode node,String value,String name,FillMode defaultValue){
if (FXG_FILLMODE_CLIP_VALUE.equals(value)) {
return FillMode.CLIP;
}
else if (FXG_FILLMODE_REPEAT_VALUE.equals(value)) {
return FillMode.REPEAT;
}
else if (FXG_FILLMODE_SCALE_VALUE.equals(value)) {
return FillMode.SCALE;
}
else {
if (((AbstractFXGNode)node).isVersionGreaterThanCompiler()) {
FXGLog.getLogger().log(FXGLogger.WARN,"DefaultAttributeValue",null,((AbstractFXGNode)node).getDocumentName(),node.getStartLine(),node.getStartColumn(),defaultValue,name);
return defaultValue;
}
else {
throw new FXGException(node.getStartLine(),node.getStartColumn(),"UnknownFillMode",value);
}
}
}
| Convert an FXG String value to a fillMode enumeration. |
private StringPart createStringPart(final String name,final String value){
final StringPart stringPart=new StringPart(name,value);
stringPart.setTransferEncoding(null);
stringPart.setContentType(null);
return stringPart;
}
| Utility method for creating string parts, since we need to remove transferEncoding and content type to behave like a browser |
protected void afterShow(){
}
| Hook method just after the dialog was made visible. |
boolean ancestorIsOk(ElemTemplateElement child){
while (child.getParentElem() != null && !(child.getParentElem() instanceof ElemExsltFunction)) {
ElemTemplateElement parent=child.getParentElem();
if (parent instanceof ElemExsltFuncResult || parent instanceof ElemVariable || parent instanceof ElemParam|| parent instanceof ElemMessage) return true;
child=parent;
}
return false;
}
| Verify that a literal result belongs to a result element, a variable, or a parameter. |
public static void removeJavaNoOpLogger(Collection<Handler> rmvHnds){
Logger log=Logger.getLogger("");
for ( Handler h : log.getHandlers()) log.removeHandler(h);
if (!F.isEmpty(rmvHnds)) {
for ( Handler h : rmvHnds) log.addHandler(h);
}
}
| Removes previously added no-op handler for root java logger. |
protected void validate() throws IllegalStateException {
}
| Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions. |
@Override public void beforeFileMovement(@NotNull VirtualFileMoveEvent event){
MasonSettings masonSettings=MasonSettings.getInstance(getProject());
List<VirtualFile> componentsRoots=masonSettings.getComponentsRootsVirtualFiles();
if (componentsRoots.isEmpty()) {
return;
}
VirtualFile movedFile=event.getFile();
Set<VirtualFile> rootsSet=new THashSet<VirtualFile>(componentsRoots);
if (movedFile.isDirectory()) {
if (VfsUtil.isUnder(movedFile,rootsSet) || containsAtLeastOneFile(movedFile,componentsRoots)) {
movedFile.putUserData(FORCE_REINDEX,true);
}
}
else if (movedFile.getFileType() instanceof MasonFileType) {
if (VfsUtil.isUnder(movedFile,rootsSet)) {
movedFile.putUserData(FORCE_REINDEX,true);
}
}
}
| Fired before the movement of a file is processed. |
public boolean isFirstRun(){
return mIsFirstRun;
}
| Return true if this is the first time the app was opened. |
public String toString(){
StringBuffer sb=new StringBuffer();
sb.append("Differences:[ size: " + size());
sb.append(StringUtil.getNewlineStr());
if (size() > 0) {
for (int i=0; i < size(); i++) {
sb.append(get(i).toString());
sb.append(StringUtil.getNewlineStr());
}
}
else {
sb.append("XML Nodes are identical, No differences found");
}
sb.append(StringUtil.getNewlineStr());
sb.append("]");
return sb.toString();
}
| Gets the String representation of the object. |
private void checkSoftwareInterruptGeneration(){
if (((getStatusIM() & 0b11) == 1) && ((getCauseIP() & 0b11) == 1) & (isStatusIESet())) {
if (interruptController != null) {
interruptController.request(new TxInterruptRequest(Type.SOFTWARE_INTERRUPT));
}
}
}
| if Status<IM>[1:0] == 1 and Cause<IP>[1:0] and Status<IE> == 1, generate a software interrupt request |
public void verifyNewVolumesCanBeCreatedInConsistencyGroup(BlockConsistencyGroup consistencyGroup,List<Volume> cgVolumes){
if (!canConsistencyGroupBeModified(consistencyGroup,cgVolumes)) {
throw APIException.badRequests.cantCreateNewVolumesInCGActiveFullCopies(consistencyGroup.getLabel());
}
}
| Verify that new volumes can be created in the passed consistency group. |
public static final Token newToken(int ofKind){
switch (ofKind) {
default :
return new Token();
}
}
| Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass of Token called IDToken that you want to create if ofKind is ID, simlpy add something like : case MyParserConstants.ID : return new IDToken(); to the following switch statement. Then you can cast matchedToken variable to the appropriate type and use it in your lexical actions. |
public static long allocatePool(){
long poolPtr=GridUnsafe.allocateMemory(POOL_HDR_LEN);
GridUnsafe.setMemory(poolPtr,POOL_HDR_LEN,(byte)0);
flags(poolPtr + POOL_HDR_OFF_MEM_1,FLAG_POOLED);
flags(poolPtr + POOL_HDR_OFF_MEM_2,FLAG_POOLED);
flags(poolPtr + POOL_HDR_OFF_MEM_3,FLAG_POOLED);
return poolPtr;
}
| Allocate pool memory. |
private int hashUri(String path){
Pattern pattern=Pattern.compile("entries/([^/?]+)");
Matcher m=pattern.matcher(path);
return m.find() ? m.group(0).hashCode() : 0;
}
| The URI will be relative to servlet. e.g: entries/key1?foo=123 |
public NecronomiconInfusionRitual(String unlocalizedName,int bookType,int dimension,float requiredEnergy,ItemStack item,Object sacrifice,Object... offerings){
this(unlocalizedName,bookType,dimension,requiredEnergy,false,item,sacrifice,offerings);
}
| A Necronomicon Infusion Ritual |
public static DefaultListAdapter adapt(List list,RichObjectWrapper wrapper){
return list instanceof AbstractSequentialList ? new DefaultListAdapterWithCollectionSupport(list,wrapper) : new DefaultListAdapter(list,wrapper);
}
| Factory method for creating new adapter instances. |
private int[] multWithElement(int[] a,int element){
int degree=computeDegree(a);
if (degree == -1 || element == 0) {
return new int[1];
}
if (element == 1) {
return IntUtils.clone(a);
}
int[] result=new int[degree + 1];
for (int i=degree; i >= 0; i--) {
result[i]=field.mult(a[i],element);
}
return result;
}
| Compute the product of a polynomial a with an element from the finite field <tt>GF(2^m)</tt>. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-03-25 15:47:23.611 -0400",hash_original_method="6B975B236D38733D8D97A87E4CBCD8AE",hash_generated_method="652F22B5F8BD6D8D5D9F214EE134C943") private void positionChildren(int menuWidth,int menuHeight){
if (mHorizontalDivider != null) mHorizontalDividerRects.clear();
if (mVerticalDivider != null) mVerticalDividerRects.clear();
final int numRows=mLayoutNumRows;
final int numRowsMinus1=numRows - 1;
final int numItemsForRow[]=mLayout;
int itemPos=0;
View child;
IconMenuView.LayoutParams childLayoutParams=null;
float itemLeft;
float itemTop=0;
float itemWidth;
final float itemHeight=(menuHeight - mHorizontalDividerHeight * (numRows - 1)) / (float)numRows;
for (int row=0; row < numRows; row++) {
itemLeft=0;
itemWidth=(menuWidth - mVerticalDividerWidth * (numItemsForRow[row] - 1)) / (float)numItemsForRow[row];
for (int itemPosOnRow=0; itemPosOnRow < numItemsForRow[row]; itemPosOnRow++) {
child=getChildAt(itemPos);
child.measure(MeasureSpec.makeMeasureSpec((int)itemWidth,MeasureSpec.EXACTLY),MeasureSpec.makeMeasureSpec((int)itemHeight,MeasureSpec.EXACTLY));
childLayoutParams=(IconMenuView.LayoutParams)child.getLayoutParams();
childLayoutParams.left=(int)itemLeft;
childLayoutParams.right=(int)(itemLeft + itemWidth);
childLayoutParams.top=(int)itemTop;
childLayoutParams.bottom=(int)(itemTop + itemHeight);
itemLeft+=itemWidth;
itemPos++;
if (mVerticalDivider != null) {
mVerticalDividerRects.add(new Rect((int)itemLeft,(int)itemTop,(int)(itemLeft + mVerticalDividerWidth),(int)(itemTop + itemHeight)));
}
itemLeft+=mVerticalDividerWidth;
}
if (childLayoutParams != null) {
childLayoutParams.right=menuWidth;
}
itemTop+=itemHeight;
if ((mHorizontalDivider != null) && (row < numRowsMinus1)) {
mHorizontalDividerRects.add(new Rect(0,(int)itemTop,menuWidth,(int)(itemTop + mHorizontalDividerHeight)));
itemTop+=mHorizontalDividerHeight;
}
}
}
| The positioning algorithm that gets called from onMeasure. It just computes positions for each child, and then stores them in the child's layout params. |
public String value(){
String value=this.config.value(this.cluster);
if (value.isEmpty()) {
value=this.cluster;
}
return value;
}
| Gets the adequate tag value from config. Defaults to cluster name. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:00.016 -0500",hash_original_method="DB6BBF789AE77B5AE6E5E06EC389C87F",hash_generated_method="0C5447B0DE727866D45AF7AE8D3E7ED1") public KeyUsage(byte[] encoding) throws IOException {
super(encoding);
this.keyUsage=(boolean[])ASN1.decode(encoding);
}
| Creates the extension object on the base of its encoded form. |
public final void partChannel(String channel,String reason){
this.sendRawLine("PART " + channel + " :"+ reason);
}
| Parts a channel, giving a reason. |
public void afterBean(final @Observes AfterBeanDiscovery afterBeanDiscovery,BeanManager beanManager){
afterBeanDiscovery.addBean(new ApplicationProducer());
afterBeanDiscovery.addBean(new ApplicationMapProducer());
afterBeanDiscovery.addBean(new CompositeComponentProducer());
afterBeanDiscovery.addBean(new ComponentProducer());
afterBeanDiscovery.addBean(new FlashProducer());
afterBeanDiscovery.addBean(new FlowMapProducer());
afterBeanDiscovery.addBean(new HeaderMapProducer());
afterBeanDiscovery.addBean(new HeaderValuesMapProducer());
afterBeanDiscovery.addBean(new InitParameterMapProducer());
afterBeanDiscovery.addBean(new RequestParameterMapProducer());
afterBeanDiscovery.addBean(new RequestParameterValuesMapProducer());
afterBeanDiscovery.addBean(new RequestProducer());
afterBeanDiscovery.addBean(new RequestMapProducer());
afterBeanDiscovery.addBean(new ResourceHandlerProducer());
afterBeanDiscovery.addBean(new ExternalContextProducer());
afterBeanDiscovery.addBean(new FacesContextProducer());
afterBeanDiscovery.addBean(new RequestCookieMapProducer());
afterBeanDiscovery.addBean(new SessionProducer());
afterBeanDiscovery.addBean(new SessionMapProducer());
afterBeanDiscovery.addBean(new ViewMapProducer());
afterBeanDiscovery.addBean(new ViewProducer());
afterBeanDiscovery.addBean(new DataModelClassesMapProducer());
for ( Type type : managedPropertyTargetTypes) {
afterBeanDiscovery.addBean(new ManagedPropertyProducer(type,beanManager));
}
}
| After bean discovery. |
public boolean isExternal(){
return external;
}
| Returns if this component should have its bounds handled by an external source and not this layout manager. <p> For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. |
public static boolean isWifiEnabled(Context context){
WifiManager wifiManager=(WifiManager)context.getSystemService(Context.WIFI_SERVICE);
return (wifiManager != null && wifiManager.isWifiEnabled());
}
| Check if WIFI connection is enabled |
public boolean isStatic(){
unsupportedIn2();
return this.isStatic;
}
| Returns whether this import declaration is a static import (added in JLS3 API). |
public boolean isEnforcesTodaysHistoricFixings(){
return enforcesTodaysHistoricFixings;
}
| Enforce today's historic fixings //TODO: Q ? Should this be at Settings level ? |
public ListEditor(Vector<String> model){
this.listeners=new Vector<ListDataListener>();
setLayout(new GridBagLayout());
editor=new LimeTextField("");
editor.setColumns(DEFAULT_COLUMNS);
editor.setPreferredSize(new Dimension(500,20));
editor.setMaximumSize(new Dimension(500,20));
GridBagConstraints gbc=new GridBagConstraints();
gbc.fill=GridBagConstraints.BOTH;
gbc.anchor=GridBagConstraints.NORTHWEST;
gbc.weightx=1;
add(editor,gbc);
Action addAction=new AddAction();
addButton=new JButton(addAction);
GUIUtils.bindKeyToAction(editor,KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),addAction);
gbc=new GridBagConstraints();
gbc.anchor=GridBagConstraints.NORTHWEST;
gbc.insets=new Insets(0,ButtonRow.BUTTON_SEP,0,0);
add(addButton,gbc);
Action removeAction=new RemoveAction();
removeButton=new JButton(removeAction);
removeButton.setEnabled(false);
gbc.gridwidth=GridBagConstraints.REMAINDER;
add(removeButton,gbc);
list=new JList<Object>();
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
list.addListSelectionListener(new ListListener());
GUIUtils.bindKeyToAction(list,KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0),removeAction);
JScrollPane scrollPane=new JScrollPane(list,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
setModel(model);
scrollPane.setPreferredSize(new Dimension(500,50));
scrollPane.setMaximumSize(new Dimension(500,50));
gbc=new GridBagConstraints();
gbc.insets=new Insets(ButtonRow.BUTTON_SEP,0,0,0);
gbc.gridwidth=GridBagConstraints.REMAINDER;
gbc.anchor=GridBagConstraints.NORTHWEST;
gbc.fill=GridBagConstraints.BOTH;
gbc.weighty=1;
add(scrollPane,gbc);
}
| Creates a new list editor with the given underlying model. New elements are added to the tail of the list by default. |
public void complainAboutUnknownAttributes(String elementXpath,String... knownAttributes){
SortedMap<String,SortedSet<String>> problems=new TreeMap<>();
NodeList nodeList=getNodeList(elementXpath,false);
for (int i=0; i < nodeList.getLength(); ++i) {
Element element=(Element)nodeList.item(i);
Set<String> unknownAttributes=getUnknownAttributes(element,knownAttributes);
if (null != unknownAttributes) {
String elementName=element.getNodeName();
SortedSet<String> allUnknownAttributes=problems.get(elementName);
if (null == allUnknownAttributes) {
allUnknownAttributes=new TreeSet<>();
problems.put(elementName,allUnknownAttributes);
}
allUnknownAttributes.addAll(unknownAttributes);
}
}
if (problems.size() > 0) {
StringBuilder message=new StringBuilder();
for ( Map.Entry<String,SortedSet<String>> entry : problems.entrySet()) {
if (message.length() > 0) {
message.append(", ");
}
message.append('<');
message.append(entry.getKey());
for ( String attributeName : entry.getValue()) {
message.append(' ');
message.append(attributeName);
message.append("=\"...\"");
}
message.append('>');
}
message.insert(0,"Unknown attribute(s) on element(s): ");
String msg=message.toString();
SolrException.log(log,msg);
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,msg);
}
}
| Logs an error and throws an exception if any of the element(s) at the given elementXpath contains an attribute name that is not among knownAttributes. |
@Override public double variance(){
return Double.NaN;
}
| The Cauchy distribution is unique in that it does not have a variance value (undefined). |
private static CInliningResult inlineFunctionSilently(final JFrame parent,final IViewContainer viewContainer,final ZyGraph graph,final INaviCodeNode node,final INaviInstruction instruction,final INaviFunction function){
final INaviFunction inlineFunction=prepareFunctionInlining(parent,node,instruction,function,viewContainer);
if (inlineFunction == null) {
return null;
}
else if (inlineFunction.getBasicBlockCount() == 0) {
return null;
}
else {
try {
if (!inlineFunction.isLoaded()) {
inlineFunction.load();
}
return CInliningHelper.inlineCodeNode(graph.getRawView(),node,instruction,inlineFunction);
}
catch ( final CouldntLoadDataException e) {
exceptionDialog(parent,inlineFunction,e);
}
}
return null;
}
| Inlines a node without prompting the user for anything. |
@Override public String toString(){
return this.name;
}
| Returns a string representing the object. |
@Nullable static ValidationResult create(final CommandLineFile file){
final Command command=file.findRealCommand();
if (command == null) {
return null;
}
final ValidationResultImpl validationLayout=new ValidationResultImpl(command);
file.acceptChildren(validationLayout);
return validationLayout;
}
| Creates validation result by file |
public boolean isConsumesForecast(){
Object oo=get_Value(COLUMNNAME_IsConsumesForecast);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Is Consumes Forecast. |
public static SnmpEngineId createEngineId(InetAddress address,int port) throws IllegalArgumentException {
int suniana=42;
if (address == null) throw new IllegalArgumentException("InetAddress is null.");
return createEngineId(address,port,suniana);
}
| Generates a unique engine Id. The engine Id unicity is based on the host IP address and port. The IP address used is the passed one. The creation algorithm uses the SUN Microsystems IANA number (42). |
private void recordStats(){
long finalizationPendingCount=memoryMXBean.getObjectPendingFinalizationCount();
MemoryUsage heap=memoryMXBean.getHeapMemoryUsage();
MemoryUsage nonHeap=memoryMXBean.getNonHeapMemoryUsage();
Map<String,Long> metrics=Maps.newHashMap();
metrics.put("pending-finalization-count",finalizationPendingCount);
recordMemoryUsage("heap.total",heap,metrics);
recordMemoryUsage("nonheap.total",nonHeap,metrics);
for ( GarbageCollectorMXBean gcMXBean : gcMXBeans) {
String gcName=gcMXBean.getName().replace(" ","_");
metrics.put("gc." + gcName + ".count",gcMXBean.getCollectionCount());
final long time=gcMXBean.getCollectionTime();
final long prevTime=gcTimes.get(gcMXBean).get();
final long runtime=time - prevTime;
metrics.put("gc." + gcName + ".time",time);
metrics.put("gc." + gcName + ".runtime",runtime);
if (runtime > 0) {
gcTimes.get(gcMXBean).set(time);
}
}
long loadedClassCount=classLoadingMXBean.getLoadedClassCount();
long totalLoadedClassCount=classLoadingMXBean.getTotalLoadedClassCount();
long unloadedClassCount=classLoadingMXBean.getUnloadedClassCount();
metrics.put("loaded-class-count",loadedClassCount);
metrics.put("total-loaded-class-count",totalLoadedClassCount);
metrics.put("unloaded-class-count",unloadedClassCount);
for ( MemoryPoolMXBean memoryPoolMXBean : memoryPoolMXBeans) {
String type=poolTypeToMetricName(memoryPoolMXBean.getType());
String name=poolNameToMetricName(memoryPoolMXBean.getName());
String prefix=type + '.' + name;
MemoryUsage usage=memoryPoolMXBean.getUsage();
recordMemoryUsage(prefix,usage,metrics);
}
recordGaugeValues(metrics);
}
| Records all memory statistics |
public int deleteByExample(UserExample example) throws SQLException {
int rows=sqlMapClient.delete("t_user.ibatorgenerated_deleteByExample",example);
return rows;
}
| This method was generated by Apache iBATIS ibator. This method corresponds to the database table t_user |
public static void main(String[] args) throws Exception {
ICluster alice=Cluster.joinAwait(ImmutableMap.of("name","Alice"));
System.out.println(now() + " Alice join members: " + alice.members());
alice.listenMembership().subscribe(null);
ICluster bob=Cluster.joinAwait(ImmutableMap.of("name","Bob"),alice.address());
System.out.println(now() + " Bob join members: " + bob.members());
bob.listenMembership().subscribe(null);
ICluster carol=Cluster.joinAwait(ImmutableMap.of("name","Carol"),alice.address(),bob.address());
System.out.println(now() + " Carol join members: " + carol.members());
carol.listenMembership().subscribe(null);
Future<Void> shutdownFuture=bob.shutdown();
shutdownFuture.get();
long maxRemoveTimeout=MembershipConfig.DEFAULT_SUSPECT_TIMEOUT + 3 * FailureDetectorConfig.DEFAULT_PING_INTERVAL;
Thread.sleep(maxRemoveTimeout);
}
| Main method. |
public static String toBinaryString(byte[] input){
String result="";
int i;
for (i=0; i < input.length; i++) {
int e=input[i];
for (int ii=0; ii < 8; ii++) {
int b=(e >>> ii) & 1;
result+=b;
}
if (i != input.length - 1) {
result+=" ";
}
}
return result;
}
| Convert a byte array to the corresponding bit string. |
public BranchLookup(PlanNode input,TableNode source,TableNode branch,List<TableSource> tables){
this(input,source,source,branch,tables);
assert (source == branch.getParent());
}
| Lookup an immediate child of the starting point. |
public int optInt(String key){
return optInt(key,0);
}
| Get an optional int value associated with a key, or zero if there is no such key or if the value is not a number. If the value is a string, an attempt will be made to evaluate it as a number. |
public String path(){
return this.uri.getPath();
}
| Get path part of the HREF. |
private byte[] generateRandomData(){
byte[] data=new byte[10 * Settings.BUFFER_SIZE + 271];
PRNG.getRandom().nextBytes(data);
return data;
}
| Returns the data used to test the redirect stream. |
public String readUntil(char c){
int ix=data.indexOf(c,pos);
if (ix == -1) throw new RuntimeException("readUntil did not find character '" + c + "'");
return readN(data.indexOf(c,pos) - pos);
}
| Read until the next char is c, and return the string. |
public final void expectAtLeastOneResult(ResultSet rs) throws AdeInternalException, SQLException {
if (!rs.next()) {
throw new AdeInternalException("Expecting at least one row from " + m_sql);
}
}
| Verifies given result set contains at least one row. Issues a standard error if not. This row is then ready to be obtained from the result set (next() already called) |
public static boolean exists(final String file){
return exists(file,false);
}
| Use this to check whether or not a file exists on the filesystem. |
@Override public void write(String str){
write(str.toCharArray());
}
| Writes the characters from the specified string to the target. |
private <T>IsilonList<T> list(URI url,String key,Class<T> c,String resumeToken) throws IsilonException {
ClientResponse resp=null;
try {
URI getUrl=url;
if (resumeToken != null && !resumeToken.isEmpty()) {
getUrl=getUrl.resolve("?resume=" + resumeToken);
}
resp=_client.get(getUrl);
JSONObject obj=resp.getEntity(JSONObject.class);
IsilonList<T> ret=new IsilonList<T>();
if (resp.getStatus() == 200) {
sLogger.debug("list {} : Output from Server: {} ",key,obj.get(key).toString());
JSONArray array=obj.getJSONArray(key);
for (int i=0; i < array.length(); i++) {
JSONObject exp=array.getJSONObject(i);
ret.add(new Gson().fromJson(SecurityUtils.sanitizeJsonString(exp.toString()),c));
}
if (obj.has("resume") && !obj.getString("resume").equals("null")) {
ret.setToken(obj.getString("resume"));
}
}
else {
processErrorResponse("list",key,resp.getStatus(),obj);
}
return ret;
}
catch ( IsilonException ie) {
throw ie;
}
catch ( Exception e) {
String response=String.format("%1$s",(resp == null) ? "" : resp);
throw IsilonException.exceptions.listResourcesFailedOnIsilonArray(key,response,e);
}
finally {
if (resp != null) {
resp.close();
}
}
}
| Generic list resources implementation |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:57.973 -0400",hash_original_method="85142D2E9E15EB93CC97B3004876EC03",hash_generated_method="57EBD7EEA30AC5594D23024CA2FA7FFF") public FileAlterationObserver(String directoryName){
this(new File(directoryName));
}
| Construct an observer for the specified directory. |
protected final void EMIT_LongUnary(Instruction s,Operand result,Operand value1,boolean negOrNot){
Operand lhs, lowlhs;
boolean needsMove=!value1.similar(result);
if (result.isRegister()) {
Register lhsReg=result.asRegister().getRegister();
Register lowlhsReg=regpool.getSecondReg(lhsReg);
lowlhs=new RegisterOperand(lowlhsReg,TypeReference.Int);
lhs=new RegisterOperand(lhsReg,TypeReference.Int);
}
else {
if (VM.VerifyAssertions) opt_assert(result.isMemory());
lowlhs=setSize(result.asMemory(),DW);
lhs=lowlhs.copy();
lhs.asMemory().disp=lhs.asMemory().disp.plus(4);
}
if (needsMove) {
Operand rhs1, lowrhs1;
if (value1.isRegister()) {
Register rhs1Reg=value1.asRegister().getRegister();
Register lowrhs1Reg=regpool.getSecondReg(rhs1Reg);
lowrhs1=new RegisterOperand(lowrhs1Reg,TypeReference.Int);
rhs1=new RegisterOperand(rhs1Reg,TypeReference.Int);
}
else {
if (VM.VerifyAssertions) opt_assert(value1.isMemory());
lowrhs1=setSize(value1.asMemory(),DW);
rhs1=lowrhs1.copy();
rhs1.asMemory().disp=rhs1.asMemory().disp.plus(4);
}
EMIT(CPOS(s,MIR_Move.create(IA32_MOV,lowlhs.copy(),lowrhs1)));
EMIT(CPOS(s,MIR_Move.create(IA32_MOV,lhs.copy(),rhs1)));
}
if (negOrNot) {
EMIT(CPOS(s,MIR_UnaryAcc.create(IA32_NEG,lowlhs)));
EMIT(CPOS(s,MIR_UnaryAcc.create(IA32_NOT,lhs)));
EMIT(CPOS(s,MIR_BinaryAcc.create(IA32_SBB,lhs.copy(),IC(-1))));
}
else {
EMIT(CPOS(s,MIR_UnaryAcc.create(IA32_NOT,lowlhs)));
EMIT(CPOS(s,MIR_UnaryAcc.create(IA32_NOT,lhs)));
}
}
| Creates the MIR instruction for LONG_NEG or LONG_NOT |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.