Input:
private Chart getConvertedChart(Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension) {
    Chart helperModel = currentChart.copyInstance();
    ChartDimension oldDimension = currentChart.getDimension();
    ChartCacheManager.getInstance().cacheSeries(ChartUIUtil.getAllOrthogonalSeriesDefinitions(helperModel));
    if ((currentChart instanceof ChartWithAxes)) {
        if (!currentChart.getType().equals(fsTypeLiteral)) {
            currentChart.setType(fsTypeLiteral);
            currentChart.setSubType(sNewSubType);
            currentChart.getTitle().getLabel().getCaption().setValue(getDefaultTitle());
            ArrayList<AxisType> axisTypes = new ArrayList<AxisType>();
            EList<Axis> axes = ((ChartWithAxes) currentChart).getAxes().get(0).getAssociatedAxes();
            for (int i = 0, seriesIndex = 0; i < axes.size(); i++) {
                if (!ChartPreviewPainterBase.isLivePreviewActive() && !isNumbericAxis(axes.get(i))) {
                    axes.get(i).setType(AxisType.LINEAR_LITERAL);
                }
                axes.get(i).setPercent(sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL));
                EList<SeriesDefinition> seriesdefinitions = axes.get(i).getSeriesDefinitions();
                for (int j = 0; j < seriesdefinitions.size(); j++) {
                    Series series = seriesdefinitions.get(j).getDesignTimeSeries();
                    series = getConvertedSeries(series, seriesIndex++);
                    if (!ChartPreviewPainterBase.isLivePreviewActive() && !isNumbericAxis(axes.get(i))) {
                        axes.get(i).setType(AxisType.LINEAR_LITERAL);
                    }
                    boolean isStacked = (sNewSubType.equalsIgnoreCase(STACKED_SUBTYPE_LITERAL) || sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL));
                    series.setStacked(isStacked);
                    seriesdefinitions.get(j).getSeries().clear();
                    seriesdefinitions.get(j).getSeries().add(series);
                    axisTypes.add(axes.get(i).getType());
                }
            }
            currentChart.setSampleData(getConvertedSampleData(currentChart.getSampleData(), ((ChartWithAxes) currentChart).getAxes().get(0).getType(), axisTypes));
        } else {
            EList<Axis> axes = ((ChartWithAxes) currentChart).getAxes().get(0).getAssociatedAxes();
            for (int i = 0, seriesIndex = 0; i < axes.size(); i++) {
                if (!currentChart.getSubType().equals(sNewSubType)) {
                    if (sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL)) {
                        if (!ChartPreviewPainterBase.isLivePreviewActive() && !isNumbericAxis(axes.get(i))) {
                            axes.get(i).setType(AxisType.LINEAR_LITERAL);
                        }
                        axes.get(i).setPercent(true);
                    } else {
                        axes.get(i).setPercent(false);
                    }
                }
                EList seriesdefinitions = (axes.get(i)).getSeriesDefinitions();
                Series firstSeries = ((SeriesDefinition) seriesdefinitions.get(0)).getDesignTimeSeries();
                for (int j = 0; j < seriesdefinitions.size(); j++) {
                    Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries();
                    if ((sNewSubType.equalsIgnoreCase(STACKED_SUBTYPE_LITERAL) || sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL))) {
                        if (j != 0) {
                            series = getConvertedSeriesAsFirst(series, seriesIndex, firstSeries);
                        }
                        seriesIndex++;
                        if (!ChartPreviewPainterBase.isLivePreviewActive() && !isNumbericAxis(axes.get(i))) {
                            (axes.get(i)).setType(AxisType.LINEAR_LITERAL);
                        }
                        if (series.canBeStacked()) {
                            series.setStacked(true);
                        }
                        ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().clear();
                        ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().add(series);
                    } else {
                        series.setStacked(false);
                    }
                }
            }
            if (!currentChart.getSubType().equals(sNewSubType)) {
                currentChart.setSubType(sNewSubType);
            }
        }
    } else {
        currentChart = ChartWithAxesImpl.create();
        currentChart.setType(fsTypeLiteral);
        currentChart.setSubType(sNewSubType);
        ((ChartWithAxes) currentChart).setOrientation(newOrientation);
        currentChart.setDimension(ChartUIUtil.getDimensionType(sNewDimension));
        ((ChartWithAxes) currentChart).getAxes().get(0).setOrientation(Orientation.HORIZONTAL_LITERAL);
        ((ChartWithAxes) currentChart).getAxes().get(0).setCategoryAxis(true);
        ((((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).setOrientation(Orientation.VERTICAL_LITERAL);
        currentChart.setBlock(helperModel.getBlock());
        currentChart.setDescription(helperModel.getDescription());
        currentChart.setGridColumnCount(helperModel.getGridColumnCount());
        currentChart.setSampleData(helperModel.getSampleData());
        currentChart.setScript(helperModel.getScript());
        currentChart.setSeriesThickness(helperModel.getSeriesThickness());
        currentChart.setUnits(helperModel.getUnits());
        if (helperModel.getInteractivity() != null) {
            currentChart.getInteractivity().setEnable(helperModel.getInteractivity().isEnable());
            currentChart.getInteractivity().setLegendBehavior(helperModel.getInteractivity().getLegendBehavior());
        }
        {
            (((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().clear();
            (((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().add(((ChartWithoutAxes) helperModel).getSeriesDefinitions().get(0));
            ((((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().clear();
            ((((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().addAll(((((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getSeriesDefinitions());
            Series series = ((((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getDesignTimeSeries();
            ((((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getSeries().clear();
            ((((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getSeries().add(series);
            EList<SeriesDefinition> seriesdefinitions = ((((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions();
            for (int j = 0; j < seriesdefinitions.size(); j++) {
                series = (seriesdefinitions.get(j)).getDesignTimeSeries();
                series = getConvertedSeries(series, j);
                series.getLabel().setVisible(false);
                if ((sNewSubType.equalsIgnoreCase(STACKED_SUBTYPE_LITERAL) || sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL))) {
                    series.setStacked(true);
                } else {
                    series.setStacked(false);
                }
                (seriesdefinitions.get(j)).getSeries().clear();
                (seriesdefinitions.get(j)).getSeries().add(series);
            }
        }
        currentChart.getLegend().setItemType(LegendItemType.SERIES_LITERAL);
        currentChart.getTitle().getLabel().getCaption().setValue(getDefaultTitle());
    }
    if (!((ChartWithAxes) currentChart).getOrientation().equals(newOrientation)) {
        ((ChartWithAxes) currentChart).setOrientation(newOrientation);
    }
    if (!currentChart.getDimension().equals(ChartUIUtil.getDimensionType(sNewDimension))) {
        currentChart.setDimension(ChartUIUtil.getDimensionType(sNewDimension));
    }
    if (sNewDimension.equals(THREE_DIMENSION_TYPE) && ChartUIUtil.getDimensionType(sNewDimension) != oldDimension) {
        ((ChartWithAxes) currentChart).setRotation(Rotation3DImpl.create(new Angle3D[] { Angle3DImpl.create(-20, 45, 0) }));
        ((ChartWithAxes) currentChart).getPrimaryBaseAxes()[0].getAncillaryAxes().clear();
        Axis zAxisAncillary = AxisImpl.create(Axis.ANCILLARY_BASE);
        zAxisAncillary.setTitlePosition(Position.BELOW_LITERAL);
        zAxisAncillary.getTitle().getCaption().setValue(Messages.getString("String_Node_Str"));
        zAxisAncillary.getTitle().setVisible(true);
        zAxisAncillary.setPrimaryAxis(true);
        zAxisAncillary.setLabelPosition(Position.BELOW_LITERAL);
        zAxisAncillary.setOrientation(Orientation.HORIZONTAL_LITERAL);
        zAxisAncillary.getOrigin().setType(IntersectionType.MIN_LITERAL);
        zAxisAncillary.getOrigin().setValue(NumberDataElementImpl.create(0));
        zAxisAncillary.getTitle().setVisible(false);
        zAxisAncillary.setType(AxisType.TEXT_LITERAL);
        ((ChartWithAxes) currentChart).getPrimaryBaseAxes()[0].getAncillaryAxes().add(zAxisAncillary);
        SeriesDefinition sdZ = SeriesDefinitionImpl.create();
        sdZ.getSeriesPalette().shift(0);
        sdZ.getSeries().add(SeriesImpl.create());
        zAxisAncillary.getSeriesDefinitions().add(sdZ);
        if (currentChart.getSampleData().getAncillarySampleData().isEmpty()) {
            BaseSampleData sdAncillary = DataFactory.eINSTANCE.createBaseSampleData();
            sdAncillary.setDataSetRepresentation("String_Node_Str");
            currentChart.getSampleData().getAncillarySampleData().add(sdAncillary);
        }
        EList<SeriesDefinition> seriesdefinitions = ChartUIUtil.getOrthogonalSeriesDefinitions(currentChart, 0);
        for (int j = 0; j < seriesdefinitions.size(); j++) {
            Series series = seriesdefinitions.get(j).getDesignTimeSeries();
            ((BarSeries) series).setRiser(foRiserType);
            series.setStacked(false);
            if ((series instanceof BarSeries) && (series.getLabelPosition() != Position.OUTSIDE_LITERAL)) {
                series.setLabelPosition(Position.OUTSIDE_LITERAL);
            }
        }
    }
    ChartUIUtil.restoreLabelPositionFromCache(currentChart);
    return currentChart;
}

Output:
             currentChart.setSubType(sNewSubType);
-            currentChart.getTitle().getLabel().getCaption().setValue(getDefaultTitle());
+            Text title = currentChart.getTitle().getLabel().getCaption();
+            if (title.getValue() == null || title.getValue().trim().length() == 0 || title.getValue().trim().equals(oldType.getDefaultTitle().trim())) {
+                title.setValue(getDefaultTitle());
+            }
             ArrayList<AxisType> axisTypes = new ArrayList<AxisType>();


Input:
public void add(CommandInfo commandInfo) {
    synchronized (mCommands) {
        mCommands.add(commandInfo);
    }
}

Output:
     synchronized (mCommands) {
-        mCommands.add(commandInfo);
+        if (mCommands.isEmpty()) {
+            mCommands.add(commandInfo);
+        } else {
+            mCommands.add(0, commandInfo);
+        }
     }


Input:
public void mouseExited0(E event) {
    if (event == null)
        return;
    Set<GlimpseTargetStack> oldHovered = clearHovered();
    getContainingTargets(event);
    Set<GlimpseTargetStack> newHovered = getHovered();
    notifyMouseEnteredExited(event, oldHovered, newHovered);
}

Output:
         return;
-    Set<GlimpseTargetStack> oldHovered = clearHovered();
+    List<GlimpseTargetStack> oldHovered = clearHovered();
     getContainingTargets(event);


Input:
private void startLoadingNextInitial() {
    if (remainingInitialFragments == null) {
        remainingInitialFragments = new BoundedIntQueue(initialLoadSequence.length + 1);
        for (int sp : initialLoadSequence) {
            remainingInitialFragments.add(sp);
        }
        remainingInitialFragments.add(leftoversFragment());
    }
    if (initialFragmentErrorHandlers.isEmpty() && waitingForInitialFragmentsErrorHandlers.isEmpty() && remainingInitialFragments.size() > 1) {
        initialFragmentsLoading = false;
        return;
    }
    if (remainingInitialFragments.size() > 0) {
        initialFragmentsLoading = true;
        int nextSplitPoint = remainingInitialFragments.peek();
        logEventProgress(LwmLabels.downloadGroup(nextSplitPoint), LwmLabels.BEGIN, nextSplitPoint, null);
        startLoadingFragment(nextSplitPoint, new InitialFragmentDownloadFailed());
        return;
    }
    initialFragmentsLoading = false;
    assert (haveInitialFragmentsLoaded());
    assert (waitingForInitialFragments.size() == waitingForInitialFragmentsErrorHandlers.size());
    while (waitingForInitialFragments.size() > 0) {
        startLoadingFragment(waitingForInitialFragments.remove(), waitingForInitialFragmentsErrorHandlers.remove());
    }
}

Output:
         int nextSplitPoint = remainingInitialFragments.peek();
-        logEventProgress(LwmLabels.downloadGroup(nextSplitPoint), LwmLabels.BEGIN, nextSplitPoint, null);
+        logDownloadStart(nextSplitPoint);
         startLoadingFragment(nextSplitPoint, new InitialFragmentDownloadFailed());


Input:
public List<Var> constructDefinedVars() {
    return null;
}

Output:
 public List<Var> constructDefinedVars() {
-    return null;
+    return Collections.emptyList();
 }


Input:
public org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
    if (src == null)
        return null;
    org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent();
    copyElement(src, tgt);
    tgt.setCategory(convertCodeableConcept(src.getCategory()));
    tgt.setCode(convertCodeableConcept(src.getCode()));
    for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) tgt.addReasonCode(convertCodeableConcept(t));
    for (org.hl7.fhir.dstu3.model.Reference t : src.getReasonReference()) tgt.addReasonReference(convertReference(t));
    for (org.hl7.fhir.dstu3.model.Reference t : src.getGoal()) tgt.addGoal(convertReference(t));
    tgt.setStatus(convertCarePlanActivityStatus(src.getStatus()));
    tgt.setStatusReason(convertCodeableConcept(src.getStatusReason()));
    tgt.setProhibited(src.getProhibited());
    tgt.setScheduled(convertType(src.getScheduled()));
    tgt.setLocation(convertReference(src.getLocation()));
    for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) tgt.addPerformer(convertReference(t));
    tgt.setProduct(convertType(src.getProduct()));
    tgt.setDailyAmount(convertSimpleQuantity(src.getDailyAmount()));
    tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
    tgt.setDescription(src.getDescription());
    return tgt;
}

Output:
 public org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
-    if (src == null)
+    if (src == null || src.isEmpty())
         return null;


Input:
public void processRequest() throws Exception {
    FormProcessor fp = new FormProcessor(request);
    ub.incNumVisitsToMainMenu();
    session.setAttribute(USER_BEAN_NAME, ub);
    request.setAttribute("String_Node_Str", true);
    request.setAttribute("String_Node_Str", false);
    if (ub == null || ub.getId() == 0) {
        forwardPage(Page.MENU, false);
        return;
    }
    StudyDAO sdao = new StudyDAO(sm.getDataSource());
    ArrayList studies = null;
    long pwdExpireDay = new Long(SQLInitServlet.getField("String_Node_Str")).longValue();
    Date lastPwdChangeDate = ub.getPasswdTimestamp();
    int pwdChangeRequired = new Integer(SQLInitServlet.getField("String_Node_Str")).intValue();
    UserAccountDAO udao = new UserAccountDAO(sm.getDataSource());
    UserAccountBean ub1 = (UserAccountBean) udao.findByPK(ub.getId());
    ub1.setLastVisitDate(new Date(System.currentTimeMillis()));
    ub1.setOwner(ub1);
    ub1.setUpdater(ub1);
    udao.update(ub1);
    if (currentStudy != null) {
        request.setAttribute("String_Node_Str", currentStudy.getId());
        request.setAttribute("String_Node_Str", super.getEventDefinitionsByCurrentStudy());
        request.setAttribute("String_Node_Str", super.getStudyGroupClassesByCurrentStudy());
    }
    if (ub.isLdapUser()) {
        lastPwdChangeDate = new Date();
    }
    logger.info("String_Node_Str" + ub.isLdapUser());
    if ((lastPwdChangeDate != null) || ((lastPwdChangeDate == null) && (pwdChangeRequired == 0))) {
        if (lastPwdChangeDate != null) {
            Calendar cal = Calendar.getInstance();
            long difference = Math.abs(cal.getTime().getTime() - lastPwdChangeDate.getTime());
            long days = difference / (1000 * 60 * 60 * 24);
            session.setAttribute("String_Node_Str", "String_Node_Str");
            if (!ub.isLdapUser() && pwdExpireDay > 0 && days >= pwdExpireDay) {
                System.out.println("String_Node_Str");
                studies = (ArrayList) sdao.findAllByUser(ub.getName());
                request.setAttribute("String_Node_Str", studies);
                session.setAttribute("String_Node_Str", ub);
                addPageMessage(respage.getString("String_Node_Str"));
                session.setAttribute("String_Node_Str", "String_Node_Str");
                if (pwdChangeRequired == 1) {
                    request.setAttribute("String_Node_Str", "String_Node_Str");
                    addPageMessage(respage.getString("String_Node_Str"));
                } else {
                    request.setAttribute("String_Node_Str", "String_Node_Str");
                    addPageMessage(respage.getString("String_Node_Str") + "String_Node_Str" + respage.getString("String_Node_Str"));
                }
                forwardPage(Page.RESET_PASSWORD);
            }
        }
        if (currentStudy == null) {
            forwardPage(Page.MENU);
            return;
        }
        if (ub.getNumVisitsToMainMenu() <= 1) {
            if (ub.getLastVisitDate() != null) {
                addPageMessage(respage.getString("String_Node_Str") + "String_Node_Str" + ub.getFirstName() + "String_Node_Str" + ub.getLastName() + "String_Node_Str" + respage.getString("String_Node_Str") + "String_Node_Str" + local_df.format(ub.getLastVisitDate()) + "String_Node_Str");
            } else {
                addPageMessage(respage.getString("String_Node_Str") + "String_Node_Str" + ub.getFirstName() + "String_Node_Str" + ub.getLastName() + "String_Node_Str");
            }
            if (currentStudy.getStatus().isLocked()) {
                addPageMessage(respage.getString("String_Node_Str"));
            } else if (currentStudy.getStatus().isFrozen()) {
                addPageMessage(respage.getString("String_Node_Str"));
            }
        }
        Integer assignedDiscrepancies = getDiscrepancyNoteDAO().getViewNotesCountWithFilter(ub.getId(), currentStudy.getId());
        request.setAttribute("String_Node_Str", assignedDiscrepancies == null ? 0 : assignedDiscrepancies);
        int parentStudyId = currentStudy.getParentStudyId() > 0 ? currentStudy.getParentStudyId() : currentStudy.getId();
        StudyParameterValueDAO spvdao = new StudyParameterValueDAO(sm.getDataSource());
        StudyParameterValueBean parentSPV = spvdao.findByHandleAndStudy(parentStudyId, "String_Node_Str");
        currentStudy.getStudyParameterConfig().setSubjectIdGeneration(parentSPV.getValue());
        String idSetting = parentSPV.getValue();
        if (idSetting.equals("String_Node_Str") || idSetting.equals("String_Node_Str")) {
            request.setAttribute("String_Node_Str", resword.getString("String_Node_Str"));
            fp.addPresetValue("String_Node_Str", resword.getString("String_Node_Str"));
        }
        setPresetValues(fp.getPresetValues());
        if (currentRole.isInvestigator() || currentRole.isResearchAssistant() || currentRole.isResearchAssistant2()) {
            setupListStudySubjectTable();
        }
        if (currentRole.isMonitor()) {
            setupSubjectSDVTable();
        } else if (currentRole.isCoordinator() || currentRole.isDirector()) {
            if (currentStudy.getStatus().isPending()) {
                response.sendRedirect(request.getContextPath() + Page.MANAGE_STUDY_MODULE.getFileName());
                return;
            }
            setupStudySiteStatisticsTable();
            setupSubjectEventStatusStatisticsTable();
            setupStudySubjectStatusStatisticsTable();
            if (currentStudy.getParentStudyId() == 0) {
                setupStudyStatisticsTable();
            }
        }
        forwardPage(Page.MENU);
    } else {
        studies = (ArrayList) sdao.findAllByUser(ub.getName());
        request.setAttribute("String_Node_Str", studies);
        session.setAttribute("String_Node_Str", ub);
        forwardPage(Page.MENU);
    }
}

Output:
     logger.info("String_Node_Str" + ub.isLdapUser());
-    if ((lastPwdChangeDate != null) || ((lastPwdChangeDate == null) && (pwdChangeRequired == 0))) {
-        if (lastPwdChangeDate != null) {
-            Calendar cal = Calendar.getInstance();
-            long difference = Math.abs(cal.getTime().getTime() - lastPwdChangeDate.getTime());
-            long days = difference / (1000 * 60 * 60 * 24);
-            session.setAttribute("String_Node_Str", "String_Node_Str");
-            if (!ub.isLdapUser() && pwdExpireDay > 0 && days >= pwdExpireDay) {
-                System.out.println("String_Node_Str");
-                studies = (ArrayList) sdao.findAllByUser(ub.getName());
-                request.setAttribute("String_Node_Str", studies);
-                session.setAttribute("String_Node_Str", ub);
-                addPageMessage(respage.getString("String_Node_Str"));
-                session.setAttribute("String_Node_Str", "String_Node_Str");
-                if (pwdChangeRequired == 1) {
-                    request.setAttribute("String_Node_Str", "String_Node_Str");
-                    addPageMessage(respage.getString("String_Node_Str"));
-                } else {
-                    request.setAttribute("String_Node_Str", "String_Node_Str");
-                    addPageMessage(respage.getString("String_Node_Str") + "String_Node_Str" + respage.getString("String_Node_Str"));
-                }
-                forwardPage(Page.RESET_PASSWORD);
-            }
+    if (currentStudy == null) {
+        forwardPage(Page.MENU);
+        return;
+    }
+    if (ub.getNumVisitsToMainMenu() <= 1) {
+        if (ub.getLastVisitDate() != null) {
+            addPageMessage(respage.getString("String_Node_Str") + "String_Node_Str" + ub.getFirstName() + "String_Node_Str" + ub.getLastName() + "String_Node_Str" + respage.getString("String_Node_Str") + "String_Node_Str" + local_df.format(ub.getLastVisitDate()) + "String_Node_Str");
+        } else {
+            addPageMessage(respage.getString("String_Node_Str") + "String_Node_Str" + ub.getFirstName() + "String_Node_Str" + ub.getLastName() + "String_Node_Str");
+        }
+        if (currentStudy.getStatus().isLocked()) {
+            addPageMessage(respage.getString("String_Node_Str"));
+        } else if (currentStudy.getStatus().isFrozen()) {
+            addPageMessage(respage.getString("String_Node_Str"));
         }


Input:
private void drawGrid(Graphics2D g2d) {
    int gridWidth = boardWidth - (2 * BORDER_PADDING);
    int gridHeight = boardWidth - (2 * BORDER_PADDING);
    int fieldWidth = (int) gridWidth / grid.getWidth();
    int fieldHeight = (int) gridHeight / grid.getHeight();
    int fieldStartPositionX = BORDER + BORDER_PADDING;
    int fieldStartPositionY = BORDER + BORDER_PADDING;
    if (gridWidth % grid.getWidth() != 0) {
        fieldStartPositionX += (gridWidth - fieldWidth * grid.getWidth()) / 2;
    }
    if (gridHeight % grid.getHeight() != 0) {
        fieldStartPositionY += (gridHeight - fieldHeight * grid.getHeight()) / 2;
    }
    g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
    g2d.setColor(Color.black);
    g2d.drawRect(fieldStartPositionX - 1, fieldStartPositionY - 1, (grid.getWidth() * fieldWidth) + 1, (grid.getHeight() * fieldHeight) + 1);
    for (int i = 0; i < grid.getWidth(); i++) {
        int tempX = fieldStartPositionX;
        for (int j = 0; j < grid.getHeight(); j++) {
            g2d.setColor(grid.getColor(i, j));
            g2d.fillRect(tempX, fieldStartPositionY, fieldWidth, fieldHeight);
            g2d.setColor(Color.gray);
            tempX = tempX + fieldWidth;
        }
        fieldStartPositionY = fieldStartPositionY + fieldHeight;
    }
}

Output:
     int gridHeight = boardWidth - (2 * BORDER_PADDING);
-    int fieldWidth = (int) gridWidth / grid.getWidth();
-    int fieldHeight = (int) gridHeight / grid.getHeight();
+    int fieldWidth = gridWidth / grid.getWidth();
+    int fieldHeight = gridHeight / grid.getHeight();
     int fieldStartPositionX = BORDER + BORDER_PADDING;


Input:
public static TrackingJavaScriptResource create(final ValidatedConfiguration vc, final String sourceName) throws IOException {
    final BrowserSourceConfiguration browserSourceConfiguration = vc.configuration().getSourceConfiguration(sourceName, BrowserSourceConfiguration.class);
    return new TrackingJavaScriptResource(browserSourceConfiguration.javascript.name, createScriptConstants(browserSourceConfiguration), browserSourceConfiguration.javascript.debug);
}

Output:
     final BrowserSourceConfiguration browserSourceConfiguration = vc.configuration().getSourceConfiguration(sourceName, BrowserSourceConfiguration.class);
-    return new TrackingJavaScriptResource(browserSourceConfiguration.javascript.name, createScriptConstants(browserSourceConfiguration), browserSourceConfiguration.javascript.debug);
+    return new TrackingJavaScriptResource("String_Node_Str", createScriptConstants(browserSourceConfiguration), browserSourceConfiguration.javascript.debug);
 }


Input:
public void endListBand(IListBandContent listBand) throws BirtException {
    while (!(current instanceof ListArea)) {
        current.close();
        current = current.getParent();
    }
    int bandType = listBand.getBandType();
    if (bandType == IBandContent.BAND_HEADER || bandType == IBandContent.BAND_GROUP_HEADER) {
        ContainerArea container = current;
        while (container != null && !(container instanceof ListArea) && !(container instanceof ListGroupArea)) {
            container = container.getParent();
        }
        if (container instanceof RepeatableArea) {
            ((RepeatableArea) container).setInHeaderBand(false);
        }
    }
}

Output:
 public void endListBand(IListBandContent listBand) throws BirtException {
-    while (!(current instanceof ListArea)) {
+    while (!(current instanceof ListArea || current instanceof ListGroupArea)) {
         current.close();


Input:
private void extractDimlets() {
    ItemStack realizedTab = inventoryHelper.getStacks()[DimensionEnscriberContainer.SLOT_TAB];
    NBTTagCompound tagCompound = realizedTab.getTagCompound();
    if (tagCompound != null) {
        int idx = DimensionEnscriberContainer.SLOT_DIMLETS;
        for (DimletType type : DimletType.values()) {
            if (tagCompound.hasKey(type.getName())) {
                NBTTagIntArray tagIntArray = (NBTTagIntArray) tagCompound.getTag(type.getName());
                if (tagIntArray != null) {
                    int[] dimlets = tagIntArray.func_150302_c();
                    for (int id : dimlets) {
                        inventoryHelper.getStacks()[idx++] = new ItemStack(ModItems.knownDimlet, 1, id);
                    }
                }
            }
        }
    }
    inventoryHelper.getStacks()[DimensionEnscriberContainer.SLOT_TAB] = new ItemStack(ModItems.emptyDimensionTab);
    markDirty();
}

Output:
         int idx = DimensionEnscriberContainer.SLOT_DIMLETS;
-        for (DimletType type : DimletType.values()) {
-            if (tagCompound.hasKey(type.getName())) {
-                NBTTagIntArray tagIntArray = (NBTTagIntArray) tagCompound.getTag(type.getName());
-                if (tagIntArray != null) {
-                    int[] dimlets = tagIntArray.func_150302_c();
-                    for (int id : dimlets) {
-                        inventoryHelper.getStacks()[idx++] = new ItemStack(ModItems.knownDimlet, 1, id);
-                    }
-                }
-            }
+        String descriptionString = tagCompound.getString("String_Node_Str");
+        String[] opcodes = descriptionString.split("String_Node_Str");
+        for (String oc : opcodes) {
+            Integer id = Integer.parseInt(oc.substring(1));
+            inventoryHelper.getStacks()[idx++] = new ItemStack(ModItems.knownDimlet, 1, id);
         }


Input:
private static List<IRepositoryNode> getRecycleBinFilteredNodes() {
    return getTreeList(getRootNode(ERepositoryObjectType.RECYCLE_BIN, true));
}

Output:
 private static List<IRepositoryNode> getRecycleBinFilteredNodes() {
-    return getTreeList(getRootNode(ERepositoryObjectType.RECYCLE_BIN, true));
+    return getTreeList(getRecycleBinRepNode());
 }


Input:
private void switchToCheckBox() {
    createLabel(valueArea, LABEL_DEFAULT_VALUE, maxStrLengthProperty);
    defaultValueChooser = new Combo(valueArea, SWT.READ_ONLY | SWT.BORDER);
    defaultValueChooser.add(CHOICE_NO_DEFAULT);
    defaultValueChooser.add(BOOLEAN_TRUE);
    defaultValueChooser.add(BOOLEAN_FALSE);
    defaultValueChooser.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    defaultValueChooser.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            switch(defaultValueChooser.getSelectionIndex()) {
                case 0:
                    defaultValue = null;
                    break;
                case 1:
                    defaultValue = Boolean.toString(true);
                    break;
                case 2:
                    defaultValue = Boolean.toString(false);
                    break;
            }
        }
    });
}

Output:
 private void switchToCheckBox() {
-    createLabel(valueArea, LABEL_DEFAULT_VALUE, maxStrLengthProperty);
+    createLabel(valueArea, LABEL_DEFAULT_VALUE);
     defaultValueChooser = new Combo(valueArea, SWT.READ_ONLY | SWT.BORDER);


Input:
public void sendMessage(Message message) {
    adapter.sendMessage(message);
}

Output:
 public void sendMessage(Message message) {
-    adapter.sendMessage(message);
+    adapter.sendMessage(message, address);
 }


Input:
public boolean validateTool(ItemStack item) {
    int id = item.getTypeId();
    if (id >= 256 && id <= 259 || id >= 267 && id <= 279 || id >= 283 && id <= 286 || id >= 290 && id <= 294 || id == 346) {
        return true;
    } else {
        return false;
    }
}

Output:
     int id = item.getTypeId();
-    if (id >= 256 && id <= 259 || id >= 267 && id <= 279 || id >= 283 && id <= 286 || id >= 290 && id <= 294 || id == 346) {
+    if ((id >= 256 && id <= 259) || (id >= 267 && id <= 279) || (id >= 283 && id <= 286) || (id >= 290 && id <= 294) || id == 346) {
         return true;


Input:
public void testWithDateAndPlaceAsInput() {
    UkaProgramService service = new UkaProgramService();
    UkaProgramRepository mock = Mockito.mock(UkaProgramRepository.class);
    service.setUkaProgramRepository(mock);
    Date now = new Date();
    String place = "String_Node_Str";
    service.getUkaProgram(now, null, null, false, place);
    Mockito.verify(mock).getUkaProgram(now, place);
}

Output:
     String place = "String_Node_Str";
-    service.getUkaProgram(now, null, null, false, place);
+    service.getUkaProgram("String_Node_Str", now, null, null, false, place);
     Mockito.verify(mock).getUkaProgram(now, place);


Input:
public void renderDrawTexture(int idx) {
    PTexture tex = drawTextures[idx];
    gl.glEnable(tex.getGLTarget());
    gl.glBindTexture(tex.getGLTarget(), tex.getGLTextureID());
    gl.glDepthMask(false);
    gl.glDisable(GL10.GL_BLEND);
    gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_REPLACE);
    gl11.glTexParameteriv(tex.getGLTarget(), GL11Ext.GL_TEXTURE_CROP_RECT_OES, drawTexCrop, 0);
    gl11x.glDrawTexiOES(0, 0, 0, width, height);
    gl.glDisable(tex.getGLTarget());
    gl.glDepthMask(true);
    gl.glEnable(GL10.GL_BLEND);
}

Output:
     gl.glDepthMask(true);
-    gl.glEnable(GL10.GL_BLEND);
+    if (blend) {
+        blend(blendMode);
+    } else {
+        noBlend();
+    }
 }


Input:
public void stop() {
    synchronized (_desktops) {
        if (log.debugable())
            log.debug("String_Node_Str" + _desktops);
        for (Iterator it = new ArrayList(_desktops.values()).iterator(); it.hasNext(); ) {
            desktopDestroyed((Desktop) it.next());
        }
        _desktops.clear();
    }
}

Output:
             log.debug("String_Node_Str" + _desktops);
-        for (Iterator it = new ArrayList(_desktops.values()).iterator(); it.hasNext(); ) {
-            desktopDestroyed((Desktop) it.next());
+        final boolean old = _desktops.disableExpunge(true);
+        try {
+            for (Iterator it = new ArrayList(_desktops.values()).iterator(); it.hasNext(); ) {
+                desktopDestroyed((Desktop) it.next());
+            }
+            _desktops.clear();
+        } finally {
+            _desktops.disableExpunge(old);
         }


Input:
public List<ICombinatoricsVector<T>> generateObjectsRange(int startIndex, int stopIndex) {
    assert (startIndex <= stopIndex);
    List<ICombinatoricsVector<T>> list = new ArrayList<>();
    Iterator<ICombinatoricsVector<T>> iterator = this.iterator();
    int index = 1;
    while (iterator.hasNext()) {
        if (index >= startIndex && index <= stopIndex) {
            list.add(iterator.next());
        } else if (index > stopIndex) {
            return list;
        } else {
            iterator.next();
        }
        index++;
    }
    return list;
}

Output:
     Iterator<ICombinatoricsVector<T>> iterator = this.iterator();
-    int index = 1;
+    long index = 1;
     while (iterator.hasNext()) {


Input:
public void insertRow(int rowNumber, int parentRowNumber) throws SemanticException {
    transStar(TRANS_LABEL_INSERT_ROW);
    Assert.isLegal(rowNumber != 0);
    int realRowNumber = rowNumber > 0 ? parentRowNumber + rowNumber : parentRowNumber + rowNumber + 1;
    int shiftPos = rowNumber > 0 ? rowNumber : rowNumber + 1;
    RowHandle row = (RowHandle) getRow(parentRowNumber);
    RowHandleAdapter adapt = HandleAdapterFactory.getInstance().getRowHandleAdapter(row);
    RowHandle copy = (RowHandle) adapt.copy();
    TableHandleAdapter.RowUIInfomation rowInfo = getRowInfo(row);
    List rowList = rowInfo.getAllChildren();
    int rowSize = rowList.size();
    for (int i = 0; i < rowSize; i++) {
        CellHandle parentCell = (CellHandle) rowList.get(i);
        CellHandle cell = getCellHandleCopy(parentCell);
        copy.getSlot(TableRow.CONTENT_SLOT).add(cell);
    }
    SlotHandle parentHandle = row.getContainerSlotHandle();
    parentHandle.add((copy));
    int pos = parentHandle.findPosn(row.getElement());
    parentHandle.shift(copy, pos + shiftPos);
    RowHandleAdapter copyAdapt = HandleAdapterFactory.getInstance().getRowHandleAdapter(copy);
    List copyChildren = copyAdapt.getChildren();
    TableHandleAdapter.RowUIInfomation info = getRowInfo(copy);
    List list = info.getAllChildren();
    List temp = new ArrayList();
    int size = list.size();
    List hasAdjust = new ArrayList();
    for (int i = 0; i < size; i++) {
        Object fillCell = list.get(i);
        CellHandleAdapter cellAdapt = HandleAdapterFactory.getInstance().getCellHandleAdapter(fillCell);
        if (cellAdapt.getRowNumber() != realRowNumber) {
            if (!hasAdjust.contains(fillCell)) {
                cellAdapt.setRowSpan(cellAdapt.getRowSpan() + 1);
                hasAdjust.add(fillCell);
            }
            temp.add(new Integer(i));
        }
    }
    int copyRowSize = copyChildren.size();
    for (int i = 0; i < copyRowSize; i++) {
        if (temp.contains(new Integer(i))) {
            ((CellHandle) copyChildren.get(i)).drop();
        }
    }
    transEnd();
}

Output:
     parentHandle.add((copy));
-    int pos = parentHandle.findPosn(row.getElement());
+    int pos = parentHandle.findPosn(row);
     parentHandle.shift(copy, pos + shiftPos);


Input:
public Instance pipe(Instance carrier) {
    CharSequence string = (CharSequence) carrier.getData();
    StringTokenization dataTokens = new StringTokenization(string);
    TokenSequence targetTokens = new TokenSequence();
    String tag = backgroundTag;
    String nextTag = backgroundTag;
    Matcher m = sgmlPattern.matcher(string);
    int textStart = 0;
    int textEnd = 0;
    int nextStart = 0;
    boolean done = false;
    logger.fine(sgmlPattern.pattern());
    logger.finer(string.toString());
    while (!done) {
        done = !(m.find());
        if (done)
            textEnd = string.length();
        else {
            String sgml = m.group();
            logger.finer("String_Node_Str" + sgml);
            int groupCount = m.groupCount();
            logger.finer(Integer.toString(groupCount));
            if (sgml.charAt(1) == '/')
                nextTag = backgroundTag;
            else {
                nextTag = sgml.substring(1, sgml.length() - 1);
            }
            logger.finer("String_Node_Str" + nextTag);
            nextStart = m.end();
            textEnd = m.start();
            logger.finer("String_Node_Str" + textStart + "String_Node_Str" + textEnd);
        }
        if (textEnd - textStart > 0) {
            logger.finer("String_Node_Str" + tag);
            logger.finer("String_Node_Str" + string.subSequence(textStart, textEnd));
            lexer.setCharSequence(string.subSequence(textStart, textEnd));
            while (lexer.hasNext()) {
                lexer.next();
                int tokStart = textStart + lexer.getStartOffset();
                int tokEnd = textStart + lexer.getEndOffset();
                dataTokens.add(new StringSpan(string, tokStart, tokEnd));
                targetTokens.add(new Token(tag));
            }
        }
        textStart = nextStart;
        tag = nextTag;
    }
    carrier.setData(dataTokens);
    carrier.setTarget(targetTokens);
    if (saveSource)
        carrier.setSource(dataTokens);
    return carrier;
}

Output:
     carrier.setTarget(targetTokens);
-    if (saveSource)
+    if (saveSource) {
         carrier.setSource(dataTokens);


Input:
public void setErrorNumber(int errorNumber) {
    entity.setErrorNumber(errorNumber);
}

Output:
 public void setErrorNumber(int errorNumber) {
-    entity.setErrorNumber(errorNumber);
+    if (entity != null) {
+        entity.setErrorNumber(errorNumber);
+    }
 }


Input:
private void processRequest(HttpServletRequest request, HttpServletResponse response, boolean isPost) throws ServletException, IOException {
    Context context = null;
    UIUtil.storeOriginalURL(request);
    try {
        context = UIUtil.obtainContext(request);
        request = Authenticate.getRealRequest(request);
        if (isPost) {
            doDSPost(context, request, response);
        } else {
            doDSGet(context, request, response);
        }
    } catch (SQLException se) {
        log.warn(LogManager.getHeader(context, "String_Node_Str", se.toString()), se);
        UIUtil.sendAlert(request, se);
        JSPManager.showInternalError(request, response);
    } catch (AuthorizeException ae) {
        if (context.getCurrentUser() == null) {
            Authenticate.startAuthentication(context, request, response);
        } else {
            log.info(LogManager.getHeader(context, "String_Node_Str", ae.toString()));
            JSPManager.showAuthorizeError(request, response, ae);
        }
    }
    if (context != null && context.isValid()) {
        context.abort();
    }
}

Output:
         request = Authenticate.getRealRequest(request);
-        if (isPost) {
+        if (log.isDebugEnabled()) {
+            log.debug(LogManager.getHeader(context, "String_Node_Str", UIUtil.getRequestLogInfo(request)));
+        }
+        if (request.getMethod().equals("String_Node_Str")) {
             doDSPost(context, request, response);


Input:
private Expression subtract(Expression first, double red1, double green1, double blue1, double red2, double green2, double blue2, HiddenTokenAwareTree parentToken) {
    if (first.getType() == ASTCssNodeType.NUMBER) {
        problemsHandler.substractOrDiveColorFromNumber(first);
        return new FaultyExpression(first);
    }
    return createResultColor(parentToken, round(red1 - red2), round(green1 - green2), round(blue1 - blue2));
}

Output:
     if (first.getType() == ASTCssNodeType.NUMBER) {
-        problemsHandler.substractOrDiveColorFromNumber(first);
+        problemsHandler.subtractOrDiveColorFromNumber(first);
         return new FaultyExpression(first);


Input:
protected void decode(SubtitleInputBuffer inputBuffer) {
    ccData.reset(inputBuffer.data.array(), inputBuffer.data.limit());
    while (ccData.bytesLeft() >= 3) {
        int ccTypeAndValid = (ccData.readUnsignedByte() & 0x07);
        int ccType = ccTypeAndValid & (DTVCC_PACKET_DATA | DTVCC_PACKET_START);
        boolean ccValid = (ccTypeAndValid & CC_VALID_FLAG) == CC_VALID_FLAG;
        byte ccData1 = (byte) ccData.readUnsignedByte();
        byte ccData2 = (byte) ccData.readUnsignedByte();
        if (ccType != DTVCC_PACKET_DATA && ccType != DTVCC_PACKET_START) {
            continue;
        }
        if (!ccValid) {
            continue;
        }
        if (ccType == DTVCC_PACKET_START) {
            finalizeCurrentPacket();
            int sequenceNumber = (ccData1 & 0xC0) >> 6;
            int packetSize = ccData1 & 0x3F;
            if (packetSize == 0) {
                packetSize = 64;
            }
            currentDtvCcPacket = new DtvCcPacket(sequenceNumber, packetSize);
            currentDtvCcPacket.packetData[currentDtvCcPacket.currentIndex++] = ccData2;
        } else {
            Assertions.checkArgument(ccType == DTVCC_PACKET_DATA);
            if (currentDtvCcPacket == null) {
                Log.e(TAG, "String_Node_Str");
                continue;
            }
            currentDtvCcPacket.packetData[currentDtvCcPacket.currentIndex++] = ccData1;
            currentDtvCcPacket.packetData[currentDtvCcPacket.currentIndex++] = ccData2;
        }
        if (currentDtvCcPacket.currentIndex == (currentDtvCcPacket.packetSize * 2 - 1)) {
            finalizeCurrentPacket();
        }
    }
}

Output:
 protected void decode(SubtitleInputBuffer inputBuffer) {
-    ccData.reset(inputBuffer.data.array(), inputBuffer.data.limit());
+    byte[] inputBufferData = inputBuffer.data.array();
+    ccData.reset(inputBufferData, inputBuffer.data.limit());
     while (ccData.bytesLeft() >= 3) {


Input:
public synchronized final void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
    monitor.beginTask(null, IProgressMonitor.UNKNOWN);
    try {
        if (srcFile != null && targetFile != null && srcFile.exists() && !targetFile.exists()) {
            if (renameFile(srcFile, targetFile)) {
                fireResourceChanged(targetFile.getAbsolutePath());
                refreshWorkspace(srcFile.getAbsolutePath());
            }
        }
    } finally {
        monitor.done();
    }
}

Output:
                 fireResourceChanged(targetFile.getAbsolutePath());
-                refreshWorkspace(srcFile.getAbsolutePath());
+                fireResourceChanged(srcFile.getAbsolutePath());
             }


Input:
private void onError(ChannelHandlerContext ctx, ByteBuf buffer) {
    try {
        ErrorMessage error = TcpMessageDecoder.decodeError(buffer);
        if (error.getError() == StatusCodes.Bad_TcpSecureChannelUnknown || error.getError() == StatusCodes.Bad_SecureChannelIdInvalid) {
            secureChannel.setChannelId(0);
        }
        logger.error("String_Node_Str" + error);
    } catch (UaException e) {
        logger.error("String_Node_Str", e.getMessage(), e);
    } finally {
        ctx.close();
    }
}

Output:
         ErrorMessage error = TcpMessageDecoder.decodeError(buffer);
-        if (error.getError() == StatusCodes.Bad_TcpSecureChannelUnknown || error.getError() == StatusCodes.Bad_SecureChannelIdInvalid) {
+        if (error.getError().getValue() == StatusCodes.Bad_TcpSecureChannelUnknown || error.getError().getValue() == StatusCodes.Bad_SecureChannelIdInvalid) {
             secureChannel.setChannelId(0);


Input:
public void testDropKeyspace() throws Exception {
    ConnectionManager cm = getConnectionManager();
    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class, this.getClass().getClassLoader(), "String_Node_Str");
    assertNotNull(definition);
    cm.buildKeyspace(definition, false);
    cm.dropKeyspace(definition.getName());
    Session session = cm.getEmptySession();
    boolean caught = false;
    try {
        session.execute("String_Node_Str" + definition.getName() + "String_Node_Str");
    } catch (InvalidQueryException e) {
        caught = true;
    }
    session.shutdown();
    assertTrue(caught);
}

Output:
     }
-    session.shutdown();
+    session.close();
     assertTrue(caught);


Input:
private boolean ensureFullRelationships() {
    if (relationshipMap == null) {
        this.relChainPosition = nodeManager.getRelationshipChainPosition(this);
        this.relationshipMap = new ArrayMap<String, IntArray>();
        getMoreRelationships();
        return true;
    }
    return false;
}

Output:
 private boolean ensureFullRelationships() {
-    if (relationshipMap == null) {
-        this.relChainPosition = nodeManager.getRelationshipChainPosition(this);
-        this.relationshipMap = new ArrayMap<String, IntArray>();
+    if (relChainPosition == null) {
+        setupMapAndChainPosition();
         getMoreRelationships();


Input:
public void testSubList() {
    List<Integer> wrappedList = createListWithContent(new int[] { 1, 2, 3, 4, 5 });
    List<Integer> testList = wrappedList.subList(1, 4);
    assertEquals(3, testList.size());
    assertEquals(testList, Arrays.asList(2, 3, 4));
    checkListSizeAndContent(testList, new int[] { 2, 3, 4 });
    testList.add(1, 6);
    assertEquals(testList, Arrays.asList(2, 6, 3, 4));
    checkListSizeAndContent(testList, new int[] { 2, 6, 3, 4 });
    assertEquals(wrappedList, Arrays.asList(1, 2, 6, 3, 4, 5));
    checkListSizeAndContent(wrappedList, new int[] { 1, 2, 6, 3, 4, 5 });
    testList.remove(2);
    assertEquals(testList, Arrays.asList(2, 6, 4));
    checkListSizeAndContent(testList, new int[] { 2, 6, 4 });
    try {
        testList.remove(3);
        fail("String_Node_Str");
    } catch (IndexOutOfBoundsException e) {
    }
    checkListSizeAndContent(wrappedList, new int[] { 1, 2, 6, 4, 5 });
    testList.set(0, 7);
    checkListSizeAndContent(testList, new int[] { 7, 6, 4 });
    checkListSizeAndContent(wrappedList, new int[] { 1, 7, 6, 4, 5 });
    try {
        wrappedList.subList(-1, 5);
        fail("String_Node_Str");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
        wrappedList.subList(0, 15);
        fail("String_Node_Str");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
        wrappedList.subList(5, 1);
        fail("String_Node_Str");
    } catch (IllegalArgumentException e) {
    }
    try {
        wrappedList.subList(0, 1).add(2, 5);
        fail("String_Node_Str");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
        wrappedList.subList(0, 1).add(-1, 5);
        fail("String_Node_Str");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
        wrappedList.subList(0, 1).get(1);
        fail("String_Node_Str");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
        wrappedList.subList(0, 1).get(-1);
        fail("String_Node_Str");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
        wrappedList.subList(0, 1).set(2, 2);
        fail("String_Node_Str");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
        wrappedList.subList(0, 1).set(-1, 5);
        fail("String_Node_Str");
    } catch (IndexOutOfBoundsException e) {
    }
}

Output:
     assertEquals(testList, Arrays.asList(2, 3, 4));
-    checkListSizeAndContent(testList, new int[] { 2, 3, 4 });
+    checkListSizeAndContent(testList, 2, 3, 4);
     testList.add(1, 6);


Input:
public ITernServer create(ITernProject project) throws Exception {
    NodejsTernServer server;
    if (isRemoteAccess()) {
        server = new NodejsTernServer(project, getRemotePort());
    } else {
        INodejsDebugger debugger = NodejsDebuggersManager.getDebugger(getDebugger());
        File installPath = getInstallPath();
        IFile ternServerFile = getTernServerDebugFile();
        if (debugger != null && debugger.isInstalled() && ternServerFile != null && ternServerFile.exists() && !ternServerFile.getProject().equals(project.getAdapter(IProject.class))) {
            server = new NodejsTernServer(project, debugger.createProcess(project.getProjectDir(), installPath, ternServerFile));
        } else {
            File ternFile = project.getRepository().getTernBaseDir();
            server = new NodejsTernServer(project, installPath, ternFile);
        }
    }
    server.setTimeout(getTimeout());
    server.setTestNumber(getTestNumber());
    server.setPersistent(isPersistent());
    return server;
}

Output:
         } else {
-            File ternFile = project.getRepository().getTernBaseDir();
-            server = new NodejsTernServer(project, installPath, ternFile);
+            File ternBaseDir = project.getRepository().getTernBaseDir();
+            server = new NodejsTernServer(project, installPath, ternBaseDir);
         }


Input:
private void showView(QuestionsView next, AnimationType from, boolean animateLastView) {
    switch(from) {
        case RIGHT:
            mInAnimation = AnimationUtils.loadAnimation(this, R.anim.push_left_in);
            mOutAnimation = AnimationUtils.loadAnimation(this, R.anim.push_left_out);
            break;
        case LEFT:
            mInAnimation = AnimationUtils.loadAnimation(this, R.anim.push_right_in);
            mOutAnimation = AnimationUtils.loadAnimation(this, R.anim.push_right_out);
            break;
        case FADE:
            mInAnimation = AnimationUtils.loadAnimation(this, R.anim.fade_in);
            mOutAnimation = AnimationUtils.loadAnimation(this, R.anim.fade_out);
            break;
    }
    if (questionsView != null) {
        if (animateLastView) {
            questionsView.startAnimation(mOutAnimation);
        }
        mViewPane.removeView(questionsView);
        questionsView.teardownView();
    }
    mInAnimation.setAnimationListener(this);
    RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
    questionsView = next;
    mViewPane.addView(questionsView, lp);
    questionsView.startAnimation(mInAnimation);
    FrameLayout header = (FrameLayout) findViewById(R.id.form_entry_header);
    TextView groupLabel = ((TextView) header.findViewById(R.id.form_entry_group_label));
    this.mGroupNativeVisibility = false;
    FormLayoutHelpers.updateGroupViewVisibility(this, mGroupNativeVisibility, mGroupForcedInvisible);
    questionsView.setFocus(this);
    SpannableStringBuilder groupLabelText = questionsView.getGroupLabel();
    if (groupLabelText != null && !groupLabelText.toString().replace("String_Node_Str", "String_Node_Str").trim().equals("String_Node_Str")) {
        groupLabel.setText(groupLabelText);
        this.mGroupNativeVisibility = true;
        FormLayoutHelpers.updateGroupViewVisibility(this, mGroupNativeVisibility, mGroupForcedInvisible);
    }
}

Output:
     SpannableStringBuilder groupLabelText = questionsView.getGroupLabel();
-    if (groupLabelText != null && !groupLabelText.toString().replace("String_Node_Str", "String_Node_Str").trim().equals("String_Node_Str")) {
+    if (groupLabelText != null && !groupLabelText.toString().trim().equals("String_Node_Str")) {
         groupLabel.setText(groupLabelText);


Input:
public String getColumnText(Object element, int columnIndex) {
    if (element instanceof TLCState) {
        TLCState state = (TLCState) element;
        switch(columnIndex) {
            case NAME:
                if (state.isStuttering()) {
                    return "String_Node_Str";
                } else if (state.isBackToState()) {
                    return "String_Node_Str" + state.getStateNumber() + "String_Node_Str";
                }
                return state.getLabel();
            case VALUE:
                return "String_Node_Str" + state.getStateNumber() + "String_Node_Str";
            default:
                break;
        }
    } else if (element instanceof TLCVariable) {
        TLCVariable var = (TLCVariable) element;
        switch(columnIndex) {
            case NAME:
                return var.getName();
            case VALUE:
                return var.getValue().toSimpleString();
            default:
                break;
        }
    } else if (element instanceof TLCSetVariableValue || element instanceof TLCSequenceVariableValue || element instanceof TLCSimpleVariableValue) {
        TLCVariableValue varValue = (TLCVariableValue) element;
        switch(columnIndex) {
            case VALUE:
                return varValue.toString();
            case NAME:
                return "String_Node_Str";
            default:
                break;
        }
    } else if (element instanceof TLCNamedVariableValue) {
        TLCNamedVariableValue namedValue = (TLCNamedVariableValue) element;
        switch(columnIndex) {
            case NAME:
                return namedValue.getName();
            case VALUE:
                return ((TLCVariableValue) namedValue.getValue()).toSimpleString();
            default:
                break;
        }
    } else if (element instanceof TLCFcnElementVariableValue) {
        TLCFcnElementVariableValue fcnElementValue = (TLCFcnElementVariableValue) element;
        switch(columnIndex) {
            case NAME:
                return fcnElementValue.getFrom().toSimpleString();
            case VALUE:
                return ((TLCVariableValue) fcnElementValue.getValue()).toSimpleString();
            default:
                break;
        }
    } else if (element instanceof TLCRecordVariableValue) {
        TLCRecordVariableValue recordValue = (TLCRecordVariableValue) element;
        switch(columnIndex) {
            case NAME:
                return "String_Node_Str";
            case VALUE:
                return recordValue.toSimpleString();
            default:
                break;
        }
    } else if (element instanceof TLCFunctionVariableValue) {
        TLCFunctionVariableValue fcnValue = (TLCFunctionVariableValue) element;
        switch(columnIndex) {
            case NAME:
                return "String_Node_Str";
            case VALUE:
                return fcnValue.toSimpleString();
            default:
                break;
        }
    }
    return null;
}

Output:
             case NAME:
-                return var.getName();
+                if (var.isTraceExplorerVar()) {
+                    return var.getSingleLineName();
+                } else {
+                    return var.getName();
+                }
             case VALUE:


Input:
private void buildSerialDependencyGraph() {
    for (Entity e : this.entityList) {
        for (Field f : e.getFields()) {
            if (!f.isList() && getEntityOfType(f.getClazz()) != null) {
                Entity requirement = getEntityOfType(f.getClazz());
                entityMap.get(e).requires.add(requirement);
            }
        }
    }
    Collections.sort(nodes);
    LinkedList<Node> orderedList = new LinkedList<Node>();
    for (Node n : nodes) orderedList.add(n);
    while (true) {
        Node unchecked = null;
        int pos = 0;
        for (Node n : orderedList) {
            if (!n.checked) {
                unchecked = n;
                break;
            }
            pos++;
        }
        if (unchecked == null)
            break;
        boolean dependenciesSatisfied = true;
        do {
            dependenciesSatisfied = true;
            for (Entity dependency : unchecked.requires) {
                boolean satisfied = false;
                for (int i = 0; i < pos; i++) {
                    if (orderedList.get(i).entity == dependency) {
                        satisfied = true;
                        break;
                    }
                }
                dependenciesSatisfied &= satisfied;
            }
            if (dependenciesSatisfied) {
                unchecked.checked = true;
                break;
            } else {
                if (pos >= orderedList.size() - 1) {
                    throw new UnsolvableDependencyOrderException();
                } else {
                    orderedList.remove(pos);
                    orderedList.add(pos + 1, unchecked);
                    pos++;
                }
            }
        } while (!dependenciesSatisfied);
    }
    nodes = orderedList;
}

Output:
         for (Field f : e.getFields()) {
-            if (!f.isList() && getEntityOfType(f.getClazz()) != null) {
+            if (!f.isList() && getEntityOfType(f.getClazz()) != null && !f.getClazz().equals(e.getType())) {
                 Entity requirement = getEntityOfType(f.getClazz());


Input:
protected final void killedEvent() {
    setSelected(false);
    if (occupiedArea) {
        MapCircle occupied = getOccupyablePositions();
        super.getGrid().freeOccupiedArea(occupied, super.getPos());
        for (TowerOccupyer curr : occupiers) {
            curr.soldier.leaveOccupyableBuilding();
        }
        occupiers.clear();
    }
    allOccupyingBuildings.remove(this);
    ShortPoint2D defenderPos = getDefenderPos();
    super.getGrid().getMapObjectsManager().removeMapObjectType(defenderPos.getX(), defenderPos.getY(), EMapObjectType.ATTACKABLE_TOWER);
}

Output:
         for (TowerOccupyer curr : occupiers) {
-            curr.soldier.leaveOccupyableBuilding();
+            curr.soldier.leaveOccupyableBuilding(buildingArea.get(idx));
+            idx++;
         }


Input:
protected org.eclipse.persistence.internal.helper.DatabaseType buildDatabaseTypeFromMetadataType(DatabaseType dType, String catalog) {
    if (dType.isPLSQLCursorType()) {
        if (dType.isArgumentType()) {
            dType = ((ArgumentType) dType).getEnclosedType();
        }
        PLSQLCursorType pType = (PLSQLCursorType) dType;
        String typeName = pType.getCursorName();
        if (catalog != null) {
            typeName = (catalog + DOT).concat(typeName);
        }
        return new PLSQLCursor(typeName);
    }
    if (dType.isArgumentType()) {
        dType = ((ArgumentType) dType).getEnclosedType();
    } else if (dType.isTYPEType()) {
        dType = ((TYPEType) dType).getEnclosedType();
    }
    if (dType.isComposite()) {
        String typeName = dType.getTypeName();
        String compatibleType = typeName.contains(PERCENT) ? typeName.replace(PERCENT, UNDERSCORE) : typeName;
        String javaTypeName = (dType.getTypeName()).toLowerCase();
        if (dType.isPLSQLType()) {
            if (catalog != null && !typeName.contains(ROWTYPE_STR)) {
                typeName = (catalog + "String_Node_Str").concat(typeName);
                compatibleType = (catalog + "String_Node_Str").concat(compatibleType);
                javaTypeName = (catalog.toLowerCase() + "String_Node_Str").concat(javaTypeName);
            }
            if (dType.isPLSQLRecordType()) {
                PLSQLrecord plsqlRec = new PLSQLrecord();
                plsqlRec.setTypeName(typeName);
                plsqlRec.setCompatibleType(compatibleType);
                plsqlRec.setJavaTypeName(javaTypeName);
                for (FieldType fld : ((PLSQLRecordType) dType).getFields()) {
                    if (fld.getEnclosedType().isPrecisionType()) {
                        PrecisionType precisionType = (PrecisionType) fld.getEnclosedType();
                        plsqlRec.addField(fld.getFieldName(), buildDatabaseTypeFromMetadataType(precisionType), (int) precisionType.getPrecision(), (int) precisionType.getScale());
                    } else if (fld.getEnclosedType().isSizedType()) {
                        SizedType sizedType = (SizedType) fld.getEnclosedType();
                        plsqlRec.addField(fld.getFieldName(), buildDatabaseTypeFromMetadataType(sizedType), (int) sizedType.getSize());
                    } else {
                        plsqlRec.addField(fld.getFieldName(), buildDatabaseTypeFromMetadataType(fld.getEnclosedType(), catalog));
                    }
                }
                return plsqlRec;
            }
            PLSQLCollection plsqlCollection = new PLSQLCollection();
            plsqlCollection.setTypeName(typeName);
            plsqlCollection.setCompatibleType(compatibleType);
            plsqlCollection.setJavaTypeName(javaTypeName + COLLECTION_WRAPPER_SUFFIX);
            plsqlCollection.setNestedType(buildDatabaseTypeFromMetadataType(((PLSQLCollectionType) dType).getEnclosedType(), catalog));
            return plsqlCollection;
        }
        if (dType.isVArrayType()) {
            OracleArrayType varray = new OracleArrayType();
            varray.setTypeName(typeName);
            varray.setCompatibleType(compatibleType);
            varray.setJavaTypeName(getGeneratedWrapperClassName(javaTypeName, dbwsBuilder.getProjectName()));
            varray.setNestedType(buildDatabaseTypeFromMetadataType(((VArrayType) dType).getEnclosedType(), null));
            return varray;
        }
        if (dType.isObjectType()) {
            OracleObjectType objType = new OracleObjectType();
            objType.setTypeName(typeName);
            objType.setCompatibleType(compatibleType);
            objType.setJavaTypeName(getGeneratedJavaClassName(javaTypeName, dbwsBuilder.getProjectName()));
            Map<String, org.eclipse.persistence.internal.helper.DatabaseType> fields = objType.getFields();
            ObjectType oType = (ObjectType) dType;
            for (FieldType field : oType.getFields()) {
                fields.put(field.getFieldName(), buildDatabaseTypeFromMetadataType(field.getEnclosedType()));
            }
            return objType;
        }
        if (dType.isObjectTableType()) {
            OracleArrayType tableType = new OracleArrayType();
            tableType.setTypeName(typeName);
            tableType.setCompatibleType(compatibleType);
            tableType.setJavaTypeName(getGeneratedWrapperClassName(javaTypeName, dbwsBuilder.getProjectName()));
            org.eclipse.persistence.internal.helper.DatabaseType nestedType = buildDatabaseTypeFromMetadataType(((ObjectTableType) dType).getEnclosedType(), null);
            Class wrapper = getWrapperClass(nestedType);
            if (wrapper != null) {
                ((ComplexDatabaseType) nestedType).setJavaType(wrapper);
            }
            tableType.setNestedType(nestedType);
            return tableType;
        }
        return null;
    } else if (dType.isScalar()) {
        org.eclipse.persistence.internal.helper.DatabaseType theType = OraclePLSQLTypes.getDatabaseTypeForCode(((ScalarDatabaseType) dType).getTypeName());
        if (theType != null) {
            return theType;
        }
    }
    return JDBCTypes.getDatabaseTypeForCode(org.eclipse.persistence.tools.dbws.Util.getJDBCTypeFromTypeName(dType.getTypeName()));
}

Output:
         String compatibleType = typeName.contains(PERCENT) ? typeName.replace(PERCENT, UNDERSCORE) : typeName;
-        String javaTypeName = (dType.getTypeName()).toLowerCase();
+        String javaTypeName = compatibleType.toLowerCase();
         if (dType.isPLSQLType()) {


Input:
private void update() {
    downloadItems.getReadWriteLock().writeLock().lock();
    try {
        if (downloadItems.size() > 0) {
            downloadItems.set(0, downloadItems.get(0));
        }
    } finally {
        downloadItems.getReadWriteLock().writeLock().unlock();
    }
}

Output:
 private void update() {
-    downloadItems.getReadWriteLock().writeLock().lock();
+    downloadItems.getReadWriteLock().readLock().lock();
     try {


Input:
public Iterator<PropertyContainer> iterator() {
    return new Iterator<PropertyContainer>() {
        Iterator<? extends PropertyContainer> current = relationships().iterator();
        Iterator<? extends PropertyContainer> next = nodes().iterator();

        public boolean hasNext() {
            return current.hasNext();
        }
        public PropertyContainer next() {
            try {
                return current.next();
            } finally {
                Iterator<? extends PropertyContainer> temp = current;
                current = next;
                next = temp;
            }
        }
        public void remove() {
            next.remove();
        }
    };
}

Output:
         Iterator<? extends PropertyContainer> current = relationships().iterator();
-        Iterator<? extends PropertyContainer> next = nodes().iterator();
+        Iterator<? extends PropertyContainer> next = relationships().iterator();


Input:
public ScribNode visit(ScribNode parent, ScribNode child) throws ScribbleException {
    if (child instanceof GProtocolDecl) {
        GProtocolDecl gpd = (GProtocolDecl) child;
        if (gpd.isAuxModifier()) {
            return child;
        }
    }
    if (child instanceof Choice<?>) {
        return visitOverrideForChoice((InteractionSeq<?>) parent, (Choice<?>) child);
    } else {
        return super.visit(parent, child);
    }
}

Output:
     }
-    if (child instanceof Choice<?>) {
-        return visitOverrideForChoice((InteractionSeq<?>) parent, (Choice<?>) child);
-    } else {
-        return super.visit(parent, child);
+    if (getJob().useOldWf) {
+        if (child instanceof Choice<?>) {
+            return visitOverrideForChoice((InteractionSeq<?>) parent, (Choice<?>) child);
+        }
     }


Input:
public String checkCaptcha(File captchafile) {
    if (Utilities.isLoggerActive()) {
        logger.finer("String_Node_Str" + captchafile);
    }
    Image captchaImage = Utilities.loadImage(captchafile);
    Captcha captcha = createCaptcha(captchaImage);
    captcha.setCaptchaFile(captchafile);
    return checkCaptcha(captchafile, captcha);
}

Output:
     Captcha captcha = createCaptcha(captchaImage);
-    captcha.setCaptchaFile(captchafile);
+    if (captcha != null)
+        captcha.setCaptchaFile(captchafile);
     return checkCaptcha(captchafile, captcha);


Input:
public void run() {
    try {
        Decoder.VideoFrameInfo videoFrameInfo;
        if (mAudioPlayback != null)
            mAudioPlayback.play();
        while ((videoFrameInfo = mDecoder.decodeFrame(false)) != null) {
            if (mPaused && !mSeekPrepare) {
                if (mAudioPlayback != null)
                    mAudioPlayback.pause();
                synchronized (this) {
                    while (mPaused && !mSeekPrepare) {
                        this.wait();
                    }
                }
                if (mAudioPlayback != null)
                    mAudioPlayback.play();
                mTimeBase.startAt(videoFrameInfo.presentationTimeUs);
            }
            if (mBuffering) {
                mBuffering = false;
                mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_INFO, MEDIA_INFO_BUFFERING_END, 0));
            }
            while (mSeekPrepare) {
                mSeekPrepare = false;
                mCurrentPosition = mSeekTargetTime;
                mDecoder.releaseFrame(videoFrameInfo, false);
                if (mAudioPlayback != null)
                    mAudioPlayback.flush();
                videoFrameInfo = mDecoder.seekTo(mSeekMode, mSeekTargetTime);
                mTimeBase.startAt(videoFrameInfo.presentationTimeUs);
                mCurrentPosition = videoFrameInfo.presentationTimeUs;
                if (!mSeekPrepare) {
                    mEventHandler.sendEmptyMessage(MEDIA_SEEK_COMPLETE);
                }
            }
            mCurrentPosition = videoFrameInfo.presentationTimeUs;
            long waitingTime = mTimeBase.getOffsetFrom(videoFrameInfo.presentationTimeUs);
            if (mAudioPlayback != null) {
                long audioOffsetUs = mAudioPlayback.getLastPresentationTimeUs() - mCurrentPosition;
                long audioOffsetCorrectionUs = 10000;
                if (audioOffsetUs > audioOffsetCorrectionUs) {
                    waitingTime -= audioOffsetCorrectionUs;
                } else if (audioOffsetUs < -audioOffsetCorrectionUs) {
                    waitingTime += audioOffsetCorrectionUs;
                }
                mAudioPlayback.setPlaybackSpeed((float) mTimeBase.getSpeed());
            }
            long cachedDuration = mVideoExtractor.getCachedDuration();
            if (cachedDuration != -1) {
                mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_BUFFERING_UPDATE, (int) (100d / mVideoFormat.getLong(MediaFormat.KEY_DURATION) * (mCurrentPosition + cachedDuration)), 0));
            }
            if (waitingTime > 5000) {
                Thread.sleep(waitingTime / 1000);
            } else if (waitingTime < 0) {
                Log.d(TAG, "String_Node_Str" + waitingTime);
                mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_INFO, MEDIA_INFO_VIDEO_TRACK_LAGGING, 0));
                mTimeBase.startAt(videoFrameInfo.presentationTimeUs);
            }
            if (videoFrameInfo.representationChanged) {
                mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_SET_VIDEO_SIZE, videoFrameInfo.width, videoFrameInfo.height));
            }
            boolean videoOutputEos = videoFrameInfo.endOfStream;
            mDecoder.releaseFrame(videoFrameInfo, true);
            if (mRenderingStarted) {
                mRenderingStarted = false;
                mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_INFO, MEDIA_INFO_VIDEO_RENDERING_START, 0));
            }
            if (videoOutputEos) {
                mEventHandler.sendEmptyMessage(MEDIA_PLAYBACK_COMPLETE);
                mPaused = !mLooping;
                synchronized (this) {
                    if (mAudioPlayback != null)
                        mAudioPlayback.pause();
                    while (mPaused) {
                        this.wait();
                    }
                    if (mAudioPlayback != null)
                        mAudioPlayback.play();
                    if (!mSeekPrepare) {
                        videoFrameInfo = mDecoder.seekTo(SeekMode.FAST, 0);
                        mDecoder.releaseFrame(videoFrameInfo, true);
                    }
                }
            }
        }
    } catch (InterruptedException e) {
        Log.d(TAG, "String_Node_Str");
        interrupt();
        if (mIsStopping) {
            mIsStopping = false;
        } else {
            mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, 0));
        }
    } catch (IllegalStateException e) {
        Log.e(TAG, "String_Node_Str", e);
        mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, 0));
    } catch (IOException e) {
        Log.e(TAG, "String_Node_Str", e);
        mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, MEDIA_ERROR_IO));
    }
    if (mDecoder != null)
        mDecoder.release();
    if (mAudioPlayback != null)
        mAudioPlayback.stopAndRelease();
    if (mAudioExtractor != null & mAudioExtractor != mVideoExtractor) {
        mAudioExtractor.release();
    }
    mVideoExtractor.release();
    Log.d(TAG, "String_Node_Str");
}

Output:
                 if (mAudioPlayback != null)
-                    mAudioPlayback.flush();
+                    mAudioPlayback.pause(true);
                 videoFrameInfo = mDecoder.seekTo(mSeekMode, mSeekTargetTime);


Input:
public GameType getType() {
    load(MATCH_LOAD_GROUP);
    return GameType.valueOf(coreData.getType());
}

Output:
 public GameType getType() {
-    load(MATCH_LOAD_GROUP);
+    if (coreData.getType() == null) {
+        load(MATCH_LOAD_GROUP);
+    }
     return GameType.valueOf(coreData.getType());


Input:
public void start() {
    if (0 < getMaximumBackupFiles()) {
        this.myFormat = new SimpleDateFormat("String_Node_Str", Locale.US);
        int index = getFileName().lastIndexOf("String_Node_Str");
        if (-1 != index) {
            index += (getFilePathName().length() - getFileName().length());
            this.fileinfo = getFilePathName().substring(0, index);
            this.extensioninfo = getFilePathName().substring(index);
        } else {
            this.fileinfo = getFilePathName();
            this.extensioninfo = "String_Node_Str";
        }
        this.backups = new LinkedList<File>();
    }
    try {
        bytesWritten = myChannel.size();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "String_Node_Str" + bytesWritten);
        }
    } catch (IOException e) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "String_Node_Str");
        }
        bytesWritten = 0;
    }
    super.start();
}

Output:
 public void start() {
-    if (0 < getMaximumBackupFiles()) {
+    if (0 <= getMaximumBackupFiles()) {
         this.myFormat = new SimpleDateFormat("String_Node_Str", Locale.US);


Input:
public BufferedImage filterSobel(String imgPath) {
    LOGGER.info("String_Node_Str" + imgPath);
    int kernelSize = 3;
    Mat source = Imgcodecs.imread(imgPath, Imgcodecs.CV_LOAD_IMAGE_COLOR);
    Mat destination = new Mat(source.rows(), source.cols(), source.type());
    Mat kernel = new Mat(kernelSize, kernelSize, CvType.CV_32F) {
        {
            put(0, 0, -1);
            put(0, 1, 0);
            put(0, 2, 1);
            put(1, 0 - 2);
            put(1, 1, 0);
            put(1, 2, 2);
            put(2, 0, -1);
            put(2, 1, 0);
            put(2, 2, 1);
        }
    };
    Imgproc.filter2D(source, destination, -1, kernel);
    return getBufferedImage(destination);
}

Output:
             put(0, 2, 1);
-            put(1, 0 - 2);
+            put(1, 0, -2);
             put(1, 1, 0);


Input:
public void continues(DispatcherState state) throws BabuDBException {
    this.replication = new ReplicationStage(this, configuration.getMaxQ(), state.requestQueue, state.latest);
    this.heartbeat = new HeartbeatThread(this, state.latest);
    this.start();
    super.continues(state);
}

Output:
     this.heartbeat = new HeartbeatThread(this, state.latest);
-    this.start();
+    try {
+        replication.start();
+        heartbeat.start();
+        replication.waitForStartup();
+        heartbeat.waitForStartup();
+    } catch (Exception ex) {
+        Logging.logMessage(Logging.LEVEL_ERROR, this, "String_Node_Str");
+        Logging.logMessage(Logging.LEVEL_ERROR, this, ex.getMessage());
+        System.exit(1);
+    }
     super.continues(state);


Input:
public boolean itemInteractionForEntity(ItemStack itemstack, EntityPlayer player, EntityLivingBase entity, EnumHand hand) {
    if (entity.worldObj.isRemote) {
        return false;
    }
    if (entity instanceof IShearable) {
        IShearable target = (IShearable) entity;
        BlockPos pos = new BlockPos(entity.posX, entity.posY, entity.posZ);
        if (target.isShearable(itemstack, entity.worldObj, pos)) {
            List<ItemStack> drops = target.onSheared(itemstack, entity.worldObj, pos, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, itemstack));
            final CauseTracker causeTracker = ((IMixinWorldServer) entity.worldObj).getCauseTracker();
            final PhaseData currentData = causeTracker.getStack().peek();
            final IPhaseState currentState = currentData.state;
            final PhaseContext phaseContext = currentData.context;
            final Random random = EntityUtil.fromNative(entity).getRandom();
            final IMixinEntity mixinEntity = EntityUtil.toMixin(entity);
            final double posX = entity.posX;
            final double posY = entity.posY + 1.0F;
            final double posZ = entity.posZ;
            final Vector3d position = new Vector3d(posX, posY, posZ);
            for (ItemStack drop : drops) {
                final ItemStack item;
                if (drop.getItem() != null) {
                    final ItemStackSnapshot snapshot = ItemStackUtil.createSnapshot(drop);
                    final List<ItemStackSnapshot> original = new ArrayList<>();
                    original.add(snapshot);
                    final DropItemEvent.Pre dropEvent = SpongeEventFactory.createDropItemEventPre(Cause.of(NamedCause.source(entity)), ImmutableList.of(snapshot), original);
                    if (dropEvent.isCancelled()) {
                        continue;
                    }
                    Transform<World> suggested = new Transform<>(mixinEntity.getWorld(), position);
                    SpawnCause cause = EntitySpawnCause.builder().entity(mixinEntity).type(SpawnTypes.DROPPED_ITEM).build();
                    ConstructEntityEvent.Pre event = SpongeEventFactory.createConstructEntityEventPre(Cause.of(NamedCause.source(cause)), EntityTypes.ITEM, suggested);
                    SpongeImpl.postEvent(event);
                    item = event.isCancelled() ? null : ItemStackUtil.fromSnapshotToNative(dropEvent.getDroppedItems().get(0));
                } else {
                    continue;
                }
                if (item == null) {
                    continue;
                }
                if (item.stackSize != 0 && item.getItem() != null) {
                    if (!currentState.getPhase().ignoresItemPreMerging(currentState) && SpongeImpl.getGlobalConfig().getConfig().getOptimizations().doDropsPreMergeItemDrops()) {
                        if (currentState.tracksEntitySpecificDrops()) {
                            final Multimap<UUID, ItemDropData> multimap = phaseContext.getCapturedEntityDropSupplier().get();
                            final Collection<ItemDropData> itemStacks = multimap.get(entity.getUniqueID());
                            SpongeImplHooks.addItemStackToListForSpawning(itemStacks, ItemDropData.item(item).motion(new Vector3d((random.nextFloat() - random.nextFloat()) * 0.1F, random.nextFloat() * 0.05F, (random.nextFloat() - random.nextFloat()) * 0.1F)).position(new Vector3d(posX, posY, posZ)).build());
                            continue;
                        } else {
                            final List<ItemDropData> itemStacks = phaseContext.getCapturedItemStackSupplier().get();
                            SpongeImplHooks.addItemStackToListForSpawning(itemStacks, ItemDropData.item(item).position(new Vector3d(posX, posY, posZ)).motion(new Vector3d((random.nextFloat() - random.nextFloat()) * 0.1F, random.nextFloat() * 0.05F, (random.nextFloat() - random.nextFloat()) * 0.1F)).build());
                            continue;
                        }
                    }
                    EntityItem entityitem = new EntityItem(entity.worldObj, posX, posY, posZ, item);
                    entityitem.setDefaultPickupDelay();
                    entityitem.motionY += random.nextFloat() * 0.05F;
                    entityitem.motionX += (random.nextFloat() - random.nextFloat()) * 0.1F;
                    entityitem.motionZ += (random.nextFloat() - random.nextFloat()) * 0.1F;
                    if (currentState.getPhase().doesCaptureEntityDrops(currentState)) {
                        if (currentState.tracksEntitySpecificDrops()) {
                            phaseContext.getCapturedEntityItemDropSupplier().get().put(entity.getUniqueID(), entityitem);
                        } else {
                            phaseContext.getCapturedItemsSupplier().get().add(entityitem);
                        }
                        continue;
                    }
                    entity.worldObj.spawnEntityInWorld(entityitem);
                }
            }
            itemstack.damageItem(1, entity);
        }
        return true;
    }
    return false;
}

Output:
             final CauseTracker causeTracker = ((IMixinWorldServer) entity.worldObj).getCauseTracker();
-            final PhaseData currentData = causeTracker.getStack().peek();
+            final PhaseData currentData = causeTracker.getCurrentPhaseData();
             final IPhaseState currentState = currentData.state;


Input:
public Map<SkyKey, NodeEntry> getBatch(SkyKey requestor, Reason reason, Iterable<? extends SkyKey> keys) {
    HashMap<SkyKey, NodeEntry> result = new HashMap<>();
    for (SkyKey key : keys) {
        InMemoryNodeEntry entry = get(null, Reason.OTHER, key);
        if (entry != null) {
            result.put(key, entry);
        }
    }
    return result;
}

Output:
     for (SkyKey key : keys) {
-        InMemoryNodeEntry entry = get(null, Reason.OTHER, key);
+        NodeEntry entry = get(null, Reason.OTHER, key);
         if (entry != null) {


Input:
public static void appraisal(RodaUser user, SelectedItems<IndexedAIP> selected, boolean accept, String rejectReason) throws GenericException, AuthorizationDeniedException, RequestNotValidException, NotFoundException {
    List<String> listOfIds = consolidate(user, IndexedAIP.class, selected);
    ModelService model = RodaCoreFactory.getModelService();
    IndexService index = RodaCoreFactory.getIndexService();
    Date now = new Date();
    Map<String, Pair<Integer, Integer>> jobState = new HashMap<>();
    String userAgentId;
    try {
        boolean notifyAgent = true;
        PreservationMetadata pm = PremisV3Utils.createPremisUserAgentBinary(user.getName(), model, index, notifyAgent);
        userAgentId = pm.getId();
    } catch (AlreadyExistsException e) {
        userAgentId = IdUtils.getUserAgentId(user.getName());
    } catch (ValidationException e) {
        throw new GenericException(e);
    }
    for (String aipId : listOfIds) {
        AIP aip = model.retrieveAIP(aipId);
        String jobId = aip.getIngestJobId();
        if (accept) {
            aip.setState(AIPState.ACTIVE);
            model.updateAIPState(aip, user.getName());
            String id = IdUtils.createPreservationMetadataId(PreservationMetadataType.EVENT);
            PreservationEventType type = PreservationEventType.ACCESSION;
            String preservationEventDescription = AutoAcceptSIPPlugin.DESCRIPTION;
            List<LinkingIdentifier> sources = new ArrayList<>();
            List<LinkingIdentifier> outcomes = Arrays.asList(PluginHelper.getLinkingIdentifier(aipId, RodaConstants.PRESERVATION_LINKING_OBJECT_OUTCOME));
            PluginState outcome = PluginState.SUCCESS;
            String outcomeDetailNote = AutoAcceptSIPPlugin.SUCCESS_MESSAGE;
            String outcomeDetailExtension = null;
            boolean notifyEvent = true;
            try {
                ContentPayload premisEvent = PremisV3Utils.createPremisEventBinary(id, now, type.toString(), preservationEventDescription, sources, outcomes, outcome.name(), outcomeDetailNote, outcomeDetailExtension, Arrays.asList(userAgentId));
                model.createPreservationMetadata(PreservationMetadataType.EVENT, id, aipId, null, null, null, premisEvent, notifyEvent);
            } catch (AlreadyExistsException | ValidationException e) {
                throw new GenericException(e);
            }
        } else {
            model.deleteAIP(aipId);
            try {
                Map<String, String> parameters = new HashMap<String, String>();
                parameters.put("String_Node_Str", aipId);
                Job job = new Job();
                job.setName(RiskIncidenceRemoverPlugin.class.getSimpleName() + "String_Node_Str" + job.getStartDate());
                job.setPlugin(RiskIncidenceRemoverPlugin.class.getName());
                job.setPluginParameters(parameters);
                job.setSourceObjects(new SelectedItemsAll<>(AIP.class.getName()));
                Jobs.createJob(user, job);
            } catch (JobAlreadyStartedException e) {
                LOGGER.error("String_Node_Str");
            }
        }
        Report report = model.retrieveJobReport(jobId, aipId);
        Report reportItem = new Report();
        reportItem.setTitle("String_Node_Str");
        reportItem.setPlugin(user.getName());
        reportItem.setPluginDetails(rejectReason);
        reportItem.setPluginState(accept ? PluginState.SUCCESS : PluginState.FAILURE);
        reportItem.setOutcomeObjectState(accept ? AIPState.ACTIVE : AIPState.DELETED);
        reportItem.setDateCreated(now);
        report.addReport(reportItem);
        model.createOrUpdateJobReport(report);
        Pair<Integer, Integer> pair = jobState.get(jobId);
        if (pair == null) {
            jobState.put(jobId, Pair.create(1, accept ? 1 : 0));
        } else {
            jobState.put(jobId, Pair.create(pair.getFirst() + 1, pair.getSecond() + (accept ? 1 : 0)));
        }
    }
    for (Entry<String, Pair<Integer, Integer>> entry : jobState.entrySet()) {
        String jobId = entry.getKey();
        int total = entry.getValue().getFirst();
        int accepted = entry.getValue().getSecond();
        int rejected = total - accepted;
        Job job = model.retrieveJob(jobId);
        if (rejected > 0) {
            job.getJobStats().setSourceObjectsProcessedWithSuccess(job.getJobStats().getSourceObjectsProcessedWithSuccess() - rejected);
            job.getJobStats().setSourceObjectsProcessedWithFailure(job.getJobStats().getSourceObjectsProcessedWithFailure() + rejected);
        }
        job.getJobStats().setOutcomeObjectsWithManualIntervention(job.getJobStats().getOutcomeObjectsWithManualIntervention() - total);
        model.createOrUpdateJob(job);
    }
    RodaCoreFactory.getIndexService().commit(IndexedAIP.class, Job.class, Report.class, IndexedPreservationEvent.class);
}

Output:
             model.deleteAIP(aipId);
-            try {
-                Map<String, String> parameters = new HashMap<String, String>();
-                parameters.put("String_Node_Str", aipId);
-                Job job = new Job();
-                job.setName(RiskIncidenceRemoverPlugin.class.getSimpleName() + "String_Node_Str" + job.getStartDate());
-                job.setPlugin(RiskIncidenceRemoverPlugin.class.getName());
-                job.setPluginParameters(parameters);
-                job.setSourceObjects(new SelectedItemsAll<>(AIP.class.getName()));
-                Jobs.createJob(user, job);
-            } catch (JobAlreadyStartedException e) {
-                LOGGER.error("String_Node_Str");
-            }
+            aipsToDelete.add(aipId);
         }


Input:
public void run() {
    setupSandbox();
    mSession = new SessionWrapper(mPlatform, mSandbox);
    loop();
}

Output:
     mSession = new SessionWrapper(mPlatform, mSandbox);
-    loop();
+    try {
+        loop();
+    } catch (IOException e) {
+        e.printStackTrace();
+        System.exit(-1);
+    }
 }


Input:
private void drawComponentOutline(Canvas canvas, View view) {
    canvas.drawRect(view.getLeft(), view.getTop() + 1, view.getRight() - 1, view.getBottom() - 1, outlinePaint);
}

Output:
 private void drawComponentOutline(Canvas canvas, View view) {
-    canvas.drawRect(view.getLeft(), view.getTop() + 1, view.getRight() - 1, view.getBottom() - 1, outlinePaint);
+    canvas.drawRect(view.getLeft(), view.getTop(), view.getRight() - 1, view.getBottom() - 1, outlinePaint);
 }


Input:
public JField getField() {
    return field;
}

Output:
 public JField getField() {
-    return field;
+    return (JField) getTarget();
 }


Input:
public boolean equals(final Object o) {
    if (this == o)
        return true;
    if (!(o instanceof AtlasGlossaryCategory))
        return false;
    if (!super.equals(o))
        return false;
    final AtlasGlossaryCategory category = (AtlasGlossaryCategory) o;
    return Objects.equals(getDisplayName(), category.getDisplayName()) && Objects.equals(getShortDescription(), category.getShortDescription()) && Objects.equals(getLongDescription(), category.getLongDescription()) && Objects.equals(anchor, category.anchor) && Objects.equals(parentCategory, category.parentCategory) && Objects.equals(childrenCategories, category.childrenCategories) && Objects.equals(terms, category.terms) && Objects.equals(getClassifications(), category.getClassifications());
}

Output:
     final AtlasGlossaryCategory category = (AtlasGlossaryCategory) o;
-    return Objects.equals(getDisplayName(), category.getDisplayName()) && Objects.equals(getShortDescription(), category.getShortDescription()) && Objects.equals(getLongDescription(), category.getLongDescription()) && Objects.equals(anchor, category.anchor) && Objects.equals(parentCategory, category.parentCategory) && Objects.equals(childrenCategories, category.childrenCategories) && Objects.equals(terms, category.terms) && Objects.equals(getClassifications(), category.getClassifications());
+    return Objects.equals(anchor, category.anchor) && Objects.equals(parentCategory, category.parentCategory) && Objects.equals(childrenCategories, category.childrenCategories) && Objects.equals(terms, category.terms);
 }


Input:
public Element getElement(String key) {
    return cache.get(key);
}

Output:
 public Element getElement(String key) {
-    return cache.get(key);
+    Element element = cache.get(key);
+    if (logger.isDebugEnabled()) {
+        if (null != element) {
+            logger.debug("String_Node_Str", key);
+        }
+    }
+    return element;
 }


Input:
public boolean sellTransaction(double price, ItemStack item) {
    return traderConfig.sellTransaction(player.getName(), price * ((int) item.getAmount() / selectedItem.getAmount()));
}

Output:
 public boolean sellTransaction(double price, ItemStack item) {
-    return traderConfig.sellTransaction(player.getName(), price * ((int) item.getAmount() / selectedItem.getAmount()));
+    return traderConfig.sellTransaction(player.getName(), price);
 }


Input:
public void setSessions(TraceSessionComponent[] sessions) {
    fSessions = sessions;
}

Output:
 public void setSessions(TraceSessionComponent[] sessions) {
-    fSessions = sessions;
+    if (sessions != null) {
+        fSessions = Arrays.copyOf(sessions, sessions.length);
+        return;
+    }
+    fSessions = null;
 }


Input:
public static QueryRuntime parse(Query query, SiddhiAppContext siddhiAppContext, Map<String, AbstractDefinition> streamDefinitionMap, Map<String, AbstractDefinition> tableDefinitionMap, Map<String, AbstractDefinition> windowDefinitionMap, Map<String, AbstractDefinition> aggregationDefinitionMap, Map<String, Table> tableMap, Map<String, AggregationRuntime> aggregationMap, Map<String, Window> windowMap, LockSynchronizer lockSynchronizer, String queryIndex) {
    List<VariableExpressionExecutor> executors = new ArrayList<VariableExpressionExecutor>();
    QueryRuntime queryRuntime;
    Element nameElement = null;
    LatencyTracker latencyTracker = null;
    LockWrapper lockWrapper = null;
    try {
        nameElement = AnnotationHelper.getAnnotationElement("String_Node_Str", "String_Node_Str", query.getAnnotations());
        String queryName = null;
        if (nameElement != null) {
            queryName = nameElement.getValue();
        } else {
            queryName = "String_Node_Str" + queryIndex + "String_Node_Str" + UUID.randomUUID().toString();
        }
        latencyTracker = QueryParserHelper.createLatencyTracker(siddhiAppContext, queryName, SiddhiConstants.METRIC_INFIX_QUERIES, null);
        OutputStream.OutputEventType outputEventType = query.getOutputStream().getOutputEventType();
        boolean outputExpectsExpiredEvents = false;
        if (outputEventType != OutputStream.OutputEventType.CURRENT_EVENTS) {
            outputExpectsExpiredEvents = true;
        }
        StreamRuntime streamRuntime = InputStreamParser.parse(query.getInputStream(), siddhiAppContext, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, aggregationDefinitionMap, tableMap, windowMap, aggregationMap, executors, latencyTracker, outputExpectsExpiredEvents, queryName);
        QuerySelector selector = SelectorParser.parse(query.getSelector(), query.getOutputStream(), siddhiAppContext, streamRuntime.getMetaComplexEvent(), tableMap, executors, queryName, SiddhiConstants.UNKNOWN_STATE);
        boolean isWindow = query.getInputStream() instanceof JoinInputStream;
        if (!isWindow && query.getInputStream() instanceof SingleInputStream) {
            for (StreamHandler streamHandler : ((SingleInputStream) query.getInputStream()).getStreamHandlers()) {
                if (streamHandler instanceof org.wso2.siddhi.query.api.execution.query.input.handler.Window) {
                    isWindow = true;
                    break;
                }
            }
        }
        Element synchronizedElement = AnnotationHelper.getAnnotationElement("String_Node_Str", null, query.getAnnotations());
        if (synchronizedElement != null) {
            if (!("String_Node_Str".equalsIgnoreCase(synchronizedElement.getValue()))) {
                lockWrapper = new LockWrapper("String_Node_Str");
                lockWrapper.setLock(new ReentrantLock());
            }
        } else {
            if (isWindow || !(streamRuntime instanceof SingleStreamRuntime)) {
                if (streamRuntime instanceof JoinStreamRuntime) {
                    MetaStateEvent metaStateEvent = (MetaStateEvent) streamRuntime.getMetaComplexEvent();
                    MetaStreamEvent[] metaStreamEvents = metaStateEvent.getMetaStreamEvents();
                    if (metaStreamEvents[0].getEventType() == EventType.WINDOW && metaStreamEvents[1].getEventType() == EventType.WINDOW) {
                        LockWrapper leftLockWrapper = windowMap.get(metaStreamEvents[0].getLastInputDefinition().getId()).getLock();
                        LockWrapper rightLockWrapper = windowMap.get(metaStreamEvents[1].getLastInputDefinition().getId()).getLock();
                        if (!leftLockWrapper.equals(rightLockWrapper)) {
                            lockSynchronizer.sync(leftLockWrapper, rightLockWrapper);
                        }
                        lockWrapper = leftLockWrapper;
                    } else if (metaStreamEvents[0].getEventType() == EventType.WINDOW) {
                        lockWrapper = windowMap.get(metaStreamEvents[0].getLastInputDefinition().getId()).getLock();
                    } else if (metaStreamEvents[1].getEventType() == EventType.WINDOW) {
                        lockWrapper = windowMap.get(metaStreamEvents[1].getLastInputDefinition().getId()).getLock();
                    } else {
                        lockWrapper = new LockWrapper("String_Node_Str");
                        lockWrapper.setLock(new ReentrantLock());
                    }
                } else {
                    lockWrapper = new LockWrapper("String_Node_Str");
                    lockWrapper.setLock(new ReentrantLock());
                }
            }
        }
        OutputRateLimiter outputRateLimiter = OutputParser.constructOutputRateLimiter(query.getOutputStream().getId(), query.getOutputRate(), query.getSelector().getGroupByList().size() != 0, isWindow, siddhiAppContext.getScheduledExecutorService(), siddhiAppContext, queryName);
        if (outputRateLimiter instanceof WrappedSnapshotOutputRateLimiter) {
            selector.setBatchingEnabled(false);
        }
        siddhiAppContext.addEternalReferencedHolder(outputRateLimiter);
        OutputCallback outputCallback = OutputParser.constructOutputCallback(query.getOutputStream(), streamRuntime.getMetaComplexEvent().getOutputStreamDefinition(), tableMap, windowMap, siddhiAppContext, !(streamRuntime instanceof SingleStreamRuntime), queryName);
        QueryParserHelper.reduceMetaComplexEvent(streamRuntime.getMetaComplexEvent());
        QueryParserHelper.updateVariablePosition(streamRuntime.getMetaComplexEvent(), executors);
        QueryParserHelper.initStreamRuntime(streamRuntime, streamRuntime.getMetaComplexEvent(), lockWrapper, queryName);
        selector.setEventPopulator(StateEventPopulatorFactory.constructEventPopulator(streamRuntime.getMetaComplexEvent()));
        queryRuntime = new QueryRuntime(query, siddhiAppContext, streamRuntime, selector, outputRateLimiter, outputCallback, streamRuntime.getMetaComplexEvent(), lockWrapper != null, queryName);
        if (outputRateLimiter instanceof WrappedSnapshotOutputRateLimiter) {
            selector.setBatchingEnabled(false);
            ((WrappedSnapshotOutputRateLimiter) outputRateLimiter).init(streamRuntime.getMetaComplexEvent().getOutputStreamDefinition().getAttributeList().size(), selector.getAttributeProcessorList(), streamRuntime.getMetaComplexEvent());
        }
        outputRateLimiter.init(siddhiAppContext, lockWrapper, queryName);
    } catch (DuplicateDefinitionException e) {
        if (nameElement != null) {
            throw new DuplicateDefinitionException(e.getMessageWithOutContext() + "String_Node_Str" + nameElement.getValue(), e, e.getQueryContextStartIndex(), e.getQueryContextEndIndex(), siddhiAppContext.getName(), siddhiAppContext.getSiddhiAppString());
        } else {
            throw new DuplicateDefinitionException(e.getMessage(), e, e.getQueryContextStartIndex(), e.getQueryContextEndIndex(), siddhiAppContext.getName(), siddhiAppContext.getSiddhiAppString());
        }
    } catch (Throwable t) {
        ExceptionUtil.populateQueryContext(t, query, siddhiAppContext);
        throw t;
    }
    return queryRuntime;
}

Output:
         siddhiAppContext.addEternalReferencedHolder(outputRateLimiter);
-        OutputCallback outputCallback = OutputParser.constructOutputCallback(query.getOutputStream(), streamRuntime.getMetaComplexEvent().getOutputStreamDefinition(), tableMap, windowMap, siddhiAppContext, !(streamRuntime instanceof SingleStreamRuntime), queryName);
+        OutputCallback outputCallback = OutputParser.constructOutputCallback(query.getOutputStream(), streamRuntime.getMetaComplexEvent().getOutputStreamDefinition(), tableMap, windowMap, siddhiAppContext, !(streamRuntime instanceof SingleStreamRuntime) || !query.getSelector().getGroupByList().isEmpty(), queryName);
         QueryParserHelper.reduceMetaComplexEvent(streamRuntime.getMetaComplexEvent());


Input:
public static boolean isUpperCase(char ch) {
    return DefaultCaseConverter.toUpperCase(ch) == ch;
}

Output:
 public static boolean isUpperCase(char ch) {
-    return DefaultCaseConverter.toUpperCase(ch) == ch;
+    return (ch >= 'A' && ch <= 'Z') || (ch >= 0xC0 && ch <= 0xD6) || (ch >= 0xD8 && ch <= 0xDE);
 }