Input:
public void reduce(final IntWritable key, final Iterable<IntWritable> values, final Reducer<IntWritable, IntWritable, IntWritable, IntWritable>.Context context) throws IOException, InterruptedException {
    int totalDegree = 0;
    for (final IntWritable token : values) {
        totalDegree++;
    }
    context.write(key, new IntWritable(totalDegree));
}

Output:
     for (final IntWritable token : values) {
-        totalDegree++;
+        totalDegree = totalDegree + token.get();
     }


Input:
public ScreenTransform preConcatenate(final ScreenTransform a) {
    final double cMinX = minX + a.minX / a.scaleX;
    final double cMaxX = (screenWidth - 1) / (scaleX * a.scaleX) + cMinX;
    final double cMinY = minY + a.minY / a.scaleY;
    final double cMaxY = (screenHeight - 1) / (scaleY * a.scaleY) + cMinY;
    return new ScreenTransform(cMinX, cMaxX, cMinY, cMaxY, screenWidth, screenHeight);
}

Output:
 public ScreenTransform preConcatenate(final ScreenTransform a) {
-    final double cMinX = minX + a.minX / a.scaleX;
+    final double cMinX = minX + a.minX / scaleX;
     final double cMaxX = (screenWidth - 1) / (scaleX * a.scaleX) + cMinX;


Input:
public void evaluateBipartite(File outputPath, List<UniversalPage> concepts1, List<UniversalPage> concepts2) throws IOException, DaoException, WikapidiaException {
    this.output = new CSVWriter(new FileWriter(outputPath), ',');
    writeHeader();
    if (concepts1.size() == 0 || concepts2.size() == 0)
        LOG.warning("String_Node_Str");
    int counter = 0;
    int total_size = concepts1.size() * concepts2.size();
    for (UniversalPage c1 : concepts1) {
        for (UniversalPage c2 : concepts2) {
            counter++;
            if (counter % 1000 == 0)
                LOG.info(String.format("String_Node_Str", counter, total_size));
            if (c1.equals(c2))
                continue;
            try {
                List<SRResult> results = new ArrayList<SRResult>();
                for (Language lang : langs) {
                    MonolingualSRMetric sr = metrics.get(lang);
                    results.add(sr.similarity(c1.getLocalId(lang), c2.getLocalId(lang), false));
                }
                writeRow(c1, c2, results);
            } catch (Exception e) {
                LOG.warning(String.format("String_Node_Str", c1, c2));
            }
        }
    }
    this.output.close();
}

Output:
             } catch (Exception e) {
-                LOG.warning(String.format("String_Node_Str", c1, c2));
+                LOG.warning(String.format("String_Node_Str", c1.getBestEnglishTitle(lpDao, true), c2.getBestEnglishTitle(lpDao, true)));
             }


Input:
private void showSubjectEditor(boolean show) {
    if (mSubjectTextEditor == null) {
        if (show == false) {
            return;
        }
        mSubjectTextEditor = (EditText) findViewById(R.id.subject);
        mSubjectTextEditor.setOnKeyListener(mSubjectKeyListener);
        mSubjectTextEditor.addTextChangedListener(mSubjectEditorWatcher);
    }
    mSubjectTextEditor.setText(mWorkingMessage.getSubject());
    mSubjectTextEditor.setVisibility(show ? View.VISIBLE : View.GONE);
    hideOrShowTopPanel();
}

Output:
         mSubjectTextEditor = (EditText) findViewById(R.id.subject);
-        mSubjectTextEditor.setOnKeyListener(mSubjectKeyListener);
+    }
+    mSubjectTextEditor.setOnKeyListener(show ? mSubjectKeyListener : null);
+    if (show) {
         mSubjectTextEditor.addTextChangedListener(mSubjectEditorWatcher);


Input:
public boolean doesRssItemAlreadyExsists(long feedId) {
    List<RssItem> feeds = daoSession.getRssItemDao().queryBuilder().where(RssItemDao.Properties.Id.eq(feedId)).list();
    return (feeds.size() <= 0) ? false : true;
}

Output:
     List<RssItem> feeds = daoSession.getRssItemDao().queryBuilder().where(RssItemDao.Properties.Id.eq(feedId)).list();
-    return (feeds.size() <= 0) ? false : true;
+    return feeds.size() > 0;
 }


Input:
private void refresh() {
    if (!signalOn) {
        paintLogo();
        return;
    }
    synchronized (refreshMonitor) {
        Graphics2D canvasGraphics = canvasGraphics();
        if (canvasGraphics == null)
            return;
        int canvasEffectiveWidth = canvas.canvasEffectiveSize().width;
        int canvasEffectiveHeight = canvas.canvasEffectiveSize().height;
        if (crtMode >= 3 || (MULTI_BUFFERING < 2 && (osdFramesLeft >= 0 || crtMode > 0))) {
            int intermWidth = Math.min(canvasEffectiveWidth, 2048);
            int intermHeight = Math.min(canvasEffectiveHeight, 1280);
            Graphics2D intermGraphics = intermFrameImage.createGraphics();
            intermGraphics.setBackground(Color.BLACK);
            intermGraphics.clearRect(0, 0, intermWidth, intermHeight);
            renderFrame(intermGraphics, intermWidth, intermHeight);
            if (crtMode == 2)
                intermGraphics.drawImage(scanlinesTextureImage, 0, 0, intermWidth, intermHeight, 0, 0, intermWidth, intermHeight, null);
            if (crtMode >= 3) {
                intermGraphics.setComposite(crtTriadComposite);
                intermGraphics.drawImage(intermFrameImage, 0, 0, intermWidth, intermHeight, 0, 0, intermWidth, intermHeight, null);
            }
            intermGraphics.dispose();
            canvasGraphics.drawImage(intermFrameImage, 0, 0, intermWidth, intermHeight, 0, 0, intermWidth, intermHeight, null);
            paintOSD(canvasGraphics);
        } else {
            renderFrame(canvasGraphics, canvasEffectiveWidth, canvasEffectiveHeight);
            if (crtMode == 2)
                canvasGraphics.drawImage(scanlinesTextureImage, 0, 0, canvasEffectiveWidth, canvasEffectiveHeight, 0, 0, canvasEffectiveWidth, canvasEffectiveHeight, null);
            paintOSD(canvasGraphics);
        }
        canvasFinish(canvasGraphics);
    }
}

Output:
             renderFrame(canvasGraphics, canvasEffectiveWidth, canvasEffectiveHeight);
-            if (crtMode == 2)
+            if (crtMode == 2) {
+                canvasGraphics.setComposite(AlphaComposite.SrcOver);
                 canvasGraphics.drawImage(scanlinesTextureImage, 0, 0, canvasEffectiveWidth, canvasEffectiveHeight, 0, 0, canvasEffectiveWidth, canvasEffectiveHeight, null);


Input:
public int bit_count2(int size, int[] data) {
    int count = 0;
    for (int i = 0; i < size; i++) {
        int d = data[i];
        for (int j = 0; j < 4; j++) {
            count += lut[d & 255];
            d = d >> 8;
        }
    }
    return count;
}

Output:
     int count = 0;
-    for (int i = 0; i < size; i++) {
+    int one = 1;
+    for (int i = 0; i < size; i += one) {
         int d = data[i];


Input:
public RemoteViews updateDayHeader(DayHeader dayHeader) {
    RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.day_header);
    rv.setTextViewText(R.id.day_header_title, createDayEntryString(dayHeader));
    setTextSize(context, rv, R.id.day_header_title, R.dimen.day_header_title);
    setTextColorRes(context, rv, R.id.day_header_title, R.attr.dayHeaderTitle);
    setBackgroundColorRes(context, rv, R.id.day_header_separator, R.attr.dayHeaderSeparator);
    setPadding(context, rv, R.id.day_header_title, 0, R.dimen.day_header_padding_top, R.dimen.day_header_padding_right, R.dimen.day_header_padding_bottom);
    Intent intent = createOpenCalendarAtDayIntent(context, dayHeader.getStartDate());
    rv.setOnClickFillInIntent(R.id.day_header, intent);
    return rv;
}

Output:
     setPadding(context, rv, R.id.day_header_title, 0, R.dimen.day_header_padding_top, R.dimen.day_header_padding_right, R.dimen.day_header_padding_bottom);
-    Intent intent = createOpenCalendarAtDayIntent(context, dayHeader.getStartDate());
+    Intent intent = createOpenCalendarAtDayIntent(dayHeader.getStartDate());
     rv.setOnClickFillInIntent(R.id.day_header, intent);


Input:
public void handleMessage(Message msg) {
    if (DebugFlags.WEB_VIEW && msg.what != INVAL_RECT_MSG_ID) {
        Log.v(LOGTAG, msg.what < REMEMBER_PASSWORD || msg.what > RETURN_LABEL ? Integer.toString(msg.what) : HandlerDebugString[msg.what - REMEMBER_PASSWORD]);
    }
    if (mWebViewCore == null) {
        return;
    }
    switch(msg.what) {
        case REMEMBER_PASSWORD:
            {
                mDatabase.setUsernamePassword(msg.getData().getString("String_Node_Str"), msg.getData().getString("String_Node_Str"), msg.getData().getString("String_Node_Str"));
                ((Message) msg.obj).sendToTarget();
                break;
            }
        case NEVER_REMEMBER_PASSWORD:
            {
                mDatabase.setUsernamePassword(msg.getData().getString("String_Node_Str"), null, null);
                ((Message) msg.obj).sendToTarget();
                break;
            }
        case SWITCH_TO_SHORTPRESS:
            {
                if (mPreventDrag == PREVENT_DRAG_MAYBE_YES) {
                    mPreventDrag = PREVENT_DRAG_NO;
                    mPreventLongPress = false;
                    mPreventDoubleTap = false;
                }
                if (mTouchMode == TOUCH_INIT_MODE) {
                    mTouchMode = mFullScreenHolder == null ? TOUCH_SHORTPRESS_START_MODE : TOUCH_SHORTPRESS_MODE;
                    updateSelection();
                } else if (mTouchMode == TOUCH_DOUBLE_TAP_MODE) {
                    mTouchMode = TOUCH_DONE_MODE;
                }
                break;
            }
        case SWITCH_TO_LONGPRESS:
            {
                if (mPreventLongPress) {
                    mTouchMode = TOUCH_DONE_MODE;
                    WebViewCore.TouchEventData ted = new WebViewCore.TouchEventData();
                    ted.mAction = WebViewCore.ACTION_LONGPRESS;
                    ted.mX = viewToContentX((int) mLastTouchX + mScrollX);
                    ted.mY = viewToContentY((int) mLastTouchY + mScrollY);
                    mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
                } else if (mPreventDrag == PREVENT_DRAG_NO) {
                    mTouchMode = TOUCH_DONE_MODE;
                    if (mFullScreenHolder == null) {
                        performLongClick();
                        rebuildWebTextView();
                    }
                }
                break;
            }
        case RELEASE_SINGLE_TAP:
            {
                if (mPreventDrag == PREVENT_DRAG_MAYBE_YES) {
                    mPreventDrag = PREVENT_DRAG_NO;
                    mPreventLongPress = false;
                    mPreventDoubleTap = false;
                }
                if (mPreventDrag == PREVENT_DRAG_NO) {
                    mTouchMode = TOUCH_DONE_MODE;
                    doShortPress();
                }
                break;
            }
        case SCROLL_BY_MSG_ID:
            setContentScrollBy(msg.arg1, msg.arg2, (Boolean) msg.obj);
            break;
        case SYNC_SCROLL_TO_MSG_ID:
            if (mUserScroll) {
                mUserScroll = false;
                break;
            }
        case SCROLL_TO_MSG_ID:
            if (setContentScrollTo(msg.arg1, msg.arg2)) {
                mUserScroll = false;
                mWebViewCore.sendMessage(EventHub.SYNC_SCROLL, msg.arg1, msg.arg2);
            }
            break;
        case SPAWN_SCROLL_TO_MSG_ID:
            spawnContentScrollTo(msg.arg1, msg.arg2);
            break;
        case NEW_PICTURE_MSG_ID:
            {
                WebSettings settings = mWebViewCore.getSettings();
                final int viewWidth = getViewWidth();
                final WebViewCore.DrawData draw = (WebViewCore.DrawData) msg.obj;
                final Point viewSize = draw.mViewPoint;
                boolean useWideViewport = settings.getUseWideViewPort();
                WebViewCore.RestoreState restoreState = draw.mRestoreState;
                boolean hasRestoreState = restoreState != null;
                if (hasRestoreState) {
                    mInZoomOverview = false;
                    if (restoreState.mMinScale == 0) {
                        if (restoreState.mMobileSite) {
                            if (draw.mMinPrefWidth > Math.max(0, draw.mViewPoint.x)) {
                                mMinZoomScale = (float) viewWidth / draw.mMinPrefWidth;
                                mMinZoomScaleFixed = false;
                                mInZoomOverview = useWideViewport && settings.getLoadWithOverviewMode();
                            } else {
                                mMinZoomScale = restoreState.mDefaultScale;
                                mMinZoomScaleFixed = true;
                            }
                        } else {
                            mMinZoomScale = DEFAULT_MIN_ZOOM_SCALE;
                            mMinZoomScaleFixed = false;
                        }
                    } else {
                        mMinZoomScale = restoreState.mMinScale;
                        mMinZoomScaleFixed = true;
                    }
                    if (restoreState.mMaxScale == 0) {
                        mMaxZoomScale = DEFAULT_MAX_ZOOM_SCALE;
                    } else {
                        mMaxZoomScale = restoreState.mMaxScale;
                    }
                    if (mInitialScaleInPercent > 0) {
                        setNewZoomScale(mInitialScaleInPercent / 100.0f, mInitialScaleInPercent != mTextWrapScale * 100, false);
                    } else if (restoreState.mViewScale > 0) {
                        mTextWrapScale = restoreState.mTextWrapScale;
                        setNewZoomScale(restoreState.mViewScale, false, false);
                    } else {
                        mInZoomOverview = useWideViewport && settings.getLoadWithOverviewMode();
                        float scale;
                        if (mInZoomOverview) {
                            scale = (float) viewWidth / DEFAULT_VIEWPORT_WIDTH;
                        } else {
                            scale = restoreState.mTextWrapScale;
                        }
                        setNewZoomScale(scale, Math.abs(scale - mTextWrapScale) >= 0.01f, false);
                    }
                    setContentScrollTo(restoreState.mScrollX, restoreState.mScrollY);
                    clearTextEntry();
                    if (getSettings().getBuiltInZoomControls()) {
                        updateZoomButtonsEnabled();
                    }
                }
                final boolean updateLayout = viewSize.x == mLastWidthSent && viewSize.y == mLastHeightSent;
                recordNewContentSize(draw.mWidthHeight.x, draw.mWidthHeight.y + (mFindIsUp ? mFindHeight : 0), updateLayout);
                if (DebugFlags.WEB_VIEW) {
                    Rect b = draw.mInvalRegion.getBounds();
                    Log.v(LOGTAG, "String_Node_Str" + b.left + "String_Node_Str" + b.top + "String_Node_Str" + b.right + "String_Node_Str" + b.bottom + "String_Node_Str");
                }
                invalidateContentRect(draw.mInvalRegion.getBounds());
                if (mPictureListener != null) {
                    mPictureListener.onNewPicture(WebView.this, capturePicture());
                }
                if (useWideViewport) {
                    mZoomOverviewWidth = Math.min(sMaxViewportWidth, Math.max((int) (viewWidth / mDefaultScale), Math.max(draw.mMinPrefWidth, draw.mViewPoint.x)));
                }
                if (!mMinZoomScaleFixed) {
                    mMinZoomScale = (float) viewWidth / mZoomOverviewWidth;
                }
                if (!mDrawHistory && mInZoomOverview) {
                    if (Math.abs((viewWidth * mInvActualScale) - mZoomOverviewWidth) > 1) {
                        setNewZoomScale((float) viewWidth / mZoomOverviewWidth, Math.abs(mActualScale - mTextWrapScale) < 0.01f, false);
                    }
                }
                if (draw.mFocusSizeChanged && inEditingMode()) {
                    mFocusSizeChanged = true;
                }
                if (hasRestoreState) {
                    mViewManager.postReadyToDrawAll();
                }
                break;
            }
        case WEBCORE_INITIALIZED_MSG_ID:
            nativeCreate(msg.arg1);
            break;
        case UPDATE_TEXTFIELD_TEXT_MSG_ID:
            if (inEditingMode() && mWebTextView.isSameTextField(msg.arg1)) {
                if (msg.getData().getBoolean("String_Node_Str")) {
                    Spannable text = (Spannable) mWebTextView.getText();
                    int start = Selection.getSelectionStart(text);
                    int end = Selection.getSelectionEnd(text);
                    mWebTextView.setInPassword(true);
                    Spannable pword = (Spannable) mWebTextView.getText();
                    Selection.setSelection(pword, start, end);
                } else if (msg.arg2 == mTextGeneration) {
                    mWebTextView.setTextAndKeepSelection((String) msg.obj);
                }
            }
            break;
        case UPDATE_TEXT_SELECTION_MSG_ID:
            if (inEditingMode() && mWebTextView.isSameTextField(msg.arg1) && msg.arg2 == mTextGeneration) {
                WebViewCore.TextSelectionData tData = (WebViewCore.TextSelectionData) msg.obj;
                mWebTextView.setSelectionFromWebKit(tData.mStart, tData.mEnd);
            }
            break;
        case RETURN_LABEL:
            if (inEditingMode() && mWebTextView.isSameTextField(msg.arg1)) {
                mWebTextView.setHint((String) msg.obj);
                InputMethodManager imm = InputMethodManager.peekInstance();
                if (imm != null && imm.isActive(mWebTextView)) {
                    imm.restartInput(mWebTextView);
                }
            }
            break;
        case MOVE_OUT_OF_PLUGIN:
            navHandledKey(msg.arg1, 1, false, 0, true);
            break;
        case UPDATE_TEXT_ENTRY_MSG_ID:
            if (inEditingMode() && nativeCursorIsTextInput()) {
                mWebTextView.bringIntoView();
                rebuildWebTextView();
            }
            break;
        case CLEAR_TEXT_ENTRY:
            clearTextEntry();
            break;
        case INVAL_RECT_MSG_ID:
            {
                Rect r = (Rect) msg.obj;
                if (r == null) {
                    invalidate();
                } else {
                    viewInvalidate(r.left, r.top, r.right, r.bottom);
                }
                break;
            }
        case IMMEDIATE_REPAINT_MSG_ID:
            {
                int updates = msg.arg1;
                if (updates != 0) {
                    nativeUpdateLayers(mRootLayer, updates);
                }
                invalidate();
                break;
            }
        case SET_ROOT_LAYER_MSG_ID:
            {
                int oldLayer = mRootLayer;
                mRootLayer = msg.arg1;
                if (oldLayer > 0) {
                    nativeDestroyLayer(oldLayer);
                }
                if (mRootLayer == 0) {
                    mLayersHaveAnimations = false;
                }
                if (mEvaluateThread != null) {
                    mEvaluateThread.cancel();
                    mEvaluateThread = null;
                }
                if (nativeLayersHaveAnimations(mRootLayer)) {
                    mLayersHaveAnimations = true;
                    mEvaluateThread = new EvaluateLayersAnimations();
                    mEvaluateThread.start();
                }
                invalidate();
                break;
            }
        case REQUEST_FORM_DATA:
            AutoCompleteAdapter adapter = (AutoCompleteAdapter) msg.obj;
            if (mWebTextView.isSameTextField(msg.arg1)) {
                mWebTextView.setAdapterCustom(adapter);
            }
            break;
        case RESUME_WEBCORE_PRIORITY:
            WebViewCore.resumePriority(mWebViewCore);
            break;
        case LONG_PRESS_CENTER:
            mGotCenterDown = false;
            mTrackballDown = false;
            if (getParent() != null) {
                performLongClick();
            }
            break;
        case WEBCORE_NEED_TOUCH_EVENTS:
            mForwardTouchEvents = (msg.arg1 != 0);
            break;
        case PREVENT_TOUCH_ID:
            if (msg.arg1 == MotionEvent.ACTION_DOWN) {
                if (mPreventDrag == PREVENT_DRAG_MAYBE_YES) {
                    mPreventDrag = (msg.arg2 & TOUCH_PREVENT_DRAG) == TOUCH_PREVENT_DRAG ? PREVENT_DRAG_YES : PREVENT_DRAG_NO;
                    if (mPreventDrag == PREVENT_DRAG_YES) {
                        mTouchMode = TOUCH_DONE_MODE;
                    } else {
                        mPreventLongPress = (msg.arg2 & TOUCH_PREVENT_LONGPRESS) == TOUCH_PREVENT_LONGPRESS;
                        mPreventDoubleTap = (msg.arg2 & TOUCH_PREVENT_DOUBLETAP) == TOUCH_PREVENT_DOUBLETAP;
                    }
                }
            }
            break;
        case REQUEST_KEYBOARD:
            if (msg.arg1 == 0) {
                hideSoftKeyboard();
            } else {
                displaySoftKeyboard(1 == msg.arg2);
            }
            break;
        case FIND_AGAIN:
            if (mFindIsUp) {
                findAll(mLastFind);
            }
            break;
        case DRAG_HELD_MOTIONLESS:
            mHeldMotionless = MOTIONLESS_TRUE;
            invalidate();
        case AWAKEN_SCROLL_BARS:
            if (mTouchMode == TOUCH_DRAG_MODE && mHeldMotionless == MOTIONLESS_TRUE) {
                awakenScrollBars(ViewConfiguration.getScrollDefaultDelay(), false);
                mPrivateHandler.sendMessageDelayed(mPrivateHandler.obtainMessage(AWAKEN_SCROLL_BARS), ViewConfiguration.getScrollDefaultDelay());
            }
            break;
        case DO_MOTION_UP:
            doMotionUp(msg.arg1, msg.arg2);
            break;
        case SHOW_FULLSCREEN:
            {
                WebViewCore.PluginFullScreenData data = (WebViewCore.PluginFullScreenData) msg.obj;
                if (data.mNpp != 0 && data.mView != null) {
                    if (mFullScreenHolder != null) {
                        Log.w(LOGTAG, "String_Node_Str");
                        mFullScreenHolder.dismiss();
                    }
                    mFullScreenHolder = new PluginFullScreenHolder(WebView.this, data.mNpp);
                    data.mView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));
                    mFullScreenHolder.setContentView(data.mView);
                    mFullScreenHolder.setCancelable(false);
                    mFullScreenHolder.setCanceledOnTouchOutside(false);
                    mFullScreenHolder.show();
                } else if (mFullScreenHolder == null) {
                    break;
                }
                int x = contentToViewX(data.mDocX);
                int y = contentToViewY(data.mDocY);
                int width = contentToViewDimension(data.mDocWidth);
                int height = contentToViewDimension(data.mDocHeight);
                int viewWidth = getViewWidth();
                int viewHeight = getViewHeight();
                int newX = mScrollX;
                int newY = mScrollY;
                if (x < mScrollX) {
                    newX = x + (width > viewWidth ? (width - viewWidth) / 2 : 0);
                } else if (x + width > mScrollX + viewWidth) {
                    newX = x + width - viewWidth - (width > viewWidth ? (width - viewWidth) / 2 : 0);
                }
                if (y < mScrollY) {
                    newY = y + (height > viewHeight ? (height - viewHeight) / 2 : 0);
                } else if (y + height > mScrollY + viewHeight) {
                    newY = y + height - viewHeight - (height > viewHeight ? (height - viewHeight) / 2 : 0);
                }
                scrollTo(newX, newY);
                if (width > viewWidth || height > viewHeight) {
                    mZoomCenterX = viewWidth * .5f;
                    mZoomCenterY = viewHeight * .5f;
                    setNewZoomScale(mActualScale / Math.max((float) width / viewWidth, (float) height / viewHeight), false, false);
                }
                mFullScreenHolder.updateBound(contentToViewX(data.mDocX) - mScrollX, contentToViewY(data.mDocY) - mScrollY, contentToViewDimension(data.mDocWidth), contentToViewDimension(data.mDocHeight));
            }
            break;
        case HIDE_FULLSCREEN:
            if (mFullScreenHolder != null) {
                mFullScreenHolder.dismiss();
                mFullScreenHolder = null;
            }
            break;
        case DOM_FOCUS_CHANGED:
            if (inEditingMode()) {
                nativeClearCursor();
                rebuildWebTextView();
            }
            break;
        case SHOW_RECT_MSG_ID:
            {
                WebViewCore.ShowRectData data = (WebViewCore.ShowRectData) msg.obj;
                int x = mScrollX;
                int left = contentToViewDimension(data.mLeft);
                int width = contentToViewDimension(data.mWidth);
                int maxWidth = contentToViewDimension(data.mContentWidth);
                int viewWidth = getViewWidth();
                if (width < viewWidth) {
                    x += left + width / 2 - mScrollX - viewWidth / 2;
                } else {
                    x += (int) (left + data.mXPercentInDoc * width - mScrollX - data.mXPercentInView * viewWidth);
                }
                x = Math.max(0, (Math.min(maxWidth, x + viewWidth)) - viewWidth);
                int y = mScrollY;
                int top = contentToViewDimension(data.mTop);
                int height = contentToViewDimension(data.mHeight);
                int maxHeight = contentToViewDimension(data.mContentHeight);
                int viewHeight = getViewHeight();
                if (height < viewHeight) {
                    y += top + height / 2 - mScrollY - viewHeight / 2;
                } else {
                    y += (int) (top + data.mYPercentInDoc * height - mScrollY - data.mYPercentInView * viewHeight);
                }
                y = Math.max(0, (Math.min(maxHeight, y + viewHeight) - viewHeight));
                scrollTo(x, y);
            }
            break;
        default:
            super.handleMessage(msg);
            break;
    }
}

Output:
                 if (updates != 0) {
-                    nativeUpdateLayers(mRootLayer, updates);
+                    nativeUpdateLayers(updates);
                 }


Input:
public void handleRequest(HttpServerExchange exchange, RequestContext context) throws Exception {
    String db = context.getDBName();
    String co = context.getCollectionName();
    String id = context.getIndexId();
    if (id.startsWith("String_Node_Str") || id.equals("String_Node_Str")) {
        ResponseHelper.endExchangeWithMessage(exchange, HttpStatus.SC_UNAUTHORIZED, id + "String_Node_Str");
        return;
    }
    IndexDAO.deleteIndex(db, co, id);
    if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {
        DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(), exchange, context, new BasicDBObject());
    }
    ResponseHelper.endExchange(exchange, HttpStatus.SC_GONE);
}

Output:
     }
-    IndexDAO.deleteIndex(db, co, id);
+    int SC = IndexDAO.deleteIndex(db, co, id);
+    exchange.setResponseCode(SC);
     if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {


Input:
public void append0() {
    int i = size / 8;
    int ci = size / CACHE_WIDTH;
    if (i >= vector.length) {
        extend();
    }
    if (size % CACHE_WIDTH == 0 && ci > 0) {
        countCache[ci] = countCache[ci - 1];
    }
    int r = size % 8;
    vector[i] &= ~BITS[r];
    size0++;
    if (size0 == 2) {
        node2pos = size;
    }
    if (size0 % CACHE_WIDTH == 0) {
        indexCache[size0 / CACHE_WIDTH] = size;
    }
    size++;
}

Output:
     size0++;
-    if (size0 == 2) {
+    if (size0 == 1) {
+        node1pos = size;
+    } else if (size0 == 2) {
         node2pos = size;


Input:
public boolean post(Event event, boolean forced) {
    org.spongepowered.api.event.Event spongeEvent = null;
    try (final CauseStackManager.CauseStackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) {
        if (!forced) {
            if (!isEventAllowed(event)) {
                return false;
            }
            spongeEvent = SpongeForgeEventFactory.createSpongeEvent(event);
        }
        IEventListener[] listeners = event.getListenerList().getListeners(this.busID);
        if (!forced && (event instanceof org.spongepowered.api.event.Event || spongeEvent != null) && !Sponge.getGame().getPlatform().getExecutionType().isClient()) {
            boolean cancelled = ((SpongeModEventManager) SpongeImpl.getGame().getEventManager()).post(spongeEvent, event, listeners);
            if (!cancelled) {
                SpongeForgeEventFactory.onForgePost(event);
            }
            return cancelled;
        }
        listeners = event.getListenerList().getListeners(this.busID);
        int index = 0;
        IMixinASMEventHandler modListener = null;
        try {
            for (; index < listeners.length; index++) {
                final IEventListener listener = listeners[index];
                if (listener instanceof IMixinASMEventHandler) {
                    modListener = (IMixinASMEventHandler) listener;
                    modListener.getTimingsHandler().startTimingIfSync();
                    SpongeForgeEventHooks.preEventPhaseCheck(listener, event);
                    listener.invoke(event);
                    SpongeForgeEventHooks.postEventPhaseCheck(listener, event);
                    modListener.getTimingsHandler().stopTimingIfSync();
                } else {
                    listener.invoke(event);
                }
            }
        } catch (Throwable throwable) {
            if (modListener != null) {
                modListener.getTimingsHandler().stopTimingIfSync();
            }
            this.exceptionHandler.handleException((EventBus) (Object) this, event, listeners, index, throwable);
            throw new RuntimeException(throwable);
        }
    }
    return (event.isCancelable() ? event.isCanceled() : false);
}

Output:
     org.spongepowered.api.event.Event spongeEvent = null;
-    try (final CauseStackManager.CauseStackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) {
+    if (!isSpongeSetUp) {
+        try {
+            Sponge.getCauseStackManager();
+        } catch (Exception e) {
+            return false;
+        }
+    }
+    isSpongeSetUp = true;
+    final boolean isMainThread = Sponge.isServerAvailable() && Sponge.getServer().isMainThread();
+    try (final CauseStackManager.CauseStackFrame frame = isMainThread ? Sponge.getCauseStackManager().pushCauseFrame() : null) {
         if (!forced) {


Input:
public void testMatchMultiVarArgs() throws TypeMismatchException {
    FnCallInfo fc = makeFnCallInfo(VARARGS_TYPE, Arrays.asList(Types.F_INT));
    List<FnMatch> matches;
    matches = concretiseInputsOverloaded(FAKE_CONTEXT, fc, true);
    assertEquals("String_Node_Str", 1, matches.size());
    FnMatch match = matches.get(0);
    assertEquals("String_Node_Str", 1, match.concreteAlts.size());
    assertEquals("String_Node_Str", Arrays.asList(Types.F_INT), match.concreteAlts.get(0).getInputs());
}

Output:
     FnCallInfo fc = makeFnCallInfo(VARARGS_TYPE, Arrays.asList(Types.F_INT));
-    List<FnMatch> matches;
-    matches = concretiseInputsOverloaded(FAKE_CONTEXT, fc, true);
-    assertEquals("String_Node_Str", 1, matches.size());
-    FnMatch match = matches.get(0);
+    FnMatch match = concretiseInputsOverloaded(FAKE_CONTEXT, fc);
     assertEquals("String_Node_Str", 1, match.concreteAlts.size());


Input:
public boolean directCaptchaLoad(String destination) {
    file = new File(destination, System.currentTimeMillis() + getFileType());
    try {
        br.cloneBrowser().getDownload(file, imageUrl);
        return renameCaptcha(file, destination);
    } catch (Exception e) {
    }
    return false;
}

Output:
     try {
-        br.cloneBrowser().getDownload(file, imageUrl);
+        URLConnectionAdapter urlc = br.cloneBrowser().openGetConnection(imageUrl);
+        Browser.download(file, urlc);
         return renameCaptcha(file, destination);


Input:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    ReportEngineService.getInstance().setEngineContext(getServletContext(), request);
    BirtContext context = new BirtContext(request);
    if (context.getBean().getException() != null) {
        context.finalize();
        String target = "String_Node_Str";
        request.setAttribute("String_Node_Str", context.getBean().getException());
        RequestDispatcher rd = request.getRequestDispatcher(target);
        rd.include(request, response);
    } else {
        try {
            if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
                viewer.service(request, response);
            }
            if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
                preview.service(request, response);
            } else if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
                engine.service(request, response);
            } else if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
                parameter.service(request, response);
            }
        } catch (BirtException e) {
            String target = "String_Node_Str";
            request.setAttribute("String_Node_Str", e);
            RequestDispatcher rd = request.getRequestDispatcher(target);
            rd.include(request, response);
        } finally {
            context.finalize();
        }
    }
}

Output:
         context.finalize();
-        String target = "String_Node_Str";
-        request.setAttribute("String_Node_Str", context.getBean().getException());
-        RequestDispatcher rd = request.getRequestDispatcher(target);
-        rd.include(request, response);
+        displayException(request, response, context.getBean().getException());
     } else {


Input:
public void addSelection(Collection<IScore> scores) {
    scores = Collections2.filter(scores, query.getMode().isSupportedBy());
    if (scores.isEmpty())
        return;
    this.selection.addAll(scores);
    IScore last = Iterables.getLast(scores);
    sortByImpl(last, last.getDefaultSorting());
    submitComputation(scores, null);
    listeners.fireIndexedPropertyChange(PROP_SELECTION, selection.size() - 1, null, last);
}

Output:
         return;
-    this.selection.addAll(scores);
+    this.selection.addAll(0, scores);
     IScore last = Iterables.getLast(scores);


Input:
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
    FileDialog fd = new FileDialog(shell.getShell(), SWT.SAVE);
    fd.setFilterExtensions(new String[] { "String_Node_Str" });
    fd.setText("String_Node_Str");
    String filename = fd.open();
    if (filename == null)
        return;
    File file = new File(filename);
    try {
        System.out.println(file.toURL());
    } catch (MalformedURLException e1) {
        log.error(e1.getMessage(), e1);
    }
    XSDDesc xsdDesc = buildUp(filename, LOCAL, 0);
    include(xsdDesc);
    getButton(IDialogConstants.OK_ID).setEnabled(true);
    tableViewer.refresh();
}

Output:
     try {
-        System.out.println(file.toURL());
+        log.info(file.toURL());
     } catch (MalformedURLException e1) {


Input:
public boolean isInFactory() {
    return factoryMode;
}

Output:
 public boolean isInFactory() {
-    return factoryMode;
+    return true;
 }


Input:
public void testIsContainsViewConnectionSchemaString() {
    String schemaName = "String_Node_Str";
    String tablePattern = null;
    boolean containsTable = false;
    Connection dataProvider = null;
    DatabaseMetaData metaData = null;
    java.sql.Connection sqlConn = null;
    Schema schema = null;
    String[] tableType = new String[] { TableType.VIEW.toString() };
    ResultSet tables = Mockito.mock(ResultSet.class);
    try {
        Mockito.when(tables.next()).thenReturn(true);
        metaData = Mockito.mock(DatabaseMetaData.class);
        Mockito.when(metaData.getTables(null, schemaName, tablePattern, tableType)).thenReturn(tables);
        dataProvider = Mockito.mock(DatabaseConnection.class);
        TypedReturnCode<java.sql.Connection> reConn = new TypedReturnCode<java.sql.Connection>();
        sqlConn = Mockito.mock(java.sql.Connection.class);
        reConn.setOk(true);
        reConn.setObject(sqlConn);
        Mockito.when(sqlConn.getMetaData()).thenReturn(metaData);
        Mockito.when(sqlConn.isClosed()).thenReturn(true);
        schema = Mockito.mock(Schema.class);
        Mockito.when(schema.getName()).thenReturn(schemaName);
        PowerMockito.mockStatic(MetadataConnectionUtils.class);
        Mockito.when(MetadataConnectionUtils.checkConnection((DatabaseConnection) dataProvider)).thenReturn(reConn);
        PowerMockito.mockStatic(ExtractMetaDataUtils.class);
        Mockito.when(ExtractMetaDataUtils.getDatabaseMetaData(sqlConn, (DatabaseConnection) dataProvider, false)).thenReturn(metaData);
        PowerMockito.mockStatic(PackageHelper.class);
        Mockito.when(PackageHelper.getCatalogOrSchema(schema)).thenReturn(schema);
        Mockito.when(PackageHelper.getParentPackage(schema)).thenReturn(null);
        containsTable = DqRepositoryViewService.isContainsView(dataProvider, schema, tablePattern);
        Mockito.verify(metaData).getTables(null, schemaName, tablePattern, tableType);
        Mockito.verify(tables).next();
        Mockito.verify(sqlConn).isClosed();
        Mockito.verify(schema).getName();
    } catch (Exception e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
    Mockito.verifyZeroInteractions(metaData, tables, dataProvider, sqlConn, schema);
    assertTrue(containsTable);
}

Output:
         metaData = Mockito.mock(DatabaseMetaData.class);
-        Mockito.when(metaData.getTables(null, schemaName, tablePattern, tableType)).thenReturn(tables);
+        Mockito.when(metaData.getTables(null, schemaName, tablePattern, DqRepositoryViewService.VIEW_TYPES)).thenReturn(tables);
         dataProvider = Mockito.mock(DatabaseConnection.class);


Input:
private void limitEqualEdgesToLeafs(QueryTree<N> tree, int maxEqualEdgeCount) {
    Set<QueryTree<N>> parents = new HashSet<QueryTree<N>>();
    for (QueryTree<N> leaf : tree.getLeafs()) {
        if (leaf.getUserObject().equals("String_Node_Str")) {
            parents.add(leaf.getParent());
        }
    }
    for (QueryTree<N> parent : parents) {
        for (Object edge : parent.getEdges()) {
            int cnt = 0;
            for (QueryTree<N> child : parent.getChildren(edge)) {
                if (child.getUserObject().equals("String_Node_Str")) {
                    if (child.isLeaf()) {
                        cnt++;
                        if (cnt > maxEqualEdgeCount) {
                            parent.removeChild((QueryTreeImpl<N>) child);
                        }
                    }
                }
            }
        }
    }
}

Output:
                         cnt++;
-                        if (cnt > maxEqualEdgeCount) {
+                        if (existsResourceChild || cnt > maxEqualEdgeCount) {
                             parent.removeChild((QueryTreeImpl<N>) child);


Input:
public synchronized User getUserByName(String name) throws FtpException {
    lazyInit();
    Statement stmt = null;
    ResultSet rs = null;
    try {
        HashMap<String, Object> map = new HashMap<String, Object>();
        map.put(ATTR_LOGIN, escapeString(name));
        String sql = StringUtils.replaceString(selectUserStmt, map);
        LOG.info(sql);
        stmt = createConnection().createStatement();
        rs = stmt.executeQuery(sql);
        BaseUser thisUser = null;
        String trueStr = Boolean.TRUE.toString();
        if (rs.next()) {
            thisUser = new BaseUser();
            thisUser.setName(rs.getString(ATTR_LOGIN));
            thisUser.setHomeDirectory(rs.getString(ATTR_HOME));
            thisUser.setEnabled(trueStr.equalsIgnoreCase(rs.getString(ATTR_ENABLE)));
            thisUser.setMaxIdleTime(rs.getInt(ATTR_MAX_IDLE_TIME));
            List<Authority> authorities = new ArrayList<Authority>();
            if (trueStr.equalsIgnoreCase(rs.getString(ATTR_WRITE_PERM))) {
                authorities.add(new WritePermission());
            }
            authorities.add(new ConcurrentLoginPermission(rs.getInt(ATTR_MAX_LOGIN_NUMBER), rs.getInt(ATTR_MAX_LOGIN_PER_IP)));
            authorities.add(new TransferRatePermission(rs.getInt(ATTR_MAX_DOWNLOAD_RATE), rs.getInt(ATTR_MAX_UPLOAD_RATE)));
            thisUser.setAuthorities(authorities.toArray(new Authority[0]));
        }
        return thisUser;
    } catch (SQLException ex) {
        LOG.error("String_Node_Str", ex);
        throw new FtpException("String_Node_Str", ex);
    } finally {
        if (rs != null) {
            try {
                rs.close();
            } catch (Exception ex) {
                LOG.error("String_Node_Str", ex);
            }
        }
        if (stmt != null) {
            try {
                stmt.close();
            } catch (Exception ex) {
                LOG.error("String_Node_Str", ex);
            }
        }
    }
}

Output:
             thisUser.setHomeDirectory(rs.getString(ATTR_HOME));
-            thisUser.setEnabled(trueStr.equalsIgnoreCase(rs.getString(ATTR_ENABLE)));
+            thisUser.setEnabled(isTrue(rs.getString(ATTR_ENABLE)));
             thisUser.setMaxIdleTime(rs.getInt(ATTR_MAX_IDLE_TIME));


Input:
public void postApplication(MasterContext<VarSelMasterResult, VarSelWorkerResult> context) {
    VarSelMasterResult varSelMasterResult = context.getMasterResult();
    List<Integer> results = varSelMasterResult.getColumnIdList();
    LOG.info("String_Node_Str" + results);
    Path out = new Path(context.getProps().getProperty(Constants.VAR_SEL_COLUMN_IDS_OUPUT));
    writeColumnIdsIntoHDFS(out, results);
}

Output:
     LOG.info("String_Node_Str" + results);
-    Path out = new Path(context.getProps().getProperty(Constants.VAR_SEL_COLUMN_IDS_OUPUT));
+    String out = context.getProps().getProperty(Constants.VAR_SEL_COLUMN_IDS_OUPUT);
     writeColumnIdsIntoHDFS(out, results);


Input:
public void actionPerformed(ActionEvent e) {
    if (chatTabbedPane != null && chatTabbedPane.getSelectedIndex() < chatTabbedPane.getTabCount() - 1) {
        ChatWindow.this.chatTabbedPane.setSelectedIndex(chatTabbedPane.getSelectedIndex() + 1);
    }
}

Output:
 public void actionPerformed(ActionEvent e) {
-    if (chatTabbedPane != null && chatTabbedPane.getSelectedIndex() < chatTabbedPane.getTabCount() - 1) {
-        ChatWindow.this.chatTabbedPane.setSelectedIndex(chatTabbedPane.getSelectedIndex() + 1);
+    if (chatTabbedPane != null) {
+        if (chatTabbedPane.getSelectedIndex() < chatTabbedPane.getTabCount() - 1) {
+            ChatWindow.this.chatTabbedPane.setSelectedIndex(chatTabbedPane.getSelectedIndex() + 1);
+        } else {
+            ChatWindow.this.chatTabbedPane.setSelectedIndex(0);
+        }
     }


Input:
public void testCallingMethods_GcallingJ() {
    this.runConformTest(new String[] { "String_Node_Str", "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str", "String_Node_Str", "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" }, "String_Node_Str");
}

Output:
 public void testCallingMethods_GcallingJ() {
-    this.runConformTest(new String[] { "String_Node_Str", "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str", "String_Node_Str", "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" }, "String_Node_Str");
+    runConformTest(new String[] { "String_Node_Str", "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str", "String_Node_Str", "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" }, "String_Node_Str");
 }


Input:
List<RSGroupInfo> retrieveGroupListFromZookeeper() throws IOException {
    String groupBasePath = ZNodePaths.joinZNode(watcher.znodePaths.baseZNode, rsGroupZNode);
    List<RSGroupInfo> RSGroupInfoList = Lists.newArrayList();
    try {
        if (ZKUtil.checkExists(watcher, groupBasePath) != -1) {
            List<String> children = ZKUtil.listChildrenAndWatchForNewChildren(watcher, groupBasePath);
            if (children == null) {
                return RSGroupInfoList;
            }
            for (String znode : children) {
                byte[] data = ZKUtil.getData(watcher, ZNodePaths.joinZNode(groupBasePath, znode));
                if (data.length > 0) {
                    ProtobufUtil.expectPBMagicPrefix(data);
                    ByteArrayInputStream bis = new ByteArrayInputStream(data, ProtobufUtil.lengthOfPBMagic(), data.length);
                    RSGroupInfoList.add(RSGroupProtobufUtil.toGroupInfo(RSGroupProtos.RSGroupInfo.parseFrom(bis)));
                }
            }
            LOG.debug("String_Node_Str" + RSGroupInfoList.size());
        }
    } catch (KeeperException | DeserializationException | InterruptedException e) {
        throw new IOException("String_Node_Str", e);
    }
    return RSGroupInfoList;
}

Output:
 List<RSGroupInfo> retrieveGroupListFromZookeeper() throws IOException {
-    String groupBasePath = ZNodePaths.joinZNode(watcher.znodePaths.baseZNode, rsGroupZNode);
+    String groupBasePath = ZNodePaths.joinZNode(watcher.getZNodePaths().baseZNode, rsGroupZNode);
     List<RSGroupInfo> RSGroupInfoList = Lists.newArrayList();


Input:
public boolean execute(Plugin plugin, CommandSender sender, String[] args) {
    int amount = 1;
    if (args.length >= 3) {
        try {
            amount = Math.min(64, Math.max(1, Integer.parseInt(args[2])));
        } catch (NumberFormatException e) {
            throw new SMSException("String_Node_Str" + args[1] + "String_Node_Str");
        }
    }
    Player targetPlayer;
    if (args.length >= 4) {
        targetPlayer = Bukkit.getPlayer(args[3]);
        if (targetPlayer == null) {
            throw new SMSException("String_Node_Str" + args[3] + "String_Node_Str");
        }
    } else {
        notFromConsole(sender);
        targetPlayer = (Player) sender;
    }
    if (args[0].startsWith("String_Node_Str")) {
        short mapId;
        try {
            mapId = Short.parseShort(args[0]);
            giveMap(sender, targetPlayer, mapId, amount);
        } catch (NumberFormatException e) {
            throw new SMSException("String_Node_Str" + args[0] + "String_Node_Str");
        }
    } else if (args[0].startsWith("String_Node_Str")) {
        giveBook(sender, targetPlayer, args[1], amount);
    } else {
        showUsage(sender);
    }
    return true;
}

Output:
     if (args[0].startsWith("String_Node_Str")) {
-        short mapId;
-        try {
-            mapId = Short.parseShort(args[0]);
-            giveMap(sender, targetPlayer, mapId, amount);
-        } catch (NumberFormatException e) {
-            throw new SMSException("String_Node_Str" + args[0] + "String_Node_Str");
-        }
+        short mapId = getMapId(targetPlayer, args[1]);
+        giveMap(sender, targetPlayer, mapId, amount);
     } else if (args[0].startsWith("String_Node_Str")) {


Input:
public static String genColumnAlias() {
    String n = String.format("String_Node_Str", alias_no);
    alias_no++;
    return n;
}

Output:
 public static String genColumnAlias() {
-    String n = String.format("String_Node_Str", alias_no);
-    alias_no++;
+    String n = String.format("String_Node_Str", col_alias_no);
+    col_alias_no++;
     return n;


Input:
public ArrayList<ArrayList<String>> getCrossReferencingContent(String tableName) throws XtentisWebappException {
    try {
        String[] results = Util.getPort().getItems(new WSGetItems(new WSDataClusterPK(Configuration.datacluster), tableName, null, -1, 0, -1)).getStrings();
        DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
        XPath xpath = XPathFactory.newInstance().newXPath();
        ArrayList<ArrayList<String>> list = new ArrayList<ArrayList<String>>();
        for (int i = 0; i < results.length; i++) {
            Element lineElement = documentBuilder.parse(new InputSource(new StringReader(results[i]))).getDocumentElement();
            NodeList rowList = (NodeList) xpath.evaluate("String_Node_Str", lineElement, XPathConstants.NODESET);
            ArrayList<String> fields = new ArrayList<String>();
            for (int j = 0; j < rowList.getLength(); j++) {
                {
                    NodeList textNodes = rowList.item(j).getChildNodes();
                    String val = "String_Node_Str";
                    if (textNodes.getLength() > 0) {
                        String text = textNodes.item(0).getNodeValue();
                        if (text != null)
                            val = text;
                    }
                    fields.add(val);
                }
            }
            list.add(fields);
        }
        if (results.length > 0)
            return list;
        else
            return null;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}

Output:
         ArrayList<ArrayList<String>> list = new ArrayList<ArrayList<String>>();
-        for (int i = 0; i < results.length; i++) {
+        for (int i = 1; i < results.length; i++) {
             Element lineElement = documentBuilder.parse(new InputSource(new StringReader(results[i]))).getDocumentElement();


Input:
public void resourceChanged(final IResourceChangeEvent event) {
    if (event.getDelta() == null)
        return;
    final IResourceDelta delta = event.getDelta().findMember(name);
    if (delta == null)
        return;
    fileChanged(delta);
}

Output:
 public void resourceChanged(final IResourceChangeEvent event) {
-    if (event.getDelta() == null)
-        return;
-    final IResourceDelta delta = event.getDelta().findMember(name);
+    final IResourceDelta delta = event.getDelta() == null ? null : event.getDelta().findMember(name);
     if (delta == null)


Input:
protected void performOperation(boolean feedback) {
    SolutionBrowserClipboard clipBoard = SolutionBrowserClipboard.getInstance();
    clipBoard.setDataForCut(repositoryFiles);
    clipBoard.setMimeType("String_Node_Str");
    final SolutionFileActionEvent event = new SolutionFileActionEvent();
    event.setAction(this.getClass().getName());
    event.setMessage("String_Node_Str");
    EventBusUtil.EVENT_BUS.fireEvent(event);
}

Output:
     SolutionBrowserClipboard clipBoard = SolutionBrowserClipboard.getInstance();
-    clipBoard.setDataForCut(repositoryFiles);
+    clipBoard.setClipboardItemsForCut(filesToCut);
     clipBoard.setMimeType("String_Node_Str");


Input:
public void addOptionalAdditionalCosts(Ability ability, Game game) {
    if (ability instanceof SpellAbility) {
        Player player = game.getPlayer(controllerId);
        if (player != null) {
            this.resetKicker(game, ability);
            for (OptionalAdditionalCost kickerCost : kickerCosts) {
                boolean again = true;
                while (player.isInGame() && again) {
                    String times = "String_Node_Str";
                    if (kickerCost.isRepeatable()) {
                        int activatedCount = getKickedCounter(game, ability);
                        times = Integer.toString(activatedCount + 1) + (activatedCount == 0 ? "String_Node_Str" : "String_Node_Str");
                    }
                    if (kickerCost.canPay(ability, sourceId, controllerId, game) && player.chooseUse(Outcome.Benefit, "String_Node_Str" + times + kickerCost.getText(false) + "String_Node_Str", ability, game)) {
                        this.activateKicker(kickerCost, ability, game);
                        for (Iterator itKickerCost = kickerCost.iterator(); itKickerCost.hasNext(); ) {
                            Object kickerCostObject = itKickerCost.next();
                            if ((kickerCostObject instanceof Costs) || (kickerCostObject instanceof CostsImpl)) {
                                for (Iterator<Cost> itDetails = ((Costs) kickerCostObject).iterator(); itDetails.hasNext(); ) {
                                    addKickerCostsToAbility(itDetails.next(), ability, game);
                                }
                            } else {
                                addKickerCostsToAbility((Cost) kickerCostObject, ability, game);
                            }
                        }
                        again = kickerCost.isRepeatable();
                    } else {
                        again = false;
                    }
                }
            }
        }
    }
}

Output:
                         this.activateKicker(kickerCost, ability, game);
-                        for (Iterator itKickerCost = kickerCost.iterator(); itKickerCost.hasNext(); ) {
-                            Object kickerCostObject = itKickerCost.next();
-                            if ((kickerCostObject instanceof Costs) || (kickerCostObject instanceof CostsImpl)) {
-                                for (Iterator<Cost> itDetails = ((Costs) kickerCostObject).iterator(); itDetails.hasNext(); ) {
-                                    addKickerCostsToAbility(itDetails.next(), ability, game);
+                        if (kickerCost instanceof Costs) {
+                            for (Iterator itKickerCost = ((Costs) kickerCost).iterator(); itKickerCost.hasNext(); ) {
+                                Object kickerCostObject = itKickerCost.next();
+                                if ((kickerCostObject instanceof Costs) || (kickerCostObject instanceof CostsImpl)) {
+                                    for (Iterator<Cost> itDetails = ((Costs) kickerCostObject).iterator(); itDetails.hasNext(); ) {
+                                        addKickerCostsToAbility(itDetails.next(), ability, game);
+                                    }
+                                } else {
+                                    addKickerCostsToAbility((Cost) kickerCostObject, ability, game);
                                 }


Input:
private void createOrUpdate(final RpslObject importedObject) {
    final GrsObjectInfo grsObjectInfo = grsSource.getDao().find(importedObject.getKey().toString(), importedObject.getType());
    if (grsObjectInfo == null) {
        create(importedObject);
    } else {
        currentObjectIds.remove(grsObjectInfo.getObjectId());
        if (!grsObjectInfo.getRpslObject().equals(importedObject)) {
            update(importedObject, grsObjectInfo);
        }
    }
}

Output:
 private void createOrUpdate(final RpslObject importedObject) {
-    final GrsObjectInfo grsObjectInfo = grsSource.getDao().find(importedObject.getKey().toString(), importedObject.getType());
+    final String pkey = importedObject.getKey().toString();
+    final ObjectType type = importedObject.getType();
+    final GrsObjectInfo grsObjectInfo = grsSource.getDao().find(pkey, type);
     if (grsObjectInfo == null) {


Input:
public boolean addTask(GoogleApiClientTask task) {
    if (!isStarted()) {
        throw new IllegalStateException("String_Node_Str");
    }
    task.mRunOnBackgroundThread = false;
    return mTaskQueue.offer(task);
}

Output:
     if (!isStarted()) {
-        throw new IllegalStateException("String_Node_Str");
+        Log.e(TAG, "String_Node_Str");
+        return false;
     }


Input:
private boolean parameterIsUsedByNodesWithoutDifferences(VariableDeclaration variableDeclaration1, VariableDeclaration variableDeclaration2) {
    PlainVariable variable1 = new PlainVariable(variableDeclaration1);
    PlainVariable variable2 = new PlainVariable(variableDeclaration2);
    for (PDGNodeMapping pdgNodeMapping : sortedNodeMappings) {
        PDGNode node1 = pdgNodeMapping.getNodeG1();
        PDGNode node2 = pdgNodeMapping.getNodeG2();
        if (node1.usesLocalVariable(variable1) && node2.usesLocalVariable(variable2)) {
            List<ASTNodeDifference> differences = pdgNodeMapping.getNonOverlappingNodeDifferences();
            if (differences.isEmpty())
                return true;
            for (ASTNodeDifference difference : differences) {
                BindingSignaturePair signaturePair = difference.getBindingSignaturePair();
                if (!signaturePair.getSignature1().containsBinding(variableDeclaration1.resolveBinding().getKey()) && !signaturePair.getSignature2().containsBinding(variableDeclaration2.resolveBinding().getKey())) {
                    return true;
                }
            }
        }
    }
    return false;
}

Output:
                 BindingSignaturePair signaturePair = difference.getBindingSignaturePair();
-                if (!signaturePair.getSignature1().containsBinding(variableDeclaration1.resolveBinding().getKey()) && !signaturePair.getSignature2().containsBinding(variableDeclaration2.resolveBinding().getKey())) {
-                    return true;
+                if (signaturePair.getSignature1().containsBinding(variableDeclaration1.resolveBinding().getKey()) && signaturePair.getSignature2().containsBinding(variableDeclaration2.resolveBinding().getKey())) {
+                    foundInDifferences = true;
+                    break;
                 }


Input:
private void log(Level level, String message, Throwable exception, TaskListener listener) {
    listener.getLogger().println(message);
    Logger.getLogger(InstanceCreator.class.getName()).log(level, message, exception);
}

Output:
     listener.getLogger().println(message);
-    Logger.getLogger(InstanceCreator.class.getName()).log(level, message, exception);
+    LOGGER.log(level, message, exception);
 }


Input:
public void updatePage() {
    textMaximalLength.setText(model.getMaxValueLength() == null ? "String_Node_Str" : String.valueOf(model.getMaxValueLength()));
    textAlphabetSize.setText(model.getAlphabetSize() == null ? "String_Node_Str" : String.valueOf(model.getAlphabetSize()));
    textDomainSize.setText(model.getDomainSize() == null ? "String_Node_Str" : String.valueOf(model.getDomainSize()));
    buttonLeftAlign.setSelection(model.getAlignmentOrder() == Order.LEFT_TO_RIGHT);
    buttonRightAlign.setSelection(model.getAlignmentOrder() == Order.RIGHT_TO_LEFT);
    buttonLeftRedact.setSelection(model.getAlignmentOrder() == Order.LEFT_TO_RIGHT);
    buttonRightRedact.setSelection(model.getAlignmentOrder() == Order.RIGHT_TO_LEFT);
    comboPaddingChar.select(indexOf(comboPaddingChar, model.getPaddingCharacter()));
    comboRedactionChar.select(indexOf(comboRedactionChar, model.getRedactionCharacter()));
}

Output:
     buttonRightAlign.setSelection(model.getAlignmentOrder() == Order.RIGHT_TO_LEFT);
-    buttonLeftRedact.setSelection(model.getAlignmentOrder() == Order.LEFT_TO_RIGHT);
-    buttonRightRedact.setSelection(model.getAlignmentOrder() == Order.RIGHT_TO_LEFT);
+    buttonLeftRedact.setSelection(model.getRedactionOrder() == Order.LEFT_TO_RIGHT);
+    buttonRightRedact.setSelection(model.getRedactionOrder() == Order.RIGHT_TO_LEFT);
     comboPaddingChar.select(indexOf(comboPaddingChar, model.getPaddingCharacter()));


Input:
public Move createMoveUseInvoiceDue(Invoice invoice) throws AxelorException {
    Company company = invoice.getCompany();
    Account account = invoice.getPartnerAccount();
    Partner partner = invoice.getPartner();
    Move move = null;
    MoveLine invoiceCustomerMoveLine = this.getCustomerMoveLineByLoop(invoice);
    List<MoveLine> debitMoveLines = paymentService.getInvoiceDue(invoice, true);
    if (debitMoveLines != null && debitMoveLines.size() != 0) {
        if (this.isSameAccount(debitMoveLines, invoice.getPartnerAccount())) {
            List<MoveLine> creditMoveLineList = new ArrayList<MoveLine>();
            creditMoveLineList.add(invoiceCustomerMoveLine);
            paymentService.useExcessPaymentOnMoveLines(debitMoveLines, creditMoveLineList);
        } else {
            this.createMoveUseDebit(invoice, debitMoveLines, invoiceCustomerMoveLine);
        }
        reconcileService.balanceCredit(invoiceCustomerMoveLine, company, true);
        BigDecimal remainingPaidAmount = invoiceCustomerMoveLine.getAmountRemaining();
        if (remainingPaidAmount.compareTo(BigDecimal.ZERO) > 0) {
            this.createExcessMove(invoice, company, partner, account, remainingPaidAmount, invoiceCustomerMoveLine);
        }
        invoice.setInTaxTotalRemaining(this.getInTaxTotalRemaining(invoice));
    }
    return move;
}

Output:
     MoveLine invoiceCustomerMoveLine = this.getCustomerMoveLineByLoop(invoice);
-    List<MoveLine> debitMoveLines = paymentService.getInvoiceDue(invoice, true);
+    List<MoveLine> debitMoveLines = (List<MoveLine>) paymentService.getInvoiceDue(invoice, true);
     if (debitMoveLines != null && debitMoveLines.size() != 0) {


Input:
public double[][] learn(double[] x, double[] y) {
    try {
        gamma = Double.parseDouble(gammaField.getText().trim());
        if (gamma <= 0) {
            JOptionPane.showMessageDialog(this, "String_Node_Str" + gamma, "String_Node_Str", JOptionPane.ERROR_MESSAGE);
            return null;
        }
    } catch (Exception ex) {
        JOptionPane.showMessageDialog(this, "String_Node_Str" + gammaField.getText(), "String_Node_Str", JOptionPane.ERROR_MESSAGE);
        return null;
    }
    try {
        C = Double.parseDouble(cField.getText().trim());
        if (C < 0) {
            JOptionPane.showMessageDialog(this, "String_Node_Str" + C, "String_Node_Str", JOptionPane.ERROR_MESSAGE);
            return null;
        }
    } catch (Exception ex) {
        JOptionPane.showMessageDialog(this, "String_Node_Str" + cField.getText(), "String_Node_Str", JOptionPane.ERROR_MESSAGE);
        return null;
    }
    double[][] data = dataset[datasetIndex].toArray(new double[dataset[datasetIndex].size()][]);
    int[] label = dataset[datasetIndex].toArray(new int[dataset[datasetIndex].size()]);
    SVM<double[]> svm = new SVM<>(new GaussianKernel(gamma), C);
    svm.learn(data, label);
    svm.finish();
    for (int i = 0; i < label.length; i++) {
        label[i] = svm.predict(data[i]);
    }
    double trainError = error(label, label);
    System.out.format("String_Node_Str", 100 * trainError);
    double[][] z = new double[y.length][x.length];
    for (int i = 0; i < y.length; i++) {
        for (int j = 0; j < x.length; j++) {
            double[] p = { x[j], y[i] };
            z[i][j] = svm.predict(p);
        }
    }
    return z;
}

Output:
     for (int i = 0; i < label.length; i++) {
-        label[i] = svm.predict(data[i]);
+        pred[i] = svm.predict(data[i]);
     }


Input:
public void execute() throws ResourceAllocationException, ResourceUnavailableException {
    CallContext callerContext = CallContext.current();
    GlobalLoadBalancerRule rule = _entityMgr.findById(GlobalLoadBalancerRule.class, getEntityId());
    GlobalLoadBalancerResponse response = null;
    if (rule != null) {
        response = _responseGenerator.createGlobalLoadBalancerResponse(rule);
        setResponseObject(response);
    }
    response.setResponseName(getCommandName());
}

Output:
     if (rule != null) {
-        response = _responseGenerator.createGlobalLoadBalancerResponse(rule);
-        setResponseObject(response);
+        GlobalLoadBalancerResponse response = _responseGenerator.createGlobalLoadBalancerResponse(rule);
+        response.setResponseName(getCommandName());
+        this.setResponseObject(response);
     }


Input:
public static File[] getBaseDirFiles(File basedir, String[] paths, String[] suffixes) {
    LangUtil.throwIaxIfNull(basedir, "String_Node_Str");
    LangUtil.throwIaxIfNull(paths, "String_Node_Str");
    File[] result = null;
    if (!LangUtil.isEmpty(suffixes)) {
        ArrayList list = new ArrayList();
        for (int i = 0; i < paths.length; i++) {
            boolean listed = false;
            String path = paths[i];
            for (int j = 0; !listed && (j < suffixes.length); j++) {
                String suffix = suffixes[j];
                if (listed = path.endsWith(suffix)) {
                    list.add(new File(basedir, paths[i]));
                }
            }
        }
        result = (File[]) list.toArray(new File[0]);
    } else {
        result = new File[paths.length];
        for (int i = 0; i < result.length; i++) {
            result[i] = newFile(basedir, paths[i]);
        }
    }
    return result;
}

Output:
             String path = paths[i];
-            for (int j = 0; !listed && (j < suffixes.length); j++) {
-                String suffix = suffixes[j];
-                if (listed = path.endsWith(suffix)) {
+            for (int j = 0; j < suffixes.length; j++) {
+                if (path.endsWith(suffixes[j])) {
                     list.add(new File(basedir, paths[i]));


Input:
public void modifyText(ModifyEvent e) {
    String objecType = objectTypesCombo.getText();
    Role.Specification specification = role.getSpecifications().get(objecType);
    if (specification == null) {
        specification = role.new Specification();
        role.getSpecifications().put(objecType, specification);
    }
    instancesComposite.setVisible(!specification.isAdmin());
    isAdminButton.setSelection(specification.isAdmin());
    if (!specification.isAdmin()) {
        instanceNameCombo.removeAll();
        try {
            feedInstanceNameCombo();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        ;
        instanceAccessCombo.select(0);
        instancesViewer.setInput(specification.getInstances());
    }
    paramsContainerComposite.setVisible(false);
    if ("String_Node_Str".equals(objectTypesCombo.getText())) {
        isAdminButton.setEnabled(false);
        instanceAccessCombo.setEnabled(false);
    } else {
        isAdminButton.setEnabled(true);
        instanceAccessCombo.setEnabled(true);
    }
}

Output:
         instanceAccessCombo.select(0);
-        instancesViewer.setInput(specification.getInstances());
+        inputList = specification.getInstances();
+        instancesViewer.setInput(inputList);
     }


Input:
public ArrayList<DBTable> search(final String catalog, final String schema, final String table, final byte caseSensitivity) {
    ArrayList<DBTable> tmpResult = get(table, IdentifierField.TABLE.isCaseSensitive(caseSensitivity));
    if (schema != null) {
        ArrayList<DBTable> result = new ArrayList<DBTable>();
        for (DBTable match : tmpResult) {
            if (match.getADQLSchemaName() != null) {
                if (IdentifierField.SCHEMA.isCaseSensitive(caseSensitivity)) {
                    if (!match.getADQLSchemaName().equals(schema))
                        continue;
                } else {
                    if (!match.getADQLSchemaName().equalsIgnoreCase(schema))
                        continue;
                }
                if (catalog != null && match.getADQLCatalogName() != null) {
                    if (IdentifierField.CATALOG.isCaseSensitive(caseSensitivity)) {
                        if (!match.getADQLCatalogName().equals(catalog))
                            continue;
                    } else {
                        if (!match.getADQLCatalogName().equalsIgnoreCase(catalog))
                            continue;
                    }
                }
            }
            result.add(match);
        }
        return result;
    } else
        return tmpResult;
}

Output:
         for (DBTable match : tmpResult) {
-            if (match.getADQLSchemaName() != null) {
-                if (IdentifierField.SCHEMA.isCaseSensitive(caseSensitivity)) {
-                    if (!match.getADQLSchemaName().equals(schema))
+            if (match.getADQLSchemaName() == null)
+                continue;
+            if (IdentifierField.SCHEMA.isCaseSensitive(caseSensitivity)) {
+                if (!match.getADQLSchemaName().equals(schema))
+                    continue;
+            } else {
+                if (!match.getADQLSchemaName().equalsIgnoreCase(schema))
+                    continue;
+            }
+            if (catalog != null) {
+                if (match.getADQLCatalogName() == null)
+                    continue;
+                if (IdentifierField.CATALOG.isCaseSensitive(caseSensitivity)) {
+                    if (!match.getADQLCatalogName().equals(catalog))
                         continue;


Input:
public void confirmPaymentVoucher(PaymentVoucher paymentVoucher) throws AxelorException {
    log.debug("String_Node_Str");
    paymentVoucherSequenceService.setReference(paymentVoucher);
    Partner payerPartner = paymentVoucher.getPartner();
    PaymentMode paymentMode = paymentVoucher.getPaymentMode();
    Company company = paymentVoucher.getCompany();
    Journal journal = paymentModeService.getPaymentModeJournal(paymentMode, company);
    LocalDate paymentDate = paymentVoucher.getPaymentDate();
    boolean scheduleToBePaid = false;
    Account paymentModeAccount = paymentModeService.getPaymentModeAccount(paymentMode, company);
    paymentVoucherControlService.checkPaymentVoucherField(paymentVoucher, company, paymentModeAccount, journal);
    if (paymentVoucher.getRemainingAmount().compareTo(BigDecimal.ZERO) > 0 && !journal.getExcessPaymentOk()) {
        throw new AxelorException(String.format(I18n.get(IExceptionMessage.PAYBOX_3), GeneralServiceImpl.EXCEPTION), IException.INCONSISTENCY);
    }
    if (paymentVoucher.getPayboxPaidOk()) {
        paymentVoucherControlService.checkPayboxAmount(paymentVoucher);
    }
    boolean allRight = paymentVoucherControlService.checkIfSameAccount(paymentVoucher.getPaymentInvoiceToPayList(), paymentVoucher.getMoveLine());
    log.debug("String_Node_Str", allRight);
    if (allRight) {
        scheduleToBePaid = this.toPayWithExcessPayment(paymentVoucher.getPaymentInvoiceToPayList(), paymentVoucher.getMoveLine(), scheduleToBePaid, paymentDate);
    }
    if (paymentVoucher.getMoveLine() == null || (paymentVoucher.getMoveLine() != null && !allRight) || (scheduleToBePaid && !allRight && paymentVoucher.getMoveLine() != null)) {
        Move move = moveService.getMoveCreateService().createMove(journal, company, null, payerPartner, paymentDate, paymentMode, paymentVoucher.getCashRegister());
        move.setPaymentVoucher(paymentVoucher);
        paymentVoucher.setGeneratedMove(move);
        BigDecimal paidLineTotal = BigDecimal.ZERO;
        int moveLineNo = 1;
        boolean isDebitToPay = paymentVoucherToolService.isDebitToPay(paymentVoucher);
        for (PaymentInvoiceToPay paymentInvoiceToPay : this.getPaymentInvoiceToPayList(paymentVoucher)) {
            MoveLine moveLineToPay = paymentInvoiceToPay.getMoveLine();
            log.debug("String_Node_Str", moveLineToPay.getDebit());
            log.debug("String_Node_Str", moveLineToPay.getAmountPaid());
            BigDecimal amountToPay = this.getAmountCurrencyConverted(moveLineToPay, paymentVoucher, paymentInvoiceToPay.getAmountToPay());
            if (amountToPay.compareTo(BigDecimal.ZERO) > 0) {
                paidLineTotal = paidLineTotal.add(amountToPay);
                this.payMoveLine(move, moveLineNo, payerPartner, moveLineToPay, amountToPay, paymentInvoiceToPay, isDebitToPay, paymentDate);
                moveLineNo += 1;
            }
        }
        MoveLine moveLine = null;
        if (paymentVoucher.getMoveLine() != null) {
            moveLine = moveLineService.createMoveLine(move, paymentVoucher.getPartner(), paymentVoucher.getMoveLine().getAccount(), paymentVoucher.getPaidAmount(), isDebitToPay, paymentDate, moveLineNo, null);
            Reconcile reconcile = reconcileService.createReconcile(moveLine, paymentVoucher.getMoveLine(), moveLine.getDebit(), !isDebitToPay);
            reconcileService.confirmReconcile(reconcile);
        } else {
            moveLine = moveLineService.createMoveLine(move, payerPartner, paymentModeAccount, paymentVoucher.getPaidAmount(), isDebitToPay, paymentDate, moveLineNo, null);
        }
        move.getMoveLineList().add(moveLine);
        if (paymentVoucher.getPaidAmount().compareTo(paidLineTotal) > 0) {
            BigDecimal remainingPaidAmount = paymentVoucher.getRemainingAmount();
            Account partnerAccount = Beans.get(AccountCustomerService.class).getPartnerAccount(payerPartner, company, paymentVoucherToolService.isPurchase(paymentVoucher));
            moveLine = moveLineService.createMoveLine(move, paymentVoucher.getPartner(), partnerAccount, remainingPaidAmount, !isDebitToPay, paymentDate, moveLineNo++, null);
            move.getMoveLineList().add(moveLine);
            if (isDebitToPay) {
                reconcileService.balanceCredit(moveLine);
            }
        }
        moveService.getMoveValidateService().validateMove(move);
        paymentVoucher.setGeneratedMove(move);
    }
    paymentVoucher.setStatusSelect(PaymentVoucherRepository.STATUS_CONFIRMED);
    paymentVoucherSequenceService.setReceiptNo(paymentVoucher, company, journal);
    this.deleteUnPaidLines(paymentVoucher);
    paymentVoucherRepository.save(paymentVoucher);
}

Output:
                 paidLineTotal = paidLineTotal.add(amountToPay);
-                this.payMoveLine(move, moveLineNo, payerPartner, moveLineToPay, amountToPay, paymentInvoiceToPay, isDebitToPay, paymentDate);
-                moveLineNo += 1;
+                this.payMoveLine(move, moveLineNo++, payerPartner, moveLineToPay, amountToPay, paymentInvoiceToPay, isDebitToPay, paymentDate);
             }


Input:
public void overrideKylinJobJarPath(String path) {
    kylinConfig.setProperty(KYLIN_JOB_JAR, path);
}

Output:
 public void overrideKylinJobJarPath(String path) {
-    kylinConfig.setProperty(KYLIN_JOB_JAR, path);
+    System.setProperty(KYLIN_JOB_JAR, path);
 }


Input:
final boolean doPoll(Cursor c) {
    final String tripId = mTripId;
    final String stopId = mStopId;
    final long reminderMS = (1 + c.getInt(TripsDbAdapter.TRIP_COL_REMINDER)) * ONE_MINUTE;
    final long departMS = c.getInt(TripsDbAdapter.TRIP_COL_DEPARTURE) * ONE_MINUTE;
    mState = NOT_FOUND;
    while (mState != CLEARED) {
        Log.d(TAG, "String_Node_Str" + getTaskId());
        ObaResponse response = ObaApi.getArrivalsDeparturesForStop(stopId);
        final long now = System.currentTimeMillis();
        if (response.getCode() == ObaApi.OBA_OK) {
            final ObaArray arrivals = response.getData().getArrivalsAndDepartures();
            final int length = arrivals.length();
            for (int i = 0; i < length; ++i) {
                ObaArrivalInfo info = arrivals.getArrivalInfo(i);
                if (tripId.equals(info.getTripId())) {
                    synchronized (this) {
                        if (mState == NOT_FOUND) {
                            Log.d(TAG, "String_Node_Str" + getTaskId());
                            mState = FOUND;
                        }
                        long time = info.getPredictedArrivalTime();
                        if (time == 0) {
                            time = info.getScheduledArrivalTime();
                        }
                        if (mState == FOUND) {
                            if ((time - reminderMS) < now) {
                                doNotification(time - now, c);
                                mState = NOTIFIED;
                            } else if (time < now) {
                                mState = CLEARED;
                                break;
                            }
                        } else if (mState == NOTIFIED) {
                            final long timeDiff = time - now;
                            if (timeDiff <= 0) {
                                cancelNotification();
                                mState = CLEARED;
                                break;
                            } else {
                                doNotification(timeDiff, c);
                            }
                        }
                    }
                }
            }
        }
        if (mState == NOT_FOUND && ((departMS + LOOKAHEAD_DURATION_MS) > now)) {
            Log.d(TAG, "String_Node_Str" + getTaskId());
            break;
        }
        try {
            Thread.sleep(30 * 1000);
        } catch (InterruptedException e) {
        }
    }
    return mState == CLEARED;
}

Output:
     mState = NOT_FOUND;
-    while (mState != CLEARED) {
+    while (mState != DONE) {
         Log.d(TAG, "String_Node_Str" + getTaskId());


Input:
protected void drawItem(Graphics2D g2, int section, Rectangle2D dataArea, PiePlotState state, int currentPass) {
    Number n = this.dataset.getValue(section);
    if (n == null) {
        return;
    }
    double value = n.doubleValue();
    double angle1 = 0.0;
    double angle2 = 0.0;
    if (this.direction == Rotation.CLOCKWISE) {
        angle1 = state.getLatestAngle();
        angle2 = angle1 - value / state.getTotal() * 360.0;
    } else if (this.direction == Rotation.ANTICLOCKWISE) {
        angle1 = state.getLatestAngle();
        angle2 = angle1 + value / state.getTotal() * 360.0;
    } else {
        throw new IllegalStateException("String_Node_Str");
    }
    double angle = (angle2 - angle1);
    if (Math.abs(angle) > getMinimumArcAngleToDraw()) {
        double ep = 0.0;
        double mep = getMaximumExplodePercent();
        if (mep > 0.0) {
            ep = getExplodePercent(section) / mep;
        }
        Rectangle2D arcBounds = getArcBounds(state.getPieArea(), state.getExplodedPieArea(), angle1, angle, ep);
        Arc2D.Double arc = new Arc2D.Double(arcBounds, angle1, angle, Arc2D.PIE);
        if (currentPass == 0) {
            if (this.shadowPaint != null && this.shadowGenerator == null) {
                Shape shadowArc = ShapeUtilities.createTranslatedShape(arc, (float) this.shadowXOffset, (float) this.shadowYOffset);
                g2.setPaint(this.shadowPaint);
                g2.fill(shadowArc);
            }
        } else if (currentPass == 1) {
            Comparable key = getSectionKey(section);
            Paint paint = lookupSectionPaint(key, state);
            g2.setPaint(paint);
            g2.fill(arc);
            Paint outlinePaint = lookupSectionOutlinePaint(key);
            Stroke outlineStroke = lookupSectionOutlineStroke(key);
            if (this.sectionOutlinesVisible) {
                g2.setPaint(outlinePaint);
                g2.setStroke(outlineStroke);
                g2.draw(arc);
            }
            if (state.getInfo() != null) {
                EntityCollection entities = state.getEntityCollection();
                if (entities != null) {
                    String tip = null;
                    if (this.toolTipGenerator != null) {
                        tip = this.toolTipGenerator.generateToolTip(this.dataset, key);
                    }
                    String url = null;
                    if (this.urlGenerator != null) {
                        url = this.urlGenerator.generateURL(this.dataset, key, this.pieIndex);
                    }
                    PieSectionEntity entity = new PieSectionEntity(arc, this.dataset, this.pieIndex, section, key, tip, url);
                    entities.add(entity);
                }
            }
        }
    }
    state.setLatestAngle(angle2);
}

Output:
         if (mep > 0.0) {
-            ep = getExplodePercent(section) / mep;
+            ep = getExplodePercent(this.getSectionKey(section)) / mep;
         }


Input:
public Report execute(IndexService index, ModelService model, StorageService storage, List<AIP> aips) throws PluginException {
    FileOutputStream fos = null;
    try {
        SimpleJobPluginInfo jobPluginInfo = PluginHelper.getInitialJobInformation(this, aips.size());
        PluginHelper.updateJobInformation(this, jobPluginInfo);
        if (exportType == ExportType.MULTI_ZIP) {
            for (AIP aip : aips) {
                LOGGER.debug("String_Node_Str", aip.getId());
                try {
                    List<ZipEntryInfo> zipEntries = ModelUtils.aipToZipEntry(aip);
                    java.io.File outputFolderFile = new java.io.File(outputFolder);
                    java.io.File zip = new java.io.File(outputFolderFile, aip.getId() + "String_Node_Str");
                    if (zip.exists() && removeIfAlreadyExists) {
                        zip.delete();
                    }
                    fos = new FileOutputStream(zip);
                    ZipTools.zip(zipEntries, fos);
                    jobPluginInfo.incrementObjectsProcessedWithSuccess();
                } catch (Exception e) {
                    LOGGER.error("String_Node_Str" + aip.getId() + "String_Node_Str" + e.getMessage());
                    jobPluginInfo.incrementObjectsProcessedWithFailure();
                }
            }
            jobPluginInfo.finalizeInfo();
            PluginHelper.updateJobInformation(this, jobPluginInfo);
        } else if (exportType == ExportType.FOLDER) {
            FileStorageService localStorage = new FileStorageService(Paths.get(outputFolder));
            for (AIP aip : aips) {
                LOGGER.debug("String_Node_Str", aip.getId());
                StoragePath aipPath = ModelUtils.getAIPStoragePath(aip.getId());
                try {
                    localStorage.copy(storage, aipPath, DefaultStoragePath.parse(aip.getId()));
                    jobPluginInfo.incrementObjectsProcessedWithSuccess();
                } catch (AlreadyExistsException e) {
                    if (removeIfAlreadyExists) {
                        try {
                            localStorage.deleteResource(DefaultStoragePath.parse(aip.getId()));
                            localStorage.copy(storage, aipPath, DefaultStoragePath.parse(aip.getId()));
                            jobPluginInfo.incrementObjectsProcessedWithSuccess();
                        } catch (AlreadyExistsException e2) {
                            jobPluginInfo.incrementObjectsProcessedWithFailure();
                        }
                    } else {
                        LOGGER.error("String_Node_Str", aip.getId());
                        jobPluginInfo.incrementObjectsProcessedWithFailure();
                    }
                }
            }
            jobPluginInfo.finalizeInfo();
            PluginHelper.updateJobInformation(this, jobPluginInfo);
        }
    } catch (AuthorizationDeniedException | RequestNotValidException | GenericException | NotFoundException e) {
        throw new PluginException(e.getMessage(), e);
    } catch (JobException e) {
        LOGGER.error("String_Node_Str");
    } finally {
        IOUtils.closeQuietly(fos);
    }
    return PluginHelper.initPluginReport(this);
}

Output:
 public Report execute(IndexService index, ModelService model, StorageService storage, List<AIP> aips) throws PluginException {
-    FileOutputStream fos = null;
+    OutputStream os = null;
     try {


Input:
public boolean performFinish() {
    String targetFile = page.getTargetFile();
    Object[] elements = page.getSelectedPatternsTree().getCheckedElements();
    List<Pattern> seletedPatterns = new ArrayList<Pattern>();
    for (Object element : elements) {
        if (element instanceof IFile) {
            IFile file = (IFile) element;
            if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
                seletedPatterns.add(PatternResourceFileHelper.getInstance().findPattern(file));
            }
        }
    }
    if ("String_Node_Str".equals(targetFile)) {
        MessageDialog.openError(getShell(), "String_Node_Str", "String_Node_Str");
        return false;
    } else {
        File resource = new File(targetFile);
        if (isForExchange) {
            ExportFactory.export(resource, folder, seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
            for (Iterator iterator = seletedPatterns.iterator(); iterator.hasNext(); ) {
                Pattern pattern = (Pattern) iterator.next();
                File patternFile = new File(resource, pattern.getName() + "String_Node_Str");
                if (patternFile.isFile() && patternFile.exists()) {
                    try {
                        FilesUtils.zip(patternFile, patternFile.getPath() + "String_Node_Str");
                        patternFile.delete();
                    } catch (Exception e) {
                        log.error(e.getMessage(), e);
                    }
                }
            }
            return true;
        } else {
            boolean isContinue = true;
            if (resource.exists()) {
                isContinue = MessageDialogWithToggle.openConfirm(null, DefaultMessagesImpl.getString("String_Node_Str"), DefaultMessagesImpl.getString("String_Node_Str"));
            }
            if (isContinue) {
                ExportFactory.export(resource, folder, seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
                return true;
            }
            return false;
        }
    }
}

Output:
                 Pattern pattern = (Pattern) iterator.next();
-                File patternFile = new File(resource, pattern.getName() + "String_Node_Str");
+                File patternFile = new File(resource, ExportFactory.toLocalFileName(pattern.getName() + "String_Node_Str"));
                 if (patternFile.isFile() && patternFile.exists()) {


Input:
private static void executeIdentity(DataSiftClient dataSift, String endpoint, HashMap<String, String> params) throws IOException {
    switch(endpoint) {
        case "String_Node_Str":
            String label = getOrDefault(params, "String_Node_Str", null);
            int page = Integer.parseInt(getOrDefault(params, "String_Node_Str", "String_Node_Str"));
            int perpage = Integer.parseInt(getOrDefault(params, "String_Node_Str", "String_Node_Str"));
            printResponse(dataSift.account().list(label, page, perpage).sync());
            break;
        case "String_Node_Str":
            printResponse(dataSift.account().get(params.get("String_Node_Str")).sync());
            break;
        case "String_Node_Str":
            String createlabel = params.get("String_Node_Str");
            Boolean active = getOrDefault(params, "String_Node_Str", "String_Node_Str").equals("String_Node_Str");
            Boolean master = getOrDefault(params, "String_Node_Str", "String_Node_Str").equals("String_Node_Str");
            printResponse(dataSift.account().create(createlabel, active, master).sync());
            break;
        case "String_Node_Str":
            String targetid = params.get("String_Node_Str");
            String updatelabel = getOrDefault(params, "String_Node_Str", null);
            String updateactivitystring = getOrDefault(params, "String_Node_Str", null);
            Boolean updateactivity = null;
            if (updateactivitystring.equals("String_Node_Str")) {
                updateactivity = true;
            } else if (updateactivitystring.equals("String_Node_Str")) {
                updateactivity = false;
            }
            String updatemasterstring = getOrDefault(params, "String_Node_Str", null);
            Boolean updatemaster = null;
            if (updatemasterstring.equals("String_Node_Str")) {
                updatemaster = true;
            } else if (updatemasterstring.equals("String_Node_Str")) {
                updatemaster = false;
            }
            printResponse(dataSift.account().update(targetid, updatelabel, updateactivity, updatemaster).sync());
            break;
        case "String_Node_Str":
            printResponse(dataSift.account().delete(params.get("String_Node_Str")).sync());
            break;
    }
}

Output:
             Boolean updateactivity = null;
-            if (updateactivitystring.equals("String_Node_Str")) {
-                updateactivity = true;
-            } else if (updateactivitystring.equals("String_Node_Str")) {
-                updateactivity = false;
+            if (updateactivitystring != null) {
+                if (updateactivitystring.equals("String_Node_Str")) {
+                    updateactivity = true;
+                } else if (updateactivitystring.equals("String_Node_Str")) {
+                    updateactivity = false;
+                }
             }


Input:
public static boolean createItem(Item item, String propLabel, String version) {
    String name = propLabel;
    propLabel = escapeSpecialCharacters(propLabel);
    IProxyRepositoryFactory factory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    RepositoryContext context = factory.getRepositoryContext();
    Property prop = PropertiesFactory.eINSTANCE.createProperty();
    item.setProperty(prop);
    try {
        String nextId = factory.getNextId();
        Property property = item.getProperty();
        property.setId(nextId);
        property.setVersion(version);
        property.setAuthor(context.getUser());
        property.setLabel(propLabel);
        factory.create(item, new Path(item.getState().getPath()));
        IRepositoryNodeConfiguration configuration = RepositoryNodeConfigurationManager.getConfiguration(item);
        if (configuration != null) {
            IRepositoryNodeResourceProvider resourceProvider = configuration.getResourceProvider();
            if (resourceProvider.needSaveReferenceFile()) {
                resourceProvider.handleReferenceFile(item);
            }
        }
        CommandManager.getInstance().pushCommand(ICommand.CMD_ADD, nextId, name);
        return true;
    } catch (PersistenceException e) {
        log.error(e.getMessage(), e);
    }
    return false;
}

Output:
         }
-        CommandManager.getInstance().pushCommand(ICommand.CMD_ADD, nextId, name);
+        if (pushCommandStack) {
+            CommandManager.getInstance().pushCommand(ICommand.CMD_ADD, nextId, name);
+        }
         return true;


Input:
void writeData(Consumer<WireOut> c) {
    outWire.writeDocument(false, out -> {
        final long position = outWire.bytes().writePosition();
        try {
            c.accept(outWire);
        } catch (Exception exception) {
            LOG.error("String_Node_Str", exception);
            outWire.bytes().writePosition(position);
            outWire.writeEventName(() -> "String_Node_Str").throwable(exception);
        }
        if (position == outWire.bytes().writePosition()) {
            outWire.writeEventName(reply).marshallable(EMPTY);
        }
    });
    if (YamlLogging.showServerWrites)
        try {
            System.out.println("String_Node_Str" + Wires.fromSizePrefixedBlobs(outWire.bytes(), 0, outWire.bytes().writePosition()));
        } catch (Exception e) {
            System.out.println("String_Node_Str" + outWire.bytes().toDebugString());
        }
}

Output:
             c.accept(outWire);
-        } catch (Exception exception) {
-            LOG.error("String_Node_Str", exception);
+        } catch (Throwable t) {
+            inBytes.readPosition(readPosition);
+            LOG.info("String_Node_Str" + inBytes.toDebugString(), "String_Node_Str" + c, t);
             outWire.bytes().writePosition(position);


Input:
protected BloomFilterUtils buildBloomFilter(InputStream is) throws IOException {
    final BloomFilterUtils filter = initBloomFilter(getExpectedNumberOfElements());
    final BufferedReader reader = new BufferedReader(new InputStreamReader(is));
    String line = null;
    while ((line = reader.readLine()) != null) {
        filter.put(line);
    }
    reader.close();
    return filter;
}

Output:
     final BloomFilterUtils filter = initBloomFilter(getExpectedNumberOfElements());
-    final BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+    final BufferedReader reader = new BufferedReader(new InputStreamReader(is, Globals.DEFAULT_CHARSET));
     String line = null;


Input:
private void addEmptyDataToContainer(StyleEntry style, XlsContainer parent, int startCoordinate, int width) {
    Data data = createEmptyData(parent, style);
    data.setSizeInfo(new ContainerSizeInfo(startCoordinate, width));
    addData(data);
}

Output:
 private void addEmptyDataToContainer(StyleEntry style, XlsContainer parent, int startCoordinate, int width) {
-    Data data = createEmptyData(parent, style);
+    Data data = createEmptyData(style);
     data.setSizeInfo(new ContainerSizeInfo(startCoordinate, width));


Input:
public List<ProgramSpecification> getDeletedProgramSpecifications(final Id.Application id, ApplicationSpecification appSpec) {
    ApplicationMeta existing = txnl.executeUnchecked(new TransactionExecutor.Function<AppMds, ApplicationMeta>() {
        public ApplicationMeta apply(AppMds mds) throws Exception {
            return mds.apps.getApplication(id.getAccountId(), id.getId());
        }
    });
    List<ProgramSpecification> deletedProgramSpecs = Lists.newArrayList();
    if (existing != null) {
        ApplicationSpecification existingAppSpec = existing.getSpec();
        ImmutableMap<String, ProgramSpecification> existingSpec = new ImmutableMap.Builder<String, ProgramSpecification>().putAll(existingAppSpec.getMapReduce()).putAll(existingAppSpec.getWorkflows()).putAll(existingAppSpec.getFlows()).putAll(existingAppSpec.getProcedures()).putAll(existingAppSpec.getServices()).build();
        ImmutableMap<String, ProgramSpecification> newSpec = new ImmutableMap.Builder<String, ProgramSpecification>().putAll(appSpec.getMapReduce()).putAll(appSpec.getWorkflows()).putAll(appSpec.getFlows()).putAll(appSpec.getProcedures()).putAll(appSpec.getServices()).build();
        MapDifference<String, ProgramSpecification> mapDiff = Maps.difference(existingSpec, newSpec);
        deletedProgramSpecs.addAll(mapDiff.entriesOnlyOnLeft().values());
    }
    return deletedProgramSpecs;
}

Output:
         ApplicationSpecification existingAppSpec = existing.getSpec();
-        ImmutableMap<String, ProgramSpecification> existingSpec = new ImmutableMap.Builder<String, ProgramSpecification>().putAll(existingAppSpec.getMapReduce()).putAll(existingAppSpec.getWorkflows()).putAll(existingAppSpec.getFlows()).putAll(existingAppSpec.getProcedures()).putAll(existingAppSpec.getServices()).build();
-        ImmutableMap<String, ProgramSpecification> newSpec = new ImmutableMap.Builder<String, ProgramSpecification>().putAll(appSpec.getMapReduce()).putAll(appSpec.getWorkflows()).putAll(appSpec.getFlows()).putAll(appSpec.getProcedures()).putAll(appSpec.getServices()).build();
+        ImmutableMap<String, ProgramSpecification> existingSpec = new ImmutableMap.Builder<String, ProgramSpecification>().putAll(existingAppSpec.getMapReduce()).putAll(existingAppSpec.getSpark()).putAll(existingAppSpec.getWorkflows()).putAll(existingAppSpec.getFlows()).putAll(existingAppSpec.getProcedures()).putAll(existingAppSpec.getServices()).build();
+        ImmutableMap<String, ProgramSpecification> newSpec = new ImmutableMap.Builder<String, ProgramSpecification>().putAll(appSpec.getMapReduce()).putAll(existingAppSpec.getSpark()).putAll(appSpec.getWorkflows()).putAll(appSpec.getFlows()).putAll(appSpec.getProcedures()).putAll(appSpec.getServices()).build();
         MapDifference<String, ProgramSpecification> mapDiff = Maps.difference(existingSpec, newSpec);


Input:
public void writeStatement(MethodWriter writer) {
    IType type = this.value.getType();
    int var = writer.registerLocal(type);
    this.value.writeExpression(writer);
    writer.writeVarInsn(type.getStoreOpcode(), var);
    Label elseLabel = new Label();
    Label endLabel = new Label();
    for (int i = 0; i < this.caseCount; ) {
        this.cases[i].writeStatement(writer, var, elseLabel);
        writer.writeJumpInsn(Opcodes.GOTO, endLabel);
        writer.writeFrameLabel(elseLabel);
        if (++i < this.caseCount) {
            elseLabel = new Label();
        }
    }
    writer.writeFrameLabel(elseLabel);
    this.writeError(writer, type, type.getLoadOpcode(), var);
    writer.removeLocals(1);
    writer.writeFrameLabel(endLabel);
}

Output:
     this.writeError(writer, type, type.getLoadOpcode(), var);
-    writer.removeLocals(1);
+    writer.resetLocals(locals);
     writer.writeFrameLabel(endLabel);


Input:
public final static double[] limit(double[] array, double bottom, double top) {
    double[] result = new double[array.length];
    for (int i = 0; i < array.length; i++) {
        if (array[i] > top || array[i] == Double.NaN || array[i] == Double.POSITIVE_INFINITY) {
            result[i] = top;
        } else if (array[i] < bottom || array[i] == -Double.NaN || array[i] == Double.NEGATIVE_INFINITY) {
            result[i] = bottom;
        } else {
            result[i] = array[i];
        }
    }
    return result;
}

Output:
     for (int i = 0; i < array.length; i++) {
-        if (array[i] > top || array[i] == Double.NaN || array[i] == Double.POSITIVE_INFINITY) {
+        if ((array[i] > top) || (array[i] == Double.NaN) || (array[i] == Double.POSITIVE_INFINITY)) {
             result[i] = top;


Input:
private void handleWarning(String line) throws IOException {
    final StreamWarningEvent warningEvent = objectMapper.readValue(line, StreamWarningEvent.class);
    for (final StreamListener listener : listeners) {
        Future<?> result = pool.submit((new Runnable() {

            public void run() {
                listener.onWarning(warningEvent);
            }
        }));
    }
}

Output:
     for (final StreamListener listener : listeners) {
-        Future<?> result = pool.submit((new Runnable() {
+        pool.submit((new Runnable() {