Input:
private final void performLayoutAndPlaceSurfacesLockedInner(boolean recoveringMemory) {
    final long currentTime = SystemClock.uptimeMillis();
    final int dw = mDisplay.getWidth();
    final int dh = mDisplay.getHeight();
    int i;
    if (mFocusMayChange) {
        mFocusMayChange = false;
        updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES);
    }
    if (mFxSession == null) {
        mFxSession = new SurfaceSession();
    }
    if (SHOW_TRANSACTIONS)
        Slog.i(TAG, "String_Node_Str");
    for (i = mExitingTokens.size() - 1; i >= 0; i--) {
        mExitingTokens.get(i).hasVisible = false;
    }
    for (i = mExitingAppTokens.size() - 1; i >= 0; i--) {
        mExitingAppTokens.get(i).hasVisible = false;
    }
    boolean orientationChangeComplete = true;
    Session holdScreen = null;
    float screenBrightness = -1;
    float buttonBrightness = -1;
    boolean focusDisplayed = false;
    boolean animating = false;
    Surface.openTransaction();
    try {
        boolean wallpaperForceHidingChanged = false;
        int repeats = 0;
        int changes = 0;
        do {
            repeats++;
            if (repeats > 6) {
                Slog.w(TAG, "String_Node_Str");
                mLayoutNeeded = false;
                break;
            }
            if ((changes & (WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER | WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG | WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT)) != 0) {
                if ((changes & WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER) != 0) {
                    if ((adjustWallpaperWindowsLocked() & ADJUST_WALLPAPER_LAYERS_CHANGED) != 0) {
                        assignLayersLocked();
                        mLayoutNeeded = true;
                    }
                }
                if ((changes & WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG) != 0) {
                    if (DEBUG_LAYOUT)
                        Slog.v(TAG, "String_Node_Str");
                    if (updateOrientationFromAppTokensLocked()) {
                        mLayoutNeeded = true;
                        mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION);
                    }
                }
                if ((changes & WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT) != 0) {
                    mLayoutNeeded = true;
                }
            }
            if (repeats < 4) {
                changes = performLayoutLockedInner();
                if (changes != 0) {
                    continue;
                }
            } else {
                Slog.w(TAG, "String_Node_Str");
                changes = 0;
            }
            final int transactionSequence = ++mTransactionSequence;
            boolean tokensAnimating = false;
            final int NAT = mAppTokens.size();
            for (i = 0; i < NAT; i++) {
                if (mAppTokens.get(i).stepAnimationLocked(currentTime, dw, dh)) {
                    tokensAnimating = true;
                }
            }
            final int NEAT = mExitingAppTokens.size();
            for (i = 0; i < NEAT; i++) {
                if (mExitingAppTokens.get(i).stepAnimationLocked(currentTime, dw, dh)) {
                    tokensAnimating = true;
                }
            }
            if (DEBUG_APP_TRANSITIONS)
                Slog.v(TAG, "String_Node_Str" + transactionSequence + "String_Node_Str" + tokensAnimating);
            animating = tokensAnimating;
            boolean tokenMayBeDrawn = false;
            boolean wallpaperMayChange = false;
            boolean forceHiding = false;
            mPolicy.beginAnimationLw(dw, dh);
            final int N = mWindows.size();
            for (i = N - 1; i >= 0; i--) {
                WindowState w = (WindowState) mWindows.get(i);
                final WindowManager.LayoutParams attrs = w.mAttrs;
                if (w.mSurface != null) {
                    if (w.commitFinishDrawingLocked(currentTime)) {
                        if ((w.mAttrs.flags & WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER) != 0) {
                            if (DEBUG_WALLPAPER)
                                Slog.v(TAG, "String_Node_Str" + w);
                            wallpaperMayChange = true;
                        }
                    }
                    boolean wasAnimating = w.mAnimating;
                    if (w.stepAnimationLocked(currentTime, dw, dh)) {
                        animating = true;
                    }
                    if (wasAnimating && !w.mAnimating && mWallpaperTarget == w) {
                        wallpaperMayChange = true;
                    }
                    if (mPolicy.doesForceHide(w, attrs)) {
                        if (!wasAnimating && animating) {
                            if (DEBUG_VISIBILITY)
                                Slog.v(TAG, "String_Node_Str" + w);
                            wallpaperForceHidingChanged = true;
                            mFocusMayChange = true;
                        } else if (w.isReadyForDisplay() && w.mAnimation == null) {
                            forceHiding = true;
                        }
                    } else if (mPolicy.canBeForceHidden(w, attrs)) {
                        boolean changed;
                        if (forceHiding) {
                            changed = w.hideLw(false, false);
                            if (DEBUG_VISIBILITY && changed)
                                Slog.v(TAG, "String_Node_Str" + w);
                        } else {
                            changed = w.showLw(false, false);
                            if (DEBUG_VISIBILITY && changed)
                                Slog.v(TAG, "String_Node_Str" + w);
                            if (changed) {
                                if (wallpaperForceHidingChanged && w.isVisibleNow()) {
                                    Animation a = mPolicy.createForceHideEnterAnimation();
                                    if (a != null) {
                                        w.setAnimation(a);
                                    }
                                }
                                if (mCurrentFocus == null || mCurrentFocus.mLayer < w.mLayer) {
                                    mFocusMayChange = true;
                                }
                            }
                        }
                        if (changed && (attrs.flags & WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER) != 0) {
                            wallpaperMayChange = true;
                        }
                    }
                    mPolicy.animatingWindowLw(w, attrs);
                }
                final AppWindowToken atoken = w.mAppToken;
                if (atoken != null && (!atoken.allDrawn || atoken.freezingScreen)) {
                    if (atoken.lastTransactionSequence != transactionSequence) {
                        atoken.lastTransactionSequence = transactionSequence;
                        atoken.numInterestingWindows = atoken.numDrawnWindows = 0;
                        atoken.startingDisplayed = false;
                    }
                    if ((w.isOnScreen() || w.mAttrs.type == WindowManager.LayoutParams.TYPE_BASE_APPLICATION) && !w.mExiting && !w.mDestroying) {
                        if (DEBUG_VISIBILITY || DEBUG_ORIENTATION) {
                            Slog.v(TAG, "String_Node_Str" + w + "String_Node_Str" + w.isDrawnLw() + "String_Node_Str" + w.isAnimating());
                            if (!w.isDrawnLw()) {
                                Slog.v(TAG, "String_Node_Str" + w.mSurface + "String_Node_Str" + w.mPolicyVisibility + "String_Node_Str" + w.mDrawPending + "String_Node_Str" + w.mCommitDrawPending + "String_Node_Str" + w.mAttachedHidden + "String_Node_Str" + atoken.hiddenRequested + "String_Node_Str" + w.mAnimating);
                            }
                        }
                        if (w != atoken.startingWindow) {
                            if (!atoken.freezingScreen || !w.mAppFreezing) {
                                atoken.numInterestingWindows++;
                                if (w.isDrawnLw()) {
                                    atoken.numDrawnWindows++;
                                    if (DEBUG_VISIBILITY || DEBUG_ORIENTATION)
                                        Slog.v(TAG, "String_Node_Str" + atoken + "String_Node_Str" + atoken.freezingScreen + "String_Node_Str" + w.mAppFreezing);
                                    tokenMayBeDrawn = true;
                                }
                            }
                        } else if (w.isDrawnLw()) {
                            atoken.startingDisplayed = true;
                        }
                    }
                } else if (w.mReadyToShow) {
                    w.performShowLocked();
                }
            }
            changes |= mPolicy.finishAnimationLw();
            if (tokenMayBeDrawn) {
                final int NT = mTokenList.size();
                for (i = 0; i < NT; i++) {
                    AppWindowToken wtoken = mTokenList.get(i).appWindowToken;
                    if (wtoken == null) {
                        continue;
                    }
                    if (wtoken.freezingScreen) {
                        int numInteresting = wtoken.numInterestingWindows;
                        if (numInteresting > 0 && wtoken.numDrawnWindows >= numInteresting) {
                            if (DEBUG_VISIBILITY)
                                Slog.v(TAG, "String_Node_Str" + wtoken + "String_Node_Str" + numInteresting + "String_Node_Str" + wtoken.numDrawnWindows);
                            wtoken.showAllWindowsLocked();
                            unsetAppFreezingScreenLocked(wtoken, false, true);
                            orientationChangeComplete = true;
                        }
                    } else if (!wtoken.allDrawn) {
                        int numInteresting = wtoken.numInterestingWindows;
                        if (numInteresting > 0 && wtoken.numDrawnWindows >= numInteresting) {
                            if (DEBUG_VISIBILITY)
                                Slog.v(TAG, "String_Node_Str" + wtoken + "String_Node_Str" + numInteresting + "String_Node_Str" + wtoken.numDrawnWindows);
                            wtoken.allDrawn = true;
                            changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_ANIM;
                            if (!mOpeningApps.contains(wtoken)) {
                                wtoken.showAllWindowsLocked();
                            }
                        }
                    }
                }
            }
            if (mAppTransitionReady) {
                int NN = mOpeningApps.size();
                boolean goodToGo = true;
                if (DEBUG_APP_TRANSITIONS)
                    Slog.v(TAG, "String_Node_Str" + NN + "String_Node_Str" + mDisplayFrozen + "String_Node_Str" + mAppTransitionTimeout + "String_Node_Str");
                if (!mDisplayFrozen && !mAppTransitionTimeout) {
                    for (i = 0; i < NN && goodToGo; i++) {
                        AppWindowToken wtoken = mOpeningApps.get(i);
                        if (DEBUG_APP_TRANSITIONS)
                            Slog.v(TAG, "String_Node_Str" + wtoken + "String_Node_Str" + wtoken.allDrawn + "String_Node_Str" + wtoken.startingDisplayed);
                        if (!wtoken.allDrawn && !wtoken.startingDisplayed && !wtoken.startingMoved) {
                            goodToGo = false;
                        }
                    }
                }
                if (goodToGo) {
                    if (DEBUG_APP_TRANSITIONS)
                        Slog.v(TAG, "String_Node_Str");
                    int transit = mNextAppTransition;
                    if (mSkipAppTransitionAnimation) {
                        transit = WindowManagerPolicy.TRANSIT_UNSET;
                    }
                    mNextAppTransition = WindowManagerPolicy.TRANSIT_UNSET;
                    mAppTransitionReady = false;
                    mAppTransitionRunning = true;
                    mAppTransitionTimeout = false;
                    mStartingIconInTransition = false;
                    mSkipAppTransitionAnimation = false;
                    mH.removeMessages(H.APP_TRANSITION_TIMEOUT);
                    if (mToTopApps.size() > 0) {
                        NN = mAppTokens.size();
                        for (i = 0; i < NN; i++) {
                            AppWindowToken wtoken = mAppTokens.get(i);
                            if (wtoken.sendingToTop) {
                                wtoken.sendingToTop = false;
                                moveAppWindowsLocked(wtoken, NN, false);
                            }
                        }
                        mToTopApps.clear();
                    }
                    WindowState oldWallpaper = mWallpaperTarget;
                    adjustWallpaperWindowsLocked();
                    wallpaperMayChange = false;
                    LayoutParams animLp = null;
                    AppWindowToken animToken = null;
                    int bestAnimLayer = -1;
                    if (DEBUG_APP_TRANSITIONS)
                        Slog.v(TAG, "String_Node_Str" + mWallpaperTarget + "String_Node_Str" + mLowerWallpaperTarget + "String_Node_Str" + mUpperWallpaperTarget);
                    int foundWallpapers = 0;
                    final int NC = mClosingApps.size();
                    NN = NC + mOpeningApps.size();
                    for (i = 0; i < NN; i++) {
                        AppWindowToken wtoken;
                        int mode;
                        if (i < NC) {
                            wtoken = mClosingApps.get(i);
                            mode = 1;
                        } else {
                            wtoken = mOpeningApps.get(i - NC);
                            mode = 2;
                        }
                        if (mLowerWallpaperTarget != null) {
                            if (mLowerWallpaperTarget.mAppToken == wtoken || mUpperWallpaperTarget.mAppToken == wtoken) {
                                foundWallpapers |= mode;
                            }
                        }
                        if (wtoken.appFullscreen) {
                            WindowState ws = wtoken.findMainWindow();
                            if (ws != null) {
                                if ((ws.mAttrs.flags & FLAG_COMPATIBLE_WINDOW) != 0) {
                                    animLp = ws.mAttrs;
                                    animToken = ws.mAppToken;
                                    bestAnimLayer = Integer.MAX_VALUE;
                                } else if (ws.mLayer > bestAnimLayer) {
                                    animLp = ws.mAttrs;
                                    animToken = ws.mAppToken;
                                    bestAnimLayer = ws.mLayer;
                                }
                            }
                        }
                    }
                    if (foundWallpapers == 3) {
                        if (DEBUG_APP_TRANSITIONS)
                            Slog.v(TAG, "String_Node_Str");
                        switch(transit) {
                            case WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN:
                            case WindowManagerPolicy.TRANSIT_TASK_OPEN:
                            case WindowManagerPolicy.TRANSIT_TASK_TO_FRONT:
                                transit = WindowManagerPolicy.TRANSIT_WALLPAPER_INTRA_OPEN;
                                break;
                            case WindowManagerPolicy.TRANSIT_ACTIVITY_CLOSE:
                            case WindowManagerPolicy.TRANSIT_TASK_CLOSE:
                            case WindowManagerPolicy.TRANSIT_TASK_TO_BACK:
                                transit = WindowManagerPolicy.TRANSIT_WALLPAPER_INTRA_CLOSE;
                                break;
                        }
                        if (DEBUG_APP_TRANSITIONS)
                            Slog.v(TAG, "String_Node_Str" + transit);
                    } else if (oldWallpaper != null) {
                        transit = WindowManagerPolicy.TRANSIT_WALLPAPER_CLOSE;
                        if (DEBUG_APP_TRANSITIONS)
                            Slog.v(TAG, "String_Node_Str" + transit);
                    } else if (mWallpaperTarget != null) {
                        transit = WindowManagerPolicy.TRANSIT_WALLPAPER_OPEN;
                        if (DEBUG_APP_TRANSITIONS)
                            Slog.v(TAG, "String_Node_Str" + transit);
                    }
                    if ((transit & WindowManagerPolicy.TRANSIT_ENTER_MASK) != 0) {
                        mLastEnterAnimToken = animToken;
                        mLastEnterAnimParams = animLp;
                    } else if (mLastEnterAnimParams != null) {
                        animLp = mLastEnterAnimParams;
                        mLastEnterAnimToken = null;
                        mLastEnterAnimParams = null;
                    }
                    if (!mPolicy.allowAppAnimationsLw()) {
                        animLp = null;
                    }
                    NN = mOpeningApps.size();
                    for (i = 0; i < NN; i++) {
                        AppWindowToken wtoken = mOpeningApps.get(i);
                        if (DEBUG_APP_TRANSITIONS)
                            Slog.v(TAG, "String_Node_Str" + wtoken);
                        wtoken.reportedVisible = false;
                        wtoken.inPendingTransaction = false;
                        wtoken.animation = null;
                        setTokenVisibilityLocked(wtoken, animLp, true, transit, false);
                        wtoken.updateReportedVisibilityLocked();
                        wtoken.waitingToShow = false;
                        wtoken.showAllWindowsLocked();
                    }
                    NN = mClosingApps.size();
                    for (i = 0; i < NN; i++) {
                        AppWindowToken wtoken = mClosingApps.get(i);
                        if (DEBUG_APP_TRANSITIONS)
                            Slog.v(TAG, "String_Node_Str" + wtoken);
                        wtoken.inPendingTransaction = false;
                        wtoken.animation = null;
                        setTokenVisibilityLocked(wtoken, animLp, false, transit, false);
                        wtoken.updateReportedVisibilityLocked();
                        wtoken.waitingToHide = false;
                        wtoken.allDrawn = true;
                    }
                    mNextAppTransitionPackage = null;
                    mOpeningApps.clear();
                    mClosingApps.clear();
                    changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_LAYOUT;
                    mLayoutNeeded = true;
                    if (!moveInputMethodWindowsIfNeededLocked(true)) {
                        assignLayersLocked();
                    }
                    updateFocusedWindowLocked(UPDATE_FOCUS_PLACING_SURFACES);
                    mFocusMayChange = false;
                }
            }
            if (!animating && mAppTransitionRunning) {
                mAppTransitionRunning = false;
                mToBottomApps.clear();
                rebuildAppWindowListLocked();
                changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_LAYOUT;
                moveInputMethodWindowsIfNeededLocked(false);
                wallpaperMayChange = true;
                mFocusMayChange = true;
            }
            int adjResult = 0;
            if (wallpaperForceHidingChanged && changes == 0 && !mAppTransitionReady) {
                WindowState oldWallpaper = mWallpaperTarget;
                if (mLowerWallpaperTarget != null && mLowerWallpaperTarget.mAppToken != null) {
                    if (DEBUG_WALLPAPER)
                        Slog.v(TAG, "String_Node_Str" + mLowerWallpaperTarget);
                    if (DEBUG_WALLPAPER)
                        Slog.v(TAG, "String_Node_Str" + mLowerWallpaperTarget.mAppToken.hidden + "String_Node_Str" + mLowerWallpaperTarget.mAppToken.hiddenRequested);
                    if (mLowerWallpaperTarget.mAppToken.hidden) {
                        mLowerWallpaperTarget = mUpperWallpaperTarget = null;
                        changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_ANIM;
                    }
                }
                adjResult = adjustWallpaperWindowsLocked();
                wallpaperMayChange = false;
                wallpaperForceHidingChanged = false;
                if (DEBUG_WALLPAPER)
                    Slog.v(TAG, "String_Node_Str" + oldWallpaper + "String_Node_Str" + mWallpaperTarget + "String_Node_Str" + mLowerWallpaperTarget);
                if (mLowerWallpaperTarget == null) {
                    forceHiding = false;
                    for (i = N - 1; i >= 0; i--) {
                        WindowState w = (WindowState) mWindows.get(i);
                        if (w.mSurface != null) {
                            final WindowManager.LayoutParams attrs = w.mAttrs;
                            if (mPolicy.doesForceHide(w, attrs) && w.isVisibleLw()) {
                                if (DEBUG_FOCUS)
                                    Slog.i(TAG, "String_Node_Str" + w + "String_Node_Str");
                                forceHiding = true;
                            } else if (mPolicy.canBeForceHidden(w, attrs)) {
                                if (!w.mAnimating) {
                                    w.clearAnimation();
                                }
                            }
                        }
                    }
                }
            }
            if (wallpaperMayChange) {
                if (DEBUG_WALLPAPER)
                    Slog.v(TAG, "String_Node_Str");
                adjResult = adjustWallpaperWindowsLocked();
            }
            if ((adjResult & ADJUST_WALLPAPER_LAYERS_CHANGED) != 0) {
                if (DEBUG_WALLPAPER)
                    Slog.v(TAG, "String_Node_Str");
                changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_LAYOUT;
                assignLayersLocked();
            } else if ((adjResult & ADJUST_WALLPAPER_VISIBILITY_CHANGED) != 0) {
                if (DEBUG_WALLPAPER)
                    Slog.v(TAG, "String_Node_Str");
                changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_LAYOUT;
            }
            if (mFocusMayChange) {
                mFocusMayChange = false;
                if (updateFocusedWindowLocked(UPDATE_FOCUS_PLACING_SURFACES)) {
                    changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_ANIM;
                    adjResult = 0;
                }
            }
            if (mLayoutNeeded) {
                changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_LAYOUT;
            }
            if (DEBUG_APP_TRANSITIONS)
                Slog.v(TAG, "String_Node_Str" + Integer.toHexString(changes));
        } while (changes != 0);
        final boolean someoneLosingFocus = mLosingFocus.size() != 0;
        boolean obscured = false;
        boolean blurring = false;
        boolean dimming = false;
        boolean covered = false;
        boolean syswin = false;
        boolean backgroundFillerShown = false;
        final int N = mWindows.size();
        for (i = N - 1; i >= 0; i--) {
            WindowState w = (WindowState) mWindows.get(i);
            boolean displayed = false;
            final WindowManager.LayoutParams attrs = w.mAttrs;
            final int attrFlags = attrs.flags;
            if (w.mSurface != null) {
                w.computeShownFrameLocked();
                if (localLOGV)
                    Slog.v(TAG, "String_Node_Str" + i + "String_Node_Str" + w.mSurface + "String_Node_Str" + w.mShownFrame + "String_Node_Str" + w.mLastShownFrame);
                boolean resize;
                int width, height;
                if ((w.mAttrs.flags & w.mAttrs.FLAG_SCALED) != 0) {
                    resize = w.mLastRequestedWidth != w.mRequestedWidth || w.mLastRequestedHeight != w.mRequestedHeight;
                    width = w.mRequestedWidth;
                    height = w.mRequestedHeight;
                    w.mLastRequestedWidth = width;
                    w.mLastRequestedHeight = height;
                    w.mLastShownFrame.set(w.mShownFrame);
                    try {
                        if (SHOW_TRANSACTIONS)
                            logSurface(w, "String_Node_Str" + w.mShownFrame.left + "String_Node_Str" + w.mShownFrame.top, null);
                        w.mSurface.setPosition(w.mShownFrame.left, w.mShownFrame.top);
                    } catch (RuntimeException e) {
                        Slog.w(TAG, "String_Node_Str" + w, e);
                        if (!recoveringMemory) {
                            reclaimSomeSurfaceMemoryLocked(w, "String_Node_Str");
                        }
                    }
                } else {
                    resize = !w.mLastShownFrame.equals(w.mShownFrame);
                    width = w.mShownFrame.width();
                    height = w.mShownFrame.height();
                    w.mLastShownFrame.set(w.mShownFrame);
                }
                if (resize) {
                    if (width < 1)
                        width = 1;
                    if (height < 1)
                        height = 1;
                    if (w.mSurface != null) {
                        try {
                            if (SHOW_TRANSACTIONS)
                                logSurface(w, "String_Node_Str" + w.mShownFrame.left + "String_Node_Str" + w.mShownFrame.top + "String_Node_Str" + w.mShownFrame.width() + "String_Node_Str" + w.mShownFrame.height(), null);
                            w.mSurface.setSize(width, height);
                            w.mSurface.setPosition(w.mShownFrame.left, w.mShownFrame.top);
                        } catch (RuntimeException e) {
                            Slog.e(TAG, "String_Node_Str" + w + "String_Node_Str" + width + "String_Node_Str" + height + "String_Node_Str" + w.mShownFrame.left + "String_Node_Str" + w.mShownFrame.top + "String_Node_Str", e);
                            if (!recoveringMemory) {
                                reclaimSomeSurfaceMemoryLocked(w, "String_Node_Str");
                            }
                        }
                    }
                }
                if (!w.mAppFreezing && w.mLayoutSeq == mLayoutSeq) {
                    w.mContentInsetsChanged = !w.mLastContentInsets.equals(w.mContentInsets);
                    w.mVisibleInsetsChanged = !w.mLastVisibleInsets.equals(w.mVisibleInsets);
                    boolean configChanged = w.mConfiguration != mCurConfiguration && (w.mConfiguration == null || mCurConfiguration.diff(w.mConfiguration) != 0);
                    if (localLOGV)
                        Slog.v(TAG, "String_Node_Str" + w + "String_Node_Str" + configChanged + "String_Node_Str" + w.mLastFrame + "String_Node_Str" + w.mFrame);
                    if (!w.mLastFrame.equals(w.mFrame) || w.mContentInsetsChanged || w.mVisibleInsetsChanged || configChanged) {
                        w.mLastFrame.set(w.mFrame);
                        w.mLastContentInsets.set(w.mContentInsets);
                        w.mLastVisibleInsets.set(w.mVisibleInsets);
                        if (mDisplayFrozen) {
                            if (DEBUG_ORIENTATION)
                                Slog.v(TAG, "String_Node_Str" + w);
                            w.mOrientationChanging = true;
                            if (!mWindowsFreezingScreen) {
                                mWindowsFreezingScreen = true;
                                mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
                                mH.sendMessageDelayed(mH.obtainMessage(H.WINDOW_FREEZE_TIMEOUT), 2000);
                            }
                        }
                        if (w.mOrientationChanging) {
                            if (DEBUG_ORIENTATION)
                                Slog.v(TAG, "String_Node_Str" + w + "String_Node_Str" + w.mSurface);
                            w.mDrawPending = true;
                            w.mCommitDrawPending = false;
                            w.mReadyToShow = false;
                            if (w.mAppToken != null) {
                                w.mAppToken.allDrawn = false;
                            }
                        }
                        if (DEBUG_ORIENTATION)
                            Slog.v(TAG, "String_Node_Str" + w + "String_Node_Str" + w.mFrame);
                        mResizingWindows.add(w);
                    } else if (w.mOrientationChanging) {
                        if (!w.mDrawPending && !w.mCommitDrawPending) {
                            if (DEBUG_ORIENTATION)
                                Slog.v(TAG, "String_Node_Str" + w + "String_Node_Str" + w.mSurface);
                            w.mOrientationChanging = false;
                        }
                    }
                }
                if (w.mAttachedHidden || !w.isReadyForDisplay()) {
                    if (!w.mLastHidden) {
                        w.mLastHidden = true;
                        if (SHOW_TRANSACTIONS)
                            logSurface(w, "String_Node_Str", null);
                        if (w.mSurface != null) {
                            try {
                                w.mSurface.hide();
                            } catch (RuntimeException e) {
                                Slog.w(TAG, "String_Node_Str" + w);
                            }
                        }
                        mKeyWaiter.releasePendingPointerLocked(w.mSession);
                    }
                    if (w.mOrientationChanging) {
                        w.mOrientationChanging = false;
                        if (DEBUG_ORIENTATION)
                            Slog.v(TAG, "String_Node_Str" + w);
                    }
                } else if (w.mLastLayer != w.mAnimLayer || w.mLastAlpha != w.mShownAlpha || w.mLastDsDx != w.mDsDx || w.mLastDtDx != w.mDtDx || w.mLastDsDy != w.mDsDy || w.mLastDtDy != w.mDtDy || w.mLastHScale != w.mHScale || w.mLastVScale != w.mVScale || w.mLastHidden) {
                    displayed = true;
                    w.mLastAlpha = w.mShownAlpha;
                    w.mLastLayer = w.mAnimLayer;
                    w.mLastDsDx = w.mDsDx;
                    w.mLastDtDx = w.mDtDx;
                    w.mLastDsDy = w.mDsDy;
                    w.mLastDtDy = w.mDtDy;
                    w.mLastHScale = w.mHScale;
                    w.mLastVScale = w.mVScale;
                    if (SHOW_TRANSACTIONS)
                        logSurface(w, "String_Node_Str" + w.mShownAlpha + "String_Node_Str" + w.mAnimLayer + "String_Node_Str" + (w.mDsDx * w.mHScale) + "String_Node_Str" + (w.mDtDx * w.mVScale) + "String_Node_Str" + (w.mDsDy * w.mHScale) + "String_Node_Str" + (w.mDtDy * w.mVScale) + "String_Node_Str", null);
                    if (w.mSurface != null) {
                        try {
                            w.mSurface.setAlpha(w.mShownAlpha);
                            w.mSurface.setLayer(w.mAnimLayer);
                            w.mSurface.setMatrix(w.mDsDx * w.mHScale, w.mDtDx * w.mVScale, w.mDsDy * w.mHScale, w.mDtDy * w.mVScale);
                        } catch (RuntimeException e) {
                            Slog.w(TAG, "String_Node_Str" + w, e);
                            if (!recoveringMemory) {
                                reclaimSomeSurfaceMemoryLocked(w, "String_Node_Str");
                            }
                        }
                    }
                    if (w.mLastHidden && !w.mDrawPending && !w.mCommitDrawPending && !w.mReadyToShow) {
                        if (SHOW_TRANSACTIONS)
                            logSurface(w, "String_Node_Str", null);
                        if (DEBUG_VISIBILITY)
                            Slog.v(TAG, "String_Node_Str" + w + "String_Node_Str");
                        if (showSurfaceRobustlyLocked(w)) {
                            w.mHasDrawn = true;
                            w.mLastHidden = false;
                        } else {
                            w.mOrientationChanging = false;
                        }
                    }
                    if (w.mSurface != null) {
                        w.mToken.hasVisible = true;
                    }
                } else {
                    displayed = true;
                }
                if (displayed) {
                    if (!covered) {
                        if (attrs.width == LayoutParams.MATCH_PARENT && attrs.height == LayoutParams.MATCH_PARENT) {
                            covered = true;
                        }
                    }
                    if (w.mOrientationChanging) {
                        if (w.mDrawPending || w.mCommitDrawPending) {
                            orientationChangeComplete = false;
                            if (DEBUG_ORIENTATION)
                                Slog.v(TAG, "String_Node_Str" + w);
                        } else {
                            w.mOrientationChanging = false;
                            if (DEBUG_ORIENTATION)
                                Slog.v(TAG, "String_Node_Str" + w);
                        }
                    }
                    w.mToken.hasVisible = true;
                }
            } else if (w.mOrientationChanging) {
                if (DEBUG_ORIENTATION)
                    Slog.v(TAG, "String_Node_Str" + w);
                w.mOrientationChanging = false;
            }
            final boolean canBeSeen = w.isDisplayedLw();
            if (someoneLosingFocus && w == mCurrentFocus && canBeSeen) {
                focusDisplayed = true;
            }
            final boolean obscuredChanged = w.mObscured != obscured;
            if (!(w.mObscured = obscured)) {
                if (w.mSurface != null) {
                    if ((attrFlags & FLAG_KEEP_SCREEN_ON) != 0) {
                        holdScreen = w.mSession;
                    }
                    if (!syswin && w.mAttrs.screenBrightness >= 0 && screenBrightness < 0) {
                        screenBrightness = w.mAttrs.screenBrightness;
                    }
                    if (!syswin && w.mAttrs.buttonBrightness >= 0 && buttonBrightness < 0) {
                        buttonBrightness = w.mAttrs.buttonBrightness;
                    }
                    if (canBeSeen && (attrs.type == WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG || attrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD || attrs.type == WindowManager.LayoutParams.TYPE_SYSTEM_ERROR)) {
                        syswin = true;
                    }
                }
                boolean opaqueDrawn = canBeSeen && w.isOpaqueDrawn();
                if (opaqueDrawn && w.isFullscreen(dw, dh)) {
                    obscured = true;
                } else if (opaqueDrawn && w.needsBackgroundFiller(dw, dh)) {
                    if (SHOW_TRANSACTIONS)
                        Slog.d(TAG, "String_Node_Str");
                    obscured = true;
                    if (mBackgroundFillerSurface == null) {
                        try {
                            mBackgroundFillerSurface = new Surface(mFxSession, 0, "String_Node_Str", 0, dw, dh, PixelFormat.OPAQUE, Surface.FX_SURFACE_NORMAL);
                        } catch (Exception e) {
                            Slog.e(TAG, "String_Node_Str", e);
                        }
                    }
                    try {
                        mBackgroundFillerSurface.setPosition(0, 0);
                        mBackgroundFillerSurface.setSize(dw, dh);
                        mBackgroundFillerSurface.setLayer(w.mAnimLayer - 1);
                        mBackgroundFillerSurface.show();
                    } catch (RuntimeException e) {
                        Slog.e(TAG, "String_Node_Str");
                    }
                    backgroundFillerShown = true;
                    mBackgroundFillerShown = true;
                } else if (canBeSeen && !obscured && (attrFlags & FLAG_BLUR_BEHIND | FLAG_DIM_BEHIND) != 0) {
                    if (localLOGV)
                        Slog.v(TAG, "String_Node_Str" + w + "String_Node_Str" + blurring + "String_Node_Str" + obscured + "String_Node_Str" + displayed);
                    if ((attrFlags & FLAG_DIM_BEHIND) != 0) {
                        if (!dimming) {
                            dimming = true;
                            if (mDimAnimator == null) {
                                mDimAnimator = new DimAnimator(mFxSession);
                            }
                            mDimAnimator.show(dw, dh);
                        }
                        mDimAnimator.updateParameters(w, currentTime);
                    }
                    if ((attrFlags & FLAG_BLUR_BEHIND) != 0) {
                        if (!blurring) {
                            blurring = true;
                            mBlurShown = true;
                            if (mBlurSurface == null) {
                                if (SHOW_TRANSACTIONS)
                                    Slog.i(TAG, "String_Node_Str" + mBlurSurface + "String_Node_Str");
                                try {
                                    mBlurSurface = new Surface(mFxSession, 0, "String_Node_Str", -1, 16, 16, PixelFormat.OPAQUE, Surface.FX_SURFACE_BLUR);
                                } catch (Exception e) {
                                    Slog.e(TAG, "String_Node_Str", e);
                                }
                            }
                            if (SHOW_TRANSACTIONS)
                                Slog.i(TAG, "String_Node_Str" + mBlurSurface + "String_Node_Str" + dw + "String_Node_Str" + dh + "String_Node_Str" + (w.mAnimLayer - 1));
                            if (mBlurSurface != null) {
                                mBlurSurface.setPosition(0, 0);
                                mBlurSurface.setSize(dw, dh);
                                try {
                                    mBlurSurface.show();
                                } catch (RuntimeException e) {
                                    Slog.w(TAG, "String_Node_Str", e);
                                }
                            }
                        }
                        mBlurSurface.setLayer(w.mAnimLayer - 2);
                    }
                }
            }
            if (obscuredChanged && mWallpaperTarget == w) {
                updateWallpaperVisibilityLocked();
            }
        }
        if (backgroundFillerShown == false && mBackgroundFillerShown) {
            mBackgroundFillerShown = false;
            if (SHOW_TRANSACTIONS)
                Slog.d(TAG, "String_Node_Str");
            try {
                mBackgroundFillerSurface.hide();
            } catch (RuntimeException e) {
                Slog.e(TAG, "String_Node_Str", e);
            }
        }
        if (mDimAnimator != null && mDimAnimator.mDimShown) {
            animating |= mDimAnimator.updateSurface(dimming, currentTime, mDisplayFrozen || !mPolicy.isScreenOn());
        }
        if (!blurring && mBlurShown) {
            if (SHOW_TRANSACTIONS)
                Slog.i(TAG, "String_Node_Str" + mBlurSurface + "String_Node_Str");
            try {
                mBlurSurface.hide();
            } catch (IllegalArgumentException e) {
                Slog.w(TAG, "String_Node_Str");
            }
            mBlurShown = false;
        }
        if (SHOW_TRANSACTIONS)
            Slog.i(TAG, "String_Node_Str");
    } catch (RuntimeException e) {
        Slog.e(TAG, "String_Node_Str", e);
    }
    Surface.closeTransaction();
    if (DEBUG_ORIENTATION && mDisplayFrozen)
        Slog.v(TAG, "String_Node_Str" + orientationChangeComplete);
    if (orientationChangeComplete) {
        if (mWindowsFreezingScreen) {
            mWindowsFreezingScreen = false;
            mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
        }
        stopFreezingDisplayLocked();
    }
    i = mResizingWindows.size();
    if (i > 0) {
        do {
            i--;
            WindowState win = mResizingWindows.get(i);
            try {
                if (DEBUG_ORIENTATION)
                    Slog.v(TAG, "String_Node_Str" + win + "String_Node_Str" + win.mFrame);
                boolean configChanged = win.mConfiguration != mCurConfiguration && (win.mConfiguration == null || mCurConfiguration.diff(win.mConfiguration) != 0);
                win.mConfiguration = mCurConfiguration;
                if (DEBUG_ORIENTATION && configChanged) {
                    Slog.i(TAG, "String_Node_Str" + win + "String_Node_Str" + win.mFrame.width() + "String_Node_Str" + win.mFrame.height() + "String_Node_Str" + win.mConfiguration);
                }
                win.mClient.resized(win.mFrame.width(), win.mFrame.height(), win.mLastContentInsets, win.mLastVisibleInsets, win.mDrawPending, configChanged ? win.mConfiguration : null);
                win.mContentInsetsChanged = false;
                win.mVisibleInsetsChanged = false;
            } catch (RemoteException e) {
                win.mOrientationChanging = false;
            }
        } while (i > 0);
        mResizingWindows.clear();
    }
    boolean wallpaperDestroyed = false;
    i = mDestroySurface.size();
    if (i > 0) {
        do {
            i--;
            WindowState win = mDestroySurface.get(i);
            win.mDestroying = false;
            if (mInputMethodWindow == win) {
                mInputMethodWindow = null;
            }
            if (win == mWallpaperTarget) {
                wallpaperDestroyed = true;
            }
            win.destroySurfaceLocked();
        } while (i > 0);
        mDestroySurface.clear();
    }
    for (i = mExitingTokens.size() - 1; i >= 0; i--) {
        WindowToken token = mExitingTokens.get(i);
        if (!token.hasVisible) {
            mExitingTokens.remove(i);
            if (token.windowType == TYPE_WALLPAPER) {
                mWallpaperTokens.remove(token);
            }
        }
    }
    for (i = mExitingAppTokens.size() - 1; i >= 0; i--) {
        AppWindowToken token = mExitingAppTokens.get(i);
        if (!token.hasVisible && !mClosingApps.contains(token)) {
            token.animation = null;
            token.animating = false;
            mAppTokens.remove(token);
            mExitingAppTokens.remove(i);
            if (mLastEnterAnimToken == token) {
                mLastEnterAnimToken = null;
                mLastEnterAnimParams = null;
            }
        }
    }
    boolean needRelayout = false;
    if (!animating && mAppTransitionRunning) {
        mAppTransitionRunning = false;
        needRelayout = true;
        rebuildAppWindowListLocked();
        mToBottomApps.clear();
    }
    if (focusDisplayed) {
        mH.sendEmptyMessage(H.REPORT_LOSING_FOCUS);
    }
    if (wallpaperDestroyed) {
        needRelayout = adjustWallpaperWindowsLocked() != 0;
    }
    if (needRelayout) {
        requestAnimationLocked(0);
    } else if (animating) {
        requestAnimationLocked(currentTime + (1000 / 60) - SystemClock.uptimeMillis());
    }
    mQueue.setHoldScreenLocked(holdScreen != null);
    if (screenBrightness < 0 || screenBrightness > 1.0f) {
        mPowerManager.setScreenBrightnessOverride(-1);
    } else {
        mPowerManager.setScreenBrightnessOverride((int) (screenBrightness * Power.BRIGHTNESS_ON));
    }
    if (buttonBrightness < 0 || buttonBrightness > 1.0f) {
        mPowerManager.setButtonBrightnessOverride(-1);
    } else {
        mPowerManager.setButtonBrightnessOverride((int) (buttonBrightness * Power.BRIGHTNESS_ON));
    }
    if (holdScreen != mHoldingScreenOn) {
        mHoldingScreenOn = holdScreen;
        Message m = mH.obtainMessage(H.HOLD_SCREEN_CHANGED, holdScreen);
        mH.sendMessage(m);
    }
    if (mTurnOnScreen) {
        if (DEBUG_VISIBILITY)
            Slog.v(TAG, "String_Node_Str");
        mPowerManager.userActivity(SystemClock.uptimeMillis(), false, LocalPowerManager.BUTTON_EVENT, true);
        mTurnOnScreen = false;
    }
    enableScreenIfNeededLocked();
}

Output:
                         Slog.v(TAG, "String_Node_Str" + w + "String_Node_Str" + configChanged + "String_Node_Str" + w.mLastFrame + "String_Node_Str" + w.mFrame);
-                    if (!w.mLastFrame.equals(w.mFrame) || w.mContentInsetsChanged || w.mVisibleInsetsChanged || configChanged) {
+                    if (!w.mLastFrame.equals(w.mFrame) || w.mContentInsetsChanged || w.mVisibleInsetsChanged || w.mSurfaceResized || configChanged) {
                         w.mLastFrame.set(w.mFrame);


Input:
private void doUpdateSchedule(HttpRequest request, HttpResponder responder, String namespaceId, String appId, String appVersion, String scheduleName) throws IOException, BadRequestException, NotFoundException, SchedulerException, AlreadyExistsException {
    ApplicationId applicationId = new ApplicationId(namespaceId, appId, appVersion);
    ScheduleSpecification scheduleSpecFromRequest;
    try (Reader reader = new InputStreamReader(new ChannelBufferInputStream(request.getContent()), Charsets.UTF_8)) {
        scheduleSpecFromRequest = GSON.fromJson(reader, ScheduleSpecification.class);
    } catch (IOException e) {
        LOG.debug("String_Node_Str", e);
        throw new IOException("String_Node_Str");
    } catch (JsonSyntaxException e) {
        throw new BadRequestException("String_Node_Str" + e.getMessage());
    }
    if (!scheduleName.equals(scheduleSpecFromRequest.getSchedule().getName())) {
        throw new BadRequestException(String.format("String_Node_Str", scheduleSpecFromRequest.getSchedule().getName(), scheduleName));
    }
    lifecycleService.updateSchedule(applicationId, scheduleSpecFromRequest);
    responder.sendStatus(HttpResponseStatus.OK);
}

Output:
     ApplicationId applicationId = new ApplicationId(namespaceId, appId, appVersion);
-    ScheduleSpecification scheduleSpecFromRequest;
+    ScheduleUpdateDetail scheduleUpdateDetail;
     try (Reader reader = new InputStreamReader(new ChannelBufferInputStream(request.getContent()), Charsets.UTF_8)) {


Input:
private Type getGenericReturnType(Class<?> cascadingClass, String methodNameAndDesc) throws NoSuchMethodException {
    Method cascadingMethod = new RealMethodOrConstructor(cascadingClass, methodNameAndDesc).getMember();
    Type genericReturnType = cascadingMethod.getGenericReturnType();
    if (genericReturnType instanceof TypeVariable<?>) {
        genericReturnType = getGenericReflection().resolveTypeVariable((TypeVariable<?>) genericReturnType);
    }
    return genericReturnType;
}

Output:
     }
-    return genericReturnType;
+    return genericReturnType == Object.class ? null : genericReturnType;
 }


Input:
final private void writeInvocation(final Connection conn, final Invocation inv) {
    if (!conn.live()) {
        inv.returnToContainer();
        return;
    }
    final MemberImpl memberImpl = getMember(conn.getEndPoint());
    if (memberImpl != null) {
        memberImpl.didWrite();
    }
    inv.write();
    conn.getWriteHandler().enqueueInvocation(inv);
}

Output:
         inv.returnToContainer();
-        return;
+        return false;
     }


Input:
private void initDraw(int textColor, float textSize, int selectedColor, int footerLineHeight, int footerColor) {
    paintText = new Paint();
    paintText.setColor(textColor);
    paintText.setTextSize(textSize);
    paintText.setAntiAlias(true);
    paintSelected = new Paint();
    paintSelected.setColor(selectedColor);
    paintSelected.setTextSize(textSize);
    paintSelected.setAntiAlias(true);
    paintFooterLine = new Paint();
    paintFooterLine.setStyle(Paint.Style.FILL_AND_STROKE);
    paintFooterLine.setStrokeWidth(footerLineHeight);
    paintFooterLine.setColor(FOOTER_COLOR);
    paintFooterTriangle = new Paint();
    paintFooterTriangle.setStyle(Paint.Style.FILL_AND_STROKE);
    paintFooterTriangle.setColor(footerColor);
}

Output:
     paintFooterLine.setStrokeWidth(footerLineHeight);
-    paintFooterLine.setColor(FOOTER_COLOR);
+    paintFooterLine.setColor(footerColor);
     paintFooterTriangle = new Paint();


Input:
protected void configure() {
    ThreadFactory factory = new ThreadFactoryBuilder().setNameFormat("String_Node_Str").build();
    bind(ExecutorService.class).toInstance(Executors.newFixedThreadPool(1, factory));
}

Output:
     ThreadFactory factory = new ThreadFactoryBuilder().setNameFormat("String_Node_Str").build();
-    bind(ExecutorService.class).toInstance(Executors.newFixedThreadPool(1, factory));
+    bind(ExecutorService.class).toInstance(Executors.newFixedThreadPool(10, factory));
 }


Input:
protected void shareByNfc() {
    NfcAdapter nfc = NfcAdapter.getDefaultAdapter(this);
    if (nfc != null && nfc.isNdefPushEnabled()) {
        nfc.setNdefPushMessageCallback(new NfcAdapter.CreateNdefMessageCallback() {
            public NdefMessage createNdefMessage(NfcEvent event) {
                NdefRecord uriRecord = NdefRecord.createUri(getPaymentUri());
                return new NdefMessage(new NdefRecord[] { uriRecord });
            }
        }, this);
        ivNfc.setVisibility(View.VISIBLE);
        ivNfc.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                Utils.showSimpleMessageDialog(ReceiveCoinsActivity.this, getString(R.string.nfc_payment_request_hint));
            }
        });
    } else {
        ivNfc.setVisibility(View.GONE);
    }
}

Output:
     NfcAdapter nfc = NfcAdapter.getDefaultAdapter(this);
-    if (nfc != null && nfc.isNdefPushEnabled()) {
+    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && nfc != null && nfc.isNdefPushEnabled()) {
         nfc.setNdefPushMessageCallback(new NfcAdapter.CreateNdefMessageCallback() {


Input:
private void deregisterDependenciesForJavaProject(final IJavaProject javaProject) {
    DependencyInfo dependencyInfoForProject = createDependencyInfoForProject(javaProject);
    workspaceDependenciesByProject.removeAll(dependencyInfoForProject);
    jrePackageFragmentRoots.removeAll(dependencyInfoForProject);
}

Output:
 private void deregisterDependenciesForJavaProject(final IJavaProject javaProject) {
-    DependencyInfo dependencyInfoForProject = createDependencyInfoForProject(javaProject);
+    DependencyInfo dependencyInfoForProject = getDependencyInfoForProject(javaProject);
     workspaceDependenciesByProject.removeAll(dependencyInfoForProject);


Input:
private static void setEbcdicValue(EbcdicConnection connection, INode node, String repositoryValue) {
    if ("String_Node_Str".equals(repositoryValue)) {
        String value = getParameterValue(connection, node, "String_Node_Str");
        if (value != null) {
            connection.setDataFile(value);
        }
    }
    if ("String_Node_Str".equals(repositoryValue)) {
        String value = getParameterValue(connection, node, "String_Node_Str");
        if (value != null) {
            connection.setMidFile(value);
        }
    }
    if ("String_Node_Str".equals(repositoryValue)) {
        String value = getParameterValue(connection, node, "String_Node_Str");
        if (value != null) {
            connection.setEncoding(value);
        }
    }
}

Output:
     }
-    if ("String_Node_Str".equals(repositoryValue)) {
-        String value = getParameterValue(connection, node, "String_Node_Str");
+    if ("String_Node_Str".equals(param.getRepositoryValue())) {
+        String value = getParameterValue(connection, node, param);
         if (value != null) {


Input:
public void initiateStream() {
    streamingInterface.selectAlternateSetting(connection, 6);
    ByteBuffer buffer = ByteBuffer.allocateDirect(4096);
    Endpoint endpoint = streamingInterface.getCurrentEndpoints()[0];
    UsbEndpoint usbEndpoint = streamingInterface.getUsbInterface().getEndpoint(0);
    streamingInterface.printEndpoints();
    try {
        IsochronousAsyncTransfer transfer = new IsochronousAsyncTransfer(this, usbEndpoint, connection, buffer, 20);
        int result = connection.isochronousTransfer(this, transfer, usbEndpoint, buffer, 500);
        Timber.d("String_Node_Str", result > 0 ? result : LibusbError.fromNative(result));
    } catch (Exception e) {
        e.printStackTrace();
    }
}

Output:
     try {
-        IsochronousAsyncTransfer transfer = new IsochronousAsyncTransfer(this, usbEndpoint, connection, buffer, 20);
-        int result = connection.isochronousTransfer(this, transfer, usbEndpoint, buffer, 500);
-        Timber.d("String_Node_Str", result > 0 ? result : LibusbError.fromNative(result));
+        IsochronousAsyncTransfer transfer = new IsochronousAsyncTransfer(this, endpoint.getEndpoint(), connection, buffer, 20);
+        transfer.submit(buffer, 500);
     } catch (Exception e) {


Input:
public boolean mergeToHost(Component host) {
    if (host == null)
        throw new UiException("String_Node_Str");
    if (host == _host)
        return false;
    if (_parent == null)
        throw new UiException("String_Node_Str");
    HtmlShadowElement oldParent = (HtmlShadowElement) _parent;
    if (host != _host) {
        _parent = null;
        ((ComponentCtrl) host).addShadowRoot(this);
        _host = host;
        return true;
    }
    return false;
}

Output:
         _parent = null;
-        ((ComponentCtrl) host).addShadowRoot(this);
+        ((ComponentCtrl) host).addShadowRootBefore(this, (ShadowElement) parent);
         _host = host;


Input:
static private boolean contains(String formats, String format) {
    int index = formats.indexOf(format);
    if (index != -1) {
        if (index > 0) {
            if (formats.charAt(index - 1) != ',') {
                return false;
            }
        }
        int lastIndex = index + format.length();
        if (lastIndex < formats.length()) {
            if (formats.charAt(lastIndex) != ',') {
                return false;
            }
        }
        return true;
    }
    return false;
}

Output:
 static private boolean contains(String formats, String format) {
-    int index = formats.indexOf(format);
-    if (index != -1) {
+    int index = 0;
+    int lastIndex = 0;
+    do {
+        index = formats.indexOf(format, lastIndex);
+        if (index == -1) {
+            break;
+        }
+        lastIndex = index + format.length();
         if (index > 0) {


Input:
public Concept leastUpperBound(Object e1, Object e2) {
    if (!(e1 instanceof Concept) || !(e2 instanceof Concept)) {
        throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + e1 + "String_Node_Str" + e2);
    }
    if ((e1 instanceof FiniteConcept) && (e2 instanceof FiniteConcept)) {
        Concept lub = (Concept) _dag.leastUpperBound(e1, e2);
        if (lub instanceof FlatTokenRepresentativeConcept && !lub.equals(e1) && !lub.equals(e2)) {
            lub = leastUpperBound(((FiniteConcept) lub).getCoverSetAbove().toArray());
        }
        return lub;
    } else if (e1 instanceof InfiniteConcept) {
        return ((InfiniteConcept) e1).leastUpperBound((Concept) e2);
    } else {
        return ((InfiniteConcept) e2).leastUpperBound((Concept) e1);
    }
}

Output:
         return ((InfiniteConcept) e1).leastUpperBound((Concept) e2);
-    } else {
+    } else if (e2 instanceof InfiniteConcept) {
         return ((InfiniteConcept) e2).leastUpperBound((Concept) e1);


Input:
public boolean canExtractItem(int slot, ItemStack stack, int side) {
    if (worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 1) {
        return stack.getItem() == Items.bucket;
    } else {
        return worldObj.getBlockMetadata(xCoord, yCoord, zCoord) > 0 && hasMaster() ? getMasterTileEntity().canExtractItem(slot, stack, side) : false;
    }
}

Output:
     } else {
-        return worldObj.getBlockMetadata(xCoord, yCoord, zCoord) > 0 && hasMaster() ? getMasterTileEntity().canExtractItem(slot, stack, side) : false;
+        return worldObj.getBlockMetadata(xCoord, yCoord, zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().canExtractItem(slot, stack, side) : false;
     }


Input:
public ApplicationInfo deploy(Collection<? extends Sniffer> sniffers, final ExtendedDeploymentContext context) {
    long operationStartTime = Calendar.getInstance().getTimeInMillis();
    events.send(new Event<DeploymentContext>(Deployment.DEPLOYMENT_START, context), false);
    final ActionReport report = context.getActionReport();
    final DeployCommandParameters commandParams = context.getCommandParameters(DeployCommandParameters.class);
    final String appName = commandParams.name();
    if (commandParams.origin == OpsParams.Origin.deploy && appRegistry.get(appName) != null) {
        report.setMessage(localStrings.getLocalString("String_Node_Str", "String_Node_Str", appName));
        report.setActionExitCode(ActionReport.ExitCode.FAILURE);
        return null;
    }
    if (commandParams.virtualservers == null) {
        commandParams.virtualservers = DeploymentUtils.getVirtualServers(commandParams.target, env, domain);
    }
    if (commandParams.enabled == null) {
        commandParams.enabled = Boolean.TRUE;
    }
    if (commandParams.altdd != null) {
        context.getSource().addArchiveMetaData(DeploymentProperties.ALT_DD, commandParams.altdd);
    }
    if (commandParams.runtimealtdd != null) {
        context.getSource().addArchiveMetaData(DeploymentProperties.RUNTIME_ALT_DD, commandParams.runtimealtdd);
    }
    ProgressTracker tracker = new ProgressTracker() {
        public void actOn(Logger logger) {
            for (EngineRef module : get("String_Node_Str", EngineRef.class)) {
                try {
                    module.stop(context);
                } catch (Exception e) {
                }
            }
            try {
                PreDestroy.class.cast(context).preDestroy();
            } catch (Exception e) {
            }
            for (EngineRef module : get("String_Node_Str", EngineRef.class)) {
                try {
                    module.unload(context);
                } catch (Exception e) {
                }
            }
            try {
                ApplicationInfo appInfo = appRegistry.get(appName);
                if (appInfo != null) {
                    events.send(new Event<ApplicationInfo>(Deployment.APPLICATION_DISABLED, appInfo));
                }
            } catch (Exception e) {
            }
            for (EngineRef module : get("String_Node_Str", EngineRef.class)) {
                try {
                    module.clean(context);
                } catch (Exception e) {
                }
            }
            if (!commandParams.keepfailedstubs) {
                try {
                    context.clean();
                } catch (Exception e) {
                }
            }
            appRegistry.remove(appName);
        }
    };
    context.addTransientAppMetaData(ExtendedDeploymentContext.TRACKER, tracker);
    context.setPhase(DeploymentContextImpl.Phase.PREPARE);
    ApplicationInfo appInfo = null;
    try {
        ArchiveHandler handler = context.getArchiveHandler();
        if (handler == null) {
            handler = getArchiveHandler(context.getSource(), commandParams.type);
            context.setArchiveHandler(handler);
        }
        if (handler == null) {
            report.setMessage(localStrings.getLocalString("String_Node_Str", "String_Node_Str", context.getSourceDir()));
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return null;
        }
        DeploymentTracing tracing = context.getModuleMetaData(DeploymentTracing.class);
        if (tracing != null) {
            tracing.addMark(DeploymentTracing.Mark.ARCHIVE_HANDLER_OBTAINED);
        }
        getDeployableTypes(context);
        if (tracing != null) {
            tracing.addMark(DeploymentTracing.Mark.PARSING_DONE);
        }
        if (sniffers != null && logger.isLoggable(Level.FINE)) {
            for (Sniffer sniffer : sniffers) {
                logger.fine("String_Node_Str" + sniffer.getModuleType());
            }
        }
        sniffers = getSniffers(handler, sniffers, context);
        ClassLoaderHierarchy clh = habitat.getService(ClassLoaderHierarchy.class);
        if (tracing != null) {
            tracing.addMark(DeploymentTracing.Mark.CLASS_LOADER_HIERARCHY);
        }
        context.createDeploymentClassLoader(clh, handler);
        events.send(new Event<DeploymentContext>(Deployment.AFTER_DEPLOYMENT_CLASSLOADER_CREATION, context), false);
        if (tracing != null) {
            tracing.addMark(DeploymentTracing.Mark.CLASS_LOADER_CREATED);
        }
        final ClassLoader cloader = context.getClassLoader();
        final ClassLoader currentCL = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(cloader);
            List<EngineInfo> sortedEngineInfos = setupContainerInfos(handler, sniffers, context);
            if (tracing != null) {
                tracing.addMark(DeploymentTracing.Mark.CONTAINERS_SETUP_DONE);
            }
            if (logger.isLoggable(Level.FINE)) {
                for (EngineInfo info : sortedEngineInfos) {
                    logger.fine("String_Node_Str" + info.getSniffer().getModuleType());
                }
            }
            if (sortedEngineInfos == null || sortedEngineInfos.isEmpty()) {
                report.failure(logger, localStrings.getLocalString("String_Node_Str", "String_Node_Str", context.getSource().getName()));
                tracker.actOn(logger);
                return null;
            }
            ApplicationInfo tempAppInfo = new ApplicationInfo(events, context.getSource(), appName);
            for (Object m : context.getModuleMetadata()) {
                tempAppInfo.addMetaData(m);
            }
            tempAppInfo.setIsJavaEEApp(sortedEngineInfos);
            context.getSource().setExtraData(Boolean.class, tempAppInfo.isJavaEEApp());
            appRegistry.add(appName, tempAppInfo);
            try {
                notifyLifecycleInterceptorsBefore(ExtendedDeploymentContext.Phase.PREPARE, context);
            } catch (Throwable interceptorException) {
                report.failure(logger, "String_Node_Str", null);
                report.setFailureCause(interceptorException);
                logger.log(Level.SEVERE, KernelLoggerInfo.lifecycleException, interceptorException);
                tracker.actOn(logger);
                return null;
            }
            events.send(new Event<DeploymentContext>(Deployment.DEPLOYMENT_BEFORE_CLASSLOADER_CREATION, context), false);
            context.createApplicationClassLoader(clh, handler);
            events.send(new Event<DeploymentContext>(Deployment.AFTER_APPLICATION_CLASSLOADER_CREATION, context), false);
            if (tracing != null) {
                tracing.addMark(DeploymentTracing.Mark.CLASS_LOADER_CREATED);
            }
            ModuleInfo moduleInfo = null;
            try {
                moduleInfo = prepareModule(sortedEngineInfos, appName, context, tracker);
                final ClientJarWriter cjw = new ClientJarWriter(context);
                cjw.run();
            } catch (Throwable prepareException) {
                prepareException.printStackTrace();
                report.failure(logger, "String_Node_Str", null);
                report.setFailureCause(prepareException);
                logger.log(Level.SEVERE, KernelLoggerInfo.lifecycleException, prepareException);
                tracker.actOn(logger);
                return null;
            }
            appInfo = context.getModuleMetaData(ApplicationInfo.class);
            if (appInfo == null) {
                appInfo = new ApplicationInfo(events, context.getSource(), appName);
                appInfo.addModule(moduleInfo);
                for (Object m : context.getModuleMetadata()) {
                    moduleInfo.addMetaData(m);
                    appInfo.addMetaData(m);
                }
            } else {
                for (EngineRef ref : moduleInfo.getEngineRefs()) {
                    appInfo.add(ref);
                }
            }
            appRegistry.remove(appName);
            appInfo.setIsJavaEEApp(sortedEngineInfos);
            appRegistry.add(appName, appInfo);
            notifyLifecycleInterceptorsAfter(ExtendedDeploymentContext.Phase.PREPARE, context);
            if (tracing != null) {
                tracing.addMark(DeploymentTracing.Mark.PREPARED);
            }
            context.setPhase(DeploymentContextImpl.Phase.PREPARED);
            Thread.currentThread().setContextClassLoader(context.getClassLoader());
            appInfo.setAppClassLoader(context.getClassLoader());
            events.send(new Event<DeploymentContext>(Deployment.APPLICATION_PREPARED, context), false);
            if (loadOnCurrentInstance(context)) {
                appInfo.setLibraries(commandParams.libraries());
                try {
                    notifyLifecycleInterceptorsBefore(ExtendedDeploymentContext.Phase.LOAD, context);
                    appInfo.load(context, tracker);
                    notifyLifecycleInterceptorsAfter(ExtendedDeploymentContext.Phase.LOAD, context);
                    notifyLifecycleInterceptorsBefore(ExtendedDeploymentContext.Phase.START, context);
                    appInfo.start(context, tracker);
                    notifyLifecycleInterceptorsAfter(ExtendedDeploymentContext.Phase.START, context);
                } catch (Throwable loadException) {
                    logger.log(Level.SEVERE, KernelLoggerInfo.lifecycleException, loadException);
                    report.failure(logger, "String_Node_Str", null);
                    report.setFailureCause(loadException);
                    tracker.actOn(logger);
                    return null;
                }
            }
            return appInfo;
        } finally {
            context.postDeployClean(false);
            Thread.currentThread().setContextClassLoader(currentCL);
        }
    } catch (Throwable e) {
        report.failure(logger, localStrings.getLocalString("String_Node_Str", "String_Node_Str", appName), null);
        report.setFailureCause(e);
        logger.log(Level.SEVERE, KernelLoggerInfo.lifecycleException, e);
        tracker.actOn(logger);
        return null;
    } finally {
        if (report.getActionExitCode() == ActionReport.ExitCode.SUCCESS) {
            events.send(new Event<ApplicationInfo>(Deployment.DEPLOYMENT_SUCCESS, appInfo));
            long operationTime = Calendar.getInstance().getTimeInMillis() - operationStartTime;
            if (appInfo != null) {
                deploymentLifecycleProbeProvider.applicationDeployedEvent(appName, getApplicationType(appInfo), String.valueOf(operationTime));
            }
        } else {
            events.send(new Event<DeploymentContext>(Deployment.DEPLOYMENT_FAILURE, context));
        }
    }
}

Output:
         }
-        getDeployableTypes(context);
+        if (handler.requiresAnnotationScanning(context.getSource())) {
+            getDeployableTypes(context);
+        }
         if (tracing != null) {


Input:
private List iterateAndReturn(ResultSet rSet, Class entityClazz, EntityMetadata metadata) {
    MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(metadata.getPersistenceUnit());
    EntityType entityType = metaModel.entity(metadata.getEntityClazz());
    Iterator<Row> rowIter = rSet.iterator();
    List results = new ArrayList();
    Map<String, Object> relationalValues = new HashMap<String, Object>();
    Map<String, Field> compositeColumns = new HashMap<String, Field>();
    Object compositeKeyInstance = null;
    if (metaModel.isEmbeddable(metadata.getIdAttribute().getBindableJavaType())) {
        compositeKeyInstance = getCompositeKeyInstance(metadata);
        EmbeddableType compositeKey = metaModel.embeddable(metadata.getIdAttribute().getBindableJavaType());
        Iterator<Attribute> attributes = compositeKey.getAttributes().iterator();
        while (attributes.hasNext()) {
            Attribute attribute = attributes.next();
            String columnName = ((AbstractAttribute) attribute).getJPAColumnName();
            compositeColumns.put(columnName, (Field) attribute.getJavaMember());
        }
    }
    while (rowIter.hasNext()) {
        Object entity = null;
        Row row = rowIter.next();
        ColumnDefinitions columnDefs = row.getColumnDefinitions();
        Iterator<Definition> columnDefIter = columnDefs.iterator();
        entity = iteratorColumns(metadata, entityType, relationalValues, compositeColumns, compositeKeyInstance, entity, row, columnDefIter);
        if (compositeKeyInstance != null) {
            entity = CassandraUtilities.initialize(metadata, entity, compositeKeyInstance);
        }
        if (entity != null && entity.getClass().isAssignableFrom(metadata.getEntityClazz())) {
            Object rowKey = PropertyAccessorHelper.getId(entity, metadata);
            populateSecondaryTableData(rowKey, entity, metaModel, metadata);
            if (!relationalValues.isEmpty()) {
                results.add(new EnhanceEntity(entity, rowKey, relationalValues));
            } else {
                results.add(entity);
            }
        } else if (entity != null) {
            results.add(entity);
        }
    }
    return results;
}

Output:
     if (metaModel.isEmbeddable(metadata.getIdAttribute().getBindableJavaType())) {
-        compositeKeyInstance = getCompositeKeyInstance(metadata);
+        isCompositeKey = true;
         EmbeddableType compositeKey = metaModel.embeddable(metadata.getIdAttribute().getBindableJavaType());


Input:
public int compare(DimensionDesc o1, DimensionDesc o2) {
    JoinDesc j1 = o2.getJoin();
    JoinDesc j2 = o1.getJoin();
    return new Integer(j1 != null ? j1.getPrimaryKey().length : 0).compareTo(j2 != null ? j2.getPrimaryKey().length : 0);
}

Output:
     JoinDesc j2 = o1.getJoin();
-    return new Integer(j1 != null ? j1.getPrimaryKey().length : 0).compareTo(j2 != null ? j2.getPrimaryKey().length : 0);
+    return Integer.compare(j1 != null ? j1.getPrimaryKey().length : 0, j2 != null ? j2.getPrimaryKey().length : 0);
 }


Input:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_details, container, false);
    final ImageView albumImage = (ImageView) rootView.findViewById(R.id.details_album_image);
    ImageView backgroundImage = (ImageView) rootView.findViewById(R.id.details_background_image);
    View textContainer = rootView.findViewById(R.id.details_text_container);
    TextView albumTitleText = (TextView) textContainer.findViewById(R.id.details_album_title);
    int selectedPosition = getArguments().getInt(ARG_SELECTED_IMAGE_POSITION);
    String albumImageUrl = ALBUM_IMAGE_URLS[selectedPosition];
    String backgroundImageUrl = BACKGROUND_IMAGE_URLS[selectedPosition];
    String albumName = ALBUM_NAMES[selectedPosition];
    Picasso.with(getActivity()).load(albumImageUrl).fit().centerCrop().into(albumImage);
    Picasso.with(getActivity()).load(backgroundImageUrl).fit().centerCrop().into(backgroundImage);
    albumTitleText.setText(albumName);
    albumImage.setTransitionName(albumName);
    albumImage.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {

        public boolean onPreDraw() {
            albumImage.getViewTreeObserver().removeOnPreDrawListener(this);
            getActivity().startPostponedEnterTransition();
            return true;
        }
    });
    return rootView;
}

Output:
     albumTitleText.setText(albumName);
-    albumImage.setTransitionName(albumName);
-    albumImage.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
+    int startingPosition = getArguments().getInt(ARG_STARTING_ALBUM_IMAGE_POSITION);
+    if (savedInstanceState == null && albumPosition == startingPosition) {
+        albumImage.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {


Input:
public boolean isUseNaming() {
    return useNaming;
}

Output:
 public boolean isUseNaming() {
-    return useNaming;
+    synchronized (this) {
+        return useNaming;
+    }
 }


Input:
public Image createAndSave(Image image, BufferedImage bufferedImage) throws PersistenceException {
    Image ret = create(image);
    File outputfile = new File(image.getImagepath());
    try {
        ImageIO.write(bufferedImage, "String_Node_Str", outputfile);
    } catch (IOException e) {
        LOGGER.debug("String_Node_Str" + e);
        throw new PersistenceException(e.getMessage());
    }
    return ret;
}

Output:
     } catch (IOException e) {
-        LOGGER.debug("String_Node_Str" + e);
+        LOGGER.debug("String_Node_Str", e);
         throw new PersistenceException(e.getMessage());


Input:
public synchronized void reconfigurePool(ConnectorConnectionPool poolResource) throws PoolingException {
    int _idleTime = Integer.parseInt(poolResource.getIdleTimeoutInSeconds()) * 1000;
    if (poolInitialized) {
        if (_idleTime != idletime && _idleTime != 0) {
            scheduleResizerTask();
        }
        if (_idleTime == 0) {
            cancelResizerTask();
        }
    }
    idletime = _idleTime;
    resizeQuantity = Integer.parseInt(poolResource.getPoolResizeQuantity());
    maxWaitTime = Integer.parseInt(poolResource.getMaxWaitTimeInMillis());
    if (maxWaitTime < 0) {
        maxWaitTime = 0;
    }
    validation = poolResource.isIsConnectionValidationRequired();
    failAllConnections = poolResource.isFailAllConnections();
    setAdvancedPoolConfiguration(poolResource);
    if (!isSelfManaged()) {
        int _maxPoolSize = Integer.parseInt(poolResource.getMaxPoolSize());
        int oldMaxPoolSize = maxPoolSize;
        if (_maxPoolSize < steadyPoolSize) {
            maxPoolSize = steadyPoolSize;
        } else {
            maxPoolSize = _maxPoolSize;
        }
        if (oldMaxPoolSize != maxPoolSize) {
            ds.setMaxSize(maxPoolSize);
        }
        int _steadyPoolSize = Integer.parseInt(poolResource.getSteadyPoolSize());
        int oldSteadyPoolSize = steadyPoolSize;
        if (_steadyPoolSize > maxPoolSize) {
            steadyPoolSize = maxPoolSize;
        } else {
            steadyPoolSize = _steadyPoolSize;
        }
        if (poolInitialized) {
            int toKill = ds.getResourcesSize() - maxPoolSize;
            if (toKill > 0)
                killExtraResources(toKill);
        }
        if (oldSteadyPoolSize != steadyPoolSize) {
            if (poolInitialized) {
                if (oldSteadyPoolSize < steadyPoolSize) {
                    increaseSteadyPoolSize(_steadyPoolSize);
                    if (poolLifeCycleListener != null) {
                        poolLifeCycleListener.connectionsFreed(steadyPoolSize);
                    }
                }
            }
        }
    }
}

Output:
         }
-        if (oldSteadyPoolSize != steadyPoolSize) {
-            if (poolInitialized) {
-                if (oldSteadyPoolSize < steadyPoolSize) {
-                    increaseSteadyPoolSize(_steadyPoolSize);
-                    if (poolLifeCycleListener != null) {
-                        poolLifeCycleListener.connectionsFreed(steadyPoolSize);
-                    }
-                }
-            }
-        }
+        reconfigureSteadyPoolSize(oldSteadyPoolSize, _steadyPoolSize);
     }


Input:
public IndicatorParameters getParameters() {
    if (parameters != null) {
        TextParameters textParameters = parameters.getTextParameter();
        if (textParameters == null) {
            textParameters = IndicatorsFactory.eINSTANCE.createTextParameters();
        }
        textParameters.setUseNulls(true);
        textParameters.setUseBlank(true);
        parameters.setTextParameter(textParameters);
    }
    return parameters;
}

Output:
 public IndicatorParameters getParameters() {
-    if (parameters != null) {
-        TextParameters textParameters = parameters.getTextParameter();
-        if (textParameters == null) {
-            textParameters = IndicatorsFactory.eINSTANCE.createTextParameters();
-        }
-        textParameters.setUseNulls(true);
-        textParameters.setUseBlank(true);
-        parameters.setTextParameter(textParameters);
-    }
+    parameters = super.getParameters();
+    parameters.getTextParameter().setUseNulls(true);
+    parameters.getTextParameter().setUseBlank(true);
     return parameters;


Input:
public void onUpdateIgnitionSate(final int state) {
    int screenState = (state > 0) ? SCREEN_ON : SCREEN_ON;
    setScreenState(screenState);
}

Output:
 public void onUpdateIgnitionSate(final int state) {
-    int screenState = (state > 0) ? SCREEN_ON : SCREEN_ON;
+    int screenState = (state > 0) ? SCREEN_ON : SCREEN_OFF;
     setScreenState(screenState);


Input:
protected CloudFoundryApplicationModule getExistingApplication() throws CoreException {
    CloudFoundryApplicationModule appModule = cloudServer.getExistingCloudModule(module);
    if (appModule == null) {
        String errorMessage = "String_Node_Str" + module.getId();
        throw CloudErrorUtil.toCoreException(errorMessage);
    }
    return appModule;
}

Output:
     if (appModule == null) {
-        String errorMessage = "String_Node_Str" + module.getId();
+        String errorMessage = "String_Node_Str" + (module != null ? "String_Node_Str" + module.getId() : "String_Node_Str");
         throw CloudErrorUtil.toCoreException(errorMessage);


Input:
public JsonNode handleResult(String result) throws AradException {
    try {
        JsonNode node = JsonUtil.json2node(result);
        JsonNode error = node.findValue(errorKey);
        if (error == null || errorCodes.contains(error.asText())) {
            return node;
        } else {
            String statue = error.asText();
            AradException e = new AradException();
            e.setError_code(statue);
            throw e;
        }
    } catch (JsonProcessingException e1) {
        e1.printStackTrace();
        AradException exception = new AradException(e1.getMessage());
        throw exception;
    } catch (IOException e1) {
        e1.printStackTrace();
        AradException exception = new AradException(e1.getMessage());
        throw exception;
    }
}

Output:
         JsonNode node = JsonUtil.json2node(result);
-        JsonNode error = node.findValue(errorKey);
+        JsonNode error = node.get(errorKey);
         if (error == null || errorCodes.contains(error.asText())) {


Input:
static LoggingDeviceProxy create(final String serialPortName) {
    if (serialPortName == null) {
        throw new IllegalArgumentException("String_Node_Str");
    }
    final SerialIOConfiguration config = new SerialIOConfiguration(serialPortName, BaudRate.BAUD_460800, CharacterSize.EIGHT, Parity.NONE, StopBits.ONE, FlowControl.HARDWARE);
    try {
        final SerialDeviceCommandExecutionQueue commandQueue = SerialDeviceCommandExecutionQueue.create(APPLICATION_NAME, config, -1, null);
        if (commandQueue == null) {
            if (LOG.isEnabledFor(Level.ERROR)) {
                LOG.error("String_Node_Str" + serialPortName + "String_Node_Str");
            }
        } else {
            if (LOG.isDebugEnabled()) {
                LOG.debug("String_Node_Str" + serialPortName + "String_Node_Str");
            }
            final boolean wasHandshakeSuccessful = commandQueue.executeAndReturnStatus(new HandshakeCommandStrategy());
            if (wasHandshakeSuccessful) {
                LOG.info("String_Node_Str");
                return new LoggingDeviceProxy(commandQueue, serialPortName);
            } else {
                LOG.error("String_Node_Str");
            }
            commandQueue.shutdown();
        }
    } catch (Exception e) {
        LOG.error("String_Node_Str", e);
    }
    return null;
}

Output:
                 LOG.info("String_Node_Str");
-                return new LoggingDeviceProxy(commandQueue, serialPortName);
+                try {
+                    return new LoggingDeviceProxy(commandQueue, serialPortName);
+                } catch (InitializationException e) {
+                    LOG.error("String_Node_Str", e);
+                    CONSOLE_LOG.error("String_Node_Str");
+                } catch (Exception e) {
+                    LOG.error("String_Node_Str", e);
+                }
             } else {


Input:
private void _replaceConnectingEntities(ComponentEntity targetEntity, HashMap<String, String> portTypes) throws CloneNotSupportedException, IllegalActionException, NameDuplicationException {
    for (Object portObject : targetEntity.portList()) {
        if (!(portObject instanceof IOPort)) {
            continue;
        }
        IOPort port = (IOPort) portObject;
        for (Object relationObject : port.linkedRelationList()) {
            Relation relation = (Relation) relationObject;
            List<Port> linkedPortList = relation.linkedPortList(port);
            IOPort remotePort = null;
            for (Port connectingPort : linkedPortList) {
                if (connectingPort instanceof IOPort && _isValidConnectingPort((IOPort) connectingPort)) {
                    remotePort = (IOPort) port.clone(port.workspace());
                    remotePort.setInput(!port.isInput());
                    remotePort.setOutput(!port.isOutput());
                    remotePort.setPersistent(true);
                    remotePort.setContainer(this);
                    remotePort.setMultiport(false);
                    if (remotePort instanceof TypedIOPort) {
                        Type type = BaseType.forName(portTypes.get(port.getFullName()));
                        ((TypedIOPort) remotePort).setTypeEquals(type);
                        StringAttribute targetPortName = new StringAttribute(remotePort, "String_Node_Str");
                        targetPortName.setExpression(port.getFullName());
                    }
                    break;
                }
            }
            relation.unlinkAll();
            if (remotePort != null) {
                port.link(relation);
                remotePort.link(relation);
            }
        }
    }
}

Output:
                     if (remotePort instanceof TypedIOPort) {
-                        Type type = BaseType.forName(portTypes.get(port.getFullName()));
+                        Type type = portTypes.get(port.getFullName());
                         ((TypedIOPort) remotePort).setTypeEquals(type);


Input:
protected int doWork() {
    reportMemoryStats("String_Node_Str");
    log.info("String_Node_Str");
    buildSortedReadEndLists();
    reportMemoryStats("String_Node_Str");
    generateDuplicateIndexes();
    reportMemoryStats("String_Node_Str");
    log.info("String_Node_Str" + this.numDuplicateIndices + "String_Node_Str");
    Map<String, DuplicationMetrics> metricsByLibrary = new HashMap<String, DuplicationMetrics>();
    final SAMFileReader in = new SAMFileReader(INPUT);
    final SAMFileHeader header = in.getFileHeader();
    final SAMFileWriter out = new SAMFileWriterFactory().makeSAMOrBAMWriter(in.getFileHeader(), true, OUTPUT);
    long pairedReadsExamined = 0;
    long pairedReadDuplicates = 0;
    long recordInFileIndex = 0;
    long nextDuplicateIndex = (this.duplicateIndexes.hasNext() ? this.duplicateIndexes.next() : -1);
    for (final SAMRecord rec : in) {
        String library = getLibraryName(header, rec);
        DuplicationMetrics metrics = metricsByLibrary.get(library);
        if (metrics == null) {
            metrics = new DuplicationMetrics();
            metrics.LIBRARY = library;
            metricsByLibrary.put(library, metrics);
        }
        if (rec.getReadUnmappedFlag()) {
            ++metrics.UNMAPPED_READS;
        } else if (!rec.getReadPairedFlag() || rec.getMateUnmappedFlag()) {
            ++metrics.UNPAIRED_READS_EXAMINED;
        } else {
            ++pairedReadsExamined;
        }
        if (recordInFileIndex++ == nextDuplicateIndex) {
            rec.setDuplicateReadFlag(true);
            if (!rec.getReadPairedFlag() || rec.getMateUnmappedFlag()) {
                ++metrics.UNPAIRED_READ_DUPLICATES;
            } else {
                ++pairedReadDuplicates;
            }
            if (this.duplicateIndexes.hasNext()) {
                nextDuplicateIndex = this.duplicateIndexes.next();
            } else {
                nextDuplicateIndex = -1;
            }
        } else {
            rec.setDuplicateReadFlag(false);
        }
        if (this.REMOVE_DUPLICATES && rec.getDuplicateReadFlag()) {
        } else {
            out.addAlignment(rec);
        }
    }
    reportMemoryStats("String_Node_Str");
    out.close();
    reportMemoryStats("String_Node_Str");
    final MetricsFile<DuplicationMetrics, Double> file = getMetricsFile();
    for (DuplicationMetrics metrics : metricsByLibrary.values()) {
        metrics.READ_PAIRS_EXAMINED = pairedReadsExamined / 2;
        metrics.READ_PAIR_DUPLICATES = pairedReadDuplicates / 2;
        metrics.calculateDerivedMetrics();
        file.addMetric(metrics);
    }
    if (metricsByLibrary.size() == 1) {
        file.setHistogram(metricsByLibrary.values().iterator().next().calculateRoiHistogram());
    }
    file.write(METRICS_FILE);
    return 0;
}

Output:
         } else {
-            ++pairedReadsExamined;
+            ++metrics.READ_PAIRS_EXAMINED;
         }


Input:
private void clearExistingFile() throws IOException {
    boolean newCreation = !confFile.exists();
    if (!newCreation) {
        confFile.delete();
    }
    if (newCreation) {
        logger.log(Level.INFO, "String_Node_Str", confFile.getPath());
    }
    confFile.createNewFile();
}

Output:
     if (!newCreation) {
-        confFile.delete();
+        if (!confFile.delete()) {
+            throw new IOException();
+        }
     }


Input:
public void run() {
    if (mainHUD == null) {
        mainHUD = HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
    }
    for (String name : buttonMap.keySet()) {
        HUDButton button = buttonMap.get(name);
        button.setVisible(false);
    }
    buttonMap.clear();
    gestureMap.clear();
    if (avatar == null) {
        return;
    }
    for (String action : avatar.getAnimationNames()) {
        String name = action;
        if (action.startsWith("String_Node_Str") == true) {
            name = name.substring(5);
        } else if (action.startsWith("String_Node_Str") == true) {
            name = name.substring(7);
        }
        gestureMap.put(bundle.getString(name), action);
    }
    gestureMap.put("String_Node_Str", "String_Node_Str");
    gestureMap.put("String_Node_Str", "String_Node_Str");
    for (String name : gestureMap.keySet()) {
        int row = 0;
        int column = 0;
        for (String[] gesture : gestures) {
            if (gesture[0].equals(name)) {
                column = Integer.valueOf(gesture[1]);
                row = Integer.valueOf(gesture[2]);
                HUDButton button = mainHUD.createButton(name);
                button.setDecoratable(false);
                button.setLocation(leftMargin + column * columnWidth, bottomMargin + row * rowHeight);
                mainHUD.addComponent(button);
                buttonMap.put(name, button);
                button.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent event) {
                        String action = gestureMap.get(event.getActionCommand());
                        logger.info("String_Node_Str" + event.getActionCommand());
                        if (action.equals("String_Node_Str") == true) {
                            CharacterEyes eyes = avatar.getEyes();
                            eyes.wink(false);
                        } else if (action.equals("String_Node_Str") == true) {
                            CharacterEyes eyes = avatar.getEyes();
                            eyes.wink(true);
                        } else {
                            avatar.playAnimation(action);
                        }
                    }
                });
                break;
            }
        }
    }
    setVisible(true);
}

Output:
         HUDButton button = buttonMap.get(name);
-        button.setVisible(false);
+        mainHUD.removeComponent(button);
     }


Input:
public boolean seek(final long timestamp) {
    boolean ret = false;
    final long offsetTimestamp = timestamp - this.getCtfTmfTrace().getCTFTrace().getOffset();
    if (offsetTimestamp < 0)
        ret = super.seek(timestamp);
    else
        ret = super.seek(offsetTimestamp);
    if (ret)
        curLocation.setLocation(getCurrentEvent().getTimestampValue());
    return ret;
}

Output:
     final long offsetTimestamp = timestamp - this.getCtfTmfTrace().getCTFTrace().getOffset();
-    if (offsetTimestamp < 0)
+    if (offsetTimestamp < 0) {
         ret = super.seek(timestamp);


Input:
public static void setStarColors(Item fireworkStar, DyeColor... colors) {
    if (fireworkStar == null || fireworkStar.getType() != ItemType.FireworkStar) {
        return;
    }
    if (colors == null || colors.length < 1) {
        return;
    }
    if (verifyTags(fireworkStar, "String_Node_Str", COMPOUND, true)) {
        ArrayList<Integer> rawColors = new ArrayList<Integer>();
        for (int index = 0; index < colors.length; index++) {
            if (colors[index] == null || colors[index] == DyeColor.CUSTOM) {
                continue;
            }
            rawColors.add(colors[index].getDecimalCode());
        }
        int[] rawColorsArray = new int[rawColors.size()];
        for (int index = 0; index < rawColors.size(); index++) {
            rawColorsArray[index] = rawColors.get(index).intValue();
        }
        setStarColorsRaw(fireworkStar, rawColorsArray);
    }
}

Output:
         for (int index = 0; index < rawColors.size(); index++) {
-            rawColorsArray[index] = rawColors.get(index).intValue();
+            rawColorsArray[index] = rawColors.get(index);
         }


Input:
public List<Pipeline> createPipelineLatest(int noOfPipelines, ItemGroup context, boolean pagingEnabled) {
    List<Pipeline> result = new ArrayList<Pipeline>();
    int no = noOfPipelines;
    if (firstProject.isInQueue()) {
        String pipeLineTimestamp = PipelineUtils.formatTimestamp(firstProject.getQueueItem().getInQueueSince());
        List<Stage> pipelineStages = new ArrayList<Stage>();
        for (Stage stage : getStages()) {
            pipelineStages.add(stage.createLatestStage(context, null));
        }
        Pipeline pipelineLatest = new Pipeline(getName(), firstProject, lastProject, "String_Node_Str" + firstProject.getNextBuildNumber(), pipeLineTimestamp, TriggerCause.getTriggeredBy(firstProject, null), null, pipelineStages, false);
        result.add(pipelineLatest);
        no--;
    }
    int pipelineCount = noOfPipelines;
    if (pagingEnabled) {
        pipelineCount = firstProject.getBuilds().size();
    }
    Iterator it = firstProject.getBuilds().iterator();
    for (int i = 0; i < pipelineCount && it.hasNext(); i++) {
        AbstractBuild firstBuild = (AbstractBuild) it.next();
        List<Change> pipelineChanges = Change.getChanges(firstBuild);
        String pipeLineTimestamp = PipelineUtils.formatTimestamp(firstBuild.getTimeInMillis());
        List<Stage> pipelineStages = new ArrayList<Stage>();
        for (Stage stage : getStages()) {
            pipelineStages.add(stage.createLatestStage(context, firstBuild));
        }
        Pipeline pipelineLatest = new Pipeline(getName(), firstProject, lastProject, firstBuild.getDisplayName(), pipeLineTimestamp, TriggerCause.getTriggeredBy(firstProject, firstBuild), UserInfo.getContributors(firstBuild), pipelineStages, false);
        pipelineLatest.setChanges(pipelineChanges);
        pipelineLatest.calculateTotalBuildTime();
        result.add(pipelineLatest);
    }
    return result;
}

Output:
     }
-    int pipelineCount = noOfPipelines;
-    if (pagingEnabled) {
-        pipelineCount = firstProject.getBuilds().size();
+    int totalNoOfPipelines = firstProject.getBuilds().size();
+    component.setTotalNoOfPipelines(totalNoOfPipelines);
+    int startIndex = 0;
+    int retrieveSize = noOfPipelines;
+    if (pagingEnabled && !component.isFullScreenView()) {
+        startIndex = (component.getCurrentPage() - 1) * noOfPipelines;
+        retrieveSize = Math.min(totalNoOfPipelines - ((component.getCurrentPage() - 1) * noOfPipelines), noOfPipelines);
     }


Input:
public Matrix buildTotalXform(float pwidth, float pheight, float cwidth, float cheight, float cleft, float ctop, float rotation, float straighten, float scale, RectF dst) {
    Matrix m = getFlipMatrix(pwidth, pheight);
    m.postRotate(rotation + straighten, pwidth / 2, pheight / 2);
    Matrix m1 = new Matrix();
    m1.setRotate(rotation, pwidth / 2, pheight / 2);
    RectF crop = new RectF(cleft, ctop, cleft + cwidth, ctop + cheight);
    if (!m1.mapRect(crop))
        return null;
    if (dst != null)
        dst.set(crop);
    m.postTranslate(-crop.left, -crop.top);
    m.postScale(scale, scale);
    return m;
}

Output:
 public Matrix buildTotalXform(float pwidth, float pheight, float cwidth, float cheight, float cleft, float ctop, float rotation, float straighten, float scale, RectF dst) {
-    Matrix m = getFlipMatrix(pwidth, pheight);
-    m.postRotate(rotation + straighten, pwidth / 2, pheight / 2);
-    Matrix m1 = new Matrix();
-    m1.setRotate(rotation, pwidth / 2, pheight / 2);
-    RectF crop = new RectF(cleft, ctop, cleft + cwidth, ctop + cheight);
+    float s_pwidth = pwidth * scale;
+    float s_pheight = pheight * scale;
+    Matrix m = getFlipMatrix(s_pwidth, s_pheight);
+    m.postRotate(rotation + straighten, s_pwidth / 2, s_pheight / 2);
+    Matrix m1 = getFlipMatrix(s_pwidth, s_pheight);
+    m1.postRotate(rotation, s_pwidth / 2, s_pheight / 2);
+    RectF crop = new RectF(cleft * scale, ctop * scale, (cleft + cwidth) * scale, (ctop + cheight) * scale);
     if (!m1.mapRect(crop))


Input:
protected int shiftOutWords(final int numWords) {
    int numWordContainingLogUnitsShiftedOut = 0;
    for (LogUnit logUnit = shiftOut(); logUnit != null && numWordContainingLogUnitsShiftedOut < numWords; logUnit = shiftOut()) {
        if (logUnit.hasOneOrMoreWords()) {
            numWordContainingLogUnitsShiftedOut += logUnit.getNumWords();
        }
    }
    return numWordContainingLogUnitsShiftedOut;
}

Output:
 protected int shiftOutWords(final int numWords) {
-    int numWordContainingLogUnitsShiftedOut = 0;
-    for (LogUnit logUnit = shiftOut(); logUnit != null && numWordContainingLogUnitsShiftedOut < numWords; logUnit = shiftOut()) {
-        if (logUnit.hasOneOrMoreWords()) {
-            numWordContainingLogUnitsShiftedOut += logUnit.getNumWords();
-        }
-    }
-    return numWordContainingLogUnitsShiftedOut;
+    int numWordsShiftedOut = 0;
+    do {
+        final LogUnit logUnit = shiftOut();
+        if (logUnit == null)
+            break;
+        numWordsShiftedOut += logUnit.getNumWords();
+    } while (numWordsShiftedOut < numWords);
+    return numWordsShiftedOut;
 }


Input:
public void onFilter1Pressed() {
    try {
        changeActiveFilter(filterView1);
        ivfullscreenImage.setImage(new Image(new FileInputStream(filterGaussian(ivfullscreenImage.getId())), ivfullscreenImage.getFitWidth(), ivfullscreenImage.getFitHeight(), true, true));
    } catch (FileNotFoundException e) {
        LOGGER.error("String_Node_Str" + e.getMessage());
    }
}

Output:
     try {
-        changeActiveFilter(filterView1);
-        ivfullscreenImage.setImage(new Image(new FileInputStream(filterGaussian(ivfullscreenImage.getId())), ivfullscreenImage.getFitWidth(), ivfullscreenImage.getFitHeight(), true, true));
+        if (changeActiveFilter(filterView1)) {
+            filteredImgPath = filterGaussian(ivfullscreenImage.getId());
+            ivfullscreenImage.setImage(new Image(new FileInputStream(filteredImgPath), ivfullscreenImage.getFitWidth(), ivfullscreenImage.getFitHeight(), true, true));
+        }
     } catch (FileNotFoundException e) {


Input:
public void recycleBuffer() {
    this.fileBufferManager.releaseFileChannelForReading(this.gateID, this.fileID, true);
}

Output:
 public void recycleBuffer() {
-    this.fileBufferManager.releaseFileChannelForReading(this.gateID, this.fileID, true);
+    try {
+        if (this.fileChannel != null) {
+            this.fileBufferManager.releaseFileChannelForReading(this.gateID, this.fileID);
+            this.fileChannel = null;
+        }
+    } catch (Exception e) {
+        e.printStackTrace();
+    }
+    this.fileBufferManager.decreaseBufferCounter(this.gateID, this.fileID);
 }


Input:
private void searchAllAnalysis(IFolder folder) throws CoreException {
    for (IResource resource : folder.members()) {
        if (resource.getType() == IResource.FOLDER) {
            searchAllAnalysis(folder.getFolder(resource.getName()));
            continue;
        }
        IFile file = (IFile) resource;
        if (FactoriesUtil.ANA.equals(file.getFileExtension())) {
            findAnalysis(file);
        }
    }
}

Output:
         IFile file = (IFile) resource;
-        if (FactoriesUtil.ANA.equals(file.getFileExtension())) {
+        if (checkFile(file)) {
             findAnalysis(file);