Input:
private void fireAfterDoServiceEvent(RequestContext requestContext) {
    this.ropEventMulticaster.multicastEvent(new PreDoServiceEvent(this, requestContext));
}

Output:
 private void fireAfterDoServiceEvent(RequestContext requestContext) {
-    this.ropEventMulticaster.multicastEvent(new PreDoServiceEvent(this, requestContext));
+    this.ropEventMulticaster.multicastEvent(new AfterDoServiceEvent(this, requestContext));
 }


Input:
public void drawBackgroundImage(String imageURI, double x, double y, double width, double height, double positionX, double positionY, String repeat) {
    if (imageURI == null || imageURI.length() == 0) {
        return;
    }
    byte[] imageData = null;
    try {
        InputStream imageStream = new URL(imageURI).openStream();
        imageData = new byte[imageStream.available()];
        imageStream.read(imageData);
    } catch (IOException ioe) {
        logger.log(Level.WARNING, ioe.getMessage(), ioe);
    }
    String imageTitle = "String_Node_Str" + currentPageNum + "String_Node_Str" + (++shapeCount);
    imageTitles.add(imageTitle);
    String imageName;
    if (imageNames.containsKey(imageURI)) {
        imageName = (String) imageNames.get(imageURI);
    } else {
        String extension = getImageExtension(imageURI);
        imageName = imageTitle + "String_Node_Str" + extension;
        imageNames.put(imageTitle, imageName);
        imageExtensions.put(imageTitle, extension);
        recordFileLists(imageName);
        currentImageData.put(imageTitle, imageData);
    }
    exportImageDefn(imageName, imageTitle, width, height, x, y);
}

Output:
     try {
-        InputStream imageStream = new URL(imageURI).openStream();
+        URL url = new URL(imageURI);
+        imageStream = url.openStream();
         imageData = new byte[imageStream.available()];


Input:
private static void prepareMeasure(TabularCubeHandle cubeHandle, QueryDefinition query, List metaList) throws AdapterException {
    try {
        List measureGroups = cubeHandle.getContents(CubeHandle.MEASURE_GROUPS_PROP);
        for (int i = 0; i < measureGroups.size(); i++) {
            MeasureGroupHandle mgh = (MeasureGroupHandle) measureGroups.get(i);
            List measures = mgh.getContents(MeasureGroupHandle.MEASURES_PROP);
            for (int j = 0; j < measures.size(); j++) {
                MeasureHandle measure = (MeasureHandle) measures.get(j);
                String function = measure.getFunction();
                String exprText = measure.getMeasureExpression();
                IScriptExpression expr = exprText != null ? new ScriptExpression(exprText) : null;
                if (query.getGroups().size() > 0) {
                    Binding binding = new Binding(measure.getName(), expr);
                    binding.setAggrFunction(DataAdapterUtil.adaptModelAggregationType(function));
                    IGroupDefinition group = (IGroupDefinition) query.getGroups().get(query.getGroups().size() - 1);
                    binding.addAggregateOn(group.getName());
                    query.addBinding(binding);
                } else {
                    query.addBinding(new Binding(measure.getName(), expr));
                }
                DataSetIterator.ColumnMeta meta = new DataSetIterator.ColumnMeta(measure.getName(), null, DataSetIterator.ColumnMeta.MEASURE_TYPE);
                meta.setDataType(DataAdapterUtil.adaptModelDataType(measure.getDataType()));
                metaList.add(meta);
            }
        }
    } catch (DataException e) {
        throw new AdapterException(e.getLocalizedMessage(), e);
    }
}

Output:
                 String exprText = measure.getMeasureExpression();
-                IScriptExpression expr = exprText != null ? new ScriptExpression(exprText) : null;
+                ExpressionHandle measureExprHandle = measure.getExpressionProperty(IMeasureModel.MEASURE_EXPRESSION_PROP);
+                IScriptExpression expr = null;
+                if (exprText != null && measureExprHandle != null) {
+                    expr = modelAdaptor.adaptJSExpression(measureExprHandle.getStringExpression(), measureExprHandle.getType());
+                }
                 if (query.getGroups().size() > 0) {


Input:
public Check saveCheck(Check check) {
    DBObject findObject = forId(check.getId());
    DBObject updateObject = object("String_Node_Str", check.getName()).with("String_Node_Str", check.getDescription()).with("String_Node_Str", check.getTarget()).with("String_Node_Str", check.getWarn().toPlainString()).with("String_Node_Str", check.getError().toPlainString()).with("String_Node_Str", check.isEnabled()).with("String_Node_Str", new Date(check.getLastCheck().getMillis())).with("String_Node_Str", check.getState().toString());
    DBObject setObject = object("String_Node_Str", updateObject);
    getChecksCollection().update(findObject, setObject);
    return check;
}

Output:
     DBObject findObject = forId(check.getId());
-    DBObject updateObject = object("String_Node_Str", check.getName()).with("String_Node_Str", check.getDescription()).with("String_Node_Str", check.getTarget()).with("String_Node_Str", check.getWarn().toPlainString()).with("String_Node_Str", check.getError().toPlainString()).with("String_Node_Str", check.isEnabled()).with("String_Node_Str", new Date(check.getLastCheck().getMillis())).with("String_Node_Str", check.getState().toString());
+    DateTime lastCheck = check.getLastCheck();
+    DBObject updateObject = object("String_Node_Str", check.getName()).with("String_Node_Str", check.getDescription()).with("String_Node_Str", check.getTarget()).with("String_Node_Str", check.getWarn().toPlainString()).with("String_Node_Str", check.getError().toPlainString()).with("String_Node_Str", check.isEnabled()).with("String_Node_Str", lastCheck == null ? null : new Date(lastCheck.getMillis())).with("String_Node_Str", check.getState().toString());
     DBObject setObject = object("String_Node_Str", updateObject);


Input:
private Uri addOrUpdateCalendarEvent(Id calEventId, String title, String description, Id projectId, Id contextId, String timezone, long start, long end, boolean allDay) {
    if (projectId.isInitialised()) {
        String projectName = getProjectName(projectId);
        title = projectName + "String_Node_Str" + title;
    }
    if (description == null) {
        description = "String_Node_Str";
    }
    ContentValues values = new ContentValues();
    if (!TextUtils.isEmpty(timezone)) {
        values.put("String_Node_Str", timezone);
    }
    values.put("String_Node_Str", Preferences.getCalendarId(this));
    values.put("String_Node_Str", title);
    values.put("String_Node_Str", allDay ? 1 : 0);
    if (start > 0L) {
        values.put("String_Node_Str", start);
    }
    if (end > 0L) {
        values.put("String_Node_Str", end);
    }
    values.put("String_Node_Str", description);
    values.put("String_Node_Str", 0);
    values.put("String_Node_Str", 0);
    values.put("String_Node_Str", 0);
    if (contextId.isInitialised()) {
        String contextName = getContextName(contextId);
        values.put("String_Node_Str", contextName);
    }
    Uri baseUri = Uri.parse("String_Node_Str");
    ContentResolver cr = getContentResolver();
    int updateCount = 0;
    Uri eventUri = null;
    try {
        if (calEventId.isInitialised()) {
            eventUri = ContentUris.appendId(baseUri.buildUpon(), calEventId.getId()).build();
            updateCount = cr.update(eventUri, values, null, null);
        }
        if (updateCount == 0) {
            eventUri = cr.insert(baseUri, values);
        }
    } catch (Exception e) {
        Log.e(cTag, "String_Node_Str", e);
        mAnalytics.onError(Constants.cFlurryCalendarUpdateError, e.getMessage(), getClass().getName());
    }
    return eventUri;
}

Output:
     try {
-        if (calEventId.isInitialised()) {
-            eventUri = ContentUris.appendId(baseUri.buildUpon(), calEventId.getId()).build();
-            updateCount = cr.update(eventUri, values, null, null);
-        }
-        if (updateCount == 0) {
-            eventUri = cr.insert(baseUri, values);
-        }
+        eventUri = addCalendarEntry(values, calEventId, Uri.parse("String_Node_Str"));
     } catch (Exception e) {


Input:
public void testAspectFailingReturnsUnsafeObject() throws Exception {
    scratch.file("String_Node_Str", "String_Node_Str", "String_Node_Str", "String_Node_Str", "String_Node_Str", "String_Node_Str", "String_Node_Str");
    scratch.file("String_Node_Str", "String_Node_Str");
    reporter.removeHandler(failFastHandler);
    try {
        update(ImmutableList.of("String_Node_Str"), "String_Node_Str");
        fail();
    } catch (ViewCreationFailedException e) {
    }
    assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str");
}

Output:
     try {
-        update(ImmutableList.of("String_Node_Str"), "String_Node_Str");
-        fail();
+        AnalysisResult result = update(ImmutableList.of("String_Node_Str"), "String_Node_Str");
+        assertThat(keepGoing()).isTrue();
+        assertThat(result.hasError()).isTrue();
     } catch (ViewCreationFailedException e) {


Input:
private String getInvalidRowsStatement() {
    double value = Double.valueOf(entity.getValue());
    String whereClause = null;
    TdColumn column = (TdColumn) indicator.getAnalyzedElement();
    IndicatorParameters parameters = indicator.getParameters();
    if (parameters != null) {
        String where1 = null;
        Domain domain = parameters.getIndicatorValidDomain();
        if (domain != null) {
            where1 = getWhereInvalidClause(value, domain);
        }
        String where2 = null;
        domain = parameters.getDataValidDomain();
        if (domain != null) {
            where2 = getWhereInvalidClause(value, domain);
        }
        if (where1 != null) {
            whereClause = where1;
            if (where2 != null) {
                whereClause += dbmsLanguage.or() + where2;
            }
        } else if (where2 != null) {
            whereClause = where2;
        }
    }
    return whereClause != null ? "String_Node_Str" + getFullyQualifiedTableName(column) + dbmsLanguage.where() + inBrackets(whereClause) + dbmsLanguage.and() + inBrackets(getDataFilterClause()) : null;
}

Output:
     }
-    return whereClause != null ? "String_Node_Str" + getFullyQualifiedTableName(column) + dbmsLanguage.where() + inBrackets(whereClause) + dbmsLanguage.and() + inBrackets(getDataFilterClause()) : null;
+    return whereClause != null ? "String_Node_Str" + getFullyQualifiedTableName(column) + dbmsLanguage.where() + inBrackets(whereClause) + andDataFilterClause() : null;
 }


Input:
public boolean updateConfigurationLocked(Configuration values, ActivityRecord starting) {
    int changes = 0;
    boolean kept = true;
    if (values != null) {
        Configuration newConfig = new Configuration(mConfiguration);
        changes = newConfig.updateFrom(values);
        if (changes != 0) {
            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) {
                Slog.i(TAG, "String_Node_Str" + values);
            }
            EventLog.writeEvent(EventLogTags.CONFIGURATION_CHANGED, changes);
            if (values.locale != null) {
                saveLocaleLocked(values.locale, !values.locale.equals(mConfiguration.locale), values.userSetLocale);
            }
            if (values.customTheme != null) {
                saveThemeResourceLocked(values.customTheme, (!values.customTheme.equals(mConfiguration.customTheme)));
            } else if (mConfiguration.customTheme != null) {
                saveThemeResourceLocked(null, true);
            }
            mConfigurationSeq++;
            if (mConfigurationSeq <= 0) {
                mConfigurationSeq = 1;
            }
            newConfig.seq = mConfigurationSeq;
            mConfiguration = newConfig;
            Slog.i(TAG, "String_Node_Str" + newConfig);
            AttributeCache ac = AttributeCache.instance();
            if (ac != null) {
                ac.updateConfiguration(mConfiguration);
            }
            if (Settings.System.hasInterestingConfigurationChanges(changes)) {
                Message msg = mHandler.obtainMessage(UPDATE_CONFIGURATION_MSG);
                msg.obj = new Configuration(mConfiguration);
                mHandler.sendMessage(msg);
            }
            for (int i = mLruProcesses.size() - 1; i >= 0; i--) {
                ProcessRecord app = mLruProcesses.get(i);
                try {
                    if (app.thread != null) {
                        if (DEBUG_CONFIGURATION)
                            Slog.v(TAG, "String_Node_Str" + app.processName + "String_Node_Str" + mConfiguration);
                        app.thread.scheduleConfigurationChanged(mConfiguration);
                    }
                } catch (Exception e) {
                }
            }
            Intent intent = new Intent(Intent.ACTION_CONFIGURATION_CHANGED);
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_REPLACE_PENDING);
            broadcastIntentLocked(null, null, intent, null, null, 0, null, null, null, false, false, MY_PID, Process.SYSTEM_UID);
            if ((changes & ActivityInfo.CONFIG_LOCALE) != 0) {
                broadcastIntentLocked(null, null, new Intent(Intent.ACTION_LOCALE_CHANGED), null, null, 0, null, null, null, false, false, MY_PID, Process.SYSTEM_UID);
            }
        }
    }
    if (changes != 0 && starting == null) {
        starting = mMainStack.topRunningActivityLocked(null);
    }
    if (starting != null) {
        kept = mMainStack.ensureActivityConfigurationLocked(starting, changes);
        if (kept) {
            if (DEBUG_SWITCH)
                Slog.i(TAG, "String_Node_Str" + starting + "String_Node_Str");
            mMainStack.ensureActivitiesVisibleLocked(starting, changes);
        }
    }
    if (values != null && mWindowManager != null) {
        mWindowManager.setNewConfiguration(mConfiguration);
    }
    return kept;
}

Output:
             if (values.customTheme != null) {
-                saveThemeResourceLocked(values.customTheme, (!values.customTheme.equals(mConfiguration.customTheme)));
-            } else if (mConfiguration.customTheme != null) {
-                saveThemeResourceLocked(null, true);
+                saveThemeResourceLocked(values.customTheme, !values.customTheme.equals(mConfiguration.customTheme));
             }


Input:
public Set getResourcePaths(String path) {
    if (path.equals("String_Node_Str")) {
        return new HashSet(Arrays.asList(new String[] { "String_Node_Str", "String_Node_Str" }));
    } else {
        return Collections.EMPTY_SET;
    }
}

Output:
     } else {
-        return Collections.EMPTY_SET;
+        return null;
     }


Input:
private void detectCandidates() {
    FloatArray2D[] d = octave.getD();
    for (int i = d.length - 2; i >= 1; --i) {
        int ia = i - 1;
        int ib = i + 1;
        for (int y = d[i].height - 2; y >= 1; --y) {
            int r = y * d[i].width;
            int ra = r - d[i].width;
            int rb = r + d[i].width;
            X: for (int x = d[i].width - 2; x >= 1; --x) {
                int ic = i;
                int iac = ia;
                int ibc = ib;
                int yc = y;
                int rc = r;
                int rac = ra;
                int rbc = rb;
                int xc = x;
                int xa = xc - 1;
                int xb = xc + 1;
                float e111 = d[ic].data[r + xc];
                float e000 = d[iac].data[rac + xa];
                boolean isMax = e000 < e111;
                boolean isMin = e000 > e111;
                if (!(isMax || isMin))
                    continue;
                float e100 = d[iac].data[rac + xc];
                isMax &= e100 < e111;
                isMin &= e100 > e111;
                if (!(isMax || isMin))
                    continue;
                float e200 = d[iac].data[rac + xb];
                isMax &= e200 < e111;
                isMin &= e200 > e111;
                if (!(isMax || isMin))
                    continue;
                float e010 = d[iac].data[rc + xa];
                isMax &= e010 < e111;
                isMin &= e010 > e111;
                if (!(isMax || isMin))
                    continue;
                float e110 = d[iac].data[rc + xc];
                isMax &= e110 < e111;
                isMin &= e110 > e111;
                if (!(isMax || isMin))
                    continue;
                float e210 = d[iac].data[rc + xb];
                isMax &= e210 < e111;
                isMin &= e210 > e111;
                if (!(isMax || isMin))
                    continue;
                float e020 = d[iac].data[rbc + xa];
                isMax &= e020 < e111;
                isMin &= e020 > e111;
                if (!(isMax || isMin))
                    continue;
                float e120 = d[iac].data[rbc + xc];
                isMax &= e120 < e111;
                isMin &= e120 > e111;
                if (!(isMax || isMin))
                    continue;
                float e220 = d[iac].data[rbc + xb];
                isMax &= e220 < e111;
                isMin &= e220 > e111;
                if (!(isMax || isMin))
                    continue;
                float e001 = d[ic].data[rac + xa];
                isMax &= e001 < e111;
                isMin &= e001 > e111;
                if (!(isMax || isMin))
                    continue;
                float e101 = d[ic].data[rac + xc];
                isMax &= e101 < e111;
                isMin &= e101 > e111;
                if (!(isMax || isMin))
                    continue;
                float e201 = d[ic].data[rac + xb];
                isMax &= e201 < e111;
                isMin &= e201 > e111;
                if (!(isMax || isMin))
                    continue;
                float e011 = d[ic].data[rc + xa];
                isMax &= e011 < e111;
                isMin &= e011 > e111;
                if (!(isMax || isMin))
                    continue;
                float e211 = d[ic].data[rc + xb];
                isMax &= e211 < e111;
                isMin &= e211 > e111;
                if (!(isMax || isMin))
                    continue;
                float e021 = d[ic].data[rbc + xa];
                isMax &= e021 < e111;
                isMin &= e021 > e111;
                if (!(isMax || isMin))
                    continue;
                float e121 = d[ic].data[rbc + xc];
                isMax &= e121 < e111;
                isMin &= e121 > e111;
                if (!(isMax || isMin))
                    continue;
                float e221 = d[ic].data[rbc + xb];
                isMax &= e221 < e111;
                isMin &= e221 > e111;
                if (!(isMax || isMin))
                    continue;
                float e002 = d[ibc].data[rac + xa];
                isMax &= e002 < e111;
                isMin &= e002 > e111;
                if (!(isMax || isMin))
                    continue;
                float e102 = d[ibc].data[rac + xc];
                isMax &= e102 < e111;
                isMin &= e102 > e111;
                if (!(isMax || isMin))
                    continue;
                float e202 = d[ibc].data[rac + xb];
                isMax &= e202 < e111;
                isMin &= e202 > e111;
                if (!(isMax || isMin))
                    continue;
                float e012 = d[ibc].data[rc + xa];
                isMax &= e012 < e111;
                isMin &= e012 > e111;
                if (!(isMax || isMin))
                    continue;
                float e112 = d[ibc].data[rc + xc];
                isMax &= e112 < e111;
                isMin &= e112 > e111;
                if (!(isMax || isMin))
                    continue;
                float e212 = d[ibc].data[rc + xb];
                isMax &= e212 < e111;
                isMin &= e212 > e111;
                if (!(isMax || isMin))
                    continue;
                float e022 = d[ibc].data[rbc + xa];
                isMax &= e022 < e111;
                isMin &= e022 > e111;
                if (!(isMax || isMin))
                    continue;
                float e122 = d[ibc].data[rbc + xc];
                isMax &= e122 < e111;
                isMin &= e122 > e111;
                if (!(isMax || isMin))
                    continue;
                float e222 = d[ibc].data[rbc + xb];
                isMax &= e222 < e111;
                isMin &= e222 > e111;
                if (!(isMax || isMin))
                    continue;
                boolean isLocalized = false;
                boolean isLocalizable = true;
                float dx;
                float dy;
                float di;
                float dxx;
                float dyy;
                float dii;
                float dxy;
                float dxi;
                float dyi;
                float ox;
                float oy;
                float oi;
                float od = Float.MAX_VALUE;
                float fx = 0;
                float fy = 0;
                float fi = 0;
                int t = 5;
                do {
                    --t;
                    dx = (e211 - e011) / 2.0f;
                    dy = (e121 - e101) / 2.0f;
                    di = (e112 - e110) / 2.0f;
                    float e111_2 = 2.0f * e111;
                    dxx = e011 - e111_2 + e211;
                    dyy = e101 - e111_2 + e121;
                    dii = e110 - e111_2 + e112;
                    dxy = (e221 - e021 - e201 + e001) / 4.0f;
                    dxi = (e212 - e012 - e210 + e010) / 4.0f;
                    dyi = (e122 - e102 - e120 + e100) / 4.0f;
                    final float det = Matrix3x3.det(dxx, dxy, dxi, dxy, dyy, dyi, dxi, dyi, dii);
                    if (det == 0)
                        continue X;
                    final float hixx = (dyy * dii - dyi * dyi) / det;
                    final float hixy = (dxi * dyi - dxy * dii) / det;
                    final float hixi = (dxy * dyi - dxi * dyy) / det;
                    final float hiyy = (dxx * dii - dxi * dxi) / det;
                    final float hiyi = (dxi * dxy - dxx * dyi) / det;
                    final float hiii = (dxx * dyy - dxy * dxy) / det;
                    ox = -hixx * dx - hixy * dy - hixx * di;
                    oy = -hixy * dx - hiyy * dy - hixy * di;
                    oi = -hixi * dx - hiyi * dy - hiii * di;
                    float odc = ox * ox + oy * oy + oi * oi;
                    if (odc < 2.0f) {
                        if ((Math.abs(ox) > 0.5 || Math.abs(oy) > 0.5 || Math.abs(oi) > 0.5) && odc < od) {
                            od = odc;
                            xc = (int) Math.round((float) xc + ox);
                            yc = (int) Math.round((float) yc + oy);
                            ic = (int) Math.round((float) ic + oi);
                            if (xc < 1 || yc < 1 || ic < 1 || xc > d[0].width - 2 || yc > d[0].height - 2 || ic > d.length - 2)
                                isLocalizable = false;
                            else {
                                xa = xc - 1;
                                xb = xc + 1;
                                rc = yc * d[ic].width;
                                rac = rc - d[ic].width;
                                rbc = rc + d[ic].width;
                                iac = ic - 1;
                                ibc = ic + 1;
                                e000 = d[iac].data[rac + xa];
                                e100 = d[iac].data[rac + xc];
                                e200 = d[iac].data[rac + xb];
                                e010 = d[iac].data[rc + xa];
                                e110 = d[iac].data[rc + xc];
                                e210 = d[iac].data[rc + xb];
                                e020 = d[iac].data[rbc + xa];
                                e120 = d[iac].data[rbc + xc];
                                e220 = d[iac].data[rbc + xb];
                                e001 = d[ic].data[rac + xa];
                                e101 = d[ic].data[rac + xc];
                                e201 = d[ic].data[rac + xb];
                                e011 = d[ic].data[rc + xa];
                                e111 = d[ic].data[rc + xc];
                                e211 = d[ic].data[rc + xb];
                                e021 = d[ic].data[rbc + xa];
                                e121 = d[ic].data[rbc + xc];
                                e221 = d[ic].data[rbc + xb];
                                e002 = d[ibc].data[rac + xa];
                                e102 = d[ibc].data[rac + xc];
                                e202 = d[ibc].data[rac + xb];
                                e012 = d[ibc].data[rc + xa];
                                e112 = d[ibc].data[rc + xc];
                                e212 = d[ibc].data[rc + xb];
                                e022 = d[ibc].data[rbc + xa];
                                e122 = d[ibc].data[rbc + xc];
                                e222 = d[ibc].data[rbc + xb];
                            }
                        } else {
                            fx = (float) xc + ox;
                            fy = (float) yc + oy;
                            fi = (float) ic + oi;
                            if (fx < 0 || fy < 0 || fi < 0 || fx > d[0].width - 1 || fy > d[0].height - 1 || fi > d.length - 1)
                                isLocalizable = false;
                            else
                                isLocalized = true;
                        }
                    } else
                        isLocalizable = false;
                } while (!isLocalized && isLocalizable && t >= 0);
                if (!isLocalized) {
                    continue;
                }
                if (Math.abs(e111 + 0.5f * (dx * ox + dy * oy + di * oi)) < MIN_CONTRAST)
                    continue;
                float det = dxx * dyy - dxy * dxy;
                float trace = dxx + dyy;
                if (trace * trace / det > MAX_CURVATURE_RATIO)
                    continue;
                candidates.addElement(new float[] { fx, fy, fi });
            }
        }
    }
}

Output:
                     final float hiii = (dxx * dyy - dxy * dxy) / det;
-                    ox = -hixx * dx - hixy * dy - hixx * di;
-                    oy = -hixy * dx - hiyy * dy - hixy * di;
+                    ox = -hixx * dx - hixy * dy - hixi * di;
+                    oy = -hixy * dx - hiyy * dy - hiyi * di;
                     oi = -hixi * dx - hiyi * dy - hiii * di;


Input:
public void testSetPropertyOnNullDataObject() {
    boolean expectedEx = false;
    boolean unexpectedEx = false;
    try {
        SDODataFactory factory = new SDODataFactory(getHelperContext());
        SDODataObject po = (SDODataObject) factory.create("String_Node_Str", "String_Node_Str");
        po.set("String_Node_Str", "String_Node_Str");
    } catch (SDOException sdoex) {
        if (sdoex.getMessage().lastIndexOf("String_Node_Str") != -1) {
            expectedEx = true;
        }
    } catch (Exception x) {
        unexpectedEx = true;
    }
    assertTrue("String_Node_Str", expectedEx);
    assertFalse("String_Node_Str", unexpectedEx);
}

Output:
     try {
-        SDODataFactory factory = new SDODataFactory(getHelperContext());
+        SDODataFactory factory = (SDODataFactory) getHelperContext().getDataFactory();
         SDODataObject po = (SDODataObject) factory.create("String_Node_Str", "String_Node_Str");


Input:
protected boolean isValidName(String name) {
    try {
        entity.getModel().getParameters().invalidateFieldsHash();
        return !name.isEmpty() && entity.getModel().getParameters().get(name) == null && entity.getModel().getEntityByName(name) == null && ScriptUtils.isValidJsIdentifier(name);
    } catch (Exception ex) {
        ErrorManager.getDefault().notify(ex);
    }
    return false;
}

Output:
         entity.getModel().getParameters().invalidateFieldsHash();
-        return !name.isEmpty() && entity.getModel().getParameters().get(name) == null && entity.getModel().getEntityByName(name) == null && ScriptUtils.isValidJsIdentifier(name);
+        return !name.isEmpty() && entity.getModel().getParameters().get(name) == null && (entity.getModel().getEntityByName(name) == null || getName().equalsIgnoreCase(name)) && ScriptUtils.isValidJsIdentifier(name);
     } catch (Exception ex) {


Input:
void beforeBeanDiscovery(BeforeBeanDiscovery event) {
    LOGGER.fine("String_Node_Str");
    initialize();
    for (Class<? extends Annotation> qualifier : knownParameterQualifiers) {
        event.addQualifier(qualifier);
    }
}

Output:
     LOGGER.fine("String_Node_Str");
-    initialize();
+    initialize(manager);
     for (Class<? extends Annotation> qualifier : knownParameterQualifiers) {


Input:
public void stop() {
    if (!started)
        return;
    parallelExecutorService.shutdown();
    Collection<NamedExecutorService> executors = mapExecutors.values();
    for (NamedExecutorService namedExecutorService : executors) {
        namedExecutorService.stop();
    }
    threadPoolExecutor.shutdownNow();
    try {
        threadPoolExecutor.awaitTermination(3, TimeUnit.SECONDS);
    } catch (InterruptedException ignored) {
    }
    started = false;
}

Output:
     }
-    threadPoolExecutor.shutdownNow();
+    parallelExecutorService.shutdown();
     try {


Input:
private void createIndicatorItems(final TreeItem treeItem, IndicatorUnit[] indicatorTypeMappings) {
    for (IndicatorUnit indicatorMapping : indicatorTypeMappings) {
        final TreeItem indicatorItem = new TreeItem(treeItem, SWT.NONE);
        final IndicatorUnit typeMapping = indicatorMapping;
        final IndicatorEnum indicatorEnum = indicatorMapping.getType();
        indicatorItem.setData(COLUMN_INDICATOR_VALUE, treeItem.getData(COLUMN_INDICATOR_VALUE));
        indicatorItem.setData(INDICATOR_UNIT_VALUE, typeMapping);
        indicatorItem.setText(0, indicatorMapping.getType().getLabel());
        TreeEditor editor;
        if (indicatorEnum.hasChildren()) {
            editor = new TreeEditor(tree);
            Label optionLabel = new Label(tree, SWT.NONE);
            optionLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
            optionLabel.setImage(ImageLib.getImage(ImageLib.INDICATOR_OPTION));
            optionLabel.setToolTipText("String_Node_Str");
            optionLabel.pack();
            optionLabel.setData(indicatorMapping);
            optionLabel.addMouseListener(new MouseAdapter() {

                public void mouseDown(MouseEvent e) {
                    final IndicatorUnit indicator = (IndicatorUnit) ((Label) e.getSource()).getData();
                    final IndicatorOptionsWizard wizard = new IndicatorOptionsWizard(indicator, analysis) {
                        public void dispose() {
                            activeCount = 0;
                            super.dispose();
                        }
                    };
                    try {
                        WizardDialog dialog = new WizardDialog(null, wizard) {
                            public void openTray(DialogTray tray) throws IllegalStateException, UnsupportedOperationException {
                                super.openTray(tray);
                                if (tray instanceof HelpTray) {
                                    HelpTray helpTray = (HelpTray) tray;
                                    ReusableHelpPart helpPart = helpTray.getHelpPart();
                                    helpPart.getForm().getForm().notifyListeners(SWT.Activate, new Event());
                                }
                            }
                        };
                        dialog.setPageSize(300, 400);
                        dialog.create();
                        dialog.getShell().addShellListener(new ShellAdapter() {
                            public void shellActivated(ShellEvent e) {
                                String string = HelpPlugin.PLUGIN_ID + HelpPlugin.INDICATOR_OPTION_HELP_ID;
                                if (activeCount < 2) {
                                    Point point = e.widget.getDisplay().getCursorLocation();
                                    IContext context = HelpSystem.getContext(string);
                                    IHelpResource[] relatedTopics = context.getRelatedTopics();
                                    for (IHelpResource topic : relatedTopics) {
                                        topic.getLabel();
                                        topic.getHref();
                                    }
                                    IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
                                    helpSystem.displayContext(context, point.x + 15, point.y);
                                    activeCount++;
                                    ReusableHelpPart lastActiveInstance = ReusableHelpPart.getLastActiveInstance();
                                    if (lastActiveInstance != null) {
                                        String href = IndicatorParameterTypes.getHref(indicator);
                                        if (href != null) {
                                            lastActiveInstance.showURL(href);
                                        }
                                    }
                                }
                            }
                        });
                        int open = dialog.open();
                        if (Window.OK == open) {
                            setDirty(wizard.isDirty());
                        }
                    } catch (AssertionFailedException ex) {
                        MessageDialogWithToggle.openInformation(null, "String_Node_Str", "String_Node_Str");
                    }
                }
            });
            editor.minimumWidth = WIDTH1_CELL;
            editor.horizontalAlignment = SWT.CENTER;
            editor.setEditor(optionLabel, indicatorItem, 1);
        }
        editor = new TreeEditor(tree);
        Label delLabel = new Label(tree, SWT.NONE);
        delLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
        delLabel.setImage(ImageLib.getImage(ImageLib.ACTION_DELETE));
        delLabel.setToolTipText("String_Node_Str");
        delLabel.pack();
        delLabel.addMouseListener(new MouseAdapter() {
            public void mouseDown(MouseEvent e) {
                ColumnIndicator columnIndicator = (ColumnIndicator) treeItem.getData(COLUMN_INDICATOR_VALUE);
                deleteIndicatorItems(columnIndicator, typeMapping);
                setElements(columnIndicators);
            }
        });
        editor.minimumWidth = WIDTH1_CELL;
        editor.horizontalAlignment = SWT.CENTER;
        editor.setEditor(delLabel, indicatorItem, 2);
        if (indicatorEnum.hasChildren()) {
            indicatorItem.setData(treeItem.getData(COLUMN_INDICATOR_VALUE));
            createIndicatorItems(indicatorItem, indicatorMapping.getChildren());
        }
    }
}

Output:
         TreeEditor editor;
-        if (indicatorEnum.hasChildren()) {
-            editor = new TreeEditor(tree);
-            Label optionLabel = new Label(tree, SWT.NONE);
-            optionLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
-            optionLabel.setImage(ImageLib.getImage(ImageLib.INDICATOR_OPTION));
-            optionLabel.setToolTipText("String_Node_Str");
-            optionLabel.pack();
-            optionLabel.setData(indicatorMapping);
-            optionLabel.addMouseListener(new MouseAdapter() {
+        editor = new TreeEditor(tree);
+        Label optionLabel = new Label(tree, SWT.NONE);
+        optionLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+        optionLabel.setImage(ImageLib.getImage(ImageLib.INDICATOR_OPTION));
+        optionLabel.setToolTipText("String_Node_Str");
+        optionLabel.pack();
+        optionLabel.setData(indicatorMapping);
+        optionLabel.addMouseListener(new MouseAdapter() {


Input:
public void shouldPresent_NoContentError_IntoView() throws Exception {
    Flowable<FactAboutNumber> noContent = Flowable.error(new ContentNotFoundError());
    when(usecase.fetchTrivia()).thenReturn(noContent);
    presenter.fetchRandomFacts();
    BehavioursVerifier.with(view).shouldShowLoading().shouldShowEmptyState().shouldHideLoading().shouldNotShowErrorState();
    DataFlowWatcher.with(onNext, onError, onCompleted).shouldFinishWithError();
    verify(strategist, atLeastOnce()).applyStrategy(any());
}

Output:
     presenter.fetchRandomFacts();
-    BehavioursVerifier.with(view).shouldShowLoading().shouldShowEmptyState().shouldHideLoading().shouldNotShowErrorState();
+    BehavioursVerifier.with(view).showLoadingFirstHideLoadingAfter().shouldShowEmptyState().shouldNotShowErrorState();
     DataFlowWatcher.with(onNext, onError, onCompleted).shouldFinishWithError();


Input:
void writeAll(final SocketChannel socketChannel, final ReplicatedSharedHashMap.ModificationIterator modificationIterator) throws InterruptedException, IOException {
    for (; ; ) {
        final boolean wasDataRead = modificationIterator.nextEntry(entryCallback);
        if (!wasDataRead && bytes.position() == 0)
            return;
        if (bytes.remaining() > entryMaxSize && (wasDataRead || bytes.position() == 0))
            continue;
        bytes.flip();
        final ByteBuffer byteBuffer = bytes.buffer();
        byteBuffer.limit((int) bytes.limit());
        byteBuffer.position((int) bytes.position());
        socketChannel.write(byteBuffer);
        bytes.clear();
        byteBuffer.clear();
        return;
    }
}

Output:
     for (; ; ) {
-        final boolean wasDataRead = modificationIterator.nextEntry(entryCallback);
+        byteBuffer.limit(byteBuffer.capacity());
+        boolean wasDataRead = false;
+        try {
+            wasDataRead = modificationIterator.nextEntry(entryCallback);
+        } catch (IndexOutOfBoundsException e) {
+            e.printStackTrace();
+            int i = 1;
+        }
         if (!wasDataRead && bytes.position() == 0)


Input:
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (data != null || ((requestCode == MediaUtils.RequestCode.ACTIVITY_REQUEST_CODE_TAKE_PHOTO || requestCode == MediaUtils.RequestCode.ACTIVITY_REQUEST_CODE_TAKE_VIDEO))) {
        Bundle extras;
        switch(requestCode) {
            case MediaGalleryActivity.REQUEST_CODE:
                if (resultCode == Activity.RESULT_OK) {
                    handleMediaGalleryResult(data);
                }
                break;
            case MediaGalleryPickerActivity.REQUEST_CODE:
                if (resultCode == Activity.RESULT_OK) {
                    handleMediaGalleryPickerResult(data);
                }
                break;
            case MediaUtils.RequestCode.ACTIVITY_REQUEST_CODE_PICTURE_LIBRARY:
                Uri imageUri = data.getData();
                fetchMedia(imageUri);
                break;
            case MediaUtils.RequestCode.ACTIVITY_REQUEST_CODE_TAKE_PHOTO:
                if (resultCode == Activity.RESULT_OK) {
                    try {
                        File f = new File(mMediaCapturePath);
                        Uri capturedImageUri = Uri.fromFile(f);
                        if (!addMedia(capturedImageUri, null))
                            Toast.makeText(getActivity(), getResources().getText(R.string.gallery_error), Toast.LENGTH_SHORT).show();
                        getActivity().sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("String_Node_Str" + Environment.getExternalStorageDirectory())));
                    } catch (Exception e) {
                        e.printStackTrace();
                    } catch (OutOfMemoryError e) {
                        e.printStackTrace();
                    }
                } else if (mActivity != null && mQuickMediaType > -1 && TextUtils.isEmpty(mContentEditText.getText())) {
                    mActivity.getPost().delete();
                    mActivity.finish();
                }
                break;
            case MediaUtils.RequestCode.ACTIVITY_REQUEST_CODE_VIDEO_LIBRARY:
                Uri videoUri = data.getData();
                fetchMedia(videoUri);
                break;
            case MediaUtils.RequestCode.ACTIVITY_REQUEST_CODE_TAKE_VIDEO:
                if (resultCode == Activity.RESULT_OK) {
                    Uri capturedVideoUri = MediaUtils.getLastRecordedVideoUri(getActivity());
                    if (!addMedia(capturedVideoUri, null))
                        Toast.makeText(getActivity(), getResources().getText(R.string.gallery_error), Toast.LENGTH_SHORT).show();
                } else if (mActivity != null && mQuickMediaType > -1 && TextUtils.isEmpty(mContentEditText.getText())) {
                    mActivity.getPost().delete();
                    mActivity.finish();
                }
                break;
            case ACTIVITY_REQUEST_CODE_CREATE_LINK:
                try {
                    extras = data.getExtras();
                    if (extras == null)
                        return;
                    String linkURL = extras.getString("String_Node_Str");
                    if (linkURL != null && !linkURL.equals("String_Node_Str") && !linkURL.equals("String_Node_Str")) {
                        if (mSelectionStart > mSelectionEnd) {
                            int temp = mSelectionEnd;
                            mSelectionEnd = mSelectionStart;
                            mSelectionStart = temp;
                        }
                        Editable str = mContentEditText.getText();
                        if (str == null)
                            return;
                        if (mActivity.getPost().isLocalDraft()) {
                            if (extras.getString("String_Node_Str") == null) {
                                if (mSelectionStart < mSelectionEnd)
                                    str.delete(mSelectionStart, mSelectionEnd);
                                str.insert(mSelectionStart, linkURL);
                                str.setSpan(new URLSpan(linkURL), mSelectionStart, mSelectionStart + linkURL.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
                                mContentEditText.setSelection(mSelectionStart + linkURL.length());
                            } else {
                                String linkText = extras.getString("String_Node_Str");
                                if (linkText == null)
                                    return;
                                if (mSelectionStart < mSelectionEnd)
                                    str.delete(mSelectionStart, mSelectionEnd);
                                str.insert(mSelectionStart, linkText);
                                str.setSpan(new URLSpan(linkURL), mSelectionStart, mSelectionStart + linkText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
                                mContentEditText.setSelection(mSelectionStart + linkText.length());
                            }
                        } else {
                            if (extras.getString("String_Node_Str") == null) {
                                if (mSelectionStart < mSelectionEnd)
                                    str.delete(mSelectionStart, mSelectionEnd);
                                String urlHTML = "String_Node_Str" + linkURL + "String_Node_Str" + linkURL + "String_Node_Str";
                                str.insert(mSelectionStart, urlHTML);
                                mContentEditText.setSelection(mSelectionStart + urlHTML.length());
                            } else {
                                String linkText = extras.getString("String_Node_Str");
                                if (mSelectionStart < mSelectionEnd)
                                    str.delete(mSelectionStart, mSelectionEnd);
                                String urlHTML = "String_Node_Str" + linkURL + "String_Node_Str" + linkText + "String_Node_Str";
                                str.insert(mSelectionStart, urlHTML);
                                mContentEditText.setSelection(mSelectionStart + urlHTML.length());
                            }
                        }
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
                break;
        }
    }
}

Output:
                 } else if (mActivity != null && mQuickMediaType > -1 && TextUtils.isEmpty(mContentEditText.getText())) {
-                    mActivity.getPost().delete();
+                    WordPress.wpDB.deletePost(mActivity.getPost());
                     mActivity.finish();


Input:
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final ByteArrayId other = (ByteArrayId) obj;
    if (!Arrays.equals(id, other.id)) {
        return false;
    }
    return true;
}

Output:
     final ByteArrayId other = (ByteArrayId) obj;
-    if (!Arrays.equals(id, other.id)) {
-        return false;
-    }
-    return true;
+    return Arrays.equals(id, other.id);
 }


Input:
public int pathDistanceToPlayer(int playerId, int opponentId) {
    Point distances = getDeltaDistances(playerId, opponentId);
    return (Math.abs(distances.x) + Math.abs(distances.y)) - 1;
}

Output:
     Point distances = getDeltaDistances(playerId, opponentId);
-    return (Math.abs(distances.x) + Math.abs(distances.y)) - 1;
+    return Math.abs(distances.x) + Math.abs(distances.y);
 }


Input:
protected Document requestAnnotations(Document document) throws GerbilException {
    Document resultDoc = new DocumentImpl(document.getText(), document.getDocumentURI());
    HttpEntity entity = new StringEntity(new JSONObject().put("String_Node_Str", document.getText()).put("String_Node_Str", "String_Node_Str").put("String_Node_Str", "String_Node_Str").put("String_Node_Str", "String_Node_Str").toString(), ContentType.APPLICATION_JSON);
    HttpPost request = null;
    try {
        request = createPostRequest(serviceUrl);
    } catch (IllegalArgumentException e) {
        throw new GerbilException("String_Node_Str", e, ErrorTypes.UNEXPECTED_EXCEPTION);
    }
    request.addHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.toString());
    request.addHeader(HttpHeaders.ACCEPT_CHARSET, ContentType.APPLICATION_JSON.getCharset().name());
    request.setEntity(entity);
    entity = null;
    CloseableHttpResponse response = null;
    try {
        response = sendRequest(request);
        entity = response.getEntity();
        try {
            String content = IOUtils.toString(entity.getContent(), ContentType.APPLICATION_JSON.getCharset().name());
            JSONObject outObj = new JSONObject(content);
            if (outObj.has("String_Node_Str")) {
                JSONArray graph = outObj.getJSONArray("String_Node_Str");
                for (int i = 0; i < graph.length(); i++) {
                    parseType(graph.getJSONObject(i), resultDoc);
                }
            } else {
                parseType(outObj, resultDoc);
            }
        } catch (Exception e) {
            LOGGER.error("String_Node_Str", e);
            throw new GerbilException("String_Node_Str", e, ErrorTypes.UNEXPECTED_EXCEPTION);
        }
    } finally {
        if (entity != null) {
            try {
                EntityUtils.consume(entity);
            } catch (IOException e1) {
            }
        }
        if (response != null) {
            try {
                response.close();
            } catch (IOException e) {
            }
        }
        closeRequest(request);
    }
    return resultDoc;
}

Output:
 protected Document requestAnnotations(Document document) throws GerbilException {
-    Document resultDoc = new DocumentImpl(document.getText(), document.getDocumentURI());
-    HttpEntity entity = new StringEntity(new JSONObject().put("String_Node_Str", document.getText()).put("String_Node_Str", "String_Node_Str").put("String_Node_Str", "String_Node_Str").put("String_Node_Str", "String_Node_Str").toString(), ContentType.APPLICATION_JSON);
-    HttpPost request = null;
-    try {
-        request = createPostRequest(serviceUrl);
-    } catch (IllegalArgumentException e) {
-        throw new GerbilException("String_Node_Str", e, ErrorTypes.UNEXPECTED_EXCEPTION);
-    }
-    request.addHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.toString());
-    request.addHeader(HttpHeaders.ACCEPT_CHARSET, ContentType.APPLICATION_JSON.getCharset().name());
-    request.setEntity(entity);
-    entity = null;
-    CloseableHttpResponse response = null;
-    try {
-        response = sendRequest(request);
-        entity = response.getEntity();
-        try {
-            String content = IOUtils.toString(entity.getContent(), ContentType.APPLICATION_JSON.getCharset().name());
-            JSONObject outObj = new JSONObject(content);
-            if (outObj.has("String_Node_Str")) {
-                JSONArray graph = outObj.getJSONArray("String_Node_Str");
-                for (int i = 0; i < graph.length(); i++) {
-                    parseType(graph.getJSONObject(i), resultDoc);
-                }
-            } else {
-                parseType(outObj, resultDoc);
-            }
-        } catch (Exception e) {
-            LOGGER.error("String_Node_Str", e);
-            throw new GerbilException("String_Node_Str", e, ErrorTypes.UNEXPECTED_EXCEPTION);
-        }
-    } finally {
-        if (entity != null) {
-            try {
-                EntityUtils.consume(entity);
-            } catch (IOException e1) {
-            }
-        }
-        if (response != null) {
-            try {
-                response.close();
-            } catch (IOException e) {
-            }
-        }
-        closeRequest(request);
-    }
-    return resultDoc;
+    Document resultDoc = annotator.request(document);
+    return DocumentTextEditRevoker.revokeTextEdits(resultDoc, document.getText());
 }


Input:
public static CombatInfo blockWithGoodTrade(Game game, List<Permanent> attackers, List<Permanent> blockers) {
    UUID attackerId = game.getCombat().getAttackerId();
    UUID defenderId = game.getCombat().getDefenders().iterator().next();
    if (attackerId == null || defenderId == null) {
        log.warn("String_Node_Str" + attackerId + ' ' + defenderId);
        return new CombatInfo();
    }
    CombatInfo combatInfo = new CombatInfo();
    for (Permanent attacker : attackers) {
        List<Permanent> possibleBlockers = getPossibleBlockers(game, attacker, blockers);
        List<Permanent> survivedBlockers = getBlockersThatWillSurvive(game, attackerId, defenderId, attacker, possibleBlockers);
        if (!survivedBlockers.isEmpty()) {
            Permanent blocker = getWorstCreature(survivedBlockers);
            combatInfo.addPair(attacker, blocker);
            blockers.remove(blocker);
        }
        if (blockers.isEmpty()) {
            break;
        }
    }
    return combatInfo;
}

Output:
 public static CombatInfo blockWithGoodTrade(Game game, List<Permanent> attackers, List<Permanent> blockers) {
-    UUID attackerId = game.getCombat().getAttackerId();
+    UUID attackerId = game.getCombat().getAttackingPlayerId();
     UUID defenderId = game.getCombat().getDefenders().iterator().next();


Input:
private static void validateServiceState(final String text) throws Exception {
    if (text.length() > 2000) {
        throw new RuntimeException("String_Node_Str");
    }
    validateServiceState();
}

Output:
 private static void validateServiceState(final String text) throws Exception {
-    if (text.length() > 2000) {
+    final int byteLength = text.getBytes(ENCODING).length;
+    if (byteLength > 2000) {
         throw new RuntimeException("String_Node_Str");


Input:
public LayerDTO updateLayer(int layerId, String workspaceId, String ciId, LayerDTO layer) {
    try {
        ConfigurationItemKey ciKey = new ConfigurationItemKey(workspaceId, ciId);
        Layer l = productService.updateLayer(ciKey, layerId, layer.getName());
        return new LayerDTO(l.getId(), l.getName());
    } catch (ApplicationException ex) {
        throw new RestApiException(ex.toString(), ex.getMessage());
    }
}

Output:
         ConfigurationItemKey ciKey = new ConfigurationItemKey(workspaceId, ciId);
-        Layer l = productService.updateLayer(ciKey, layerId, layer.getName());
-        return new LayerDTO(l.getId(), l.getName());
+        Layer l = productService.updateLayer(ciKey, layerId, layer.getName(), layer.getColor());
+        return new LayerDTO(l.getId(), l.getName(), l.getColor());
     } catch (ApplicationException ex) {


Input:
public void setAttachments(FileAttachment[] attachments) {
    this.attachments = attachments;
}

Output:
 public void setAttachments(FileAttachment[] attachments) {
-    this.attachments = attachments;
+    if (attachments == null) {
+        this.attachments = null;
+    } else {
+        this.attachments = Arrays.copyOf(attachments, attachments.length);
+    }
 }


Input:
public void setServerOptions(String aValue) {
    String oldValue = getRunServerOptions();
    projectPrivateProperties.setProperty(RUN_SERVER_OPTIONS_KEY, aValue);
    projectPrivatePropertiesIsDirty = true;
    changeSupport.firePropertyChange(RUN_SERVER_OPTIONS_KEY, oldValue, aValue);
}

Output:
     String oldValue = getRunServerOptions();
-    projectPrivateProperties.setProperty(RUN_SERVER_OPTIONS_KEY, aValue);
+    if (aValue != null) {
+        projectPrivateProperties.setProperty(RUN_SERVER_OPTIONS_KEY, aValue);
+    } else {
+        projectPrivateProperties.remove(RUN_SERVER_OPTIONS_KEY);
+    }
     projectPrivatePropertiesIsDirty = true;


Input:
public boolean runMigration(ObjectMapper om, CKeyspaceDefinition newKeyspaceDefinition, boolean printOnly) throws CObjectMigrationException {
    if (printOnly) {
        List<CQLStatement> torun = om.runMigration(newKeyspaceDefinition, true);
        for (CQLStatement c : torun) {
            System.out.println(c.getQuery());
        }
    } else {
        om.runMigration(newKeyspaceDefinition, true);
    }
    return true;
}

Output:
     if (printOnly) {
-        List<CQLStatement> torun = om.runMigration(newKeyspaceDefinition, true);
+        List<CQLStatement> torun = om.runMigration(newKeyspaceDefinition, false);
         for (CQLStatement c : torun) {


Input:
public QueryPart resolve(Query q) {
    if (formulas != null) {
        for (int i = 0; i < formulas.length; i++) formulas[i] = (Formula) formulas[i].createElement(q);
        for (int i = 0; i < formulas.length; i++) formulas[i] = (Formula) formulas[i].resolve(q);
    }
    if (axes != null)
        for (int i = 0; i < axes.length; i++) axes[i] = (QueryAxis) axes[i].resolve(q);
    if (slicer != null) {
        setSlicer((Exp) slicer.resolve(q));
    }
    for (int i = 0; i < parameters.length; i++) parameters[i] = (Parameter) parameters[i].resolve(q);
    return this;
}

Output:
     if (slicer != null) {
-        setSlicer((Exp) slicer.resolve(q));
+        setSlicer(slicer.resolve(q));
     }


Input:
public void delegatedPluginEvent(PluginEvent event) {
    if (event.getSource() instanceof PluginForHost && event.getEventID() == PluginEvent.PLUGIN_DATA_CHANGED) {
        this.hostPluginDataChanged = event;
        return;
    }
    if (event.getSource() instanceof PluginForDecrypt && event.getEventID() == PluginEvent.PLUGIN_DATA_CHANGED) {
        this.decryptPluginDataChanged = event;
        return;
    }
    if (event.getSource() instanceof PluginForSearch && event.getEventID() == PluginEvent.PLUGIN_DATA_CHANGED) {
        this.decryptPluginDataChanged = event;
        return;
    }
    if (event.getSource() instanceof PluginForHost) {
        tabDownloadTable.pluginEvent(event);
        return;
    }
    if (event.getSource() instanceof PluginForDecrypt || event.getSource() instanceof PluginForSearch) {
        splitpane.setDividerLocation(0.8);
        return;
    }
    if (event.getSource() instanceof PluginOptional || event.getSource() instanceof UserPlugin) {
        JDAction actionToDo = null;
        switch(event.getEventID()) {
            case PluginEvent.PLUGIN_CONTROL_DND:
                actionToDo = actionDnD;
                break;
            case PluginEvent.PLUGIN_CONTROL_EXIT:
                actionToDo = actionExit;
                break;
            case PluginEvent.PLUGIN_CONTROL_RECONNECT:
                actionToDo = actionReconnect;
                break;
            case PluginEvent.PLUGIN_CONTROL_SHOW_CONFIG:
                actionToDo = actionConfig;
                break;
            case PluginEvent.PLUGIN_CONTROL_SHOW_UI:
                frame.setVisible((Boolean) event.getParameter1());
                break;
            case PluginEvent.PLUGIN_CONTROL_START_STOP:
                actionToDo = actionStartStopDownload;
                break;
        }
        if (actionToDo != null)
            actionPerformed(new ActionEvent(this, actionToDo.getActionID(), "String_Node_Str"));
    }
}

Output:
     }
-    if (event.getSource() instanceof PluginOptional || event.getSource() instanceof UserPlugin) {
+    if (event.getSource() instanceof PluginOptional) {
         JDAction actionToDo = null;


Input:
public InstanceKey getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation) throws UnimplementedError {
    Assertions.UNREACHABLE();
    return null;
}

Output:
 public InstanceKey getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation) throws UnimplementedError {
-    Assertions.UNREACHABLE();
-    return null;
+    return iKeyFactory.getInstanceKeyForAllocation(node, allocation);
 }


Input:
public void configure(Configuration config) {
    super.configure(config);
    final String fieldDelimStr = config.getString(FIELD_DELIMITER_PARAMETER, null);
    if (fieldDelimStr != null) {
        if (fieldDelimStr.length() != 1) {
            throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
        } else {
            setFieldDelim(fieldDelimStr.charAt(0));
        }
    }
    int numConfigFields = config.getInteger(NUM_FIELDS_PARAMETER, -1);
    if (numConfigFields != -1) {
        if (numConfigFields <= 0) {
            throw new IllegalConfigurationException("String_Node_Str");
        }
        if (getNumberOfNonNullFields() > 0) {
            throw new IllegalConfigurationException("String_Node_Str");
        }
        int[] textPosIdx = new int[numConfigFields];
        boolean anyTextPosSet = false;
        boolean allTextPosSet = true;
        int maxTextPos = -1;
        for (int i = 0; i < numConfigFields; i++) {
            int pos = config.getInteger(TEXT_POSITION_PARAMETER_PREFIX + i, -1);
            if (pos == -1) {
                allTextPosSet = false;
                textPosIdx[i] = i;
                maxTextPos = i;
            } else {
                anyTextPosSet = true;
                textPosIdx[i] = pos;
                maxTextPos = pos > maxTextPos ? pos : maxTextPos;
            }
        }
        if (anyTextPosSet && !allTextPosSet) {
            throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
        }
        Class<? extends Value>[] types = (Class<? extends Value>[]) new Class[maxTextPos + 1];
        int[] targetPos = new int[maxTextPos + 1];
        for (int i = 0; i < numConfigFields; i++) {
            int pos = textPosIdx[i];
            Class<? extends Value> clazz = config.getClass(FIELD_TYPE_PARAMETER_PREFIX + i, null).asSubclass(Value.class);
            if (clazz == null) {
                throw new IllegalConfigurationException("String_Node_Str" + "String_Node_Str" + i);
            }
            types[pos] = clazz;
            targetPos[pos] = i;
        }
        setFieldTypes(types);
        this.targetPositions = new int[numConfigFields];
        for (int i = 0, k = 0; i < targetPos.length; i++) {
            if (types[i] != null) {
                this.targetPositions[k++] = targetPos[i];
            }
        }
    } else {
        this.targetPositions = new int[getNumberOfNonNullFields()];
        for (int i = 0; i < this.targetPositions.length; i++) {
            this.targetPositions[i] = i;
        }
    }
    if (getNumberOfNonNullFields() == 0) {
        throw new IllegalConfigurationException("String_Node_Str");
    }
}

Output:
     } else {
-        this.targetPositions = new int[getNumberOfNonNullFields()];
-        for (int i = 0; i < this.targetPositions.length; i++) {
-            this.targetPositions[i] = i;
+        if (this.targetPositions.length == 0) {
+            this.targetPositions = new int[getNumberOfNonNullFields()];
+            for (int i = 0; i < this.targetPositions.length; i++) {
+                this.targetPositions[i] = i;
+            }
         }


Input:
public void mouseClicked(MouseEvent e) {
    if (e.getClickCount() == 2) {
        JTable target = (JTable) e.getSource();
        int row = target.getSelectedRow();
        if (target == this.populationTable) {
            NEATGenome genome = (NEATGenome) this.population.get(row);
            GenomeStructureTab tab = new GenomeStructureTab(genome);
            EncogWorkBench.getInstance().getMainWindow().getTabManager().openTab(tab);
        } else if (target == this.speciesTable) {
            Species species = (Species) this.population.getSpecies().get(row);
            NEATGenome genome = (NEATGenome) species.getLeader();
            if (genome != null) {
                GenomeStructureTab tab = new GenomeStructureTab(genome);
                EncogWorkBench.getInstance().getMainWindow().getTabManager().openTab(tab);
            }
        }
    }
}

Output:
         } else if (target == this.speciesTable) {
-            Species species = (Species) this.population.getSpecies().get(row);
+            NEATSpecies species = this.population.getSpecies().get(row);
             NEATGenome genome = (NEATGenome) species.getLeader();


Input:
private boolean isValidInterpolator(int itplId) {
    return itplId > 0;
}

Output:
 private boolean isValidInterpolator(int itplId) {
-    return itplId > 0;
+    return itplId != INTEPOLATOR_NOT_EXIST;
 }


Input:
public boolean install(Resource r, ResourceLocation location, Reference ref, ResourceTable table, CommCareInstance instance, boolean upgrade) throws UnresolvedResourceException {
    if (location.getAuthority() == Resource.RESOURCE_AUTHORITY_LOCAL) {
        try {
            if (ref.doesBinaryExist()) {
                localReference = ref.getURI();
                table.commit(r, Resource.RESOURCE_STATUS_INSTALLED);
                return true;
            } else {
                return false;
            }
        } catch (IOException e) {
            e.printStackTrace();
            return false;
        }
    } else if (location.getAuthority() == Resource.RESOURCE_AUTHORITY_REMOTE) {
        try {
            if (!ref.doesBinaryExist()) {
                return false;
            }
            InputStream incoming = ref.getStream();
            if (incoming == null) {
                return false;
            }
            String uri = ref.getURI();
            int lastslash = uri.lastIndexOf('/');
            uri = uri.substring(lastslash == -1 ? 0 : lastslash);
            int copy = 0;
            try {
                Reference destination = ReferenceManager._().DeriveReference("String_Node_Str" + uri);
                if (destination.isReadOnly()) {
                    return cache(incoming, r, table);
                }
                while (destination.doesBinaryExist()) {
                    copy++;
                    String newUri = uri + "String_Node_Str" + copy;
                    destination = ReferenceManager._().DeriveReference("String_Node_Str" + newUri);
                }
                OutputStream output = destination.getOutputStream();
                StreamsUtil.writeFromInputToOutput(incoming, output);
                output.close();
                this.localReference = destination.getURI();
                if (upgrade) {
                    table.commit(r, Resource.RESOURCE_STATUS_UPGRADE);
                } else {
                    table.commit(r, Resource.RESOURCE_STATUS_INSTALLED);
                }
                return true;
            } catch (InvalidReferenceException e) {
                return cache(incoming, r, table);
            }
        } catch (IOException e) {
            e.printStackTrace();
            return false;
        }
    }
    return false;
}

Output:
             int lastslash = uri.lastIndexOf('/');
-            uri = uri.substring(lastslash == -1 ? 0 : lastslash);
+            uri = uri.substring(lastslash == -1 ? 0 : lastslash + 1);
             int copy = 0;


Input:
public void testAddJs() throws Exception {
    LinkedList<FileInfo> files = new LinkedList<FileInfo>();
    String lcovSource = "String_Node_Str";
    List<FileInfo> processed = new CoverageJsAdder(new FileLoaderStub(lcovSource)).processDependencies(files);
    FileInfo lcov = processed.get(0);
    assertEquals(new LoadedFileInfo(CoverageJsAdder.LCOV_JS, -1, false, false, lcovSource), lcov);
    assertEquals(lcovSource, lcov.getData());
    assertFalse(lcov.canLoad());
}

Output:
     String lcovSource = "String_Node_Str";
-    List<FileInfo> processed = new CoverageJsAdder(new FileLoaderStub(lcovSource)).processDependencies(files);
+    List<FileInfo> processed = new CoverageJsAdder(new FileLoaderStub(lcovSource)).processPlugins(files);
     FileInfo lcov = processed.get(0);


Input:
public void postWindowOpen() {
    this.getWindowConfigurer().getWindow().getShell().setMaximized(true);
    super.postWindowOpen();
    ChangePerspectiveAction.getAction().switchTitle();
    ITDQRepositoryService tdqRepositoryService = (ITDQRepositoryService) org.talend.core.GlobalServiceRegister.getDefault().getService(ITDQRepositoryService.class);
    if (tdqRepositoryService != null) {
        tdqRepositoryService.addPartListener();
        tdqRepositoryService.addSoftwareSystemUpdateListener();
    }
    IWorkbenchWindowConfigurer workbenchWindowConfigurer = getWindowConfigurer();
    PreferenceManager preferenceManager = workbenchWindowConfigurer.getWindow().getWorkbench().getPreferenceManager();
    preferenceManager.remove("String_Node_Str" + WorkbenchPlugin.PREFERENCE_PAGE_CATEGORY_SEPARATOR + "String_Node_Str");
    IActionBarConfigurer actionBarConfigurer = workbenchWindowConfigurer.getActionBarConfigurer();
    ICoolBarManager coolBarManager = actionBarConfigurer.getCoolBarManager();
    IContributionItem toolBarItem = coolBarManager.find("String_Node_Str");
    if (toolBarItem != null) {
        coolBarManager.remove(toolBarItem);
    }
    IMenuManager menuManager = actionBarConfigurer.getMenuManager();
    IContributionItem[] menuItems = menuManager.getItems();
    for (IContributionItem menuItem : menuItems) {
        if ("String_Node_Str".equals(menuItem.getId()) || "String_Node_Str".equals(menuItem.getId())) {
            menuManager.remove(menuItem);
        }
    }
    IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    if (activePage != null && CheatSheetUtils.getInstance().isFirstTime() && activePage.getPerspective().getId().equals(ProductUtils.PERSPECTIVE_DQ_ID)) {
        if (!(activePage.getActivePart() instanceof org.eclipse.ui.internal.ViewIntroAdapterPart)) {
            CheatSheetUtils.getInstance().findAndmaxDisplayCheatSheet("String_Node_Str");
        }
    }
}

Output:
     }
-    IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-    if (activePage != null && CheatSheetUtils.getInstance().isFirstTime() && activePage.getPerspective().getId().equals(ProductUtils.PERSPECTIVE_DQ_ID)) {
-        if (!(activePage.getActivePart() instanceof org.eclipse.ui.internal.ViewIntroAdapterPart)) {
-            CheatSheetUtils.getInstance().findAndmaxDisplayCheatSheet("String_Node_Str");
-        }
+    ITDQRepositoryService tdqRepositoryService = (ITDQRepositoryService) org.talend.core.GlobalServiceRegister.getDefault().getService(ITDQRepositoryService.class);
+    if (tdqRepositoryService != null) {
+        tdqRepositoryService.addPartListener();
+        tdqRepositoryService.addSoftwareSystemUpdateListener();
     }


Input:
private PartitionRuntimeState collectNextPartitionState(Iterator<Map.Entry<Member, Future<PartitionRuntimeState>>> iter) {
    Map.Entry<Member, Future<PartitionRuntimeState>> next = iter.next();
    Member member = next.getKey();
    Future<PartitionRuntimeState> future = next.getValue();
    boolean collectedState = true;
    try {
        PartitionRuntimeState state = future.get(FETCH_PARTITION_STATE_SECONDS, TimeUnit.SECONDS);
        if (state == null) {
            logger.fine("String_Node_Str" + member);
        } else {
            logger.fine("String_Node_Str" + state.getVersion() + "String_Node_Str" + member);
        }
        return state;
    } catch (InterruptedException e) {
        logger.fine("String_Node_Str");
        Thread.currentThread().interrupt();
    } catch (TimeoutException e) {
        collectedState = false;
        next.setValue(fetchPartitionState(member));
    } catch (Exception e) {
        Level level = Level.SEVERE;
        if ((e instanceof MemberLeftException) || (e.getCause() instanceof TargetNotMemberException)) {
            level = Level.FINE;
        }
        logger.log(level, "String_Node_Str" + member, e);
    } finally {
        if (collectedState) {
            iter.remove();
        }
    }
    return null;
}

Output:
     try {
-        PartitionRuntimeState state = future.get(FETCH_PARTITION_STATE_SECONDS, TimeUnit.SECONDS);
+        PartitionRuntimeState state = future.get(FETCH_PARTITION_STATE_SECONDS, SECONDS);
         if (state == null) {


Input:
protected void changeState() {
    grid.hitWithArrowAt(super.getX(), super.getY(), hitStrength);
}

Output:
 protected void changeState() {
-    grid.hitWithArrowAt(super.getX(), super.getY(), hitStrength);
+    grid.hitWithArrowAt(this);
 }


Input:
public void onReceivePacket(ByteArrayDataInput data, EntityPlayer player, Object... extra) {
    try {
        if (!super.simplePacket(id, data, player)) {
            if (id.equalsIgnoreCase("String_Node_Str")) {
                this.setEnergy(ForgeDirection.UNKNOWN, data.readLong());
                this.frequency = data.readShort();
                this.mode = data.readByte();
                this.isInverted = data.readBoolean();
                this.minCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
                this.maxCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
            } else if (id.equalsIgnoreCase("String_Node_Str")) {
                this.mode = data.readByte();
            } else if (id.equalsIgnoreCase("String_Node_Str")) {
                this.frequency = data.readShort();
            } else if (id.equalsIgnoreCase("String_Node_Str")) {
                this.minCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
            } else if (id.equalsIgnoreCase("String_Node_Str")) {
                this.maxCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
            }
        } else {
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

Output:
     try {
-        if (!super.simplePacket(id, data, player)) {
-            if (id.equalsIgnoreCase("String_Node_Str")) {
-                this.setEnergy(ForgeDirection.UNKNOWN, data.readLong());
-                this.frequency = data.readShort();
-                this.mode = data.readByte();
-                this.isInverted = data.readBoolean();
-                this.minCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
-                this.maxCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
-            } else if (id.equalsIgnoreCase("String_Node_Str")) {
-                this.mode = data.readByte();
-            } else if (id.equalsIgnoreCase("String_Node_Str")) {
-                this.frequency = data.readShort();
-            } else if (id.equalsIgnoreCase("String_Node_Str")) {
-                this.minCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
-            } else if (id.equalsIgnoreCase("String_Node_Str")) {
-                this.maxCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
-            }
-        } else {
+        switch(data.readInt()) {
+            case -1:
+                {
+                    if (data.readBoolean()) {
+                        this.playersUsing.add(player);
+                    } else {
+                        this.playersUsing.remove(player);
+                    }
+                }
+            case 0:
+                {
+                    this.setEnergy(ForgeDirection.UNKNOWN, data.readLong());
+                    this.frequency = data.readShort();
+                    this.mode = data.readByte();
+                    this.isInverted = data.readBoolean();
+                    this.minCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
+                    this.maxCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
+                    break;
+                }
+            case 1:
+                {
+                    this.mode = data.readByte();
+                    break;
+                }
+            case 2:
+                {
+                    this.frequency = data.readShort();
+                    break;
+                }
+            case 3:
+                {
+                    this.minCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
+                    break;
+                }
+            case 4:
+                {
+                    this.maxCoord = new Vector3(Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())), Math.max(0, Math.min(MAX_DISTANCE, data.readInt())));
+                    break;
+                }
         }


Input:
private void loadDefaults() {
    setAllowBrowser(DEFAULT_ALLOW_BROWSER);
    setMaxTTL(DEFAULT_MAX_TTL);
    setSoftMaxTTL(DEFAULT_SOFT_MAX_TTL);
    setTTL(DEFAULT_TTL);
    setMaxLength(DEFAULT_MAX_LENGTH);
    setTimeout(DEFAULT_TIMEOUT);
    setHostList(DEFAULT_HOST_LIST);
    setKeepAlive(DEFAULT_KEEP_ALIVE);
    setPort(DEFAULT_PORT);
    setConnectionSpeed(DEFAULT_SPEED);
    setUploadSpeed(DEFAULT_UPLOAD_SPEED);
    setSearchLimit(DEFAULT_SEARCH_LIMIT);
    setClientID((new GUID(Message.makeGuid())).toHexString());
    setMaxIncomingConnections(DEFAULT_MAX_INCOMING_CONNECTION);
    setBannedIps(DEFAULT_BANNED_IPS);
    setBannedWords(DEFAULT_BANNED_WORDS);
    setFilterAdult(DEFAULT_FILTER_ADULT);
    setFilterDuplicates(DEFAULT_FILTER_DUPLICATES);
    setFilterVbs(DEFAULT_FILTER_VBS);
    setFilterHtml(DEFAULT_FILTER_HTML);
    setFilterGreedyQueries(DEFAULT_FILTER_GREEDY_QUERIES);
    setExtensions(DEFAULT_EXTENSIONS);
    setBannedIps(SettingsInterface.DEFAULT_BANNED_IPS);
    setBannedWords(SettingsInterface.DEFAULT_BANNED_WORDS);
    setFilterAdult(SettingsInterface.DEFAULT_FILTER_ADULT);
    setFilterDuplicates(SettingsInterface.DEFAULT_FILTER_DUPLICATES);
    setFilterVbs(SettingsInterface.DEFAULT_FILTER_VBS);
    setFilterHtml(SettingsInterface.DEFAULT_FILTER_HTML);
    setFilterGreedyQueries(DEFAULT_FILTER_GREEDY_QUERIES);
    setFilterBearShareQueries(SettingsInterface.DEFAULT_FILTER_BEARSHARE_QUERIES);
    setUseQuickConnect(DEFAULT_USE_QUICK_CONNECT);
    setQuickConnectHosts(DEFAULT_QUICK_CONNECT_HOSTS);
    setParallelSearchMax(DEFAULT_PARALLEL_SEARCH);
    setClearCompletedUpload(DEFAULT_CLEAR_UPLOAD);
    setClearCompletedDownload(DEFAULT_CLEAR_DOWNLOAD);
    setMaxSimDownload(DEFAULT_MAX_SIM_DOWNLOAD);
    setPromptExeDownload(DEFAULT_PROMPT_EXE_DOWNLOAD);
    setMaxUploads(DEFAULT_MAX_UPLOADS);
    setSearchAnimationTime(DEFAULT_SEARCH_ANIMATION_TIME);
    setConnectString(DEFAULT_CONNECT_STRING);
    setConnectOkString(DEFAULT_CONNECT_OK_STRING);
    setCheckAgain(DEFAULT_CHECK_AGAIN);
    setBasicInfoForQuery(DEFAULT_BASIC_INFO_FOR_QUERY);
    setAdvancedInfoForQuery(DEFAULT_ADVANCED_INFO_FOR_QUERY);
    setForceIPAddress(DEFAULT_FORCE_IP_ADDRESS);
    setForcedIPAddress(DEFAULT_FORCED_IP_ADDRESS);
    setForcedIPAddressString(DEFAULT_FORCED_IP_ADDRESS_STRING);
    setForcedPort(DEFAULT_FORCED_PORT);
    setFreeloaderFiles(DEFAULT_FREELOADER_FILES);
    setFreeloaderAllowed(DEFAULT_FREELOADER_ALLOWED);
    setUploadsPerPerson(DEFAULT_UPLOADS_PER_PERSON);
    setAverageUptime(DEFAULT_AVERAGE_UPTIME);
    setTotalUptime(DEFAULT_TOTAL_UPTIME);
    setSessions(DEFAULT_SESSIONS);
    setInstalled(DEFAULT_INSTALLED);
    setRunOnce(DEFAULT_RUN_ONCE);
    setShowTrayDialog(DEFAULT_SHOW_TRAY_DIALOG);
    setMinimizeToTray(DEFAULT_MINIMIZE_TO_TRAY);
    setShowCloseDialog(DEFAULT_SHOW_CLOSE_DIALOG);
    setLimeWireJarName(DEFAULT_LIME_WIRE_JAR_NAME);
}

Output:
     setShowCloseDialog(DEFAULT_SHOW_CLOSE_DIALOG);
-    setLimeWireJarName(DEFAULT_LIME_WIRE_JAR_NAME);
+    setClassPath(DEFAULT_CLASSPATH);
 }


Input:
String getProgress() {
    String numberS = driver.findElement(By.id(idNumber)).getText();
    String missingS = driver.findElement(By.id(idMissing)).getText();
    return "String_Node_Str" + numberS + "String_Node_Str" + missingS;
}

Output:
 String getProgress() {
-    String numberS = driver.findElement(By.id(idNumber)).getText();
-    String missingS = driver.findElement(By.id(idMissing)).getText();
-    return "String_Node_Str" + numberS + "String_Node_Str" + missingS;
+    driver.findElement(By.linkText("String_Node_Str")).click();
+    driver.findElement(By.linkText("String_Node_Str")).click();
+    final String progressS = "String_Node_Str";
+    Pattern progressP = Pattern.compile(progressS, Pattern.DOTALL);
+    WebElement webElement = driver.findElement(By.tagName("String_Node_Str"));
+    if (webElement != null) {
+        Matcher matcher = progressP.matcher(webElement.getText());
+        if (matcher.matches()) {
+            return "String_Node_Str" + matcher.group(1) + "String_Node_Str" + total;
+        }
+    }
+    return null;
 }


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

Output:
     if (chatTabbedPane != null) {
-        if (chatTabbedPane.getSelectedIndex() != 0) {
-            ChatWindow.this.chatTabbedPane.setSelectedIndex(chatTabbedPane.getSelectedIndex() - 1);
+        int selectedIndex = chatTabbedPane.getSelectedIndex();
+        if (selectedIndex != 0) {
+            setSelectedContactTab(selectedIndex - 1);
         } else {


Input:
public GroupInfo getGroupById(Object id) {
    this.lock.lock();
    try {
        return getGroup(getPlot(id));
    } finally {
        this.lock.unlock();
    }
}

Output:
     try {
-        return getGroup(getPlot(id));
+        return (GroupInfo) getPlot(groupId);
     } finally {


Input:
private void removeParamBindingsFor(String paramName) throws PropertyValueException {
    if (paramName == null)
        return;
    Iterator iter = getElementHandle().clientsIterator();
    while (iter.hasNext()) {
        DesignElementHandle client = (DesignElementHandle) iter.next();
        PropertyHandle paramBindingsPropHandle = client.getPropertyHandle(ReportItem.PARAM_BINDINGS_PROP);
        removeParamBindingFor(paramBindingsPropHandle, paramName);
        PropertyHandle actionPropHandle = client.getPropertyHandle(ImageItem.ACTION_PROP);
        if (actionPropHandle != null) {
            Action action = (Action) actionPropHandle.getValue();
            ActionHandle actionHandle = (ActionHandle) action.getHandle(actionPropHandle);
            MemberHandle paramBindingsMemberHandle = actionHandle.getMember(Action.PARAM_BINDINGS_MEMBER);
            removeParamBindingFor(paramBindingsMemberHandle, paramName);
        }
    }
    PropertyHandle paramBindingsPropHandle = getElementHandle().getPropertyHandle(PARAM_BINDINGS_PROP);
    removeParamBindingFor(paramBindingsPropHandle, paramName);
}

Output:
             Action action = (Action) actionPropHandle.getValue();
-            ActionHandle actionHandle = (ActionHandle) action.getHandle(actionPropHandle);
-            MemberHandle paramBindingsMemberHandle = actionHandle.getMember(Action.PARAM_BINDINGS_MEMBER);
-            removeParamBindingFor(paramBindingsMemberHandle, paramName);
+            if (action != null) {
+                ActionHandle actionHandle = (ActionHandle) action.getHandle(actionPropHandle);
+                MemberHandle paramBindingsMemberHandle = actionHandle.getMember(Action.PARAM_BINDINGS_MEMBER);
+                removeParamBindingFor(paramBindingsMemberHandle, paramName);
+            }
         }


Input:
private void translateSupremeCourt(SolrDocument document, JudgmentSearchResult result) {
    String personnelType = fieldFetcher.fetchValue(document, JudgmentIndexField.SC_PERSONNEL_TYPE);
    result.setPersonnelType(personnelType);
    List<Pair<String, List<String>>> chambers = fieldFetcher.fetchValuesWithAttributes(document, JudgmentIndexField.SC_CHAMBER);
    List<SupremeCourtChamberResult> chambersResult = Lists.newLinkedList();
    chambers.forEach(x -> chambersResult.add(new SupremeCourtChamberResult(Integer.valueOf(x.getLeft()), x.getRight().get(0))));
    result.setCourtChambers(chambersResult);
    Integer divisionId = fieldFetcher.fetchIntValue(document, JudgmentIndexField.SC_DIVISION_ID);
    String divisionName = fieldFetcher.fetchValue(document, JudgmentIndexField.SC_DIVISION_NAME);
    result.setCourtChamberDivisionId(divisionId);
    result.setCourtChamberDivisionName(divisionName);
}

Output:
     List<SupremeCourtChamberResult> chambersResult = Lists.newLinkedList();
-    chambers.forEach(x -> chambersResult.add(new SupremeCourtChamberResult(Integer.valueOf(x.getLeft()), x.getRight().get(0))));
+    chambers.stream().filter(x -> x.getRight().size() > 0).forEach(x -> chambersResult.add(new SupremeCourtChamberResult(Integer.parseInt(x.getLeft()), x.getRight().get(0))));
     result.setCourtChambers(chambersResult);


Input:
public static void retrievePluginPageContents(HandlerContext handlerCtx) {
    String id = (String) handlerCtx.getInputValue("String_Node_Str");
    UIComponent comp = handlerCtx.getFacesContext().getViewRoot().findComponent(id);
    String urlContents = "String_Node_Str";
    if (comp != null) {
        String url = (String) comp.getAttributes().get(NavigationNodeFactory.REAL_URL);
        try {
            URL contentUrl = FileUtil.searchForFile(url, null);
            if (contentUrl == null) {
                throw new IOException("String_Node_Str" + url);
            }
            urlContents = new String(FileUtil.readFromURL(contentUrl));
        } catch (IOException ex) {
            Logger.getLogger(PluginHandlers.class.getName()).log(Level.SEVERE, "String_Node_Str" + url, ex);
        }
    }
    handlerCtx.setOutputValue("String_Node_Str", urlContents);
}

Output:
         } catch (IOException ex) {
-            Logger.getLogger(PluginHandlers.class.getName()).log(Level.SEVERE, "String_Node_Str" + url, ex);
+            GuiUtil.getLogger().log(Level.SEVERE, "String_Node_Str" + url, ex);
         }


Input:
public boolean addStackToInventory(ItemStack stack) {
    boolean success = false;
    if (!this.worldObj.isRemote) {
        if (this.hasLockedSeed() && SeedHelper.isAnalyzedSeed(stack) && this.lockedSeed == stack.getItem() && this.lockedSeedMeta == stack.getItemDamage()) {
            int lastId = 0;
            for (Map.Entry<Integer, SeedStorageSlot> entry : this.slots.entrySet()) {
                lastId = entry.getKey() > lastId ? entry.getKey() : lastId;
                if (entry.getValue() != null) {
                    if (ItemStack.areItemStackTagsEqual(entry.getValue().getStack(this.lockedSeed, this.lockedSeedMeta), stack)) {
                        this.setInventorySlotContents(entry.getKey(), stack);
                        success = true;
                        break;
                    }
                }
            }
            if (!success) {
                this.setInventorySlotContents(lastId + 1, stack);
                success = true;
            }
        }
    }
    return success;
}

Output:
             if (!success) {
-                this.setInventorySlotContents(lastId + 1, stack);
+                if (this.slots.size() == 0) {
+                    this.setInventorySlotContents(0, stack);
+                } else {
+                    this.setInventorySlotContents(lastId + 1, stack);
+                }
                 success = true;


Input:
public int stringToBinary(String opcode, String firstRegister, String addressingMode, String address, String otherRegister) {
    boolean allOk = true;
    int opcodeAsInt = getOpcode(opcode);
    int firstRegisterAsInt = getRegisterId(firstRegister);
    int addressingModeAsInt = getAddressingMode(addressingMode);
    int addressAsInt = 0;
    int secondRegisterIdAsInt = getRegisterId(otherRegister);
    if (address.equals("String_Node_Str"))
        address = "String_Node_Str";
    try {
        addressAsInt = Integer.parseInt(address);
    } catch (NumberFormatException e) {
        allOk = false;
    }
    if (opcodeAsInt < 0) {
        allOk = false;
    }
    if (firstRegisterAsInt < 0) {
        allOk = false;
    }
    if (addressingModeAsInt < 0) {
        allOk = false;
    }
    if (secondRegisterIdAsInt < 0) {
        allOk = false;
    }
    if (allOk) {
        if (opcodeAsInt == 1 || (opcodeAsInt >= 32 && opcodeAsInt <= 44)) {
            addressingModeAsInt = addressingModeAsInt - 1;
            if (addressingModeAsInt == -1) {
                ++addressingModeAsInt;
            }
        }
        String binary = intToBinary(opcodeAsInt, 8) + intToBinary(firstRegisterAsInt, 3) + intToBinary(addressingModeAsInt, 2) + intToBinary(secondRegisterIdAsInt, 3) + intToBinary(addressAsInt, 16);
        return binaryToInt(binary, true);
    }
    return -1;
}

Output:
     if (firstRegisterAsInt < 0) {
-        allOk = false;
+        firstRegisterAsInt = 0;
     }


Input:
protected Response getDescriptorMetadata(String version, String persistenceUnit, String descriptorAlias, HttpHeaders hh, URI baseURI) {
    PersistenceContext app = getPersistenceContext(persistenceUnit, baseURI, version, null);
    if (app == null) {
        JPARSLogger.fine("String_Node_Str", new Object[] { persistenceUnit });
        return Response.status(Status.NOT_FOUND).type(StreamingOutputMarshaller.getResponseMediaType(hh)).build();
    } else {
        ClassDescriptor descriptor = app.getJpaSession().getDescriptorForAlias(descriptorAlias);
        if (descriptor == null) {
            JPARSLogger.fine("String_Node_Str", new Object[] { descriptorAlias, persistenceUnit });
            return Response.status(Status.NOT_FOUND).type(StreamingOutputMarshaller.getResponseMediaType(hh)).build();
        } else {
            String mediaType = StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
            Descriptor returnDescriptor = buildDescriptor(app, persistenceUnit, descriptor, baseURI.toString(), version);
            String result = null;
            try {
                result = marshallMetadata(returnDescriptor, mediaType);
            } catch (JAXBException e) {
                JPARSLogger.fine("String_Node_Str", new Object[] { descriptorAlias, persistenceUnit, e.toString() });
                return Response.status(Status.INTERNAL_SERVER_ERROR).type(StreamingOutputMarshaller.getResponseMediaType(hh)).build();
            }
            return Response.ok(new StreamingOutputMarshaller(null, result, hh.getAcceptableMediaTypes())).build();
        }
    }
}

Output:
             String mediaType = StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
-            Descriptor returnDescriptor = buildDescriptor(app, persistenceUnit, descriptor, baseURI.toString(), version);
+            Descriptor returnDescriptor = buildDescriptor(app, persistenceUnit, descriptor, baseURI.toString());
             String result = null;


Input:
private DesignElement resolveNativeElement(String elementName, int nameSpace) {
    ElementRefValue refValue = moduleNameSpaces[nameSpace].resolve(elementName, null);
    return refValue.getElement();
}

Output:
 private DesignElement resolveNativeElement(String elementName, int nameSpace) {
-    ElementRefValue refValue = moduleNameSpaces[nameSpace].resolve(elementName, null);
-    return refValue.getElement();
+    NameSpace namespace = nameSpaces[nameSpace];
+    return namespace.getElement(elementName);
 }


Input:
public static void updateIcon() {
    if (instance != null) {
        if (instance.icon != null) {
            instance.icon.killAndErase();
            instance.icon = null;
        }
        if (action != null) {
            instance.icon = action.getIcon();
            instance.needsLayout = true;
        }
    }
}

Output:
     if (instance != null) {
-        if (instance.icon != null) {
-            instance.icon.killAndErase();
-            instance.icon = null;
-        }
-        if (action != null) {
-            instance.icon = action.getIcon();
-            instance.needsLayout = true;
+        synchronized (instance) {
+            if (instance.icon != null) {
+                instance.icon.killAndErase();
+                instance.icon = null;
+            }
+            if (action != null) {
+                instance.icon = action.getIcon();
+                instance.needsLayout = true;
+            }
         }


Input:
private void drawLayoutOutline(Canvas canvas) {
    canvas.drawRect(getPaddingLeft(), 1 + getPaddingTop(), getWidth() - getPaddingLeft() - getPaddingRight() - 1, getHeight() - getPaddingTop() - getPaddingBottom() - 1, outlinePaint);
}

Output:
 private void drawLayoutOutline(Canvas canvas) {
-    canvas.drawRect(getPaddingLeft(), 1 + getPaddingTop(), getWidth() - getPaddingLeft() - getPaddingRight() - 1, getHeight() - getPaddingTop() - getPaddingBottom() - 1, outlinePaint);
+    canvas.drawRect(getPaddingLeft(), getPaddingTop(), getWidth() - getPaddingRight() - 1, getHeight() - getPaddingBottom() - 1, outlinePaint);
 }


Input:
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((highPort == null) ? 0 : highPort.hashCode());
    result = prime * result + ((lowPort == null) ? 0 : lowPort.hashCode());
    result = prime * result + ((protocol == null) ? 0 : protocol.hashCode());
    return result;
}

Output:
     int result = 1;
-    result = prime * result + ((highPort == null) ? 0 : highPort.hashCode());
-    result = prime * result + ((lowPort == null) ? 0 : lowPort.hashCode());
-    result = prime * result + ((protocol == null) ? 0 : protocol.hashCode());
+    result = prime * result + ((this.highPort == null) ? 0 : this.highPort.hashCode());
+    result = prime * result + ((this.lowPort == null) ? 0 : this.lowPort.hashCode());
+    result = prime * result + ((this.protocol == null) ? 0 : this.protocol.hashCode());
     return result;


Input:
public static boolean compareBytes(char[] inputBytes, char[] compareBytes) {
    int inputBytesT = inputBytes.length;
    int compareBytesT = compareBytes.length;
    if (compareBytesT != inputBytesT)
        return false;
    if (compareBytes[0] != inputBytes[0])
        return false;
    if (compareBytes[compareBytesT - 1] != inputBytes[compareBytesT - 1])
        return false;
    switch(compareBytesT) {
        case 3:
            return compareBytes[1] == inputBytes[1];
        case 4:
            return compareBytes[1] == inputBytes[1] && compareBytes[2] == inputBytes[2];
        case 5:
            return compareBytes[1] == inputBytes[1] && compareBytes[2] == inputBytes[2] && compareBytes[3] == inputBytes[3];
        case 6:
            return compareBytes[1] == inputBytes[1] && compareBytes[3] == inputBytes[3] && compareBytes[2] == inputBytes[2] && compareBytes[4] == inputBytes[4];
        case 7:
        case 8:
        case 9:
        case 10:
        case 11:
        case 12:
        case 13:
        case 14:
        case 15:
        case 16:
        case 17:
        case 18:
        case 19:
        case 20:
        case 21:
        case 22:
        case 23:
        case 24:
        case 25:
        case 26:
        case 27:
        case 28:
        case 29:
        case 30:
            for (int i = 0; i < compareBytesT - 1; i++) {
                if (compareBytes[i] != inputBytes[i])
                    return false;
            }
            break;
        case 31:
            for (int a = 1; a <= 6; a++) {
                if (!(compareBytes[a] == inputBytes[a] && compareBytes[a + 6] == inputBytes[a + 6] && compareBytes[a + 12] == inputBytes[a + 12] && compareBytes[a + 18] == inputBytes[a + 18] && compareBytes[a + 24] == inputBytes[a + 24]))
                    return false;
            }
            break;
        default:
            for (int i = 0; i < compareBytesT - 1; i++) {
                if (compareBytes[i] != inputBytes[i])
                    return false;
            }
    }
    return true;
}

Output:
         default:
-            for (int i = 0; i < compareBytesT - 1; i++) {
+            compareBytesT--;
+            for (int i = 0; i < compareBytesT; i++) {
                 if (compareBytes[i] != inputBytes[i])


Input:
protected void pathAborted(ShortPoint2D pathTarget) {
    state = ESoldierState.AGGRESSIVE;
}

Output:
 protected void pathAborted(ShortPoint2D pathTarget) {
-    state = ESoldierState.AGGRESSIVE;
+    switch(state) {
+        case INIT_GOTO_TOWER:
+        case GOING_TO_TOWER:
+            notifyTowerThatRequestFailed();
+            break;
+        default:
+            state = ESoldierState.AGGRESSIVE;
+            break;
+    }
 }


Input:
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
    String selectedItemTag = v.getTag().toString();
    if (selectedItemTag.equals("String_Node_Str")) {
        return;
    }
    String selectedItemText = ((TextView) v).getText().toString();
    int buttonId = Integer.parseInt((parent.getTag().toString()));
    Button buttonView = (Button) findViewById(buttonId);
    buttonView.setText(selectedItemText);
    boolean b_need_restart_audio;
    SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
    SharedPreferences.Editor editor = sharedPref.edit();
    switch(buttonId) {
        case R.id.button_sample_rate:
            analyzerViews.popupMenuSampleRate.dismiss();
            if (!isLockViewRange) {
                viewRangeArray = analyzerViews.graphView.getViewPhysicalRange();
                if (viewRangeArray[0] == viewRangeArray[6]) {
                    viewRangeArray[0] = 0;
                }
                if (viewRangeArray[1] == viewRangeArray[6 + 1]) {
                    viewRangeArray[1] = Integer.parseInt(selectedItemTag) / 2;
                }
                Log.i(TAG, "String_Node_Str" + viewRangeArray[0] + "String_Node_Str" + viewRangeArray[1]);
            }
            analyzerParam.sampleRate = Integer.parseInt(selectedItemTag);
            b_need_restart_audio = true;
            editor.putInt("String_Node_Str", analyzerParam.sampleRate);
            break;
        case R.id.button_fftlen:
            analyzerViews.popupMenuFFTLen.dismiss();
            analyzerParam.fftLen = Integer.parseInt(selectedItemTag);
            b_need_restart_audio = true;
            editor.putInt("String_Node_Str", analyzerParam.fftLen);
            break;
        case R.id.button_average:
            analyzerViews.popupMenuAverage.dismiss();
            analyzerParam.nFFTAverage = Integer.parseInt(selectedItemTag);
            if (analyzerViews.graphView != null) {
                analyzerViews.graphView.setTimeMultiplier(analyzerParam.nFFTAverage);
            }
            b_need_restart_audio = false;
            editor.putInt("String_Node_Str", analyzerParam.nFFTAverage);
            break;
        default:
            Log.w(TAG, "String_Node_Str");
            b_need_restart_audio = false;
    }
    editor.apply();
    if (b_need_restart_audio) {
        restartSampling(analyzerParam);
    }
}

Output:
     }
-    editor.apply();
+    editor.commit();
     if (b_need_restart_audio) {


Input:
public String getMediaPaths() {
    return mediaPaths;
}

Output:
 public String getMediaPaths() {
-    return mediaPaths;
+    return StringUtils.notNullStr(mediaPaths);
 }


Input:
protected void onFailure(final APIFailureType type) {
    final RRError error = General.getGeneralErrorForFailure(context, type);
    General.UI_THREAD_HANDLER.post(new Runnable() {

        public void run() {
            General.showResultDialog(CommentEditActivity.this, error);
            if (progressDialog.isShowing())
                progressDialog.dismiss();
        }
    });
}

Output:
     final RRError error = General.getGeneralErrorForFailure(context, type);
-    General.UI_THREAD_HANDLER.post(new Runnable() {
+    AndroidApi.UI_THREAD_HANDLER.post(new Runnable() {


Input:
public void onItemClicked(View view, QBChatDialog chatDialog, int position) {
    if (QBDialogType.PRIVATE.equals(chatDialog.getType())) {
        startPrivateChatActivity(chatDialog);
    } else {
        startGroupChatActivity(chatDialog);
    }
}

Output:
     } else {
-        startGroupChatActivity(chatDialog);
+        startGroupChatActivity(dialogSearchWrapper.getChatDialog());
     }