Input:
public void apply() throws Exception {
    SearchResults searchResults = dataset.search(namespaceId, "String_Node_Str", targets, SortInfo.DEFAULT, 0, 3, 1, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(flowEntry, dsEntry, dsEntry, dsEntry, appEntry, appEntry, appEntry, appEntry), searchResults.getResults());
    SortInfo nameAsc = new SortInfo(AbstractSystemMetadataWriter.ENTITY_NAME_KEY, SortInfo.SortOrder.ASC);
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameAsc, 0, 2, 0, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(flowEntry, dsEntry), searchResults.getResults());
    Assert.assertEquals(2, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameAsc, 1, 2, 0, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(dsEntry, appEntry), searchResults.getResults());
    Assert.assertEquals(3, searchResults.getAllResults().size());
    SortInfo nameDesc = new SortInfo(AbstractSystemMetadataWriter.ENTITY_NAME_KEY, SortInfo.SortOrder.DESC);
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameDesc, 0, 2, 0, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(appEntry, dsEntry), searchResults.getResults());
    Assert.assertEquals(2, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameDesc, 2, 1, 0, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(flowEntry), searchResults.getResults());
    Assert.assertEquals(3, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameAsc, 2, 0, 0, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertTrue(searchResults.getResults().isEmpty());
    Assert.assertEquals(2, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameDesc, 1, 0, 0, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertTrue(searchResults.getResults().isEmpty());
    Assert.assertEquals(1, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameAsc, 4, 0, 0, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertTrue(searchResults.getResults().isEmpty());
    Assert.assertEquals(3, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameDesc, 100, 0, 0, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertTrue(searchResults.getResults().isEmpty());
    Assert.assertEquals(3, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameAsc, 0, 1, 3, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(flowEntry), searchResults.getResults());
    Assert.assertEquals(ImmutableList.of(dsName, appName), searchResults.getCursors());
    Assert.assertEquals(3, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameAsc, 0, 1, 3, searchResults.getCursors().get(0), false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(dsEntry), searchResults.getResults());
    Assert.assertEquals(ImmutableList.of(appName), searchResults.getCursors());
    Assert.assertEquals(2, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameAsc, 0, 1, 3, searchResults.getCursors().get(0), false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(appEntry), searchResults.getResults());
    Assert.assertEquals(ImmutableList.of(), searchResults.getCursors());
    Assert.assertEquals(1, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameAsc, 0, 2, 3, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(flowEntry, dsEntry), searchResults.getResults());
    Assert.assertEquals(ImmutableList.of(appName), searchResults.getCursors());
    Assert.assertEquals(3, searchResults.getAllResults().size());
    searchResults = dataset.search(namespaceId, "String_Node_Str", targets, nameAsc, 3, 1, 2, null, false, EnumSet.allOf(EntityScope.class));
    Assert.assertEquals(ImmutableList.of(), searchResults.getResults());
    Assert.assertEquals(ImmutableList.of(), searchResults.getCursors());
    Assert.assertEquals(3, searchResults.getAllResults().size());
}

Output:
     SearchResults searchResults = dataset.search(namespaceId, "String_Node_Str", targets, SortInfo.DEFAULT, 0, 3, 1, null, false, EnumSet.allOf(EntityScope.class));
-    Assert.assertEquals(ImmutableList.of(flowEntry, dsEntry, dsEntry, dsEntry, appEntry, appEntry, appEntry, appEntry), searchResults.getResults());
+    Assert.assertEquals(ImmutableList.of(flowEntry, dsEntry, dsEntry, dsEntry, appEntry, appEntry, appEntry, appEntry), searchResults.getResultsFromOffset());
     SortInfo nameAsc = new SortInfo(AbstractSystemMetadataWriter.ENTITY_NAME_KEY, SortInfo.SortOrder.ASC);


Input:
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String properNoun = null;
    Matcher matcher = urlPattern.matcher(request.getRequestURI());
    if (matcher.find()) {
        properNoun = matcher.group(1);
        if ("String_Node_Str".equals(properNoun)) {
            properNoun = null;
        }
    } else {
        response.sendError(HttpServletResponse.SC_NOT_FOUND, request.getRequestURI());
        return null;
    }
    String httpMethod = request.getMethod().toUpperCase();
    VerbType verb = null;
    if ("String_Node_Str".equals(httpMethod)) {
        verb = VerbType.create;
    } else if ("String_Node_Str".equals(httpMethod)) {
        verb = VerbType.read;
    } else if ("String_Node_Str".equals(httpMethod)) {
        verb = VerbType.update;
    } else if ("String_Node_Str".equals(httpMethod)) {
        verb = VerbType.delete;
    } else {
        response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "String_Node_Str" + httpMethod);
        return null;
    }
    try {
        return handleRESTOperation(properNoun, verb, request, response);
    } catch (Exception e) {
        if (this.exceptionHandler != null) {
            return this.exceptionHandler.resolveException(request, response, this, e);
        } else {
            throw e;
        }
    }
}

Output:
 protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
-    String properNoun = null;
+    String properNoun;
     Matcher matcher = urlPattern.matcher(request.getRequestURI());


Input:
public void endElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver) {
    if (isStartElementOpen) {
        openAndCloseStartElement();
        isStartElementOpen = false;
    }
    try {
        contentHandler.endElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), xPathFragment.getShortName());
        List<String> currentLevelPrefixMappings = prefixMappings.remove(prefixMappings.size() - 1);
        if (null != currentLevelPrefixMappings) {
            for (String prefix : currentLevelPrefixMappings) {
                contentHandler.endPrefixMapping(prefix);
            }
        }
        isStartElementOpen = false;
    } catch (SAXException e) {
        throw XMLMarshalException.marshalException(e);
    }
}

Output:
     try {
-        contentHandler.endElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), xPathFragment.getShortName());
+        String uri = xPathFragment.getNamespaceURI();
+        if (uri == null) {
+            uri = XMLConstants.EMPTY_STRING;
+        }
+        contentHandler.endElement(uri, xPathFragment.getLocalName(), xPathFragment.getShortName());
         List<String> currentLevelPrefixMappings = prefixMappings.remove(prefixMappings.size() - 1);


Input:
public void update(final IJavaElementSelection selection) {
    if (selection != null && table != null) {
        table.setContext(selection.getElementLocation());
        for (final TableItem item : table.getItems()) {
            if (item.getChecked()) {
                new UIJob("String_Node_Str") {
                    public IStatus runInUIThread(final IProgressMonitor monitor) {
                        final IProvider provider = (IProvider) ((Control) item.getData()).getData();
                        final boolean hasContent = provider.selectionChanged(selection);
                        table.setGrayed(item, !hasContent);
                        return Status.OK_STATUS;
                    }
                }.schedule();
            }
        }
        new UIJob("String_Node_Str") {
            public IStatus runInUIThread(final IProgressMonitor monitor) {
                providersComposite.layout(true);
                scrolled.layout(true);
                scrolled.setMinHeight(providersComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y);
                return Status.OK_STATUS;
            }
        }.schedule();
    }
}

Output:
             }
-        }.schedule();
+        }.schedule(500);
     }


Input:
private static void fillMultiLabelClfDataSet(MultiLabelClfDataSet dataSet, File trecFile) throws IOException {
    File matrixFile = new File(trecFile, TREC_MATRIX_FILE_NAME);
    try (BufferedReader br = new BufferedReader(new FileReader(matrixFile))) {
        String line = null;
        int dataIndex = 0;
        while ((line = br.readLine()) != null) {
            String[] lineSplit = line.split("String_Node_Str");
            String multiLabelString = lineSplit[0];
            String[] multiLabelSplit = multiLabelString.split(Pattern.quote("String_Node_Str"));
            for (String label : multiLabelSplit) {
                if (label.equals("String_Node_Str")) {
                    continue;
                }
                dataSet.addLabel(dataIndex, Integer.parseInt(label));
            }
            for (int i = 1; i < lineSplit.length; i++) {
                String pair = lineSplit[i];
                if (pair.startsWith("String_Node_Str")) {
                    break;
                }
                String[] pairSplit = pair.split("String_Node_Str");
                int featureIndex = Integer.parseInt(pairSplit[0]);
                double featureValue = Double.parseDouble(pairSplit[1]);
                dataSet.setFeatureValue(dataIndex, featureIndex, featureValue);
            }
            dataIndex += 1;
        }
    }
}

Output:
             String[] lineSplit = line.split("String_Node_Str");
-            String multiLabelString = lineSplit[0];
+            String multiLabelString = null;
+            try {
+                multiLabelString = lineSplit[0];
+            } catch (Exception e) {
+                System.out.println("String_Node_Str");
+                System.out.println("String_Node_Str" + dataIndex);
+                System.out.println("String_Node_Str" + line);
+            }
             String[] multiLabelSplit = multiLabelString.split(Pattern.quote("String_Node_Str"));


Input:
public boolean doRemove(XtentisPort port, Object wsObj) throws RemoteException {
    WSDataModelPK pk = new WSDataModelPK();
    String name = ((WSDataModel) wsObj).getName();
    pk.setPk(name);
    port.deleteDataModel(new WSDeleteDataModel(pk));
    TreeObjectUtil.deleteSpecificationFromAttachedRole(port, name, EXtentisObjects.DataMODEL.getName());
    return true;
}

Output:
     WSDataModelPK pk = new WSDataModelPK();
-    String name = ((WSDataModel) wsObj).getName();
+    String name = cmd.getObjName();
     pk.setPk(name);


Input:
public String rcInvokeMethodStoreReturn(final String variableName, final String fqcn, final String name, int timeout) {
    IRobotFactory factory = getComponent().getRobotFactory();
    IEventThreadQueuer queuer = factory.getEventThreadQueuer();
    try {
        Object result = queuer.invokeAndWait("String_Node_Str", createCallable(fqcn, name), timeout);
        return result.toString();
    } catch (TimeoutException e) {
        throw new StepExecutionException(e.toString(), EventFactory.createActionError(TestErrorEvent.CONFIRMATION_TIMEOUT));
    }
}

Output:
         Object result = queuer.invokeAndWait("String_Node_Str", createCallable(fqcn, name), timeout);
-        return result.toString();
+        return result == null ? StringConstants.NULL : result.toString();
     } catch (TimeoutException e) {


Input:
public List<MatchResult> findMatches(SequenceMinHashes seqMinHashes, double minScore, boolean allToAll) {
    MinHash minHash = seqMinHashes.getMainHashes();
    if (this.hashes.size() != minHash.numHashes())
        throw new FastAlignRuntimeException("String_Node_Str" + this.hashes.size() + "String_Node_Str" + minHash.numHashes() + "String_Node_Str");
    HashMap<MatchId, HitInfo> matchHitMap = new HashMap<MatchId, HitInfo>(size() / 10 + 1);
    int[][] subSeqMinHashes = minHash.getSubSeqMinHashes();
    for (int subSequence = 0; subSequence < subSeqMinHashes.length; subSequence++) {
        int hashIndex = 0;
        for (HashMap<Integer, ArrayList<SubSequenceId>> currHash : this.hashes) {
            ArrayList<SubSequenceId> currentHashMatchList = currHash.get(subSeqMinHashes[subSequence][hashIndex]);
            if (currentHashMatchList != null) {
                for (SubSequenceId subSequenceId : currentHashMatchList) {
                    MatchId matchedId = new MatchId(subSequenceId, subSequence);
                    HitInfo currentHitInfo = matchHitMap.get(matchedId);
                    if (currentHitInfo == null) {
                        currentHitInfo = new HitInfo();
                        matchHitMap.put(matchedId, currentHitInfo);
                    }
                    currentHitInfo.addHit();
                }
            }
            hashIndex++;
        }
    }
    this.numberSubSequencesHit.getAndAdd(matchHitMap.size());
    HashMap<SequenceId, Integer> bestSequenceHit = new HashMap<SequenceId, Integer>(matchHitMap.size());
    for (Entry<MatchId, HitInfo> match : matchHitMap.entrySet()) {
        SequenceId currId = match.getKey().id.getId();
        int currValue = match.getValue().count;
        Integer prevBestCount = bestSequenceHit.get(currId);
        if (prevBestCount == null || prevBestCount < currValue)
            bestSequenceHit.put(currId, currValue);
    }
    this.numberSequencesHit.getAndAdd(bestSequenceHit.size());
    ArrayList<MatchResult> matches = new ArrayList<MatchResult>(32);
    int[][] fullKmerMatch = null;
    for (Entry<SequenceId, Integer> match : bestSequenceHit.entrySet()) {
        if (match.getKey().getHeaderId() == seqMinHashes.getSequenceId().getHeaderId())
            continue;
        if (allToAll && match.getKey().getHeaderId() > seqMinHashes.getSequenceId().getHeaderId())
            continue;
        if (match.getValue() >= this.numMinMatches) {
            SequenceMinHashes matchedHash = this.sequenceVectorsHash.get(match.getKey());
            if (fullKmerMatch == null)
                fullKmerMatch = seqMinHashes.getFullHashes();
            Pair<Double, Integer> result = seqMinHashes.getFullScore(fullKmerMatch, matchedHash);
            double matchScore = result.x;
            int shift = result.y;
            int shiftb = -shift - seqMinHashes.getSequenceLength() + matchedHash.getSequenceLength();
            this.numberSequencesFullyCompared.getAndIncrement();
            if (matchScore >= minScore) {
                MatchResult currResult = new MatchResult(seqMinHashes.getSequenceId(), match.getKey(), matchScore, -shift, shiftb);
                matches.add(currResult);
            }
        }
    }
    return matches;
}

Output:
                 fullKmerMatch = seqMinHashes.getFullHashes();
-            Pair<Double, Integer> result = seqMinHashes.getFullScore(fullKmerMatch, matchedHash);
+            Pair<Double, Integer> result = seqMinHashes.getFullScore(fullKmerMatch, matchedHash, maxShift);
             double matchScore = result.x;


Input:
public String toString() {
    String result = "String_Node_Str";
    for (int layer : new TreeSet<Integer>(layer2Nodes.keySet())) {
        result += "String_Node_Str" + layer + "String_Node_Str";
        result += "String_Node_Str";
        for (Node n : layer2Nodes.get(layer)) result += n + "String_Node_Str";
        result += "String_Node_Str";
    }
    return result;
}

Output:
     String result = "String_Node_Str";
-    for (int layer : new TreeSet<Integer>(layer2Nodes.keySet())) {
+    for (int layer = 0; layer <= this.maxLayer; layer++) {
         result += "String_Node_Str" + layer + "String_Node_Str";


Input:
protected void restoreState(Object[] data) {
    window.restoreState(data);
    window.reSchedule();
}

Output:
 protected void restoreState(Object[] data) {
-    window.restoreState(data);
+    window.restoreState((Object[]) data[0]);
     window.reSchedule();


Input:
public void run() {
    if (hashCurControls == null) {
        return;
    }
    IElementParameter processTypeParameter = param.getChildParameters().get(EParameterName.ROUTE_RESOURCE_TYPE_ID.getName());
    String value = (String) processTypeParameter.getValue();
    IRepositoryViewObject lastVersion;
    try {
        lastVersion = ProxyRepositoryFactory.getInstance().getLastVersion(value);
        resetTextValue(lastVersion.getProperty().getItem());
    } catch (Exception e) {
    }
    if (elem != null && elem instanceof Node) {
        ((Node) elem).checkAndRefreshNode();
    }
}

Output:
     String value = (String) processTypeParameter.getValue();
-    IRepositoryViewObject lastVersion;
-    try {
-        lastVersion = ProxyRepositoryFactory.getInstance().getLastVersion(value);
-        resetTextValue(lastVersion.getProperty().getItem());
-    } catch (Exception e) {
+    if (value == null) {
+        labelText.setText("String_Node_Str");
+    } else {
+        IRepositoryViewObject lastVersion;
+        try {
+            lastVersion = ProxyRepositoryFactory.getInstance().getLastVersion(value);
+            if (lastVersion == null) {
+                processTypeParameter.setValue(null);
+                labelText.setText("String_Node_Str");
+            } else {
+                resetTextValue(lastVersion.getProperty().getItem());
+            }
+        } catch (Exception e) {
+        }
     }


Input:
public String rdbLoadLzfStringObject(ByteBuffer file) {
    try {
        Integer compressed_length = (Integer) rdb_load_length(file)[1];
        Integer length = (Integer) rdb_load_length(file)[1];
        byte[] buffer = new byte[compressed_length];
        byte[] output = new byte[length];
        output = LZFDecoder.decode(buffer);
        return new String(output);
    } catch (Exception ex) {
        return null;
    }
}

Output:
     try {
-        Integer compressed_length = (Integer) rdb_load_length(file)[1];
-        Integer length = (Integer) rdb_load_length(file)[1];
-        byte[] buffer = new byte[compressed_length];
-        byte[] output = new byte[length];
+        int i = 0;
+        byte Z_BYTE = 'Z';
+        byte V_BYTE = 'V';
+        byte COMPRESSED_TYPE_BYTE = 1;
+        int compressed_length = (Integer) rdb_load_length(file)[1];
+        int length = (Integer) (rdb_load_length(file)[1]);
+        byte[] buffer = new byte[compressed_length + 7];
+        byte[] output;
+        buffer[i++] = Z_BYTE;
+        buffer[i++] = V_BYTE;
+        buffer[i++] = COMPRESSED_TYPE_BYTE;
+        buffer[i++] = (byte) (compressed_length >> 8);
+        buffer[i++] = (byte) (compressed_length);
+        buffer[i++] = (byte) (length >> 8);
+        buffer[i++] = (byte) (length);
+        for (; i < compressed_length + 7; i++) buffer[i] = file.get();
         output = LZFDecoder.decode(buffer);


Input:
public void onDisconnected() {
    trace("String_Node_Str");
    synchronized (connectLock) {
        if (connectWaiting) {
            if (connectException == null)
                connectException = new Exception(Messages.IRCRootContainer_Exception_Unexplained_Disconnect);
            connectWaiting = false;
            connectLock.notify();
        }
    }
    showMessage(null, NLS.bind(Messages.IRCRootContainer_Disconnected, targetID.getName()));
    handleDisconnected();
}

Output:
     }
-    showMessage(null, NLS.bind(Messages.IRCRootContainer_Disconnected, targetID.getName()));
-    handleDisconnected();
+    if (targetID != null) {
+        showMessage(null, NLS.bind(Messages.IRCRootContainer_Disconnected, targetID.getName()));
+        handleDisconnected();
+    }
 }


Input:
public Parcelable onSaveInstanceState() {
    dismissPopup();
    Parcelable superState = super.onSaveInstanceState();
    SavedState ss = new SavedState(superState);
    boolean haveChildren = getChildCount() > 0 && mItemCount > 0;
    long selectedId = getSelectedItemId();
    ss.selectedId = selectedId;
    ss.height = getHeight();
    if (selectedId >= 0) {
        ss.viewTop = mSelectedTop;
        ss.position = getSelectedItemPosition();
        ss.firstId = INVALID_POSITION;
    } else {
        if (haveChildren) {
            View v = getChildAt(0);
            ss.viewTop = v.getTop();
            int firstPos = mFirstPosition;
            if (firstPos >= mItemCount) {
                firstPos = mItemCount - 1;
            }
            ss.position = firstPos;
            ss.firstId = mAdapter.getItemId(firstPos);
        } else {
            ss.viewTop = 0;
            ss.firstId = INVALID_POSITION;
            ss.position = 0;
        }
    }
    ss.filter = null;
    if (mFiltered) {
        final EditText textFilter = mTextFilter;
        if (textFilter != null) {
            Editable filterText = textFilter.getText();
            if (filterText != null) {
                ss.filter = filterText.toString();
            }
        }
    }
    return ss;
}

Output:
     } else {
-        if (haveChildren) {
+        if (haveChildren && mFirstPosition > 0) {
             View v = getChildAt(0);


Input:
private void visitFrame() {
    int len = this.typeStack.size();
    Object[] o = new Object[len];
    for (int i = 0; i < len; i++) {
        o[i] = this.typeStack.get(i);
    }
    this.mv.visitFrame(F_NEW, this.locals.size(), this.locals.toArray(), len, o);
}

Output:
     }
-    this.mv.visitFrame(F_NEW, this.locals.size(), this.locals.toArray(), len, o);
+    this.mv.visitFrame(F_NEW, this.maxLocals, this.locals, len, o);
 }


Input:
private void saveRecents() {
    StringBuilder str = new StringBuilder();
    int c = size();
    for (int i = 0; i < c; i++) {
        Emojicon e = get(i);
        str.append(e.getEmoji().codePointAt(0));
        if (i < (c - 1)) {
            str.append('~');
        }
    }
    SharedPreferences prefs = getPreferences();
    prefs.edit().putString(PREF_RECENTS, str.toString()).commit();
}

Output:
         Emojicon e = get(i);
-        str.append(e.getEmoji().codePointAt(0));
+        str.append(e.getEmoji());
         if (i < (c - 1)) {


Input:
public int executeCommand(String command) throws IllegalArgumentException, ProcessExecutionException, InterruptedException {
    int exitValue = -1;
    if (!this.getArgs().isBackgroundTask()) {
        this.monitoredDispatch(command);
        exitValue = this.waitFor(this.createProcessAdapter());
    } else {
        this.dispatchCommand(command);
        exitValue = 0;
    }
    return exitValue;
}

Output:
     if (!this.getArgs().isBackgroundTask()) {
-        this.monitoredDispatch(command);
-        exitValue = this.waitFor(this.createProcessAdapter());
+        output = this.monitoredDispatch(command);
+        this.waitFor(this.createProcessAdapter());
     } else {


Input:
private ModelGraveStone getGraveModel(byte graveType) {
    switch(graveType) {
        case 1:
            return cross;
        case 2:
            return horisontalPlate;
        case 3:
            return dogStatue;
        case 4:
            return catStatue;
        case 5:
        case 6:
        case 7:
        case 8:
        case 9:
            return swordGrave;
        case 0:
        default:
            return verticalPlate;
    }
}

Output:
         case 9:
-            return swordGrave;
+            return new ModelSwordGrave(this);
         case 0:


Input:
protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    float paddingLeft = getPaddingLeft();
    float paddingRight = getPaddingRight();
    float paddingTop = getPaddingTop();
    float paddingBottom = getPaddingBottom();
    float width = getWidth() - (paddingLeft + paddingRight);
    float height = getHeight() - (paddingTop + paddingBottom);
    float radius = (width > height ? width / 2 : height / 2);
    float rectLeft = width / 2 - radius + paddingLeft;
    float rectTop = height / 2 - radius + paddingTop;
    float rectRight = width / 2 - radius + paddingLeft + width;
    float rectBottom = height / 2 - radius + paddingTop + height;
    mRect.set(rectLeft, rectTop, rectRight, rectBottom);
    mPaint.setColor(mStrokeColor);
    mPaint.setShader(null);
    canvas.drawArc(mRect, mStartAngle, mSweepAngle, false, mPaint);
    mPaint.setColor(mPointStartColor);
    mPaint.setShader(new LinearGradient(getWidth(), getHeight(), 0, 0, mPointEndColor, mPointStartColor, Shader.TileMode.CLAMP));
    if (mPointSize > 0) {
        if (mPoint > mStartAngle + mPointSize / 2) {
            canvas.drawArc(mRect, mPoint - mPointSize / 2, mPointSize, false, mPaint);
        } else {
            canvas.drawArc(mRect, mPoint, mPointSize, false, mPaint);
        }
    } else {
        if (mValue == mStartValue)
            canvas.drawArc(mRect, mStartAngle, DEFAULT_LONG_POINTER_SIZE, false, mPaint);
        else
            canvas.drawArc(mRect, mStartAngle, mPoint - mStartAngle, false, mPaint);
    }
    if (mDividerSize > 0) {
        mPaint.setColor(mDividerColor);
        mPaint.setShader(null);
        int i = mDividerDrawFirst ? 0 : 1;
        int max = mDividerDrawLast ? mDividersCount + 1 : mDividersCount;
        for (; i < max; i++) {
            canvas.drawArc(mRect, mStartAngle + i * mDividerStepAngle, mDividerSize, false, mPaint);
        }
    }
}

Output:
     super.onDraw(canvas);
-    float paddingLeft = getPaddingLeft();
-    float paddingRight = getPaddingRight();
-    float paddingTop = getPaddingTop();
-    float paddingBottom = getPaddingBottom();
-    float width = getWidth() - (paddingLeft + paddingRight);
-    float height = getHeight() - (paddingTop + paddingBottom);
-    float radius = (width > height ? width / 2 : height / 2);
-    float rectLeft = width / 2 - radius + paddingLeft;
-    float rectTop = height / 2 - radius + paddingTop;
-    float rectRight = width / 2 - radius + paddingLeft + width;
-    float rectBottom = height / 2 - radius + paddingTop + height;
+    float padding = getStrokeWidth();
+    float size = getWidth() < getHeight() ? getWidth() : getHeight();
+    float width = size - (2 * padding);
+    float height = size - (2 * padding);
+    float radius = (width < height ? width / 2 : height / 2);
+    float rectLeft = (getWidth() - (2 * padding)) / 2 - radius + padding;
+    float rectTop = (getHeight() - (2 * padding)) / 2 - radius + padding;
+    float rectRight = (getWidth() - (2 * padding)) / 2 - radius + padding + width;
+    float rectBottom = (getHeight() - (2 * padding)) / 2 - radius + padding + height;
     mRect.set(rectLeft, rectTop, rectRight, rectBottom);


Input:
protected RemoteFieldValue[] createRemoteFieldValues(Map<String, List<String>> fields) {
    if (fields == null) {
        return EMPTY_FIELDS;
    }
    RemoteFieldValue[] result = new RemoteFieldValue[fields.size()];
    int i = 0;
    for (Entry<String, List<String>> entry : fields.entrySet()) {
        String customeFieldId = entry.getKey();
        List<String> fieldValues = entry.getValue();
        result[i++] = new RemoteFieldValue(customeFieldId, (String[]) fieldValues.toArray());
    }
    return result;
}

Output:
         List<String> fieldValues = entry.getValue();
-        result[i++] = new RemoteFieldValue(customeFieldId, (String[]) fieldValues.toArray());
+        if (fieldValues != null) {
+            result[i++] = new RemoteFieldValue(customeFieldId, (String[]) fieldValues.toArray());
+        } else {
+            result[i++] = new RemoteFieldValue(customeFieldId, new String[0]);
+        }
     }


Input:
private static double linearInterpolateAlongLine(int x, int yIdx, ArrayList<int[]> pixel, ArrayList<double[]> value) {
    final int leftXIdx = findLeftOfBracket(x, pixel.get(yIdx));
    final int rightXIdx = (x == pixel.get(yIdx)[leftXIdx]) ? leftXIdx : leftXIdx + 1;
    checkBracket(leftXIdx, rightXIdx, pixel.get(yIdx).length);
    final double leftNoise = value.get(yIdx)[leftXIdx];
    final double rightNoise = value.get(yIdx)[rightXIdx];
    return linearInterpolate(leftXIdx, rightXIdx, x, leftNoise, rightNoise);
}

Output:
     final double rightNoise = value.get(yIdx)[rightXIdx];
-    return linearInterpolate(leftXIdx, rightXIdx, x, leftNoise, rightNoise);
+    return linearInterpolate(pixel.get(yIdx)[leftXIdx], pixel.get(yIdx)[rightXIdx], x, leftNoise, rightNoise);
 }


Input:
public IEnableEventsDialog getEnableEventsDialog() {
    if (null == fEnableEventsDialog) {
        fEnableEventsDialog = new EnableEventsDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
    }
    return fEnableEventsDialog;
}

Output:
 public IEnableEventsDialog getEnableEventsDialog() {
-    if (null == fEnableEventsDialog) {
+    if (fEnableEventsDialog == null) {
         fEnableEventsDialog = new EnableEventsDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());


Input:
public ISourceLocation getSourceLocation() {
    int sourceLine = getSourceLine();
    if (sourceLine == 0 || sourceLine == -1) {
        return getEnclosingClass().getType().getSourceLocation();
    } else {
        return getEnclosingClass().getType().getSourceContext().makeSourceLocation(sourceLine);
    }
}

Output:
     } else {
-        return getEnclosingClass().getType().getSourceContext().makeSourceLocation(sourceLine);
+        if (getKind() == Shadow.StaticInitialization && getEnclosingClass().getType().getSourceLocation().getOffset() != 0)
+            return getEnclosingClass().getType().getSourceLocation();
+        else
+            return getEnclosingClass().getType().getSourceContext().makeSourceLocation(sourceLine);
     }


Input:
protected void paintInPanel(AffineTransform tran, Graphics2D g2) {
    DetectQrCodeControlPanel controls = (DetectQrCodeControlPanel) DetectQrCodeApp.this.controls;
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    synchronized (DetectQrCodeApp.this) {
        if (controls.bShowContour) {
            LinearContourLabelChang2004 contour = detector.getSquareDetector().getDetector().getContourFinder();
            List<Contour> contours = BinaryImageOps.convertContours(contour.getPackedPoints(), contour.getContours());
            g2.setStroke(new BasicStroke(1));
            VisualizeBinaryData.render(contours, null, Color.CYAN, scale, g2);
        }
        if (controls.bShowMarkers) {
            List<QrCode> detected = detector.getDetections();
            for (int i = 0; i < detected.size(); i++) {
                g2.setColor(new Color(0x5011FF00, true));
                QrCode qr = detected.get(i);
                VisualizeShapes.fillPolygon(qr.bounds, scale, g2);
                if (controls.bShowBits)
                    renderBinaryValues(g2, qr);
            }
            List<QrCode> failures = detector.getFailures();
            for (int i = 0; i < failures.size(); i++) {
                QrCode qr = failures.get(i);
                if (qr.failureCause.ordinal() < ALIGNMENT.ordinal())
                    continue;
                switch(qr.failureCause) {
                    case ERROR_CORRECTION:
                        g2.setColor(new Color(0x80FF0000, true));
                        break;
                    case DECODING_MESSAGE:
                        g2.setColor(new Color(0x80FF9000, true));
                        break;
                    default:
                        g2.setColor(new Color(0x80FF00C0, true));
                        break;
                }
                VisualizeShapes.fillPolygon(qr.bounds, scale, g2);
                if (controls.bShowBits)
                    renderBinaryValues(g2, qr);
            }
        }
        if (controls.bShowSquares) {
            List<Polygon2D_F64> polygons = detector.getSquareDetector().getPolygons(null, null);
            g2.setColor(Color.GREEN);
            g2.setStroke(new BasicStroke(3));
            for (Polygon2D_F64 p : polygons) {
                VisualizeShapes.drawPolygon(p, true, scale, g2);
            }
        }
        if (controls.bShowAlignmentPattern) {
            renderAlignmentPatterns(g2, detector.getDetections());
            renderAlignmentPatterns(g2, detector.getFailures());
        }
        if (controls.bShowPositionPattern) {
            FastQueue<PositionPatternNode> nodes = detector.getDetectPositionPatterns().getPositionPatterns();
            g2.setColor(Color.ORANGE);
            g2.setStroke(new BasicStroke(3));
            List<SquareEdge> list = new ArrayList<>();
            for (int i = 0; i < nodes.size(); i++) {
                SquareNode n = nodes.get(i);
                VisualizeShapes.drawPolygon(n.square, true, scale, g2);
                for (int j = 0; j < 4; j++) {
                    if (n.edges[j] != null) {
                        if (!list.contains(n.edges[j])) {
                            list.add(n.edges[j]);
                        }
                    }
                }
            }
            g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setColor(new Color(255, 150, 100));
            g2.setStroke(new BasicStroke(3));
            Line2D.Double l = new Line2D.Double();
            for (int i = 0; i < list.size(); i++) {
                SquareEdge e = list.get(i);
                Point2D_F64 a = e.a.center;
                Point2D_F64 b = e.b.center;
                l.setLine(scale * a.x, scale * a.y, scale * b.x, scale * b.y);
                g2.draw(l);
            }
        }
    }
}

Output:
         if (controls.bShowMarkers) {
-            List<QrCode> detected = detector.getDetections();
-            for (int i = 0; i < detected.size(); i++) {
-                g2.setColor(new Color(0x5011FF00, true));
-                QrCode qr = detected.get(i);
-                VisualizeShapes.fillPolygon(qr.bounds, scale, g2);
-                if (controls.bShowBits)
-                    renderBinaryValues(g2, qr);
-            }
-            List<QrCode> failures = detector.getFailures();
-            for (int i = 0; i < failures.size(); i++) {
-                QrCode qr = failures.get(i);
-                if (qr.failureCause.ordinal() < ALIGNMENT.ordinal())
-                    continue;
-                switch(qr.failureCause) {
-                    case ERROR_CORRECTION:
-                        g2.setColor(new Color(0x80FF0000, true));
-                        break;
-                    case DECODING_MESSAGE:
-                        g2.setColor(new Color(0x80FF9000, true));
-                        break;
-                    default:
-                        g2.setColor(new Color(0x80FF00C0, true));
-                        break;
+            synchronized (detected) {
+                for (int i = 0; i < detected.size(); i++) {
+                    g2.setColor(new Color(0x5011FF00, true));
+                    QrCode qr = detected.get(i);
+                    VisualizeShapes.fillPolygon(qr.bounds, scale, g2);
+                    if (controls.bShowBits)
+                        renderBinaryValues(g2, qr);
+                }
+                for (int i = 0; i < failures.size(); i++) {
+                    QrCode qr = failures.get(i);
+                    if (qr.failureCause.ordinal() < ALIGNMENT.ordinal())
+                        continue;
+                    switch(qr.failureCause) {
+                        case ERROR_CORRECTION:
+                            g2.setColor(new Color(0x80FF0000, true));
+                            break;
+                        case DECODING_MESSAGE:
+                            g2.setColor(new Color(0x80FF9000, true));
+                            break;
+                        default:
+                            g2.setColor(new Color(0x80FF00C0, true));
+                            break;
+                    }
+                    VisualizeShapes.fillPolygon(qr.bounds, scale, g2);
+                    if (controls.bShowBits)
+                        renderBinaryValues(g2, qr);
                 }


Input:
public Namespace getConnectNamespace() {
    return IDFactory.getDefault().getNamespaceByName("String_Node_Str");
}

Output:
 public Namespace getConnectNamespace() {
-    return IDFactory.getDefault().getNamespaceByName("String_Node_Str");
+    return IDFactory.getDefault().getNamespaceByName(XmppPlugin.NAMESPACE_IDENTIFIER);
 }


Input:
private static PropertyNode createAttribute(TLAttribute tlObj, PropertyOwnerInterface parent) {
    PropertyNode nn;
    TLPropertyType type = tlObj.getType();
    if (type != null && type.getNamespace() != null && type.getNamespace().equals(ModelNode.XSD_NAMESPACE) && type.getLocalName().equals("String_Node_Str"))
        nn = new IdNode((TLModelElement) tlObj, parent);
    nn = new AttributeNode(tlObj, parent);
    return nn;
}

Output:
         nn = new IdNode((TLModelElement) tlObj, parent);
-    nn = new AttributeNode(tlObj, parent);
+    else if (tlObj.isReference())
+        nn = new AttributeReferenceNode(tlObj, parent);
+    else
+        nn = new AttributeNode(tlObj, parent);
     return nn;


Input:
public void run() {
    try {
        startBarrier.await();
        QueueConsumer consumer = queueClient.createConsumer(new ConsumerConfig(0, instanceId, consumerSize, DequeueStrategy.FIFO, null));
        TransactionAware txAware = (TransactionAware) consumer;
        Stopwatch stopwatch = new Stopwatch();
        stopwatch.start();
        int dequeueCount = 0;
        while (valueSum.get() != expectedSum) {
            Transaction transaction = opex.start();
            txAware.startTx(transaction);
            try {
                DequeueResult result = consumer.dequeue();
                if (opex.canCommit(transaction, queueClient.getTxChanges()) && txAware.commitTx()) {
                    if (!opex.commit(transaction)) {
                        txAware.rollbackTx();
                    }
                }
                if (result.isEmpty()) {
                    continue;
                }
                byte[] data = result.getData().iterator().next();
                valueSum.addAndGet(Bytes.toInt(data));
                dequeueCount++;
            } catch (Exception e) {
                opex.abort(transaction);
                throw Throwables.propagate(e);
            }
        }
        long elapsed = stopwatch.elapsedTime(TimeUnit.MILLISECONDS);
        LOG.info("String_Node_Str", dequeueCount, elapsed);
        LOG.info("String_Node_Str", (double) dequeueCount * 1000 / elapsed);
        completeLatch.countDown();
    } catch (Exception e) {
        LOG.error(e.getMessage(), e);
    }
}

Output:
                 }
-                byte[] data = result.getData().iterator().next();
-                valueSum.addAndGet(Bytes.toInt(data));
-                dequeueCount++;
+                for (byte[] data : result.getData()) {
+                    valueSum.addAndGet(Bytes.toInt(data));
+                    dequeueCount++;
+                }
             } catch (Exception e) {


Input:
public void run() {
    final BufferObjectDataOutput out = serializationService.createObjectDataOutput(1024 * 32);
    try {
        out.writeInt(tasks.size());
        for (Operation task : tasks) {
            serializationService.writeObject(out, task);
        }
        final byte[] data = IOUtil.compress(out.toByteArray());
        final MigrationOperation migrationOperation = new MigrationOperation(migrationInfo, replicaVersions, data, tasks.size());
        Invocation inv = nodeEngine.getOperationService().createInvocationBuilder(PartitionServiceImpl.SERVICE_NAME, migrationOperation, to).setTryPauseMillis(1000).setReplicaIndex(getReplicaIndex()).build();
        Future future = inv.invoke();
        Boolean result = (Boolean) nodeEngine.toObject(future.get(timeout, TimeUnit.SECONDS));
        responseHandler.sendResponse(result);
    } catch (Throwable e) {
        responseHandler.sendResponse(Boolean.FALSE);
        if (e instanceof ExecutionException) {
            e = e.getCause() != null ? e.getCause() : e;
        }
        Level level = (e instanceof MemberLeftException || e instanceof InterruptedException) || !getNodeEngine().isActive() ? Level.INFO : Level.WARNING;
        getLogger().log(level, e.getMessage(), e);
    } finally {
        IOUtil.closeResource(out);
    }
}

Output:
         final MigrationOperation migrationOperation = new MigrationOperation(migrationInfo, replicaVersions, data, tasks.size());
-        Invocation inv = nodeEngine.getOperationService().createInvocationBuilder(PartitionServiceImpl.SERVICE_NAME, migrationOperation, to).setTryPauseMillis(1000).setReplicaIndex(getReplicaIndex()).build();
+        Invocation inv = nodeEngine.getOperationService().createInvocationBuilder(PartitionServiceImpl.SERVICE_NAME, migrationOperation, destination).setTryPauseMillis(1000).setReplicaIndex(getReplicaIndex()).build();
         Future future = inv.invoke();


Input:
public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(targetPointer.getFirst(game, source));
    if (player != null) {
        int cardsCount = Math.min(amount.calculate(game, source), player.getLibrary().size());
        for (int i = 0; i < cardsCount; i++) {
            Card card = player.getLibrary().removeFromTop(game);
            if (card != null) {
                card.moveToZone(Zone.GRAVEYARD, source.getId(), game, false);
            } else {
                break;
            }
        }
        return true;
    }
    return false;
}

Output:
         for (int i = 0; i < cardsCount; i++) {
-            Card card = player.getLibrary().removeFromTop(game);
+            Card card = player.getLibrary().getFromTop(game);
             if (card != null) {


Input:
public void restoreEntity(BackupDataInputStream data) {
    final String key = data.getKey();
    if (!TextUtils.isEmpty(key)) {
        if (key.equalsIgnoreCase(getApplicationContext().getString(R.string.settings_key_default_split_state)))
            return;
        if (key.equalsIgnoreCase("String_Node_Str"))
            return;
        if (key.equalsIgnoreCase("String_Node_Str"))
            return;
        if (key.equalsIgnoreCase(getApplicationContext().getString(R.string.settings_key_portrait_fullscreen)))
            return;
        if (key.equalsIgnoreCase(getApplicationContext().getString(R.string.settings_key_landscape_fullscreen)))
            return;
        if (key.equalsIgnoreCase(getApplicationContext().getString(R.string.settings_key_workaround_disable_rtl_fix)))
            return;
        if (key.equalsIgnoreCase(getApplicationContext().getString(R.string.settings_key_allow_suggestions_restart)))
            return;
    }
    super.restoreEntity(data);
}

Output:
     if (!TextUtils.isEmpty(key)) {
-        if (key.equalsIgnoreCase(getApplicationContext().getString(R.string.settings_key_default_split_state)))
+        if (key.equalsIgnoreCase(getApplicationContext().getString(R.string.settings_key_default_split_state_landscape)))
+            return;
+        if (key.equalsIgnoreCase(getApplicationContext().getString(R.string.settings_key_default_split_state_portrait)))
             return;


Input:
public static byte[] decode(String input) throws AddressFormatException {
    byte[] bytes = decodeToBigInteger(input).toByteArray();
    if ((bytes.length > 1) && (bytes[0] == 0) && (bytes[1] < 0)) {
        byte[] tmp = new byte[bytes.length - 1];
        System.arraycopy(bytes, 1, tmp, 0, bytes.length - 1);
        bytes = tmp;
    }
    return bytes;
}

Output:
     byte[] bytes = decodeToBigInteger(input).toByteArray();
-    if ((bytes.length > 1) && (bytes[0] == 0) && (bytes[1] < 0)) {
-        byte[] tmp = new byte[bytes.length - 1];
-        System.arraycopy(bytes, 1, tmp, 0, bytes.length - 1);
-        bytes = tmp;
+    boolean stripSignByte = bytes.length > 1 && bytes[0] == 0 && bytes[1] < 0;
+    int leadingZeros = 0;
+    for (int i = 0; input.charAt(i) == ALPHABET.charAt(0); i++) {
+        leadingZeros++;
     }


Input:
String write(BackupRequest req) {
    props = new Properties();
    request = req;
    File backupFileDir = null;
    if (request.configOnly) {
        backupFileDir = new File(request.domainDir, Constants.CONFIG_DIR);
    } else {
        backupFileDir = request.domainDir;
    }
    statusFile = new File(backupFileDir, Constants.PROPS_FILENAME);
    FileOutputStream out = null;
    try {
        setProps();
        out = new FileOutputStream(statusFile);
        props.store(out, Constants.PROPS_HEADER);
        return propsToString(false);
    } catch (Exception e) {
        return StringHelper.get("String_Node_Str", statusFile);
    } finally {
        if (out != null) {
            try {
                out.close();
            } catch (IOException ex) {
            }
        }
    }
}

Output:
     try {
-        setProps();
+        setProps(request);
         out = new FileOutputStream(statusFile);


Input:
public void debug(String messageFormat, Object... args) {
    if (messagePriorityThreshold <= Priority.DEBUG.getPrio()) {
        return;
    }
    addMessage(new Message(Priority.DEBUG, currentTimestamp(), String.format(messageFormat, args)));
}

Output:
 public void debug(String messageFormat, Object... args) {
-    if (messagePriorityThreshold <= Priority.DEBUG.getPrio()) {
+    if (messagePriorityThreshold > Priority.DEBUG.getPrio()) {
         return;


Input:
public void testReadAtIndex() throws Exception {
    final File file = File.createTempFile("String_Node_Str", "String_Node_Str");
    file.deleteOnExit();
    try {
        final ChronicleQueue chronicle = new SingleChronicleQueueBuilder(getTmpDir()).wireType(this.wireType).build();
        final ExcerptAppender appender = chronicle.createAppender();
        long lastIndex = -1;
        for (int i = 0; i < 100; i++) {
            final int j = i;
            final long index = appender.writeDocument(wire -> wire.write(() -> "String_Node_Str").text("String_Node_Str" + j));
            lastIndex = index;
        }
        final long cycle = cycle(lastIndex);
        final ExcerptTailer tailer = chronicle.createTailer();
        StringBuilder sb = new StringBuilder();
        for (int i : new int[] { 65 }) {
            tailer.moveToIndex(index(cycle, i));
            tailer.readDocument(wire -> wire.read(() -> "String_Node_Str").text(sb));
            Assert.assertEquals("String_Node_Str" + i, sb.toString());
        }
    } finally {
        file.delete();
    }
}

Output:
         StringBuilder sb = new StringBuilder();
-        for (int i : new int[] { 65 }) {
+        for (int i : new int[] { 0, 64, 65, 66 }) {
             tailer.moveToIndex(index(cycle, i));


Input:
public void execute(long t) {
    updateTimers(t);
}

Output:
 public void execute(long t) {
-    updateTimers(t);
+    updateTimers(core.cycles);
 }


Input:
public static CloudSpacesDescriptor getCloudSpaces(final String userName, final String password, final String urlText, final boolean displayURL, IRunnableContext context) throws CoreException {
    try {
        final CloudSpacesDescriptor[] supportsSpaces = new CloudSpacesDescriptor[1];
        ICoreRunnable coreRunner = new ICoreRunnable() {
            public void run(IProgressMonitor monitor) throws CoreException {
                String url = urlText;
                if (displayURL) {
                    url = getUrlFromDisplayText(urlText);
                }
                supportsSpaces[0] = CloudSpaceServerLookup.getCloudSpaceDescriptor(new CloudCredentials(userName, password), url, monitor);
            }
        };
        if (context != null) {
            runForked(coreRunner, context);
        } else {
            runForked(coreRunner);
        }
        return supportsSpaces[0];
    } catch (OperationCanceledException e) {
        new CoreException(CloudFoundryPlugin.getErrorStatus(e));
    }
    return null;
}

Output:
     } catch (OperationCanceledException e) {
-        new CoreException(CloudFoundryPlugin.getErrorStatus(e));
+        throw new CoreException(CloudFoundryPlugin.getErrorStatus(e));
     }


Input:
public void processArgument(StoredProcedureCall call, boolean callByIndex, int index) {
    boolean shouldCallByIndex = process(call, index);
    if (!callByIndex) {
        callByIndex = shouldCallByIndex;
    }
    if (m_mode.equals(JPA_PARAMETER_IN)) {
        if (hasType()) {
            if (callByIndex) {
                call.addUnamedArgument(m_queryParameter, getJavaClass(m_type));
            } else {
                if (hasJdbcType() && hasJdbcTypeName()) {
                    OracleArrayTypeMetadata aType = null;
                    if (hasTypeName() && (aType = getArrayTypeMetadata(m_typeName)) != null) {
                        call.addNamedArgument(m_name, m_queryParameter, m_jdbcType, m_jdbcTypeName, getJavaClass(m_type), buildNestedField(aType));
                    } else {
                        call.addNamedArgument(m_name, m_queryParameter, m_jdbcType, m_jdbcTypeName, getJavaClass(m_type));
                    }
                } else {
                    call.addNamedArgument(m_name, m_queryParameter, getJavaClass(m_type));
                }
            }
        } else if (hasJdbcType() && hasJdbcTypeName()) {
            if (callByIndex) {
                call.addUnamedArgument(m_queryParameter, m_jdbcType, m_jdbcTypeName);
            } else {
                call.addNamedArgument(m_name, m_queryParameter, m_jdbcType, m_jdbcTypeName);
            }
        } else if (hasJdbcType()) {
            if (callByIndex) {
                call.addUnamedArgument(m_queryParameter, m_jdbcType);
            } else {
                call.addNamedArgument(m_name, m_queryParameter, m_jdbcType);
            }
        } else {
            if (callByIndex) {
                call.addUnamedArgument(m_queryParameter);
            } else {
                call.addNamedArgument(m_name, m_queryParameter);
            }
        }
    } else if (m_mode.equals(JPA_PARAMETER_OUT)) {
        if (hasType()) {
            if (callByIndex) {
                call.addUnamedOutputArgument(m_queryParameter, getJavaClass(m_type));
            } else {
                if (hasJdbcType() && hasJdbcTypeName()) {
                    OracleArrayTypeMetadata aType = null;
                    if (hasTypeName() && (aType = getArrayTypeMetadata(m_typeName)) != null) {
                        call.addNamedOutputArgument(m_name, m_queryParameter, m_jdbcType, m_jdbcTypeName, getJavaClass(m_type), buildNestedField(aType));
                    } else {
                        call.addNamedOutputArgument(m_name, m_queryParameter, m_jdbcType, m_jdbcTypeName, getJavaClass(m_type));
                    }
                } else {
                    call.addNamedOutputArgument(m_name, m_queryParameter, getJavaClass(m_type));
                }
            }
        } else if (hasJdbcType() && hasJdbcTypeName()) {
            if (callByIndex) {
                call.addUnamedOutputArgument(m_queryParameter, m_jdbcType, m_jdbcTypeName);
            } else {
                call.addNamedOutputArgument(m_name, m_queryParameter, m_jdbcType, m_jdbcTypeName);
            }
        } else if (hasJdbcType()) {
            if (callByIndex) {
                call.addUnamedOutputArgument(m_queryParameter, m_jdbcType);
            } else {
                call.addNamedOutputArgument(m_name, m_queryParameter, m_jdbcType);
            }
        } else {
            if (callByIndex) {
                call.addUnamedOutputArgument(m_queryParameter);
            } else {
                call.addNamedOutputArgument(m_name, m_queryParameter);
            }
        }
        setDatabaseFieldSettings((DatabaseField) call.getParameters().get(call.getParameters().size() - 1));
    } else if (m_mode.equals(Direction.IN_OUT.name()) || m_mode.equals(JPA_PARAMETER_INOUT)) {
        if (hasType()) {
            if (callByIndex) {
                call.addUnamedInOutputArgument(m_queryParameter, m_queryParameter, getJavaClass(m_type));
            } else {
                if (hasJdbcType() && hasJdbcTypeName()) {
                    call.addNamedInOutputArgument(m_name, m_queryParameter, m_queryParameter, m_jdbcType, m_jdbcTypeName, getJavaClass(m_type));
                } else {
                    call.addNamedInOutputArgument(m_name, m_queryParameter, m_queryParameter, getJavaClass(m_type));
                }
            }
        } else if (hasJdbcType() && hasJdbcTypeName()) {
            if (callByIndex) {
                call.addUnamedInOutputArgument(m_queryParameter, m_queryParameter, m_jdbcType, m_jdbcTypeName);
            } else {
                call.addNamedInOutputArgument(m_name, m_queryParameter, m_queryParameter, m_jdbcType, m_jdbcTypeName);
            }
        } else if (hasJdbcType()) {
            if (callByIndex) {
                call.addUnamedInOutputArgument(m_queryParameter, m_queryParameter, m_jdbcType);
            } else {
                call.addNamedInOutputArgument(m_name, m_queryParameter, m_queryParameter, m_jdbcType);
            }
        } else {
            if (callByIndex) {
                call.addUnamedInOutputArgument(m_queryParameter);
            } else {
                call.addNamedInOutputArgument(m_name, m_queryParameter);
            }
        }
        Object[] array = (Object[]) call.getParameters().get(call.getParameters().size() - 1);
        if (array[0] == array[1]) {
            array[1] = ((DatabaseField) array[1]).clone();
        }
        setDatabaseFieldSettings((DatabaseField) array[1]);
    } else if (m_mode.equals(Direction.OUT_CURSOR.name()) || m_mode.equals(JPA_PARAMETER_REF_CURSOR)) {
        if (callByIndex) {
            call.useUnnamedCursorOutputAsResultSet(index);
        } else {
            call.useNamedCursorOutputAsResultSet(m_queryParameter);
        }
    }
}

Output:
                 if (hasJdbcType() && hasJdbcTypeName()) {
-                    call.addNamedInOutputArgument(m_name, m_queryParameter, m_queryParameter, m_jdbcType, m_jdbcTypeName, getJavaClass(m_type));
+                    OracleArrayTypeMetadata aType = null;
+                    if (hasTypeName() && (aType = getArrayTypeMetadata(m_typeName)) != null) {
+                        call.addNamedInOutputArgument(m_name, m_queryParameter, m_queryParameter, m_jdbcType, m_jdbcTypeName, getJavaClass(m_type), buildNestedField(aType));
+                    } else {
+                        call.addNamedInOutputArgument(m_name, m_queryParameter, m_queryParameter, m_jdbcType, m_jdbcTypeName, getJavaClass(m_type));
+                    }
                 } else {


Input:
public static boolean isValidNodeName(String name) {
    return Pattern.matches(TopologyService.NODE_NAME_REGEX, name);
}

Output:
 public static boolean isValidNodeName(String name) {
-    return Pattern.matches(TopologyService.NODE_NAME_REGEX, name);
+    return TopologyService.NODE_NAME_PATTERN.matcher(name).matches();
 }


Input:
public void run() {
    String listenerName = listener == null ? null : listener.component.toShortString();
    if (DBG)
        EventLogTags.writeNotificationCancel(callingUid, callingPid, pkg, id, tag, userId, mustHaveFlags, mustNotHaveFlags, reason, listenerName);
    synchronized (mNotificationList) {
        int index = indexOfNotificationLocked(pkg, tag, id, userId);
        if (index >= 0) {
            NotificationRecord r = mNotificationList.get(index);
            if (reason == REASON_DELEGATE_CLICK) {
                mUsageStats.registerClickedByUser(r);
            }
            if ((r.getNotification().flags & mustHaveFlags) != mustHaveFlags) {
                return;
            }
            if ((r.getNotification().flags & mustNotHaveFlags) != 0) {
                return;
            }
            mNotificationList.remove(index);
            cancelNotificationLocked(r, sendDelete, reason);
            cancelGroupChildrenLocked(r, callingUid, callingPid, listenerName, REASON_GROUP_SUMMARY_CANCELED);
            updateLightsLocked();
        }
    }
}

Output:
             cancelNotificationLocked(r, sendDelete, reason);
-            cancelGroupChildrenLocked(r, callingUid, callingPid, listenerName, REASON_GROUP_SUMMARY_CANCELED);
+            cancelGroupChildrenLocked(r, callingUid, callingPid, listenerName, REASON_GROUP_SUMMARY_CANCELED, sendDelete);
             updateLightsLocked();


Input:
public void testQueries() throws Exception {
    Thread[] udpLoopers = new Thread[NUM_UDP_LOOPS];
    for (int i = 0; i < NUM_UDP_LOOPS; i++) {
        final int index = i;
        udpLoopers[i] = new Thread() {
            public void run() {
                udpLoop(5000 + index);
            }
        };
        udpLoopers[i].start();
        Thread.yield();
    }
    InetAddress addr = null;
    addr = InetAddress.getByName("String_Node_Str");
    for (int i = 0; i < NUM_UDP_LOOPS; i++) {
        QueryUnicaster.instance().addUnicastEndpoint(addr, 5000 + i);
        if (i % 5 == 0) {
            try {
                Thread.sleep(200);
            } catch (InterruptedException ignored) {
            }
        }
    }
    QueryRequest qr = QueryRequest.createQuery("String_Node_Str", (byte) 2);
    assertEquals("String_Node_Str", 0, QueryUnicaster.instance().getQueryNumber());
    QueryUnicaster.instance().addQuery(qr, null);
    assertEquals("String_Node_Str", 1, QueryUnicaster.instance().getQueryNumber());
    try {
        Thread.sleep(30 * 1000);
    } catch (InterruptedException ignored) {
    }
    int numMessages = 0, numQRs = 0, numPings = 0, numQKReqs = 0;
    while (!_messages.isEmpty()) {
        Message currMessage = (Message) _messages.remove(0);
        numMessages++;
        if (currMessage instanceof QueryRequest) {
            QueryRequest currQR = (QueryRequest) currMessage;
            assertEquals("String_Node_Str", "String_Node_Str", currQR.getQuery());
            numQRs++;
        } else if (currMessage instanceof PingRequest) {
            numPings++;
            if (((PingRequest) currMessage).isQueryKeyRequest())
                numQKReqs++;
        } else
            fail("String_Node_Str" + currMessage);
    }
    assertEquals("String_Node_Str", numMessages, numPings + numQRs);
    assertLessThanOrEquals("String_Node_Str", numPings, numQRs);
    assertGreaterThan("String_Node_Str", 0, numQRs);
    assertLessThanOrEquals("String_Node_Str", numQKReqs, numQRs);
    debug("String_Node_Str" + numMessages);
    debug("String_Node_Str" + numQRs);
    debug("String_Node_Str" + numPings);
    _shouldRun = false;
    for (int i = 0; i < NUM_UDP_LOOPS; i++) udpLoopers[i].interrupt();
    try {
        Thread.sleep(2 * 1000);
    } catch (InterruptedException ignored) {
    }
    QueryReply qRep = generateFakeReply(qr.getGUID(), 251);
    QueryUnicaster.instance().handleQueryReply(qRep);
}

Output:
     assertLessThanOrEquals("String_Node_Str", numQKReqs, numQRs);
-    debug("String_Node_Str" + numMessages);
-    debug("String_Node_Str" + numQRs);
-    debug("String_Node_Str" + numPings);
+    if (LOG.isDebugEnabled()) {
+        LOG.debug("String_Node_Str" + numMessages);
+        LOG.debug("String_Node_Str" + numQRs);
+        LOG.debug("String_Node_Str" + numPings);
+    }
     _shouldRun = false;


Input:
private void initializeResultClass(DataEngineImpl dataEngine, Map appContext) throws DataException {
    try {
        IQueryResults left = getResultSetQuery(dataEngine, dataSet.getLeftDataSetDesignName(), appContext, dataSet.getJoinConditions(), false);
        IQueryResults right = getResultSetQuery(dataEngine, dataSet.getRightDataSetDesignName(), appContext, dataSet.getJoinConditions(), false);
        JointResultMetadata meta = getJointResultMetadata(left.getResultMetaData(), right.getResultMetaData());
        resultClass = meta.getResultClass();
    } catch (BirtException be) {
        throw DataException.wrap(be);
    }
}

Output:
     try {
-        IQueryResults left = getResultSetQuery(dataEngine, dataSet.getLeftDataSetDesignName(), appContext, dataSet.getJoinConditions(), false);
+        IQueryResults left = getResultSetQuery(dataEngine, dataSet.getLeftDataSetDesignName(), appContext, dataSet.getJoinConditions(), true);
         IQueryResults right = getResultSetQuery(dataEngine, dataSet.getRightDataSetDesignName(), appContext, dataSet.getJoinConditions(), false);


Input:
private soot.Local getNewLocal(polyglot.ast.New newExpr) {
    ArrayList sootParams = new ArrayList();
    ArrayList sootParamsTypes = new ArrayList();
    polyglot.types.ClassType objType = (polyglot.types.ClassType) newExpr.objectType().type();
    if (newExpr.anonType() != null) {
        objType = newExpr.anonType();
        String name = Util.getSootType(objType).toString();
        polyglot.types.ClassType outerType = objType.outer();
        if (!InitialResolver.v().hasClassInnerTag(body.getMethod().getDeclaringClass(), name)) {
            Util.addInnerClassTag(body.getMethod().getDeclaringClass(), name, null, null, outerType.flags().isInterface() ? soot.Modifier.PUBLIC | soot.Modifier.STATIC : Util.getModifier(objType.flags()));
        }
    } else {
        if (!objType.isTopLevel()) {
            String name = Util.getSootType(objType).toString();
            polyglot.types.ClassType outerType = objType.outer();
            if (!InitialResolver.v().hasClassInnerTag(body.getMethod().getDeclaringClass(), name)) {
                Util.addInnerClassTag(body.getMethod().getDeclaringClass(), name, Util.getSootType(outerType).toString(), objType.name(), outerType.flags().isInterface() ? soot.Modifier.PUBLIC | soot.Modifier.STATIC : Util.getModifier(objType.flags()));
            }
        }
    }
    soot.RefType sootType = (soot.RefType) Util.getSootType(objType);
    soot.Local retLocal = lg.generateLocal(sootType);
    soot.jimple.NewExpr sootNew = soot.jimple.Jimple.v().newNewExpr(sootType);
    soot.jimple.Stmt stmt = soot.jimple.Jimple.v().newAssignStmt(retLocal, sootNew);
    body.getUnits().add(stmt);
    Util.addLnPosTags(stmt, newExpr.position());
    soot.SootClass classToInvoke = sootType.getSootClass();
    if (newExpr.qualifier() != null) {
        if ((objType.outer() != null) && (body.getMethod().getDeclaringClass().equals(((soot.RefType) Util.getSootType(objType.outer())).getSootClass())) && (!soot.Modifier.isStatic(body.getMethod().getModifiers()))) {
            handleOuterClassParams(sootParams, sootParamsTypes, objType);
        } else {
            soot.Value qVal = createExpr(newExpr.qualifier());
            sootParams.add(qVal);
            sootParamsTypes.add(qVal.getType());
            body.getUnits().add(soot.jimple.Jimple.v().newInvokeStmt(soot.jimple.Jimple.v().newVirtualInvokeExpr((soot.Local) qVal, soot.Scene.v().getSootClass("String_Node_Str").getMethodByName("String_Node_Str"), new ArrayList())));
        }
    } else {
        handleOuterClassParams(sootParams, sootParamsTypes, objType);
    }
    sootParams.addAll(getSootParams(newExpr));
    sootParamsTypes.addAll(getSootParamsTypes(newExpr));
    handleFinalLocalParams(sootParams, sootParamsTypes, (polyglot.types.ClassType) objType);
    soot.SootMethod methodToInvoke = getMethodFromClass(classToInvoke, "String_Node_Str", sootParamsTypes, soot.VoidType.v());
    if (!methodToInvoke.getDeclaringClass().getType().equals(classToInvoke.getType())) {
        throw new RuntimeException("String_Node_Str" + classToInvoke.getType() + "String_Node_Str" + methodToInvoke.getDeclaringClass().getType());
    }
    soot.jimple.SpecialInvokeExpr specialInvokeExpr = soot.jimple.Jimple.v().newSpecialInvokeExpr(retLocal, methodToInvoke, sootParams);
    soot.jimple.Stmt invokeStmt = soot.jimple.Jimple.v().newInvokeStmt(specialInvokeExpr);
    body.getUnits().add(invokeStmt);
    Util.addLnPosTags(invokeStmt, newExpr.position());
    int numParams = 0;
    Iterator invokeParamsIt = newExpr.arguments().iterator();
    while (invokeParamsIt.hasNext()) {
        Util.addLnPosTags(specialInvokeExpr.getArgBox(numParams), ((polyglot.ast.Expr) invokeParamsIt.next()).position());
        numParams++;
    }
    return retLocal;
}

Output:
     if (newExpr.qualifier() != null) {
-        if ((objType.outer() != null) && (body.getMethod().getDeclaringClass().equals(((soot.RefType) Util.getSootType(objType.outer())).getSootClass())) && (!soot.Modifier.isStatic(body.getMethod().getModifiers()))) {
-            handleOuterClassParams(sootParams, sootParamsTypes, objType);
-        } else {
-            soot.Value qVal = createExpr(newExpr.qualifier());
-            sootParams.add(qVal);
-            sootParamsTypes.add(qVal.getType());
-            body.getUnits().add(soot.jimple.Jimple.v().newInvokeStmt(soot.jimple.Jimple.v().newVirtualInvokeExpr((soot.Local) qVal, soot.Scene.v().getSootClass("String_Node_Str").getMethodByName("String_Node_Str"), new ArrayList())));
-        }
-    } else {
-        handleOuterClassParams(sootParams, sootParamsTypes, objType);
+        qVal = createExpr(newExpr.qualifier());
     }


Input:
private boolean alignProteinChains(List<Group> seqRes, List<Group> atomRes) {
    Map<Integer, Integer> seqresIndexPosition = new HashMap<Integer, Integer>();
    Map<Integer, Integer> atomIndexPosition = new HashMap<Integer, Integer>();
    String seq1 = getFullAtomSequence(seqRes, seqresIndexPosition);
    String seq2 = getFullAtomSequence(atomRes, atomIndexPosition);
    logger.debug("String_Node_Str" + seq1.length() + "String_Node_Str" + seq1);
    logger.debug("String_Node_Str" + seq2.length() + "String_Node_Str" + seq2);
    ProteinSequence s1;
    ProteinSequence s2;
    try {
        s1 = new ProteinSequence(seq1);
        s2 = new ProteinSequence(seq2);
    } catch (CompoundNotFoundException e) {
        logger.warn("String_Node_Str", e.getMessage());
        return true;
    }
    SubstitutionMatrix<AminoAcidCompound> matrix = SubstitutionMatrixHelper.getBlosum65();
    GapPenalty penalty = new SimpleGapPenalty(8, 1);
    PairwiseSequenceAligner<ProteinSequence, AminoAcidCompound> smithWaterman = Alignments.getPairwiseAligner(s1, s2, PairwiseSequenceAlignerType.LOCAL, penalty, matrix);
    SequencePair<ProteinSequence, AminoAcidCompound> pair = smithWaterman.getPair();
    if (pair == null) {
        logger.warn("String_Node_Str");
        logger.warn("String_Node_Str");
        logger.warn(seq1);
        logger.warn(seq2);
        return true;
    }
    logger.debug("String_Node_Str" + pair.toString(100));
    boolean noMatchFound = mapChains(seqRes, atomRes, pair, seqresIndexPosition, atomIndexPosition);
    return noMatchFound;
}

Output:
     Map<Integer, Integer> atomIndexPosition = new HashMap<Integer, Integer>();
-    String seq1 = getFullAtomSequence(seqRes, seqresIndexPosition);
-    String seq2 = getFullAtomSequence(atomRes, atomIndexPosition);
+    String seq1 = getFullAtomSequence(seqRes, seqresIndexPosition, false);
+    String seq2 = getFullAtomSequence(atomRes, atomIndexPosition, false);
     logger.debug("String_Node_Str" + seq1.length() + "String_Node_Str" + seq1);


Input:
private Trinket grow(Sowing s) {
    Trinket source = s.toGrow.get(RandomUtil.nextInt(s.toGrow.size()));
    List<Trinket> neibors = ModelManager.getBattlefield().getCloseComps(source, 20);
    for (int i = 0; i < MAX_TRINKETS_COUNT; i++) {
        int trinketIndex = RandomUtil.between(0, s.trinketBuilders.size());
        Trinket candidate = s.trinketBuilders.get(trinketIndex).build(Point3D.ORIGIN);
        candidate.separationRadius *= s.spacings.get(trinketIndex);
        for (int j = 0; j < MAX_PLACES_COUNT; j++) {
            double separationDistance = source.getSpacing(candidate);
            Point2D place = source.getCoord().getTranslation(RandomUtil.between(0, AngleUtil.FULL), RandomUtil.between(separationDistance, separationDistance * 2));
            if (!ModelManager.getBattlefield().getMap().isInBounds(place) || !s.isAllowed(place)) {
                continue;
            }
            boolean isValidePlace = true;
            for (Trinket n : neibors) {
                if (n.getCoord().getDistance(place) < n.getSpacing(candidate)) {
                    isValidePlace = false;
                    break;
                }
            }
            if (isValidePlace) {
                candidate.setPos(place.get3D(ModelManager.getBattlefield().getMap().getAltitudeAt(place)));
                sowTrinket(s, candidate);
                return candidate;
            }
        }
    }
    s.toGrow.remove(source);
    return null;
}

Output:
     Trinket source = s.toGrow.get(RandomUtil.nextInt(s.toGrow.size()));
-    List<Trinket> neibors = ModelManager.getBattlefield().getCloseComps(source, 20);
+    List<Trinket> neibors = m.getInCircle(Trinket.class, source.getCoord(), 20);
     for (int i = 0; i < MAX_TRINKETS_COUNT; i++) {


Input:
private void setNodeProperties() {
    this.nodeProperties.put(NODE_PROPERTY_SERVICE_NAME, getServiceName());
    this.nodeProperties.put(NODE_SERVICE_PROPERTIES, super.properties);
    this.nodeProperties.put(NODE_PROPERTY_NAME_PROTOCOLS, getServiceID().getServiceTypeID().getProtocols());
    this.nodeProperties.put(NODE_PROPERTY_NAME_SCOPE, getServiceID().getServiceTypeID().getScopes());
    this.nodeProperties.put(NODE_PROPERTY_SERVICES, getServiceID().getServiceTypeID().getServices());
    this.nodeProperties.put(NODE_PROPERTY_NAME_NA, getServiceID().getServiceTypeID().getNamingAuthority());
    this.nodeProperties.put(LOCATION, getLocation());
    this.nodeProperties.put(WEIGHT, getWeight());
    this.nodeProperties.put(PRIORITY, getPriority());
    publishedServices.put(getServiceID().getServiceTypeID().getInternal(), this);
}

Output:
     this.nodeProperties.put(PRIORITY, getPriority());
-    publishedServices.put(getServiceID().getServiceTypeID().getInternal(), this);
+    publishedServices.put(getServiceID().getName(), this);
 }


Input:
protected void initPartNumber() throws CosXmlClientException {
    if (srcPath != null) {
        File file = new File(srcPath);
        if (!file.exists()) {
            throw new CosXmlClientException("String_Node_Str");
        }
        fileLength = file.length();
    }
    if (fileLength > 0 && sliceSize > 0) {
        int count = (int) (fileLength / sliceSize);
        int i = 1;
        for (; i < count; ++i) {
            PartStruct partStruct = new PartStruct();
            partStruct.partNumber = i;
            partStruct.alreadyUpload = false;
            partStruct.offset = (i - 1) * sliceSize;
            partStruct.sliceSize = sliceSize;
            partStructMap.put(i, partStruct);
        }
        PartStruct partStruct = new PartStruct();
        partStruct.partNumber = i;
        partStruct.alreadyUpload = false;
        partStruct.offset = (i - 1) * sliceSize;
        partStruct.sliceSize = (int) (fileLength - partStruct.offset);
        partStructMap.put(i, partStruct);
        UPLOAD_PART_COUNT.set(count);
    }
}

Output:
         partStructMap.put(i, partStruct);
-        UPLOAD_PART_COUNT.set(count);
+        UPLOAD_PART_COUNT.set(i);
     }


Input:
public void stateMachineMetaGame(long timeout) throws TransitionDefinitionException, MoveDefinitionException, GoalDefinitionException {
    strategy = new AlphaBeta(getStateMachine(), 3);
    strategy.setHeuristic(new MonteCarlo(getStateMachine()));
}

Output:
 public void stateMachineMetaGame(long timeout) throws TransitionDefinitionException, MoveDefinitionException, GoalDefinitionException {
-    strategy = new AlphaBeta(getStateMachine(), 3);
-    strategy.setHeuristic(new MonteCarlo(getStateMachine()));
+    strategy = new IDSAlphaBeta(getStateMachine());
+    AbstractHeuristic heuristic = new MonteCarlo(getStateMachine());
+    ((MonteCarlo) heuristic).setSampleSize(5);
+    strategy.setHeuristic(heuristic);
 }


Input:
protected int addPlates(int count) {
    if (!skinCompleted) {
        int addition = Math.min(count, Math.max(MAX_PLATE_COUNT - platesContained, 0));
        if (addition > 0) {
            platesContained += addition;
            plateLevel = platesContained % PLATE_PER_LEVEL_COUNT;
            if (plateLevel >= MAX_PLATE_LEVEL_COUNT) {
                skinCompleted = true;
            }
        }
        return addition;
    }
    return 0;
}

Output:
             platesContained += addition;
-            plateLevel = platesContained % PLATE_PER_LEVEL_COUNT;
+            plateLevel = platesContained / PLATE_PER_LEVEL_COUNT;
             if (plateLevel >= MAX_PLATE_LEVEL_COUNT) {


Input:
public ResponseBuilder getResponseAsBuilder() {
    return ResponseBuilder.instance(this.getRequest());
}

Output:
 public ResponseBuilder getResponseAsBuilder() {
-    return ResponseBuilder.instance(this.getRequest());
+    return ResponseBuilder.instance(this.getResponse());
 }


Input:
protected void visitExtendedItem(ExtendedItemHandle handle) {
    String tagName = handle.getExtensionName();
    IReportItemPreparation itemPreparation = ExtensionManager.getInstance().createPreparationItem(tagName);
    if (itemPreparation != null) {
        ReportItemPreparationInfo preparationInfo = new ReportItemPreparationInfo(handle, new PreparationContext(executionContext, this));
        itemPreparation.init(preparationInfo);
        itemPreparation.prepare();
    } else {
        ExtendedItemScriptExecutor.handleOnPrepare((ExtendedItemHandle) handle, executionContext);
        Iterator propIter = handle.getPropertyIterator();
        while (propIter.hasNext()) {
            PropertyHandle propHandle = (PropertyHandle) propIter.next();
            IElementPropertyDefn property = propHandle.getPropertyDefn();
            if (property.getTypeCode() == IPropertyType.ELEMENT_TYPE) {
                Object children = propHandle.getValue();
                if (children instanceof List) {
                    List tempList = (List) children;
                    for (int i = 0; tempList != null && i < tempList.size(); i++) {
                        Object tempObj = tempList.get(i);
                        if (tempObj instanceof ReportItemHandle) {
                            apply((ReportItemHandle) tempObj);
                        }
                    }
                } else if (children instanceof ReportItemHandle) {
                    apply((ReportItemHandle) children);
                }
            }
        }
    }
}

Output:
         itemPreparation.init(preparationInfo);
-        itemPreparation.prepare();
+        try {
+            itemPreparation.prepare();
+        } catch (BirtException ex) {
+            logger.log(Level.WARNING, "String_Node_Str", ex);
+            executionContext.addException(handle, ex);
+        }
     } else {


Input:
public void attributeChanged(Attribute attribute) throws IllegalActionException {
    super.attributeChanged(attribute);
    if (attribute == preemptive) {
        preemptive.getToken();
        workspace().incrVersion();
    }
    if (attribute == guardExpression) {
        String expr = guardExpression.getExpression();
        _guard.setExpression(expr);
        _relationList.destroy();
        _parseTreeEvaluator.setEvaluationMode(true);
    }
    if (attribute == triggerExpression) {
        String expr = triggerExpression.getExpression();
        _trigger.setExpression(expr);
    }
    if (attribute == refinementName) {
        _refinementVersion = -1;
    }
    if (attribute == outputActions && _debugging)
        outputActions.addDebugListener(new StreamListener());
    if (attribute == setActions && _debugging)
        setActions.addDebugListener(new StreamListener());
}

Output:
         _guard.setExpression(expr);
-        _relationList.destroy();
-        _parseTreeEvaluator.setEvaluationMode(true);
+        if (_exeDirectorIsHSDirector) {
+            _relationList.destroy();
+            _parseTreeEvaluator.setEvaluationMode(true);
+        }
     }


Input:
protected TopicSystem loadAnnotator() throws Exception {
    return new NIFBasedAnnotatorWebservice(annotaturURL, this.getAnnotatorName());
}

Output:
 protected TopicSystem loadAnnotator() throws Exception {
-    return new NIFBasedAnnotatorWebservice(annotaturURL, this.getAnnotatorName());
+    return new NIFBasedAnnotatorWebservice(annotaturURL, this.getAnnotatorName(), wikiApi, dbpediaApi);
 }


Input:
public void shouldValidateFalseWithoutParameters() {
    String username = "String_Node_Str";
    String expid = "String_Node_Str";
    String processtype = "String_Node_Str";
    String parameters = "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + "String_Node_Str";
    String metadata = "String_Node_Str";
    String genomeRelease = "String_Node_Str";
    String author = "String_Node_Str";
    CommandFactory cmdf = new CommandFactory();
    String json = "String_Node_Str" + "String_Node_Str" + expid + "String_Node_Str" + "String_Node_Str" + processtype + "String_Node_Str" + "String_Node_Str" + metadata + "String_Node_Str" + "String_Node_Str" + genomeRelease + "String_Node_Str" + "String_Node_Str" + author + "String_Node_Str";
    ProcessCommand processCommand = (ProcessCommand) cmdf.createProcessCommand(json, username);
    assertFalse(processCommand.validate());
}

Output:
     String json = "String_Node_Str" + "String_Node_Str" + expid + "String_Node_Str" + "String_Node_Str" + processtype + "String_Node_Str" + "String_Node_Str" + metadata + "String_Node_Str" + "String_Node_Str" + genomeRelease + "String_Node_Str" + "String_Node_Str" + author + "String_Node_Str";
-    ProcessCommand processCommand = (ProcessCommand) cmdf.createProcessCommand(json, username);
+    ProcessCommand processCommand = (ProcessCommand) cmdf.createProcessCommand(json, username, "String_Node_Str");
     assertFalse(processCommand.validate());


Input:
private static Annotation createAnnotation(AnnotationHolder holder, PsiFile file, Document document, Result.Warn warn, HighlightSeverity severity, TextAttributes forcedTextAttributes, boolean showErrorOnWholeLine) {
    int line = warn.line - 1;
    int column = warn.column - 1;
    if (line < 0 || line >= document.getLineCount()) {
        return null;
    }
    int lineEndOffset = document.getLineEndOffset(line);
    int lineStartOffset = document.getLineStartOffset(line);
    int errorLineStartOffset = StringUtil.lineColToOffset(document.getCharsSequence(), line, column);
    if (errorLineStartOffset == -1) {
        return null;
    }
    TextRange range;
    if (showErrorOnWholeLine) {
        range = new TextRange(lineStartOffset, lineEndOffset);
    } else {
        PsiElement lit = PsiUtil.getElementAtOffset(file, errorLineStartOffset);
        range = lit.getTextRange();
    }
    Annotation annotation = JSLinterUtil.createAnnotation(holder, severity, forcedTextAttributes, range, MESSAGE_PREFIX + warn.message.trim() + "String_Node_Str" + warn.rule + ')');
    if (annotation != null) {
        annotation.setAfterEndOfLine(errorLineStartOffset == lineEndOffset);
    }
    return annotation;
}

Output:
     }
-    Annotation annotation = JSLinterUtil.createAnnotation(holder, severity, forcedTextAttributes, range, MESSAGE_PREFIX + warn.message.trim() + "String_Node_Str" + warn.rule + ')');
+    Annotation annotation = JSLinterUtil.createAnnotation(holder, severity, forcedTextAttributes, range, MESSAGE_PREFIX + warn.message.trim() + "String_Node_Str" + warn.ruleId + ')');
     if (annotation != null) {


Input:
private void runWaitingRequests() {
    List toBeProcessed = new ArrayList(Math.min(WAITING_REQUESTS.size(), Math.max(0, MAX_CONNECTING_SOCKETS - _socketsConnecting)));
    synchronized (this) {
        while (_socketsConnecting < MAX_CONNECTING_SOCKETS && !WAITING_REQUESTS.isEmpty()) {
            toBeProcessed.add(WAITING_REQUESTS.remove(0));
            _socketsConnecting++;
        }
    }
    for (int i = 0; i < toBeProcessed.size(); i++) {
        Requestor next = (Requestor) toBeProcessed.get(i);
        next.socket.connect(next.addr, next.timeout, new DelegateConnector(next.observer));
    }
}

Output:
         while (_socketsConnecting < MAX_CONNECTING_SOCKETS && !WAITING_REQUESTS.isEmpty()) {
-            toBeProcessed.add(WAITING_REQUESTS.remove(0));
-            _socketsConnecting++;
+            Requestor next = (Requestor) WAITING_REQUESTS.remove(0);
+            if (!next.socket.isClosed()) {
+                toBeProcessed.add(next);
+                _socketsConnecting++;
+            }
         }


Input:
protected EObject getSavedReloadObject() throws ReloadCompareException {
    ColumnSet selectedColumnSet = null;
    if (selectedObj instanceof DBColumnFolderRepNode) {
        DBColumnFolderRepNode columnFolderRepNode = (DBColumnFolderRepNode) selectedObj;
        selectedColumnSet = columnFolderRepNode.getColumnSet();
    } else if (selectedObj instanceof ColumnSet) {
        selectedColumnSet = (ColumnSet) selectedObj;
    }
    ColumnSet toReloadcolumnSet = DQStructureComparer.findMatchedColumnSet(selectedColumnSet, tempReloadProvider);
    ColumnSetHelper.setColumns(toReloadcolumnSet, EMPTY_COLUMN_LIST);
    toReloadcolumnSet.getOwnedElement().clear();
    try {
        DqRepositoryViewService.getColumns(tempReloadProvider, toReloadcolumnSet, true);
        util.saveResource(toReloadcolumnSet.eResource());
    } catch (Exception e1) {
        throw new ReloadCompareException(e1);
    }
    return toReloadcolumnSet;
}

Output:
 protected EObject getSavedReloadObject() throws ReloadCompareException {
-    ColumnSet selectedColumnSet = null;
-    if (selectedObj instanceof DBColumnFolderRepNode) {
-        DBColumnFolderRepNode columnFolderRepNode = (DBColumnFolderRepNode) selectedObj;
-        selectedColumnSet = columnFolderRepNode.getColumnSet();
-    } else if (selectedObj instanceof ColumnSet) {
-        selectedColumnSet = (ColumnSet) selectedObj;
-    }
+    ColumnSet selectedColumnSet = getCurrentColumnSet();
     ColumnSet toReloadcolumnSet = DQStructureComparer.findMatchedColumnSet(selectedColumnSet, tempReloadProvider);


Input:
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    HttpServletResponse response = (HttpServletResponse) res;
    String target = request.getRequestURI();
    if (target.startsWith("String_Node_Str") || "String_Node_Str".equals(target) || "String_Node_Str".equals(target)) {
        String loginType = request.getParameter("String_Node_Str");
        String queryString = request.getQueryString();
        if (queryString == null) {
            queryString = "String_Node_Str";
        } else {
            queryString = queryString.replace("String_Node_Str" + loginType + "String_Node_Str", "String_Node_Str");
            queryString = queryString.replace("String_Node_Str" + loginType, "String_Node_Str");
            queryString = queryString.replace("String_Node_Str" + loginType, "String_Node_Str");
            if (queryString.length() > 0) {
                queryString = "String_Node_Str" + queryString;
            }
        }
        HttpSession session = request.getSession(false);
        if (session == null || session.getAttribute("String_Node_Str") == null || !"String_Node_Str".equals(session.getAttribute("String_Node_Str"))) {
            session = request.getSession(true);
            session.setAttribute("String_Node_Str", target);
            if (loginType == null) {
                response.sendRedirect(response.encodeRedirectURL("String_Node_Str" + queryString));
            } else if ("String_Node_Str".equals(loginType)) {
                response.sendRedirect(response.encodeRedirectURL("String_Node_Str" + loginType + "String_Node_Str" + queryString));
            } else {
                response.sendRedirect("String_Node_Str" + loginType + "String_Node_Str" + queryString);
            }
            return;
        }
    }
    chain.doFilter(req, res);
}

Output:
         HttpSession session = request.getSession(false);
-        if (session == null || session.getAttribute("String_Node_Str") == null || !"String_Node_Str".equals(session.getAttribute("String_Node_Str"))) {
+        String authNMsg = (String) session.getAttribute("String_Node_Str");
+        if (session == null || authNMsg == null || !"String_Node_Str".equals(authNMsg)) {
             session = request.getSession(true);


Input:
private static LibraryAttribute _importActorLibrary(Tableau tableau, LibraryAttribute gtLibrary) {
    try {
        Configuration configuration = (Configuration) tableau.toplevel();
        CompositeEntity actorLibrary = (CompositeEntity) configuration.getEntity("String_Node_Str");
        CompositeEntity library = gtLibrary.getLibrary();
        for (Object entityObject : actorLibrary.entityList()) {
            try {
                ComponentEntity libraryEntity = (ComponentEntity) entityObject;
                ComponentEntity entity = (ComponentEntity) libraryEntity.clone(library.workspace());
                entity.setContainer(library);
            } catch (Exception e) {
            }
        }
        gtLibrary.setLibrary(library);
    } catch (Exception e) {
    }
    return gtLibrary;
}

Output:
 private static LibraryAttribute _importActorLibrary(Tableau tableau, LibraryAttribute gtLibrary) {
-    try {
-        Configuration configuration = (Configuration) tableau.toplevel();
-        CompositeEntity actorLibrary = (CompositeEntity) configuration.getEntity("String_Node_Str");
-        CompositeEntity library = gtLibrary.getLibrary();
-        for (Object entityObject : actorLibrary.entityList()) {
-            try {
-                ComponentEntity libraryEntity = (ComponentEntity) entityObject;
-                ComponentEntity entity = (ComponentEntity) libraryEntity.clone(library.workspace());
-                entity.setContainer(library);
-            } catch (Exception e) {
+    if (gtLibrary != null) {
+        try {
+            Configuration configuration = (Configuration) tableau.toplevel();
+            CompositeEntity actorLibrary = (CompositeEntity) configuration.getEntity("String_Node_Str");
+            CompositeEntity library = gtLibrary.getLibrary();
+            for (Object entityObject : actorLibrary.entityList()) {
+                try {
+                    ComponentEntity libraryEntity = (ComponentEntity) entityObject;
+                    ComponentEntity entity = (ComponentEntity) libraryEntity.clone(library.workspace());
+                    entity.setContainer(library);
+                } catch (Exception e) {
+                }
             }


Input:
public Value computeValue(CSSStylableElement elt, CSSEngine engine, int idx, Value value) {
    if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
        switch(value.getPrimitiveType()) {
            case CSSPrimitiveValue.CSS_NUMBER:
                return value;
            case CSSPrimitiveValue.CSS_PX:
                float v = value.getFloatValue();
                CSSContext cx = engine.getCSSContext();
                float ratio = cx.getPixelUnitToMillimeter();
                return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * ratio / 25.4f * 72000.0f);
            case CSSPrimitiveValue.CSS_MM:
                v = value.getFloatValue();
                return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v / 25.4f * 72000.0f);
            case CSSPrimitiveValue.CSS_CM:
                v = value.getFloatValue();
                return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v / 2.54f * 72000.0f);
            case CSSPrimitiveValue.CSS_IN:
                v = value.getFloatValue();
                return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * 72000.0f);
            case CSSPrimitiveValue.CSS_PT:
                v = value.getFloatValue();
                return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * 1000.0f);
            case CSSPrimitiveValue.CSS_PC:
                v = value.getFloatValue();
                return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * 12.0f * 1000.0f);
            case CSSPrimitiveValue.CSS_EMS:
                v = value.getFloatValue();
                Value fontSize = (Value) elt.getComputedStyle().getProperty(IStyle.STYLE_FONT_SIZE);
                float fs = fontSize.getFloatValue();
                return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * fs);
            case CSSPrimitiveValue.CSS_EXS:
                v = value.getFloatValue();
                fontSize = (Value) elt.getComputedStyle().getProperty(IStyle.STYLE_FONT_SIZE);
                fs = fontSize.getFloatValue();
                return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * fs * 0.5f);
        }
    }
    return value;
}

Output:
             case CSSPrimitiveValue.CSS_PC:
-                v = value.getFloatValue();
-                return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * 12.0f * 1000.0f);
+                return value;
             case CSSPrimitiveValue.CSS_EMS:


Input:
public static FileInputDelimited createFileInputDelimited(DelimitedFileConnection delimitedFileconnection) throws IOException {
    String rowSeparator = delimitedFileconnection.getRowSeparatorValue();
    String encoding = delimitedFileconnection.getEncoding();
    String fieldSeparatorValue = delimitedFileconnection.getFieldSeparatorValue();
    if (delimitedFileconnection.isContextMode()) {
        rowSeparator = ConnectionUtils.getOriginalConntextValue(delimitedFileconnection, rowSeparator);
        encoding = ConnectionUtils.getOriginalConntextValue(delimitedFileconnection, encoding);
        fieldSeparatorValue = ConnectionUtils.getOriginalConntextValue(delimitedFileconnection, fieldSeparatorValue);
    }
    boolean isSpliteRecord = delimitedFileconnection.isSplitRecord();
    boolean isSkipeEmptyRow = delimitedFileconnection.isRemoveEmptyRow();
    String languageName = LanguageManager.getCurrentLanguage().getName();
    String zero = "String_Node_Str";
    int limitValue = AnalysisExecutorHelper.getLimitValue(delimitedFileconnection);
    int headValue = AnalysisExecutorHelper.getHeadValue(delimitedFileconnection);
    int footValue = 0;
    String footing = delimitedFileconnection.getFooterValue();
    String path = AnalysisExecutorHelper.getFilePath(delimitedFileconnection);
    if (delimitedFileconnection.isContextMode()) {
        footing = ConnectionUtils.getOriginalConntextValue(delimitedFileconnection, footing);
        footValue = Integer.parseInt(footing == PluginConstant.EMPTY_STRING ? zero : footing);
    } else {
        footValue = Integer.parseInt(footing == null || PluginConstant.EMPTY_STRING.equals(footing) ? zero : footing);
    }
    return new FileInputDelimited(ParameterUtil.trimParameter(path), ParameterUtil.trimParameter(encoding), ParameterUtil.trimParameter(StringUtils.loadConvert(fieldSeparatorValue, languageName)), ParameterUtil.trimParameter(StringUtils.loadConvert(rowSeparator, languageName)), isSkipeEmptyRow, headValue, footValue, limitValue, -1, isSpliteRecord);
}

Output:
 public static FileInputDelimited createFileInputDelimited(DelimitedFileConnection delimitedFileconnection) throws IOException {
-    String rowSeparator = delimitedFileconnection.getRowSeparatorValue();
-    String encoding = delimitedFileconnection.getEncoding();
-    String fieldSeparatorValue = delimitedFileconnection.getFieldSeparatorValue();
-    if (delimitedFileconnection.isContextMode()) {
-        rowSeparator = ConnectionUtils.getOriginalConntextValue(delimitedFileconnection, rowSeparator);
-        encoding = ConnectionUtils.getOriginalConntextValue(delimitedFileconnection, encoding);
-        fieldSeparatorValue = ConnectionUtils.getOriginalConntextValue(delimitedFileconnection, fieldSeparatorValue);
-    }
+    String rowSeparator = JavaSqlFactory.getRowSeparatorValue(delimitedFileconnection);
+    String encoding = JavaSqlFactory.getEncoding(delimitedFileconnection);
+    String fieldSeparatorValue = JavaSqlFactory.getFieldSeparatorValue(delimitedFileconnection);
     boolean isSpliteRecord = delimitedFileconnection.isSplitRecord();


Input:
public IValue resolveImplicit(IType type) {
    return type == null ? this.implicitValue : null;
}

Output:
 public IValue resolveImplicit(IType type) {
-    return type == null ? this.implicitValue : null;
+    return type == null ? this.implicitValue : super.resolveImplicit(type);
 }


Input:
private <T extends Document> void addToCache(Collection<T> collection, T doc) {
    if (collection == Collection.NODES) {
        Lock lock = getAndLock(doc.getId());
        try {
            addToCache((NodeDocument) doc);
        } finally {
            lock.unlock();
        }
    }
}

Output:
     if (collection == Collection.NODES) {
-        Lock lock = getAndLock(doc.getId());
+        Lock lock = getAndLock(idOf(doc));
         try {


Input:
public Statement[] getExitsForProcedure(PDG procedure) {
    if (procedure.equals(getMain())) {
        Statement[] normal = procedure.getReturnStatements();
        Statement[] result = new Statement[normal.length + 1];
        result[0] = getMainExit();
        System.arraycopy(normal, 0, result, 1, normal.length);
        return result;
    } else {
        return procedure.getReturnStatements();
    }
}

Output:
 public Statement[] getExitsForProcedure(PDG procedure) {
-    if (procedure.equals(getMain())) {
+    if (procedure.equals(getMain()) && backward) {
         Statement[] normal = procedure.getReturnStatements();


Input:
public List<Biz> getBizsInOrder() {
    List<Biz> bizList = new ArrayList<>();
    bizList.addAll(bizs.values());
    Collections.sort(bizList, new Comparator<Biz>() {
        public int compare(Biz o1, Biz o2) {
            return Integer.compare(o1.getPriority(), o2.getPriority());
        }
    });
    return bizList;
}

Output:
 public List<Biz> getBizsInOrder() {
-    List<Biz> bizList = new ArrayList<>();
-    bizList.addAll(bizs.values());
+    List<Biz> bizList = new ArrayList<>(bizs.values());
     Collections.sort(bizList, new Comparator<Biz>() {


Input:
public Object visitData(IDataContent data, Object value) {
    ExecutionContext context = (ExecutionContext) value;
    return new DataItemInstance(data, context);
}

Output:
     ExecutionContext context = (ExecutionContext) value;
-    return new DataItemInstance(data, context);
+    return new DataItemInstance(data, context, runningState);
 }


Input:
public int executeBatch(Statement statement, boolean isStatementPrepared) throws java.sql.SQLException {
    int[] updateResult = statement.executeBatch();
    int updateCount = 0;
    for (int count : updateResult) {
        if (count == Statement.SUCCESS_NO_INFO) {
            count = 1;
        }
        updateCount += count;
    }
    return updateCount;
}

Output:
     int[] updateResult = statement.executeBatch();
-    int updateCount = 0;
-    for (int count : updateResult) {
-        if (count == Statement.SUCCESS_NO_INFO) {
-            count = 1;
+    if (isStatementPrepared) {
+        int updateCount = 0;
+        for (int count : updateResult) {
+            if (count == Statement.SUCCESS_NO_INFO) {
+                count = 1;
+            }
+            updateCount += count;
         }


Input:
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller == null) {
        return false;
    }
    HashSet<String> choices = new HashSet<>();
    choices.add("String_Node_Str");
    choices.add("String_Node_Str");
    choices.add("String_Node_Str");
    LinkedList<CardType> order = new LinkedList<>();
    ChoiceImpl choice = new ChoiceImpl(true);
    choice.setChoices(choices);
    while (controller.canRespond() && controller.choose(Outcome.Sacrifice, choice, game) && choices.size() > 1) {
        order.add(getCardType(choice.getChoice()));
        choices.remove(choice.getChoice());
        choice.clearChoice();
    }
    order.add(getCardType(choices.iterator().next()));
    LinkedList<UUID> sacrifices = new LinkedList<>();
    int count = 1;
    for (CardType cardType : order) {
        FilterControlledPermanent filter = new FilterControlledPermanent(cardType + "String_Node_Str");
        filter.add(new CardTypePredicate(cardType));
        for (UUID playerId : controller.getInRange()) {
            int amount = Math.min(count, game.getBattlefield().countAll(filter, playerId, game));
            TargetControlledPermanent target = new TargetControlledPermanent(amount, amount, filter, false);
            Player player = game.getPlayer(playerId);
            if (player != null && player.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) {
                sacrifices.addAll(target.getTargets());
            }
        }
        for (UUID targetId : sacrifices) {
            Permanent permanent = game.getPermanent(targetId);
            if (permanent != null) {
                permanent.sacrifice(source.getSourceId(), game);
            }
        }
        sacrifices.clear();
        count++;
    }
    return true;
}

Output:
         filter.add(new CardTypePredicate(cardType));
-        for (UUID playerId : controller.getInRange()) {
+        for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
             int amount = Math.min(count, game.getBattlefield().countAll(filter, playerId, game));