Turn on Strict Mode options.  Good idea for dev builds.
<p/>
See: http://developer.android.com/reference/android/os/StrictMode.html
14264
public static void enableStrictModeForDevRelease() {
        StrictMode.setThreadPolicy(
                new StrictMode.ThreadPolicy.Builder()
                        .detectDiskReads()
                        .detectDiskWrites()
                        .detectNetwork()
                        .penaltyFlashScreen()
                        .build()
        );

    }
191977
private void setConditionEnabled(boolean enabled)
	{
		fConditionEditor.setEnabled(enabled);
		fSuspendWhenLabel.setEnabled(enabled);
		fConditionIsTrue.setEnabled(enabled);
		fConditionHasChanged.setEnabled(enabled);
	}
788623
protected void setOkEnabled(boolean enabled, String message) {

        if (enabled) {
            m_okButton.enable();
        } else {
            m_okButton.disable(message);
        }
    }
1230423
public void setMaintenanceMode(String appName, boolean enable) {
        connection.execute(new AppUpdate(appName, enable), apiKey);
    }
795702
private void setFromEnv() throws DevFailed {
        String env = TangoEnv.getTangoHost();
        assert env != null;
        if (!env.contains(":"))
            Except.throw_connection_failed("TangoApi_TANGO_HOST_NOT_SET",
                    "Unknown \"TANGO_HOST\" property " + env,
                    "TangoUrl.setFromEnv()");
        String[] array = ApiUtil.parseTangoHost(env);
        host = array[0];
        strPort = array[1];
        port = Integer.parseInt(strPort);
        envRead = true;
        fromEnv = true;
    }
1325751
def get_strict_value(self, name):
        
        dev_info = self.json_state.get('deviceInfo')
        return dev_info.get(name, None)
809514
@Override
    public void setManual() {
      this.threshold = 1.5f; // this threshold can never be reached
      this.extension = Long.MAX_VALUE;
      this.replQueueThreshold = 1.5f; // can never be reached
      this.reached = -1;
      enter();
      reportStatus("STATE* Safe mode is ON.", true);
    }
1258248
@SuppressLint("NewApi")
    private void buildAndAttach(){
        // Disable any pending transition on the activity since we are transforming it
        mActivity.overridePendingTransition(0, 0);

        // Setup window flags if Lollipop
        if(BuildUtils.isLollipop()) {
            Window window = mActivity.getWindow();
            window.addFlags(FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            window.setStatusBarColor(Color.TRANSPARENT);
        }

        // attach layout and pane to UI
        hiJackDecor();

        // Setup
        setupDrawer();

        // Populate and Inflate
        populateNavDrawer();

    }
92426
public void setMode(String mode) {
        checkNotNull(mode, "mode should not be null");
        if (MODE_ASYNC.equals(mode) || MODE_SYNC.equals(mode)) {
            this.mode = mode;
        } else {
            throw new IllegalArgumentException("illegal mode: " + mode);
        }
    }
1240144
private void requestInputMode() {
        if (needInputMethod()) {
            Window window = dialog.getWindow();

            if (window != null) {
                window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
            }
        }
    }
1364422
private void init(final Window window, final CmsAccountsApp app, final CmsUserSettings settings, boolean enabled) {

        m_userdata.initFields(m_user, enabled ? EditLevel.all : EditLevel.none);
        if (m_user != null) {
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_user.getFirstname())
                | CmsStringUtil.isEmptyOrWhitespaceOnly(m_user.getLastname())
                | CmsStringUtil.isEmptyOrWhitespaceOnly(m_user.getEmail())) {
                m_name_was_empty = true;
            }
        }
        iniLanguage(settings);
        iniProject(settings);
        iniSite(settings);
        iniStartView(settings);

        m_site.addValueChangeListener(new ValueChangeListener() {

            private static final long serialVersionUID = 5111762655156037899L;

            public void valueChange(ValueChangeEvent event) {

                setupStartFolder(null);

            }

        });

        m_ok.addClickListener(new ClickListener() {

            private static final long serialVersionUID = -2579639520410382246L;

            public void buttonClick(ClickEvent event) {

                setupValidators();
                if (isValid()) {
                    save();
                    window.close();
                    app.reload();
                }
            }
        });

        m_next.addClickListener(new ClickListener() {

            private static final long serialVersionUID = -8584899970290349959L;

            public void buttonClick(ClickEvent event) {

                setupValidators();
                switchTab();

            }
        });

        m_cancel.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 5803825104722705175L;

            public void buttonClick(ClickEvent event) {

                window.close();
            }
        });

        if (m_user == null) {
            m_role.addValueChangeListener(new ValueChangeListener() {

                private static final long serialVersionUID = 5697126133686172725L;

                public void valueChange(ValueChangeEvent event) {

                    iniSite(settings);
                    iniStartView(settings);
                }
            });
            m_group.addValueChangeListener(new ValueChangeListener() {

                private static final long serialVersionUID = 1512940002751242094L;

                public void valueChange(ValueChangeEvent event) {

                    iniStartView(settings);
                    iniSite(settings);
                }

            });
        }

        m_site.addValueChangeListener(new ValueChangeListener() {

            private static final long serialVersionUID = -169973382455098800L;

            public void valueChange(ValueChangeEvent event) {

                m_startfolder.setCmsObject(getCmsObjectWithSite((String)m_site.getValue()));

            }

        });

        m_generateButton.addClickListener(new Button.ClickListener() {

            private static final long serialVersionUID = 4128513094772586752L;

            public void buttonClick(ClickEvent event) {

                final Window windowDialog = CmsBasicDialog.prepareWindow(CmsBasicDialog.DialogWidth.content);
                windowDialog.setCaption(
                    CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_GEN_PASSWORD_CAPTION_0));
                CmsGeneratePasswordDialog dialog = new CmsGeneratePasswordDialog(
                    CmsUserEditDialog.this,
                    new Runnable() {

                        public void run() {

                            windowDialog.close();

                        }
                    });
                windowDialog.setContent(dialog);
                A_CmsUI.get().addWindow(windowDialog);
            }
        });
    }
1246098
public void validate() {
        // check if android build tool version is at least minimal required version
        Revision revBuildToolsVersion = Revision.parseRevision(buildToolsVersion);
        if (minimalBuildToolsVersion.compareTo(revBuildToolsVersion) > 0) {
            throw new GradleException("Android buildToolsVersion should be at least version " + minimalBuildToolsVersion + ": currently using " + buildToolsVersion + " from " + buildToolsDir + ". See https://developer.android.com/studio/intro/update.html on how to update the build tools in the Android SDK.");
        }

        // check if valid android build tools exists
        if (!project.file(buildToolsDir + "/aapt").exists() &&
                !project.file(buildToolsDir + "/aapt.exe").exists()) {
            throw new GradleException("Configured buildToolsVersion is invalid: " + buildToolsVersion + " (" + buildToolsDir + ")");
        }

        // check if android platform exists
        if (!project.file(androidSdk + "/platforms/android-" + compileSdkVersion).exists()) {
            throw new GradleException("Configured compileSdkVersion is invalid: " + compileSdkVersion + " (" + androidSdk + "/platforms/android-" + compileSdkVersion + ")");
        }

//        sdkHandler.initTarget(AndroidTargetHash.getPlatformHashString(new AndroidVersion(Integer.parseInt(compileSdkVersion))),
//                getBuildToolsRevision(), Collections.emptyList(), androidBuilder, false);

        sdkHandler.ensurePlatformToolsIsInstalled(extraModelInfo);
    }
1202253
void setOkButtonEnabled() {

        m_ok.setEnabled(true);
        m_ok.setCaption(CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_CLOSE_0));
        m_ok.removeClickListener(m_okClickListener);
        m_ok.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 5637556711524961424L;

            public void buttonClick(ClickEvent event) {

                closeDailog(true);
            }
        });
    }
858560
public void build(final Class<?> clazz, final Field field, final DeviceImpl device, final Object businessObject)
            throws DevFailed {
        xlogger.entry();
        BuilderUtils.checkStatic(field);
        Method getter;
        final String stateName = field.getName();
        final String getterName = BuilderUtils.GET + stateName.substring(0, 1).toUpperCase(Locale.ENGLISH)
                + stateName.substring(1);
        try {
            getter = clazz.getMethod(getterName);
        } catch (final NoSuchMethodException e) {
            throw DevFailedUtils.newDevFailed(e);
        }
        if (getter.getParameterTypes().length != 0) {
            throw DevFailedUtils.newDevFailed(DevFailedUtils.TANGO_BUILD_FAILED, getter + " must not have a parameter");
        }

        logger.debug("Has an status : {}", field.getName());
        if (getter.getReturnType() != String.class) {
            throw DevFailedUtils.newDevFailed(DevFailedUtils.TANGO_BUILD_FAILED, getter + " must have a return type of  "
                    + String.class);
        }
        Method setter;
        final String setterName = BuilderUtils.SET + stateName.substring(0, 1).toUpperCase(Locale.ENGLISH)
                + stateName.substring(1);
        try {
            setter = clazz.getMethod(setterName, String.class);
        } catch (final NoSuchMethodException e) {
            throw DevFailedUtils.newDevFailed(e);
        }
        device.setStatusImpl(new StatusImpl(businessObject, getter, setter));
        final Status annot = field.getAnnotation(Status.class);
        if (annot.isPolled()) {
            device.addAttributePolling(DeviceImpl.STATUS_NAME, annot.pollingPeriod());
        }
        xlogger.exit();
    }
599435
private void initializeDrawableForDisplay(Drawable d) {
        if (mBlockInvalidateCallback == null) {
            mBlockInvalidateCallback = new BlockInvalidateCallback();
        }
        // Temporary fix for suspending callbacks during initialization. We
        // don't want any of these setters causing an invalidate() since that
        // may call back into DrawableContainer.
        d.setCallback(mBlockInvalidateCallback.wrap(d.getCallback()));
        try {
            if (mDrawableContainerState.mEnterFadeDuration <= 0 && mHasAlpha) {
                d.setAlpha(mAlpha);
            }
            if (mDrawableContainerState.mHasColorFilter) {
                // Color filter always overrides tint.
                d.setColorFilter(mDrawableContainerState.mColorFilter);
            } else {
                if (mDrawableContainerState.mHasTintList) {
                    DrawableCompat.setTintList(d, mDrawableContainerState.mTintList);
                }
                if (mDrawableContainerState.mHasTintMode) {
                    DrawableCompat.setTintMode(d, mDrawableContainerState.mTintMode);
                }
            }
            d.setVisible(isVisible(), true);
            d.setDither(mDrawableContainerState.mDither);
            d.setState(getState());
            d.setLevel(getLevel());
            d.setBounds(getBounds());
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
                d.setLayoutDirection(getLayoutDirection());
            }
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                d.setAutoMirrored(mDrawableContainerState.mAutoMirrored);
            }
            final Rect hotspotBounds = mHotspotBounds;
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && hotspotBounds != null) {
                d.setHotspotBounds(hotspotBounds.left, hotspotBounds.top,
                        hotspotBounds.right, hotspotBounds.bottom);
            }
        } finally {
            d.setCallback(mBlockInvalidateCallback.unwrap());
        }
    }
868626
private void manageControl(byte[] messageBytes) throws DevFailed{

        ZMQutils.ControlStructure
                controlStructure = ZMQutils.getInstance().decodeControlBuffer(messageBytes);
        ApiUtil.printTrace("From Control:\n" + controlStructure);
        switch (controlStructure.commandCode) {
            case ZMQutils.ZMQ_END:
                stop = true;
                break;

            case ZMQutils.ZMQ_CONNECT_HEARTBEAT:
                connectIfNotDone(heartbeatSocket, controlStructure);
				//System.out.println("-------> ZMQ_CONNECT_HEARTBEAT: " + controlStructure.eventName);
                heartbeatSocket.subscribe(controlStructure.eventName.getBytes());
                break;


            case ZMQutils.ZMQ_DISCONNECT_HEARTBEAT:
                disconnect(heartbeatSocket, controlStructure.eventName);
                break;

            case ZMQutils.ZMQ_CONNECT_EVENT:
                connectIfNotDone(eventSocket, controlStructure);
                eventSocket.subscribe(controlStructure.eventName.getBytes());
                break;

            case ZMQutils.ZMQ_DISCONNECT_EVENT:
                disconnect(eventSocket, controlStructure.eventName);
                break;

        }
    }
1240324
public
  void activateOptions() {
      if (header) {
        getLocalHostname();
      }
      if (layout != null && layout.getHeader() != null) {
          sendLayoutMessage(layout.getHeader());
      }
      layoutHeaderChecked = true;
  }