Helper to clean up the Activity, whether it is exited through the toolbar back button, or the hardware back button.
341064
private void exitActivity(ApptentiveViewExitType exitType) {
		try {
			exitActivityGuarded(exitType);
		} catch (Exception e) {
			ApptentiveLog.e(e, "Exception while trying to exit activity (type=%s)", exitType);
			logException(e);
		}
	}
896543
function() {
				if (oIcon._bPressed) {// touchstart, touchend, press
					oList.removeSelections(true);
					oList.setSelectedKeys();
					oList.setProperty("active", false, true);
				} //otherwise - touchstart, touchend, because the user released the mouse/touchend-ed outside the icon.

				//In both cases popover closes and needs to be handled
				that._handlePopoverAfterClose();
			}
890650
private void finishActivity(Activity activity){
		if(activity != null) {
			try{
				activity.finish();
			}catch(Throwable e){
				e.printStackTrace();
			}
		}
	}
412484
public static void clear() throws BackingStoreException {
		try {
			systemRoot.clear();
		} catch (final Exception e) {
			System.err.print(e);
		}
	}
252655
def _cleanup(self):
        """"""
        self._expkg = None
        self._extmp = None
        self._flag_e = True
        self._ifile.close()
1110932
def _cleanup(self):
        """"""
        current_time = time.time()
        timeout = self._config.timeout
        if current_time - self._last_cleanup_time > timeout:
            self.store.cleanup(timeout)
            self._last_cleanup_time = current_time
540806
def clean_up(self):
        
        self.submenu.join()
        self.menu.clear_screen()
        self.menu.resume()
805656
def cleanup(self):
        
        if getattr(self._finalizer, "detach", None) and self._finalizer.detach():
            if os.path.exists(self.path):
                try:
                    rmtree(self.path)
                except OSError:
                    pass
                else:
                    self.path = None
41374
@Override
    final public void cleanup() throws ResourceException {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "cleanup");
        }

        // Invalidate all of the sessions

        for (final Iterator iterator = _sessions.iterator(); iterator.hasNext();) {
            final Object object = iterator.next();
            if (object instanceof JmsJcaSessionImpl) {
                ((JmsJcaSessionImpl) object).invalidate();
            }
        }
        _sessions.clear();

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "cleanup");
        }

    }
1231680
public void cleanUpState(VirtualConnection vc) {
        // if discrimination returned MAYBE, then we stored a link object that
        // now needs to be cleaned up
        HttpInboundLink link = (HttpInboundLink) vc.getStateMap().get(CallbackIDs.CALLBACK_HTTPICL);
        if (null != link) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Performing cleanup after discrim MAYBE");
            }
            link.destroy(null);
        }
    }
14010
private void cleanup() {
        final String methodName = "cleanup(): ";
        try {
            final Bundle b = bundle.getAndSet(null);
            if (b != null) {
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, methodName + "Uninstalling bundle location: " + b.getLocation() + ", bundle id: " + b.getBundleId());
                }
                SecurityManager sm = System.getSecurityManager();
                if (sm != null) {
                    AccessController.doPrivileged(new PrivilegedAction<Void>() {
                        @Override
                        public Void run() {
                            try {
                                b.uninstall();
                                return null;
                            } catch (BundleException ignored) {
                                return null;
                            }
                        }
                    });
                } else {
                    b.uninstall();
                }
            }
        } catch (BundleException ignored) {
        } catch (IllegalStateException ignored) {

        }
    }
91298
@Override
    public void onBackPressed() {
    	// Verify if the activity must be finished or if the parent folder must be opened.
   	    File current = this.core.getCurrentFolder();
   	    if(!this.useBackButton || current == null || current.getParent() == null || current.getPath().compareTo(this.startFolder.getPath()) == 0) {
   	    	// Close activity.
   	    	super.onBackPressed();
   	    }else{
   	    	// Open parent.
   	        this.core.loadFolder(current.getParent());
   	    }
  	}
1102681
protected void processClearBackstack(int flags) {
        if ((flags & CLEAR_BACKSTACK) == CLEAR_BACKSTACK) {
            try {
                fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
            } catch (IllegalStateException exception) {
                log.e(TAG, exception.getMessage(), exception);
            }
        }
    }
612051
def __cleanup_breakpoint(self, event, bp):
        ""
        try:
            process = event.get_process()
            thread  = event.get_thread()
            bp.disable(process, thread) # clear the debug regs / trap flag
        except Exception:
            pass
        bp.set_condition(True)  # break possible circular reference
        bp.set_action(None)
919395
function clean(done) {
	var del = require('del');
	del(cfg.destination).then(function () {
		if (typeof done === 'function') done();
		else process.exit();
	});
}
1036348
@SuppressWarnings("PMD.EmptyCatchBlock")
    private synchronized void cleanup(final WatchKey key) {
        logger.trace("cleanUp {}", key);
        try {
            key.cancel();
        }catch(Exception ex) {
            //trap
        }
        Collection<SFMF4JWatchListener> listeners = listenersByWatchKey.remove(key);
        if (listeners != null && !listeners.isEmpty()) {
            logger.warn("Cleaning up key but listeners are still registered.");
        }
        String path = pathsByWatchKey.remove(key);
        if (path != null) {
            watchKeysByPath.remove(path);
        }
    }
787988
public void clear() {
        getElement().clear();
        if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
            logUIAction(UIActions.CLEARED);
        }
    }