Input:
public void run() {
    try {
        final File cacheFile = new File(getCacheDir() + File.separator + "String_Node_Str");
        if (cacheFile.exists()) {
            cacheFile.delete();
        }
        InputStream is = getContentResolver().openInputStream(uri);
        FileOutputStream fos = new FileOutputStream(cacheFile);
        IOUtils.copy(is, fos);
        runOnUiThread(new Runnable() {
            public void run() {
                ChanApplication.getReplyManager()._onPickedFile(finalName, cacheFile);
            }
        });
    } catch (IOException e) {
        e.printStackTrace();
    }
}

Output:
             public void run() {
-                ChanApplication.getReplyManager()._onPickedFile(finalName, cacheFile);
+                ChanApplication.getReplyManager()._onPickedFile("String_Node_Str", null);
+                Toast.makeText(ImagePickActivity.this, R.string.file_open_failed, Toast.LENGTH_LONG).show();
             }

         });
-    } catch (IOException e) {
-        e.printStackTrace();
-    }
 }


Input:
public void handle(Buffer buff) {
    String msg = buff.toString();
    JsonObject received = new JsonObject(msg);
    try {
        subscribe.send(0, new StringToken(received.getField("String_Node_Str")));
    } catch (NoRoomException e) {
        e.printStackTrace();
    } catch (IllegalActionException e) {
        e.printStackTrace();
    }
}

Output:
     try {
-        subscribe.send(0, new StringToken(received.getField("String_Node_Str")));
+        subscribe.send(0, new StringToken(received.getField("String_Node_Str").toString()));
     } catch (NoRoomException e) {


Input:
public boolean checkStatus(AmbariOperations t) {
    Map<String, Integer> installRequests = t.getRequests();
    boolean allFinished = true;
    for (Entry<String, Integer> request : installRequests.entrySet()) {
        AmbariClient ambariClient = t.getAmbariClient();
        BigDecimal installProgress = ambariClient.getRequestProgress(request.getValue());
        LOGGER.info("String_Node_Str", request.getKey(), installProgress);
        allFinished = allFinished && COMPLETED.compareTo(installProgress) == 0;
        if (FAILED.compareTo(installProgress) == 0) {
            boolean failed = true;
            for (int i = 0; i < MAX_RETRY; i++) {
                if (ambariClient.getRequestProgress(request.getValue()).compareTo(FAILED) != 0) {
                    failed = false;
                    break;
                }
            }
            if (failed) {
                throw new AmbariOperationFailedException(String.format("String_Node_Str", request.getKey(), request.getValue()));
            }
        }
    }
    return allFinished;
}

Output:
         LOGGER.info("String_Node_Str", request.getKey(), installProgress);
-        allFinished = allFinished && COMPLETED.compareTo(installProgress) == 0;
-        if (FAILED.compareTo(installProgress) == 0) {
+        allFinished = allFinished && installProgress != null && COMPLETED.compareTo(installProgress) == 0;
+        if (installProgress != null && FAILED.compareTo(installProgress) == 0) {
             boolean failed = true;


Input:
public void checkUpdates(final int currentVersion) {
    try {
        File versionsFile = new File(mContext.getFilesDir(), "String_Node_Str");
        DownloadDialog version = new DownloadDialog(mContext, new URL(Const.RASHR_VERSION_URL), versionsFile);
        version.setOverrideFile(true);
        version.setHidden(true);
        version.setOnDownloadListener(new DownloadDialog.OnDownloadListener() {
            public void success(File file) {
                try {
                    if (currentVersion < Integer.valueOf(Common.fileContent(file))) {
                        new AlertDialog.Builder(mContext).setTitle(R.string.update_available).setMessage(R.string.download_update).setPositiveButton(R.string.open_playstore, new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int which) {
                                startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("String_Node_Str" + getPackageName())));
                            }
                        }).setCancelable(false).show();
                    } else {
                        if (Common.getBooleanPref(mContext, Const.PREF_NAME, Const.PREF_KEY_HIDE_UPDATE_HINTS)) {
                            Toast.makeText(mContext, R.string.app_uptodate, Toast.LENGTH_SHORT).show();
                        }
                    }
                } catch (IOException ignore) {
                }
            }
            public void failed(Exception e) {
                Toast.makeText(mContext, R.string.failed_update, Toast.LENGTH_SHORT).show();
            }
        });
        version.execute();
    } catch (MalformedURLException ignore) {
    }
}

Output:
         });
-        version.execute();
+        downloader.download();
     } catch (MalformedURLException ignore) {


Input:
public void plot(Graph g, String filename) {
    if (!disabled) {
        gephi.Plot(g, filename + "String_Node_Str" + extension);
    }
}

Output:
 public void plot(Graph g, String filename) {
-    if (!disabled) {
-        gephi.Plot(g, filename + "String_Node_Str" + extension);
-    }
+    gephi.Plot(g, filename + "String_Node_Str" + extension);
 }


Input:
public String call() throws Exception {
    ObservableList<Node> children = getRealComponent().getChildrenUnmodifiable();
    for (Node node : children) {
        if (node instanceof ListCell) {
            IComponent adapter = (IComponent) AdapterFactoryRegistry.getInstance().getAdapter(IComponent.class, node);
            if (adapter != null && adapter instanceof ITextComponent) {
                return ((ITextComponent) adapter).getText();
            }
        }
    }
    return null;
}

Output:
 public String call() throws Exception {
-    ObservableList<Node> children = getRealComponent().getChildrenUnmodifiable();
+    T comboBox = getRealComponent();
+    if (comboBox.isEditable()) {
+        TextField editor = comboBox.getEditor();
+        if (editor != null) {
+            return editor.getText();
+        }
+    }
+    ObservableList<Node> children = comboBox.getChildrenUnmodifiable();
     for (Node node : children) {


Input:
public String toString() {
    String iaString;
    if (this.hostname != null) {
        iaString = this.hostname;
    } else {
        iaString = inetAddress.toString();
        iaString = iaString.replace("String_Node_Str", "String_Node_Str");
    }
    return iaString;
}

Output:
     String iaString;
-    if (this.hostname != null) {
-        iaString = this.hostname;
+    if (this.hostName != null) {
+        iaString = this.hostName;
     } else {


Input:
public void execute() {
    VpnUser vpnUser = _entityMgr.findById(VpnUser.class, getEntityId());
    Account account = _entityMgr.findById(Account.class, vpnUser.getAccountId());
    try {
        if (!_ravService.applyVpnUsers(vpnUser.getAccountId(), userName)) {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "String_Node_Str");
        }
    } catch (Exception ex) {
        throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "String_Node_Str");
    }
    VpnUsersResponse vpnResponse = new VpnUsersResponse();
    vpnResponse.setId(vpnUser.getUuid());
    vpnResponse.setUserName(vpnUser.getUsername());
    vpnResponse.setAccountName(account.getAccountName());
    Domain domain = _entityMgr.findById(Domain.class, account.getDomainId());
    if (domain != null) {
        vpnResponse.setDomainId(domain.getUuid());
        vpnResponse.setDomainName(domain.getName());
    }
    vpnResponse.setResponseName(getCommandName());
    vpnResponse.setObjectName("String_Node_Str");
    setResponseObject(vpnResponse);
}

Output:
     Account account = _entityMgr.findById(Account.class, vpnUser.getAccountId());
-    try {
-        if (!_ravService.applyVpnUsers(vpnUser.getAccountId(), userName)) {
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "String_Node_Str");
-        }
-    } catch (Exception ex) {
+    if (!_ravService.applyVpnUsers(vpnUser.getAccountId(), userName)) {
         throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "String_Node_Str");


Input:
public void encode(BCPGOutputStream out) throws IOException {
    byte[] oid = this.oid.getEncoded();
    out.write(oid.length);
    out.write(oid);
    MPInteger point = new MPInteger(new BigInteger(1, this.point.getEncoded()));
    out.writeObject(point);
}

Output:
     byte[] oid = this.oid.getEncoded();
-    out.write(oid.length);
-    out.write(oid);
+    out.write(oid, 1, oid.length - 1);
     MPInteger point = new MPInteger(new BigInteger(1, this.point.getEncoded()));


Input:
public BytesInput getBytes() {
    if (!dictionaryTooBig && dict.size() > 0) {
        lastUsedDictionarySize = dict.size();
        lastUsedDictionaryByteSize = dictionaryByteSize;
        int maxDicId = dict.size() - 1;
        if (DEBUG)
            LOG.debug("String_Node_Str" + maxDicId);
        int bitWidth = BytesUtils.getWidthFromMaxInt(maxDicId);
        RLESimpleEncoder rleSimpleEncoder = new RLESimpleEncoder(bitWidth);
        IntIterator iterator = out.iterator();
        try {
            while (iterator.hasNext()) {
                rleSimpleEncoder.writeInt(iterator.next());
            }
            byte[] bytesHeader = new byte[] { (byte) (bitWidth & 0xFF) };
            BytesInput rleEncodedBytes = rleSimpleEncoder.toBytes();
            if (DEBUG)
                LOG.debug("String_Node_Str" + rleEncodedBytes.size());
            return concat(BytesInput.from(bytesHeader), rleEncodedBytes);
        } catch (IOException e) {
            throw new ParquetEncodingException("String_Node_Str", e);
        }
    }
    return plainValuesWriter.getBytes();
}

Output:
             }
-            byte[] bytesHeader = new byte[] { (byte) (bitWidth & 0xFF) };
+            byte[] bytesHeader = new byte[] { (byte) bitWidth };
             BytesInput rleEncodedBytes = rleSimpleEncoder.toBytes();


Input:
public static InputStream getComponentImageInputStream(String projectVersionId, String type, ApplicationContext context) {
    String icon = "String_Node_Str";
    XMLComponentUI definition = context.getUiFactory().getUiDefinition(projectVersionId, type);
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    InputStream is = null;
    if (definition != null && isNotBlank(definition.getIconImage())) {
        try {
            icon = definition.getIconImage();
            classLoader = definition.getClassLoader();
            final Enumeration<URL> systemResources = classLoader.getResources(icon);
            while (systemResources.hasMoreElements()) {
                URL url = systemResources.nextElement();
                is = url.openStream();
                break;
            }
        } catch (IOException e) {
        }
    }
    if (is == null) {
        is = UiUtils.class.getResourceAsStream(icon);
    }
    return is;
}

Output:
     if (definition != null && isNotBlank(definition.getIconImage())) {
-        try {
-            icon = definition.getIconImage();
-            classLoader = definition.getClassLoader();
-            final Enumeration<URL> systemResources = classLoader.getResources(icon);
-            while (systemResources.hasMoreElements()) {
-                URL url = systemResources.nextElement();
-                is = url.openStream();
-                break;
-            }
-        } catch (IOException e) {
+        String icon = definition.getIconImage();
+        classLoader = definition.getClassLoader();
+        is = classLoader.getResourceAsStream(icon);
+        if (is == null && icon.startsWith("String_Node_Str")) {
+            is = classLoader.getResourceAsStream(icon.substring(1));
+        }
+        if (is == null && !icon.startsWith("String_Node_Str")) {
+            is = classLoader.getResourceAsStream("String_Node_Str" + icon);
         }


Input:
public TemplateSource sourceAt(final String location) throws IOException {
    try {
        return new TemplateSource() {

            public String content() throws IOException {
                return read(resolve(location));
            }
            public String filename() {
                return location;
            }
            public long lastModified() {
                return HandlebarsEngine.this.lastModified(location);
            }
        };
    } catch (Exception e) {
        e.printStackTrace();
        throw new IOException(e);
    }
}

Output:
 public TemplateSource sourceAt(final String location) throws IOException {
-    try {
-        return new TemplateSource() {
+    final String buffer = read(resolve(location));
+    if (buffer == null) {
+        throw new FileNotFoundException(location);
+    }
+    return new TemplateSource() {


Input:
public void receive_reply(ClientRequestInfo ri) {
    ServiceContext sc = null;
    int status = -1;
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, "String_Node_Str" + prname + "String_Node_Str");
    }
    ORB orb = orbHelper.getORB();
    try {
        sc = ri.get_reply_service_context(SECURITY_ATTRIBUTE_SERVICE_ID);
        if (sc == null) {
            handle_null_service_context(ri);
            return;
        }
    } catch (org.omg.CORBA.BAD_PARAM e) {
        handle_null_service_context(ri);
        return;
    } catch (Exception ex) {
        _logger.log(Level.SEVERE, "String_Node_Str", ex);
        return;
    }
    Any a = orb.create_any();
    try {
        a = codec.decode_value(sc.context_data, SASContextBodyHelper.type());
    } catch (Exception e) {
        _logger.log(Level.SEVERE, "String_Node_Str", e);
        throw new SecurityException(localStrings.getLocalString("String_Node_Str", "String_Node_Str"));
    }
    SASContextBody sasctxbody = SASContextBodyHelper.extract(a);
    short sasdiscr = sasctxbody.discriminator();
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, "String_Node_Str" + SvcContextUtils.getMsgname(sasdiscr) + "String_Node_Str");
    }
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, "String_Node_Str");
    }
    if ((sasdiscr != MTCompleteEstablishContext.value) && (sasdiscr != MTContextError.value)) {
        _logger.log(Level.SEVERE, "String_Node_Str");
        throw new SecurityException(localStrings.getLocalString("String_Node_Str", "String_Node_Str"));
    }
    int st = mapreplyStatus(ri.reply_status());
    setreplyStatus(st, ri.effective_target());
}

Output:
     }
-    Any a = orb.create_any();
+    Any a;
     try {


Input:
private void expandParent(TreeViewer viewer, RepositoryNode node) {
    if (node.getContentType() == ERepositoryObjectType.SVN_ROOT) {
        viewer.setExpandedState(node, true);
    }
    RepositoryNode parent = node.getParent();
    if (parent != null) {
        expandParent(viewer, parent);
        if (ERepositoryObjectType.METADATA_CONNECTIONS.equals(node.getObjectType())) {
            viewer.expandToLevel(node, TreeViewer.ALL_LEVELS);
        } else {
            viewer.setExpandedState(node, true);
        }
    }
}

Output:
         expandParent(viewer, parent);
-        if (ERepositoryObjectType.METADATA_CONNECTIONS.equals(node.getObjectType())) {
+        if (ERepositoryObjectType.METADATA_CONNECTIONS != null && ERepositoryObjectType.METADATA_CONNECTIONS.equals(node.getObjectType())) {
             viewer.expandToLevel(node, TreeViewer.ALL_LEVELS);


Input:
public XMLParserException semanticError(XMLParserException e) {
    e.setLineNumber(locator.getLineNumber());
    e.setTag(currentElement);
    errors.add(e);
    return e;
}

Output:
 public XMLParserException semanticError(XMLParserException e) {
-    e.setLineNumber(locator.getLineNumber());
+    if (locator != null)
+        e.setLineNumber(locator.getLineNumber());
+    else
+        e.setLineNumber(1);
     e.setTag(currentElement);


Input:
public boolean prepare() {
    try {
        if (archive.getFirstDownloadLink().getHost().equals(DUMMY_HOSTER)) {
            Archive a = buildArchive(archive.getFirstDownloadLink());
            archive.setDownloadLinks(a.getDownloadLinks());
            archive.setType(a.getType());
        }
        if (archive.getType() == Archive.SINGLE_FILE) {
            if (new Regex(archive.getFirstDownloadLink().getFileOutput(), "String_Node_Str", Pattern.CASE_INSENSITIVE).matches()) {
                format = ArchiveFormat.RAR;
            } else if (new Regex(archive.getFirstDownloadLink().getFileOutput(), "String_Node_Str", Pattern.CASE_INSENSITIVE).matches()) {
                format = ArchiveFormat.SEVEN_ZIP;
            } else if (new Regex(archive.getFirstDownloadLink().getFileOutput(), "String_Node_Str", Pattern.CASE_INSENSITIVE).matches()) {
                format = ArchiveFormat.ZIP;
            } else if (new Regex(archive.getFirstDownloadLink().getFileOutput(), "String_Node_Str", Pattern.CASE_INSENSITIVE).matches()) {
                format = ArchiveFormat.GZIP;
            } else if (new Regex(archive.getFirstDownloadLink().getFileOutput(), "String_Node_Str", Pattern.CASE_INSENSITIVE).matches()) {
                format = ArchiveFormat.BZIP2;
            }
            inArchive = SevenZip.openInArchive(format, new RandomAccessFileInStream(new RandomAccessFile(archive.getFirstDownloadLink().getFileOutput(), "String_Node_Str")));
        } else if (archive.getType() == Archive.MULTI) {
            MultiOpener multiopener = new MultiOpener();
            inArchive = SevenZip.openInArchive(ArchiveFormat.SEVEN_ZIP, new VolumedArchiveInStream(archive.getFirstDownloadLink().getFileOutput(), multiopener));
        } else if (archive.getType() == Archive.MULTI_RAR) {
            RarOpener raropener = new RarOpener();
            IInStream inStream = raropener.getStream(archive.getFirstDownloadLink().getFileOutput());
            inArchive = SevenZip.openInArchive(ArchiveFormat.RAR, inStream, raropener);
        } else {
            return false;
        }
        long size = 0;
        int numberOfFiles = 0;
        for (ISimpleInArchiveItem item : inArchive.getSimpleInterface().getArchiveItems()) {
            if (item.getPath().trim().equals("String_Node_Str"))
                continue;
            if (item.isEncrypted()) {
                archive.setProtected(true);
            }
            size += item.getSize();
            if (item.getSize() > 0) {
                numberOfFiles++;
            }
        }
        archive.setSize(size);
        archive.setNumberOfFiles(numberOfFiles);
    } catch (SevenZipException e) {
        archive.setProtected(true);
        return true;
    } catch (Exception e) {
        return false;
    }
    return true;
}

Output:
             }
-            inArchive = SevenZip.openInArchive(format, new RandomAccessFileInStream(new RandomAccessFile(archive.getFirstDownloadLink().getFileOutput(), "String_Node_Str")));
+            stream = new RandomAccessFileInStream(new RandomAccessFile(archive.getFirstDownloadLink().getFileOutput(), "String_Node_Str"));
+            inArchive = SevenZip.openInArchive(format, stream);
         } else if (archive.getType() == Archive.MULTI) {


Input:
private static EventResponse eventResponse(Response<List<Event>> response) {
    String indexHeaderValue = response.headers().get("String_Node_Str");
    BigInteger index = new BigInteger(indexHeaderValue);
    return ImmutableEventResponse.of(response.body(), index);
}

Output:
     String indexHeaderValue = response.headers().get("String_Node_Str");
-    BigInteger index = new BigInteger(indexHeaderValue);
+    BigInteger index = indexHeaderValue == null ? BigInteger.ZERO : new BigInteger(indexHeaderValue);
     return ImmutableEventResponse.of(response.body(), index);


Input:
private PlayerSetting[] determinePlayerSettings(boolean[] availablePlayers) {
    boolean aiPlayersEnabled = iAmTheHost;
    PlayerSetting[] playerSettings = new PlayerSetting[availablePlayers.length];
    for (byte i = 0; i < playersList.getItems().size(); i++) {
        playerSettings[i] = new PlayerSetting(true);
    }
    for (byte i = (byte) playersList.getItems().size(); i < availablePlayers.length; i++) {
        playerSettings[i] = new PlayerSetting(CommonConstants.ENABLE_AI && aiPlayersEnabled, EWhatToDoAiType.getTypeByIndex(i));
    }
    return playerSettings;
}

Output:
     PlayerSetting[] playerSettings = new PlayerSetting[availablePlayers.length];
-    for (byte i = 0; i < playersList.getItems().size(); i++) {
+    byte i = 0;
+    for (; i < playersList.getItems().size(); i++) {
         playerSettings[i] = new PlayerSetting(true);


Input:
public Data clone() {
    return new Data(data.clone(), header, columns, dictionary);
}

Output:
 public Data clone() {
-    return new Data(data.clone(), header, columns, dictionary);
+    return new Data(data != null ? data.clone() : null, header, columns, dictionary);
 }


Input:
private void loadIg(JsonObject dep) throws Exception {
    String name = str(dep, "String_Node_Str");
    if (!Utilities.isToken(name))
        throw new Exception("String_Node_Str" + name + "String_Node_Str");
    String location = str(dep, "String_Node_Str");
    String source = ostr(dep, "String_Node_Str");
    if (Utilities.noString(source))
        source = location;
    log("String_Node_Str" + name + "String_Node_Str" + location + "String_Node_Str" + source);
    Map<String, byte[]> files = fetchDefinitions(source, name);
    SpecMapManager igm = new SpecMapManager(files.get("String_Node_Str"));
    igm.setName(name);
    igm.setBase(location);
    specMaps.add(igm);
    if (!Constants.VERSION.equals(igm.getVersion()))
        log("String_Node_Str" + Constants.VERSION + "String_Node_Str" + name + "String_Node_Str" + igm.getVersion() + "String_Node_Str");
    for (String fn : files.keySet()) {
        if (fn.endsWith("String_Node_Str")) {
            Resource r;
            try {
                org.hl7.fhir.dstu3.formats.JsonParser jp = new org.hl7.fhir.dstu3.formats.JsonParser();
                r = jp.parse(new ByteArrayInputStream(files.get(fn)));
            } catch (Exception e) {
                throw new Exception("String_Node_Str" + fn + "String_Node_Str" + name, e);
            }
            if (r instanceof MetadataResource) {
                String u = ((MetadataResource) r).getUrl();
                if (u != null) {
                    String p = igm.getPath(u);
                    if (p == null)
                        throw new Exception("String_Node_Str" + name + "String_Node_Str" + u);
                    r.setUserData("String_Node_Str", location + "String_Node_Str" + igpkp.doReplacements(p, r, null, null));
                    context.seeResource(u, r);
                }
            }
        }
    }
}

Output:
     specMaps.add(igm);
-    if (!Constants.VERSION.equals(igm.getVersion()))
+    if (!Constants.VERSION.equals(igm.getVersion())) {
         log("String_Node_Str" + Constants.VERSION + "String_Node_Str" + name + "String_Node_Str" + igm.getVersion() + "String_Node_Str");


Input:
public void process(Iterable<T> partialResult) throws QueryException, InterruptedException {
    Collection<T> current = Sets.newHashSet(partialResult);
    env.buildTransitiveClosure(expression, (Set<T>) current, depthBound);
    for (int i = 0; i <= depthBound; i++) {
        ImmutableList<T> toProcess = uniquifier.unique(current);
        callback.process(toProcess);
        current = ImmutableList.copyOf(env.getFwdDeps(toProcess));
        if (current.isEmpty()) {
            break;
        }
    }
}

Output:
     for (int i = 0; i <= depthBound; i++) {
-        ImmutableList<T> toProcess = uniquifier.unique(current);
+        ImmutableList<T> toProcess = minDepthUniquifier.uniqueAtDepthLessThanOrEqualTo(current, i);
         callback.process(toProcess);


Input:
private void onLoadFinished(Optional<List<RoomFinderSchedule>> result) {
    if (!result.isPresent()) {
        return;
    }
    List<RoomFinderSchedule> schedules = result.get();
    List<WeekViewEvent> events = new ArrayList<>(schedules.size());
    for (RoomFinderSchedule schedule : schedules) {
        Calendar startCal = Calendar.getInstance();
        startCal.setTime(Utils.getISODateTime(schedule.getStart()));
        Calendar endCal = Calendar.getInstance();
        endCal.setTime(Utils.getISODateTime(schedule.getEnd()));
        IntegratedCalendarEvent calendarEvent = new IntegratedCalendarEvent(schedule.getEvent_id(), schedule.getTitle(), startCal, endCal, "String_Node_Str", IntegratedCalendarEvent.getDisplayColorFromColor(0xff28921f));
        events.add(calendarEvent);
    }
    loadedEvents.put(calculateLoadedKey(newYear, newMonth), events);
    mWeekView.notifyDatasetChanged();
}

Output:
 private void onLoadFinished(Optional<List<RoomFinderSchedule>> result) {
-    if (!result.isPresent()) {
-        return;
+    List<RoomFinderSchedule> schedules;
+    if (result.isPresent()) {
+        schedules = result.get();
+    } else {
+        schedules = new ArrayList<>();
     }


Input:
private CompletableFuture<BitSet> createAndSendRequests() {
    Map<ShardId, ShardUpsertRequest> requestsByShard = groupRequests();
    if (requestsByShard.isEmpty()) {
        return CompletableFuture.completedFuture(new BitSet(0));
    }
    CompletableFuture<BitSet> result = new CompletableFuture<>();
    AtomicInteger numRequests = new AtomicInteger(requestsByShard.size());
    AtomicReference<Throwable> lastFailure = new AtomicReference<>(null);
    final BitSet responses = new BitSet();
    for (Iterator<Map.Entry<ShardId, ShardUpsertRequest>> it = requestsByShard.entrySet().iterator(); it.hasNext(); ) {
        Map.Entry<ShardId, ShardUpsertRequest> entry = it.next();
        ShardUpsertRequest request = entry.getValue();
        it.remove();
        ActionListener<ShardResponse> listener = new ActionListener<ShardResponse>() {
            public void onResponse(ShardResponse shardResponse) {
                Throwable failure = shardResponse.failure();
                if (failure == null) {
                    processShardResponse(responses, shardResponse);
                } else {
                    lastFailure.set(failure);
                }
                countdown();
            }
            public void onFailure(Exception e) {
                lastFailure.set(e);
                countdown();
            }
            private void countdown() {
                if (numRequests.decrementAndGet() == 0) {
                    Throwable throwable = lastFailure.get();
                    if (throwable == null) {
                        result.complete(responses);
                    } else {
                        throwable = SQLExceptions.unwrap(throwable, t -> t instanceof RuntimeException);
                        if (!SQLExceptions.isDocumentAlreadyExistsException(throwable) && (updateAffectedNoRows(throwable) || partitionWasDeleted(throwable, request.index()) || mixedArgumentTypesFailure(throwable, request.items()))) {
                            result.complete(responses);
                        } else {
                            result.completeExceptionally(throwable);
                        }
                    }
                }
            }
        };
        upsertAction.execute(request, new RetryListener<>(scheduler, actionListener -> upsertAction.execute(request, actionListener), listener, BACK_OFF_POLICY));
    }
    return result;
}

Output:
 private CompletableFuture<BitSet> createAndSendRequests() {
-    Map<ShardId, ShardUpsertRequest> requestsByShard = groupRequests();
+    Map<ShardId, ShardUpsertRequest> requestsByShard;
+    try {
+        requestsByShard = groupRequests();
+    } catch (Throwable t) {
+        return failedFuture(t);
+    }
     if (requestsByShard.isEmpty()) {


Input:
public void modifyLockedInvalidLock(SvnTesterFactory factory) throws Exception {
    try (SvnTester server = factory.create()) {
        final SVNRepository repo = server.openSvnRepository();
        createFile(repo, "String_Node_Str", "String_Node_Str", null);
        final long latestRevision = repo.getLatestRevision();
        final SVNLock oldLock = lock(repo, "String_Node_Str", latestRevision, false, null);
        Assert.assertNotNull(oldLock);
        unlock(repo, oldLock, false, null);
        final SVNLock newLock = lock(repo, "String_Node_Str", latestRevision, false, null);
        try {
            final Map<String, String> locks = new HashMap<>();
            locks.put(oldLock.getPath(), oldLock.getID());
            final ISVNEditor editor = repo.getCommitEditor("String_Node_Str", locks, false, null);
            editor.openRoot(-1);
            editor.openFile("String_Node_Str", latestRevision);
            sendDeltaAndClose(editor, "String_Node_Str", "String_Node_Str", "String_Node_Str");
            editor.closeDir();
            editor.closeEdit();
            Assert.fail();
        } catch (SVNException e) {
            Assert.assertEquals(e.getErrorMessage().getErrorCode(), SVNErrorCode.FS_BAD_LOCK_TOKEN);
        }
        compareLock(server.openSvnRepository().getLock("String_Node_Str"), newLock);
    }
}

Output:
         unlock(repo, oldLock, false, null);
-        final SVNLock newLock = lock(repo, "String_Node_Str", latestRevision, false, null);
+        SVNLock newLock;
+        for (int pass = 0; ; ++pass) {
+            Assert.assertTrue(pass < MAX_RELOCK_COUNT);
+            newLock = lock(repo, "String_Node_Str", latestRevision, false, null);
+            Assert.assertNotNull(newLock);
+            if (!newLock.getID().equals(oldLock.getID())) {
+                break;
+            }
+            unlock(repo, newLock, false, null);
+        }
         try {


Input:
public void uniteMergeSubTree(List<? extends INode> nodes) {
    for (INode node : nodes) {
        if (node == rootNode) {
            continue;
        }
        if (node.isActivate() && node.isSubProcessStart() && node.getLinkedMergeInfo() != null && node.getLinkedMergeInfo().get(mergeNode) != null) {
            mergeBranchStarts.add(node);
            buildSubTree(node, true);
        }
    }
}

Output:
         }
-        if (node.isActivate() && node.isSubProcessStart() && node.getLinkedMergeInfo() != null && node.getLinkedMergeInfo().get(mergeNode) != null) {
-            mergeBranchStarts.add(node);
-            buildSubTree(node, true);
+        for (INode mNode : mergeNodes) {
+            if (node.isActivate() && node.isSubProcessStart() && node.getLinkedMergeInfo() != null && node.getLinkedMergeInfo().get(mNode) != null) {
+                mergeBranchStarts.add(node);
+                buildSubTree(node, true);
+            }
         }


Input:
public void updateCachedMilestones(List<Milestone> ghMilestones) {
    for (Milestone ghMilestone : ghMilestones) {
        updateCachedListItem(new TurboMilestone(ghMilestone), milestones);
    }
}

Output:
     for (Milestone ghMilestone : ghMilestones) {
-        updateCachedListItem(new TurboMilestone(ghMilestone), milestones);
+        newMilestones.add(new TurboMilestone(ghMilestone));
     }


Input:
public String getStyleClass() {
    if (styleClass != null) {
        return styleClass;
    }
    if (generateBy instanceof StyledElementDesign) {
        return ((StyledElementDesign) generateBy).getStyleClass();
    }
    return null;
}

Output:
     if (generateBy instanceof StyledElementDesign) {
-        return ((StyledElementDesign) generateBy).getStyleClass();
+        return ((StyledElementDesign) generateBy).getStyleName();
     }


Input:
public void channelActive(ChannelHandlerContext ctx) throws Exception {
    String channelId = ctx.channel().id().asLongText();
    SocketChannel channel = (SocketChannel) ctx.channel();
    String nodeId = IpUtil.getNodeId(channel.remoteAddress());
    Log.debug("String_Node_Str" + nodeId);
    Log.debug("String_Node_Str" + channel.localAddress().getHostString() + "String_Node_Str" + channel.localAddress().getPort());
    Attribute<Node> nodeAttribute = channel.attr(key);
    Node node = nodeAttribute.get();
    try {
        NioChannelMap.add(channelId, channel);
        node.setChannelId(channelId);
        node.setStatus(Node.CONNECT);
        getNetworkService().addConnNode(node);
    } catch (Exception e) {
        Log.debug(nodeId);
        e.printStackTrace();
    }
}

Output:
         node.setStatus(Node.CONNECT);
-        getNetworkService().addConnNode(node);
+        boolean result = getNetworkService().addConnNode(node);
+        if (!result) {
+            channel.close();
+        }
     } catch (Exception e) {


Input:
private static Context updateResources(Context context, String language) {
    Locale locale = new Locale(language);
    Locale.setDefault(locale);
    Resources res = context.getResources();
    Configuration config = new Configuration(res.getConfiguration());
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        config.setLocale(locale);
        context = context.createConfigurationContext(config);
    }
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N_MR1) {
        config.locale = locale;
        res.updateConfiguration(config, res.getDisplayMetrics());
    }
    return context;
}

Output:
 private static Context updateResources(Context context, String language) {
-    Locale locale = new Locale(language);
+    Locale locale = languageLocale(language);
     Locale.setDefault(locale);


Input:
public void testEventConstructors() {
    JniMarker tmpMarker = null;
    JniMarkerField tmpMarkerField1 = null;
    JniMarkerField tmpMarkerField2 = null;
    try {
        tmpMarker = JniTraceFactory.getJniTrace(tracepath, null, printLttDebug).requestEventByName(eventName).requestEventMarker();
    } catch (JniException e) {
    }
    try {
        tmpMarkerField1 = tmpMarker.allocateNewJniMarkerField(tmpMarker.getMarkerFieldsArrayList().get(0).getMarkerFieldPtr());
    } catch (JniException e) {
        fail("String_Node_Str");
    }
}

Output:
     try {
-        tmpMarkerField1 = tmpMarker.allocateNewJniMarkerField(tmpMarker.getMarkerFieldsArrayList().get(0).getMarkerFieldPtr());
+        tmpMarker.allocateNewJniMarkerField(tmpMarker.getMarkerFieldsArrayList().get(0).getMarkerFieldPtr());
     } catch (JniException e) {


Input:
public static double typeMath(Types moveType, Types defenderType1, Types defenderType2) {
    return typeMatrix[moveType.id][defenderType1.id] * typeMatrix[moveType.id][defenderType2.id];
}

Output:
 public static double typeMath(Types moveType, Types defenderType1, Types defenderType2) {
-    return typeMatrix[moveType.id][defenderType1.id] * typeMatrix[moveType.id][defenderType2.id];
+    if (defenderType1 == Types.NONE && defenderType2 == Types.NONE) {
+        throw new IllegalArgumentException("String_Node_Str");
+    }
+    double retValue = 0.0;
+    if (defenderType2 == Types.NONE) {
+        retValue = typeMatrix[moveType.id][defenderType1.id];
+    } else if (defenderType1 == Types.NONE) {
+        retValue = typeMatrix[moveType.id][defenderType2.id];
+    } else {
+        retValue = typeMatrix[moveType.id][defenderType1.id] * typeMatrix[moveType.id][defenderType2.id];
+    }
+    return retValue;
 }


Input:
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    final Icon iconToUse = icons[getSortingStyle(column)];
    final Component rendered;
    if (delegateRenderer instanceof SortableRenderer) {
        ((SortableRenderer) delegateRenderer).setSortIcon(iconToUse);
        rendered = delegateRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    } else if (delegateRenderer instanceof DefaultTableCellRenderer) {
        rendered = delegateRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
        if (rendered == delegateRenderer) {
            final DefaultTableCellRenderer label = (DefaultTableCellRenderer) rendered;
            label.setIcon(iconToUse);
            label.setHorizontalTextPosition(SwingConstants.LEADING);
        }
    } else {
        rendered = delegateRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    }
    return rendered;
}

Output:
 public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
-    final Icon iconToUse = icons[getSortingStyle(column)];
+    final Icon sortIcon = icons[getSortingStyle(column)];
     final Component rendered;


Input:
private Movie makeData18MovieThreadsAndScrape(int movieNumberInList, boolean isData18Movie) throws InterruptedException {
    final int currentMovieNumberInList = movieNumberInList;
    final boolean parsingType = isData18Movie;
    final int numberOfThreads;
    if (this.guiMain.getPreferences().getUseIAFDForActors())
        numberOfThreads = 2;
    else
        numberOfThreads = 1;
    final int amountOfProgressToMakePerThread = (100 / numberOfThreads) - 1;
    amountOfProgressPerSubtask = amountOfProgressToMakePerThread;
    final ScrapeMovieAction thisScrapeAction = this;
    final String overriddenURL = overrideURLData18Movie;
    Thread scrapeQueryData18MovieThread = new Thread() {
        public void run() {
            try {
                SiteParsingProfile data18MoviePP;
                if (parsingType)
                    data18MoviePP = new Data18MovieParsingProfile();
                else
                    data18MoviePP = new Data18WebContentParsingProfile();
                if (overriddenURL != null && overriddenURL.length() > 0)
                    data18MoviePP.setOverridenSearchResult(overriddenURL);
                ScrapeMovieAction.this.guiMain.debugWriter("String_Node_Str" + ScrapeMovieAction.this.guiMain.getCurrentlySelectedMovieFileList().get(currentMovieNumberInList));
                ScrapeMovieAction.this.guiMain.setCurrentlySelectedMovieData18Movie(Movie.scrapeMovie(ScrapeMovieAction.this.guiMain.getCurrentlySelectedMovieFileList().get(currentMovieNumberInList), data18MoviePP, overrideURLData18Movie, promptUserForURLWhenScraping, thisScrapeAction));
                System.out.println("String_Node_Str" + ScrapeMovieAction.this.guiMain.getCurrentlySelectedMovieData18Movie());
                if (ScrapeMovieAction.this.guiMain.getPreferences().getUseIAFDForActors() && ScrapeMovieAction.this.guiMain.getCurrentlySelectedMovieData18Movie() != null) {
                    Movie scrapeMovieIAFD = Movie.scrapeMovie(ScrapeMovieAction.this.guiMain.getCurrentlySelectedMovieFileList().get(currentMovieNumberInList), new IAFDParsingProfile(), overrideURLIAFD, promptUserForURLWhenScraping, thisScrapeAction);
                    System.out.println("String_Node_Str" + scrapeMovieIAFD);
                    ScrapeMovieAction.this.guiMain.getCurrentlySelectedMovieData18Movie().setActors(scrapeMovieIAFD.getActors());
                }
            } catch (IOException e1) {
                e1.printStackTrace();
            }
        }
    };
    scrapeQueryData18MovieThread.start();
    scrapeQueryData18MovieThread.join();
    if (this.guiMain.getCurrentlySelectedMovieData18Movie() != null)
        System.out.print("String_Node_Str" + guiMain.getCurrentlySelectedMovieFileList().get(currentMovieNumberInList).getName());
    this.guiMain.movieToWriteToDiskList.add(this.guiMain.getCurrentlySelectedMovieData18Movie());
    return this.guiMain.getCurrentlySelectedMovieData18Movie();
}

Output:
     scrapeQueryData18MovieThread.join();
-    if (this.guiMain.getCurrentlySelectedMovieData18Movie() != null)
+    if (this.guiMain.getCurrentlySelectedMovieData18Movie() == null)
         System.out.print("String_Node_Str" + guiMain.getCurrentlySelectedMovieFileList().get(currentMovieNumberInList).getName());


Input:
public void minusOneDepth() {
    final List<TheRStackFrame> originalStack = new ArrayList<TheRStackFrame>();
    final MockTheRXResolvingSession resolvingSession = new MockTheRXResolvingSession();
    final TheRXStack stack = new TheRXStack(originalStack, resolvingSession, ExecutorServices.ILLEGAL_EXECUTOR);
    originalStack.add(new TheRStackFrame(new TheRLocation("String_Node_Str", 2), new IllegalTheRVarsLoader(), new IllegalTheRDebuggerEvaluator()));
    originalStack.add(new TheRStackFrame(new TheRLocation("String_Node_Str", 1), new IllegalTheRVarsLoader(), new IllegalTheRDebuggerEvaluator()));
    stack.update();
    assertEquals(2, resolvingSession.myNext);
    assertEquals(0, resolvingSession.myCurrent);
    assertEquals(0, resolvingSession.myDropped);
    check(stack, 2, 1);
    originalStack.remove(originalStack.size() - 1);
    stack.update();
    assertEquals(2, resolvingSession.myNext);
    assertEquals(1, resolvingSession.myCurrent);
    assertEquals(1, resolvingSession.myDropped);
    check(stack, 3, 1);
}

Output:
     final List<TheRStackFrame> originalStack = new ArrayList<TheRStackFrame>();
-    final MockTheRXResolvingSession resolvingSession = new MockTheRXResolvingSession();
+    final MockTheRResolvingSession resolvingSession = new MockTheRResolvingSession();
     final TheRXStack stack = new TheRXStack(originalStack, resolvingSession, ExecutorServices.ILLEGAL_EXECUTOR);


Input:
private void checkName(String name) throws NameException {
    ElementDefn metaData = (ElementDefn) element.getDefn();
    if (name == null) {
        if (element.hasDerived() || element.hasReferences())
            throw new NameException(element, name, NameException.DESIGN_EXCEPTION_HAS_REFERENCES);
        if (metaData.getNameOption() == MetaDataConstants.REQUIRED_NAME)
            throw new NameException(element, name, NameException.DESIGN_EXCEPTION_NAME_REQUIRED);
    } else {
        if (metaData.getNameOption() == MetaDataConstants.NO_NAME)
            throw new NameException(element, name, NameException.DESIGN_EXCEPTION_NAME_FORBIDDEN);
        int ns = metaData.getNameSpaceID();
        if (!getModule().getModuleNameSpace(ns).canContain(name))
            throw new NameException(element, name, NameException.DESIGN_EXCEPTION_DUPLICATE);
    }
}

Output:
         int ns = metaData.getNameSpaceID();
-        if (!getModule().getModuleNameSpace(ns).canContain(name))
+        if (ns == Module.STYLE_NAME_SPACE && element instanceof StyleElement && getModule() instanceof Library) {
+            return;
+        }
+        DesignElement existedElement = getModule().getNameSpace(ns).getElement(name);
+        if (existedElement != null && existedElement != element)
             throw new NameException(element, name, NameException.DESIGN_EXCEPTION_DUPLICATE);


Input:
public static void setupBeforeClass() throws Exception {
    staticCreateTestMetadata();
    TEST_UTIL = new HBaseTestingUtility();
    CONF = TEST_UTIL.getConfiguration();
    CONF.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, IIEndpoint.class.getName());
    TEST_UTIL.startMiniCluster();
    mockIIHtable();
    hconn = HConnectionManager.createConnection(CONF);
}

Output:
 public static void setupBeforeClass() throws Exception {
-    staticCreateTestMetadata();
+    staticCreateTestMetadata(SANDBOX_TEST_DATA);
     TEST_UTIL = new HBaseTestingUtility();


Input:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    AccountManager aManager = new AccountManagerSession();
    PersonManager pManager = new PersonManagerSession();
    ContactManager cManager = new ContactManagerSession();
    DivisionOfficeManager dManager = new DivisionOfficeManagerSession();
    String userName = (String) request.getParameter("String_Node_Str");
    String title;
    String name;
    ArrayList<String> mobileNumber = new ArrayList<String>();
    ArrayList<String> landline = new ArrayList<String>();
    ArrayList<String> emailad = new ArrayList<String>();
    String username;
    String acctType;
    try {
        Account account = aManager.getAccount(userName);
        Person person = pManager.getPerson(account.getPersonID());
        List<Contact> contact = cManager.getAllContactsByPerson(person.getId());
        username = account.getUsername();
        acctType = account.getAccountType();
        title = person.getTitle();
        name = person.getName();
        for (int i = 0; i < contact.size(); i++) {
            if (contact.get(i).getType() == ContactType.MOBILE)
                mobileNumber.add(contact.get(i).getData());
        }
        for (int i = 0; i < contact.size(); i++) {
            if (contact.get(i).getType() == ContactType.LANDLINE)
                landline.add(contact.get(i).getData());
        }
        for (int i = 0; i < contact.size(); i++) {
            if (contact.get(i).getType() == ContactType.EMAIL)
                emailad.add(contact.get(i).getData());
        }
        request.setAttribute("String_Node_Str", title);
        request.setAttribute("String_Node_Str", name);
        request.setAttribute("String_Node_Str", mobileNumber);
        request.setAttribute("String_Node_Str", landline);
        request.setAttribute("String_Node_Str", emailad);
        request.setAttribute("String_Node_Str", username);
        request.setAttribute("String_Node_Str", acctType);
    } catch (TransactionException e) {
        e.printStackTrace();
    }
    RequestDispatcher view = request.getRequestDispatcher("String_Node_Str");
    view.forward(request, response);
}

Output:
     String username;
-    String acctType;
+    AccountType acctType;
     try {


Input:
public int getValue() {
    return rewardTypeCount.get(RewardType.fromName(getColumnName()));
}

Output:
 public int getValue() {
-    return rewardTypeCount.get(RewardType.fromName(getColumnName()));
+    Integer count = rewardTypeCount.get(RewardType.fromName(getColumnName()));
+    rewardTypeCount.put(RewardType.fromName(getColumnName()), Integer.valueOf(0));
+    return count;
 }


Input:
private RecordSource compileJoins(QueryModel model, JournalReaderFactory factory) throws ParserException {
    ObjList<QueryModel> joinModels = model.getJoinModels();
    IntList ordered = model.getOrderedJoinModels();
    RecordSource master = null;
    try {
        boolean needColumnNameHistogram = model.getColumns().size() > 0;
        model.getColumnNameHistogram().clear();
        for (int i = 0, n = ordered.size(); i < n; i++) {
            int index = ordered.getQuick(i);
            QueryModel m = joinModels.getQuick(index);
            RecordSource slave = m.getRecordSource();
            if (slave == null) {
                slave = compileJournal(m, factory);
                if (m.getAlias() != null) {
                    slave.getMetadata().setAlias(m.getAlias().token);
                }
            }
            if (needColumnNameHistogram) {
                model.createColumnNameHistogram(slave);
            }
            if (master == null) {
                master = analyseAndCompileOrderBy(model, slave);
            } else {
                switch(m.getJoinType()) {
                    case QueryModel.JOIN_CROSS:
                        master = new CrossJoinRecordSource(master, slave);
                        break;
                    case QueryModel.JOIN_ASOF:
                        master = createAsOfJoin(model.getTimestamp(), m, master, slave);
                        break;
                    default:
                        master = createHashJoin(m, master, slave);
                        break;
                }
            }
            ExprNode filter = m.getPostJoinWhereClause();
            if (filter != null) {
                master = new FilteredRecordSource(master, virtualColumnBuilder.createVirtualColumn(model, filter, master.getMetadata()), filter);
            }
        }
        if (joinModelIsFalse(model)) {
            return new NoOpJournalRecordSource(master);
        }
        return master;
    } catch (ParserException e) {
        Misc.free(master);
        throw e;
    }
}

Output:
                 slave = compileJournal(m, factory);
-                if (m.getAlias() != null) {
-                    slave.getMetadata().setAlias(m.getAlias().token);
-                }
+            } else {
+                slave = filter(m, slave);
+            }
+            if (m.getAlias() != null) {
+                slave.getMetadata().setAlias(m.getAlias().token);
             }


Input:
public List<Issue> getIssues(String projectKey, String queryId) throws IOException, AuthenticationException {
    if (mode.equals(REDMINE_VERSION.TRUNK)) {
        return getIssuesTrunk(projectKey, queryId);
    } else if (mode.equals(REDMINE_VERSION.V104)) {
        return getIssuesV104(projectKey, queryId);
    }
    throw new RuntimeException("String_Node_Str" + mode);
}

Output:
 public List<Issue> getIssues(String projectKey, String queryId) throws IOException, AuthenticationException {
-    if (mode.equals(REDMINE_VERSION.TRUNK)) {
-        return getIssuesTrunk(projectKey, queryId);
-    } else if (mode.equals(REDMINE_VERSION.V104)) {
-        return getIssuesV104(projectKey, queryId);
-    }
-    throw new RuntimeException("String_Node_Str" + mode);
+    return getIssuesV104(projectKey, queryId);
 }


Input:
public void testErmaGradientWithGlobalExplicitFactor() {
    FgAndVars fgv = FactorGraphTest.getLinearChainFgWithVars();
    FactorGraph fg = fgv.fg;
    ExplicitFactor loop0 = new GlobalExplicitFactor(new VarSet(fgv.t0, fgv.t1, fgv.t2));
    loop0.setValue(0, 2);
    loop0.setValue(1, 3);
    loop0.setValue(2, 5);
    loop0.setValue(3, 7);
    loop0.setValue(4, 11);
    loop0.setValue(5, 15);
    loop0.setValue(6, 19);
    loop0.setValue(7, 23);
    fg.addFactor(loop0);
    VarConfig goldConfig = new VarConfig();
    goldConfig.put(fgv.w0, 0);
    goldConfig.put(fgv.w1, 1);
    goldConfig.put(fgv.w2, 0);
    goldConfig.put(fgv.t1, 1);
    goldConfig.put(fgv.t2, 1);
    ErmaBpPrm prm = new ErmaBpPrm();
    prm.updateOrder = BpUpdateOrder.PARALLEL;
    prm.maxIterations = 10;
    prm.s = s;
    prm.normalizeMessages = true;
    testGradientByFiniteDifferences(fg, goldConfig, prm);
}

Output:
 public void testErmaGradientWithGlobalExplicitFactor() {
-    FgAndVars fgv = FactorGraphTest.getLinearChainFgWithVars();
+    FgAndVars fgv = FactorGraphsForTests.getLinearChainFgWithVars();
     FactorGraph fg = fgv.fg;


Input:
private static void argScoringSetup(final InspectorTreeNode<EvalPair<ImmutableSet<DocLevelEventArg>, ImmutableSet<DocLevelEventArg>>> inputAsSetsOfScoringTuples, final Iterable<? extends ScoringEventObserver<DocLevelEventArg, DocLevelEventArg>> scoringEventObservers, final File outputDir) {
    final InspectorTreeNode<ProvenancedAlignment<DocLevelEventArg, DocLevelEventArg, DocLevelEventArg, DocLevelEventArg>> alignmentNode = transformed(inputAsSetsOfScoringTuples, EXACT_MATCH_ALIGNER);
    final AggregateBinaryFScoresInspector<DocLevelEventArg, DocLevelEventArg> scoreAndWriteOverallFScore = AggregateBinaryFScoresInspector.createWithScoringObservers("String_Node_Str", outputDir, scoringEventObservers);
    inspect(alignmentNode).with(scoreAndWriteOverallFScore);
    final BinaryConfusionMatrixBootstrapStrategy<HasEventType> perEventBootstrapStrategy = BinaryConfusionMatrixBootstrapStrategy.create(HasEventType.ExtractFunction.INSTANCE, ImmutableSet.of(BrokenDownFMeasureAggregator.create("String_Node_Str", new File(outputDir, "String_Node_Str"))));
    final BootstrapInspector breakdownScoresByEventTypeWithBootstrapping = BootstrapInspector.forStrategy(perEventBootstrapStrategy, 1000, new Random(0));
    inspect(alignmentNode).with(breakdownScoresByEventTypeWithBootstrapping);
    final BinaryConfusionMatrixBootstrapStrategy<DocLevelEventArg> typeRoleBootstrapStrategy = BinaryConfusionMatrixBootstrapStrategy.create(DocLevelEventArg.TypeRoleFunction.INSTANCE, ImmutableSet.of(BrokenDownFMeasureAggregator.create("String_Node_Str", new File(outputDir, "String_Node_Str"))));
    final BootstrapInspector breakdownScoresByEventTypeRoleWithBootstrapping = BootstrapInspector.forStrategy(typeRoleBootstrapStrategy, 1000, new Random(0));
    inspect(alignmentNode).with(breakdownScoresByEventTypeRoleWithBootstrapping);
    final BinaryConfusionMatrixBootstrapStrategy<DocLevelEventArg> mentionTypeBootstrapStrategy = BinaryConfusionMatrixBootstrapStrategy.create(ExtractMentionType.INSTANCE, ImmutableSet.of(BrokenDownFMeasureAggregator.create("String_Node_Str", new File(outputDir, "String_Node_Str"))));
    final BootstrapInspector breakdownScoresByMentionTypeWithBootstrapping = BootstrapInspector.forStrategy(mentionTypeBootstrapStrategy, 1000, new Random(0));
    inspect(alignmentNode).with(breakdownScoresByMentionTypeWithBootstrapping);
    final ArgumentScoringInspector argScorer = ArgumentScoringInspector.createOutputtingTo(outputDir);
    inspect(alignmentNode).with(argScorer);
    final BinaryConfusionMatrixBootstrapStrategy<HasEventType> argScoreBootstrapStrategy = BinaryConfusionMatrixBootstrapStrategy.create(Functions.constant("String_Node_Str"), ImmutableSet.of(new BrokenDownLinearScoreAggregator.Builder().name("String_Node_Str").outputDir(new File(outputDir, "String_Node_Str")).alpha(0.25).build()));
    final BootstrapInspector argScoreWithBootstrapping = BootstrapInspector.forStrategy(argScoreBootstrapStrategy, 1000, new Random(0));
    inspect(alignmentNode).with(argScoreWithBootstrapping);
    final BinaryConfusionMatrixBootstrapStrategy<HasEventType> argScoreByTypeGroupBootstrapStrategy = BinaryConfusionMatrixBootstrapStrategy.create(By2016TypeGroup.INSTANCE, ImmutableSet.of(new BrokenDownLinearScoreAggregator.Builder().name("String_Node_Str").outputDir(new File(outputDir, "String_Node_Str")).alpha(0.25).build()));
    final BootstrapInspector argScoreByTypeWithBootstrapping = BootstrapInspector.forStrategy(argScoreByTypeGroupBootstrapStrategy, 1000, new Random(0));
    inspect(alignmentNode).with(argScoreByTypeWithBootstrapping);
    final BinaryErrorLogger<HasDocID, HasDocID> logWrongAnswers = BinaryErrorLogger.forStringifierAndOutputDir(Functions.<HasDocID>toStringFunction(), outputDir);
    inspect(alignmentNode).with(logWrongAnswers);
}

Output:
     inspect(alignmentNode).with(argScoreByTypeWithBootstrapping);
-    final BinaryErrorLogger<HasDocID, HasDocID> logWrongAnswers = BinaryErrorLogger.forStringifierAndOutputDir(Functions.<HasDocID>toStringFunction(), outputDir);
+    final BinaryErrorLogger<HasDocID, HasDocID> logWrongAnswers = BinaryErrorLogger.forStringifierAndOutputDir(Functions.toStringFunction(), outputDir);
     inspect(alignmentNode).with(logWrongAnswers);


Input:
public void overrideMasterSpreadObjects() throws Exception {
    for (InDesignComponent comp : this.masterSpread.getChildren()) {
        if (comp.getBooleanProperty("String_Node_Str")) {
            if (comp instanceof Rectangle) {
                this.addRectangle((Rectangle) comp);
            } else {
                this.addChild(comp);
            }
        }
    }
    logger.debug("String_Node_Str");
    assignRectanglesToPages();
}

Output:
         if (comp.getBooleanProperty("String_Node_Str")) {
-            if (comp instanceof Rectangle) {
-                this.addRectangle((Rectangle) comp);
+            if (comp instanceof InDesignObject) {
+                InDesignObject idObj = (InDesignObject) comp;
+                if (idObj instanceof TextFrame) {
+                    TextFrame masterFrame = (TextFrame) idObj;
+                    TextFrame overrideFrame = (TextFrame) doc.clone(masterFrame);
+                    overrideFrame.setMasterFrame(masterFrame);
+                    masterToOverride.put(masterFrame, overrideFrame);
+                } else if (idObj instanceof Rectangle) {
+                    this.addRectangle((Rectangle) (doc.clone(idObj)));
+                } else {
+                    this.addChild(idObj);
+                }
             } else {


Input:
protected void createSchema(DSLContext dsl, SqlInterface sqlInterface, SqlHelper sqlHelper) throws SQLException, IOException {
    sqlInterface.createSchema(dsl, TorodbSchema.TORODB_SCHEMA);
    sqlInterface.createMetaDatabaseTable(dsl);
    sqlInterface.createMetaCollectionTable(dsl);
    sqlInterface.createMetaDocPartTable(dsl);
    sqlInterface.createMetaFieldTable(dsl);
    sqlInterface.createMetaScalarTable(dsl);
}

Output:
 protected void createSchema(DSLContext dsl, SqlInterface sqlInterface, SqlHelper sqlHelper) throws SQLException, IOException {
-    sqlInterface.createSchema(dsl, TorodbSchema.TORODB_SCHEMA);
+    sqlInterface.createSchema(dsl, TorodbSchema.IDENTIFIER);
     sqlInterface.createMetaDatabaseTable(dsl);


Input:
public int next() {
    if (!hasNext()) {
        throw new IllegalStateException();
    }
    cur = cur + incr;
    return cur;
}

Output:
     }
-    cur = cur + incr;
-    return cur;
+    int tmp = cur;
+    cur += incr;
+    return tmp;
 }


Input:
public void playerTags(ReplaceableTagEvent event) {
    if (!event.matches("String_Node_Str"))
        return;
    Player p = event.getPlayer();
    String type = event.getType() != null ? event.getType() : "String_Node_Str";
    String typeContext = event.getTypeContext() != null ? event.getTypeContext() : "String_Node_Str";
    String subType = event.getSubType() != null ? event.getSubType() : "String_Node_Str";
    String subTypeContext = event.getSubTypeContext() != null ? event.getSubTypeContext() : "String_Node_Str";
    String specifier = event.getSpecifier() != null ? event.getSpecifier() : "String_Node_Str";
    String specifierContext = event.getSpecifierContext() != null ? event.getSpecifierContext() : "String_Node_Str";
    if (type.equalsIgnoreCase("String_Node_Str")) {
        StringBuilder players = new StringBuilder();
        if (subType.equalsIgnoreCase("String_Node_Str")) {
            if (specifier.equalsIgnoreCase("String_Node_Str")) {
                for (Player player : Bukkit.getOnlinePlayers()) {
                    if (player.isOp()) {
                        players.append(player.getName());
                        players.append("String_Node_Str");
                    }
                }
            } else {
                for (Player player : Bukkit.getOnlinePlayers()) {
                    players.append(player.getName());
                    players.append("String_Node_Str");
                }
            }
        } else if (subType.equalsIgnoreCase("String_Node_Str")) {
            StringBuilder onlinePlayers = new StringBuilder();
            for (Player player : Bukkit.getOnlinePlayers()) {
                onlinePlayers.append(player.getName());
                onlinePlayers.append("String_Node_Str");
            }
            if (specifier.equalsIgnoreCase("String_Node_Str")) {
                for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
                    if (player.isOp() && !onlinePlayers.toString().contains(player.getName())) {
                        players.append(player.getName());
                        players.append("String_Node_Str");
                    }
                }
            } else {
                for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
                    if (!onlinePlayers.toString().contains(player.getName())) {
                        players.append(player.getName());
                        players.append("String_Node_Str");
                    }
                }
            }
        } else {
            for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
                players.append(player.getName());
                players.append("String_Node_Str");
            }
        }
        event.setReplaced(players.toString().substring(0, players.length() - 1));
        return;
    }
    if (event.getPlayer() == null)
        return;
    if (type.equalsIgnoreCase("String_Node_Str")) {
        if (event.hasTypeContext()) {
            if (aH.matchesInteger(event.getTypeContext())) {
                if (playerChatHistory.containsKey(event.getPlayer().getName())) {
                    List<String> history = playerChatHistory.get(event.getPlayer().getName());
                    if (history.size() < aH.getIntegerFrom(event.getTypeContext()))
                        event.setReplaced(history.get(history.size() - 1));
                    else
                        event.setReplaced(history.get(aH.getIntegerFrom(event.getTypeContext()) - 1));
                }
            }
        } else {
            if (playerChatHistory.containsKey(event.getPlayer().getName())) {
                event.setReplaced(playerChatHistory.get(event.getPlayer().getName()).get(0));
            }
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        int range = 100;
        if (aH.matchesInteger(typeContext))
            range = aH.getIntegerFrom(typeContext);
        if (subType.equalsIgnoreCase("String_Node_Str")) {
            if (specifier.equalsIgnoreCase("String_Node_Str"))
                event.setReplaced(String.valueOf(Utilities.getClosestNPC(p.getLocation(), range).getId()));
            else
                event.setReplaced(String.valueOf(Utilities.getClosestNPC(p.getLocation(), range).getName()));
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getItemInHand().getAmount()));
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getItemInHand().getTypeId()));
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getItemInHand().getDurability()));
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getItemInHand().getData()));
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getItemInHand().getMaxStackSize()));
        else if (subType.equalsIgnoreCase("String_Node_Str")) {
            if (NBTItem.hasCustomNBT(p.getItemInHand(), "String_Node_Str"))
                event.setReplaced(NBTItem.getCustomNBT(p.getItemInHand(), "String_Node_Str"));
        } else if (subType.equalsIgnoreCase("String_Node_Str")) {
            String enchantments = null;
            if (specifier.equalsIgnoreCase("String_Node_Str"))
                enchantments = NBTItem.getEnchantments(p.getItemInHand()).asDScriptListWithLevels();
            else if (specifier.equalsIgnoreCase("String_Node_Str"))
                enchantments = NBTItem.getEnchantments(p.getItemInHand()).asDScriptListLevelsOnly();
            else
                enchantments = NBTItem.getEnchantments(p.getItemInHand()).asDScriptList();
            if (enchantments != null && enchantments.length() > 0)
                event.setReplaced(enchantments);
        } else if (subType.equalsIgnoreCase("String_Node_Str")) {
            if (p.getItemInHand().hasItemMeta()) {
                if (p.getItemInHand().getItemMeta().hasLore()) {
                    event.setReplaced(new dList(p.getItemInHand().getItemMeta().getLore()).dScriptArgValue());
                }
            }
        } else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(p.getItemInHand().getItemMeta().getDisplayName());
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            if (specifier.equalsIgnoreCase("String_Node_Str")) {
                String itemName = p.getItemInHand().getType().name().toLowerCase().replace('_', ' ');
                int itemQty = p.getItemInHand().getAmount();
                if (itemName.equalsIgnoreCase("String_Node_Str")) {
                    event.setReplaced("String_Node_Str");
                } else if (itemName.equalsIgnoreCase("String_Node_Str") || itemName.equalsIgnoreCase("String_Node_Str")) {
                    event.setReplaced(itemName);
                } else if (itemQty > 1) {
                    if (itemName.equalsIgnoreCase("String_Node_Str"))
                        event.setReplaced("String_Node_Str");
                    else if (itemName.endsWith("String_Node_Str"))
                        event.setReplaced(itemName.substring(0, itemName.length() - 1) + "String_Node_Str");
                    else if (itemName.endsWith("String_Node_Str"))
                        event.setReplaced(itemName);
                    else
                        event.setReplaced(itemName + "String_Node_Str");
                } else {
                    if (itemName.equalsIgnoreCase("String_Node_Str"))
                        event.setReplaced("String_Node_Str");
                    else if (itemName.endsWith("String_Node_Str"))
                        event.setReplaced(itemName);
                    else if (itemName.startsWith("String_Node_Str") || itemName.startsWith("String_Node_Str") || itemName.startsWith("String_Node_Str") || itemName.startsWith("String_Node_Str") || itemName.startsWith("String_Node_Str"))
                        event.setReplaced("String_Node_Str" + itemName);
                    else
                        event.setReplaced("String_Node_Str" + itemName);
                }
            } else
                event.setReplaced(p.getItemInHand().getType().name());
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(p.getName());
        if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(p.getDisplayName());
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(p.getPlayerListName());
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(p.getLocation().getX() + "String_Node_Str" + p.getLocation().getY() + "String_Node_Str" + p.getLocation().getZ() + "String_Node_Str" + p.getWorld().getName());
        if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(p.getLocation().getBlockX() + "String_Node_Str" + p.getLocation().getBlockY() + "String_Node_Str" + p.getLocation().getBlockZ() + "String_Node_Str" + p.getWorld().getName());
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced("String_Node_Str" + p.getLocation().getX() + "String_Node_Str" + p.getLocation().getY() + "String_Node_Str" + p.getLocation().getZ() + "String_Node_Str" + p.getWorld().getName() + "String_Node_Str");
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getLocation().getX()));
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getLocation().getY()));
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getLocation().getZ()));
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(p.getWorld().getName());
        else if (subType.equalsIgnoreCase("String_Node_Str")) {
            int range = 50;
            if (aH.matchesInteger(subTypeContext))
                range = aH.getIntegerFrom(subTypeContext);
            event.setReplaced(new Location(p.getTargetBlock(null, range).getLocation()).dScriptArgValue());
        } else if (subType.equalsIgnoreCase("String_Node_Str"))
            if (specifier.equalsIgnoreCase("String_Node_Str"))
                event.setReplaced(p.getLocation().add(0, -1, 0).getBlock().getType().name().toLowerCase().replace('_', ' '));
            else
                event.setReplaced(p.getLocation().add(0, -1, 0).getBlock().getType().name());
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(p.getWorld().getSpawnLocation().getX() + "String_Node_Str" + p.getWorld().getSpawnLocation().getY() + "String_Node_Str" + p.getWorld().getSpawnLocation().getZ() + "String_Node_Str" + p.getWorld().getName());
        else if (subType.equalsIgnoreCase("String_Node_Str") && p.getBedSpawnLocation() != null)
            event.setReplaced(p.getBedSpawnLocation().getX() + "String_Node_Str" + p.getBedSpawnLocation().getY() + "String_Node_Str" + p.getBedSpawnLocation().getZ() + "String_Node_Str" + p.getWorld().getName());
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(String.valueOf(p.getHealth()));
        if (subType.equalsIgnoreCase("String_Node_Str")) {
            int maxHealth = p.getMaxHealth();
            if (event.getType().split("String_Node_Str").length > 2)
                maxHealth = Integer.valueOf(event.getType().split("String_Node_Str")[2]);
            if ((float) p.getHealth() / maxHealth < .10)
                event.setReplaced("String_Node_Str");
            else if ((float) p.getHealth() / maxHealth < .40)
                event.setReplaced("String_Node_Str");
            else if ((float) p.getHealth() / maxHealth < .75)
                event.setReplaced("String_Node_Str");
            else if ((float) p.getHealth() / maxHealth < 1)
                event.setReplaced("String_Node_Str");
            else
                event.setReplaced("String_Node_Str");
        } else if (subType.equalsIgnoreCase("String_Node_Str")) {
            int maxHealth = p.getMaxHealth();
            if (event.getType().split("String_Node_Str").length > 2)
                maxHealth = Integer.valueOf(event.getType().split("String_Node_Str")[2]);
            event.setReplaced(String.valueOf(((float) p.getHealth() / maxHealth) * 100));
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(String.valueOf(p.getFoodLevel()));
        if (subType.equalsIgnoreCase("String_Node_Str")) {
            int maxFood = 20;
            if (event.getType().split("String_Node_Str").length > 2)
                maxFood = Integer.valueOf(event.getType().split("String_Node_Str")[2]);
            if ((float) p.getHealth() / maxFood < .10)
                event.setReplaced("String_Node_Str");
            else if ((float) p.getFoodLevel() / maxFood < .40)
                event.setReplaced("String_Node_Str");
            else if ((float) p.getFoodLevel() / maxFood < .75)
                event.setReplaced("String_Node_Str");
            else if ((float) p.getFoodLevel() / maxFood < 1)
                event.setReplaced("String_Node_Str");
            else
                event.setReplaced("String_Node_Str");
        } else if (subType.equalsIgnoreCase("String_Node_Str")) {
            int maxFood = 20;
            if (event.getType().split("String_Node_Str").length > 2)
                maxFood = Integer.valueOf(event.getType().split("String_Node_Str")[2]);
            event.setReplaced(String.valueOf(((float) p.getFoodLevel() / maxFood) * 100));
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        if (Depends.economy != null) {
            event.setReplaced(String.valueOf(Depends.economy.getBalance(p.getName())));
            if (subType.equalsIgnoreCase("String_Node_Str"))
                event.setReplaced(String.valueOf((int) Depends.economy.getBalance(p.getName())));
            else if (subType.equalsIgnoreCase("String_Node_Str"))
                if (specifier.equalsIgnoreCase("String_Node_Str"))
                    event.setReplaced(Depends.economy.currencyNameSingular());
                else
                    event.setReplaced(Depends.economy.currencyNamePlural());
        } else {
            dB.echoError("String_Node_Str");
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        if (Depends.permissions != null) {
            if (subType.equalsIgnoreCase("String_Node_Str"))
                event.setReplaced(String.valueOf(Depends.permissions.has((World) null, p.getName(), typeContext)));
            else
                event.setReplaced(String.valueOf(Depends.permissions.has(p, typeContext)));
        } else {
            dB.echoError("String_Node_Str");
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        if (Depends.permissions != null) {
            if (subType.equalsIgnoreCase("String_Node_Str"))
                event.setReplaced(String.valueOf(Depends.permissions.playerInGroup((World) null, p.getName(), typeContext)));
            else
                event.setReplaced(String.valueOf(Depends.permissions.playerInGroup(p, typeContext)));
        } else {
            dB.echoError("String_Node_Str");
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getGameMode().getValue()));
        else
            event.setReplaced(String.valueOf(p.getGameMode().name()));
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(String.valueOf(p.isOp()));
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(String.valueOf(p.isBanned()));
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(String.valueOf(p.isOnline()));
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(String.valueOf(p.isFlying()));
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(String.valueOf(p.isSneaking()));
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(String.valueOf(p.getPlayerTime()));
        if (subType.equalsIgnoreCase("String_Node_Str")) {
            if (p.getPlayerTime() >= 23000)
                event.setReplaced("String_Node_Str");
            else if (p.getPlayerTime() >= 13500)
                event.setReplaced("String_Node_Str");
            else if (p.getPlayerTime() >= 12500)
                event.setReplaced("String_Node_Str");
            else
                event.setReplaced("String_Node_Str");
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        if (p.getWorld().hasStorm())
            event.setReplaced("String_Node_Str");
        else if (p.getPlayerTime() > 13500)
            event.setReplaced("String_Node_Str");
        else
            event.setReplaced("String_Node_Str");
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        if (subType.equalsIgnoreCase("String_Node_Str") && p.getInventory().getBoots() != null)
            event.setReplaced(p.getInventory().getBoots().getType().name());
        else if (subType.equalsIgnoreCase("String_Node_Str") && p.getInventory().getChestplate() != null)
            event.setReplaced(p.getInventory().getChestplate().getType().name());
        else if (subType.equalsIgnoreCase("String_Node_Str") && p.getInventory().getHelmet() != null)
            event.setReplaced(p.getInventory().getHelmet().getType().name());
        else if (subType.equalsIgnoreCase("String_Node_Str") && p.getInventory().getLeggings() != null)
            event.setReplaced(p.getInventory().getLeggings().getType().name());
        else
            event.setReplaced("String_Node_Str");
        if (specifier.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(event.getReplaced().toLowerCase().replace('_', ' '));
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        if (aH.matchesScript("String_Node_Str" + typeContext)) {
            int times = 0;
            if (subType.equalsIgnoreCase("String_Node_Str")) {
                times = FinishCommand.getScriptCompletes(p.getName(), aH.getStringFrom(typeContext).toUpperCase());
            } else if (subType.equalsIgnoreCase("String_Node_Str")) {
                times = FailCommand.getScriptFails(p.getName(), aH.getStringFrom(typeContext).toUpperCase());
            }
            if (times > 0)
                event.setReplaced("String_Node_Str");
            else
                event.setReplaced("String_Node_Str");
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        if (subType.equalsIgnoreCase("String_Node_Str")) {
            if (specifier.equalsIgnoreCase("String_Node_Str")) {
                for (ItemStack itemstack : event.getPlayer().getInventory().getContents()) {
                    if (itemstack != null && itemstack.getItemMeta().getDisplayName() != null) {
                        if (itemstack.getItemMeta().getDisplayName().equalsIgnoreCase(specifierContext)) {
                            event.setReplaced("String_Node_Str");
                            return;
                        }
                    }
                }
                for (ItemStack itemstack : event.getPlayer().getInventory().getArmorContents()) {
                    if (itemstack.getType().name() != "String_Node_Str" && itemstack.getItemMeta().getDisplayName() != null) {
                        if (itemstack.getItemMeta().getDisplayName().equalsIgnoreCase(specifierContext)) {
                            event.setReplaced("String_Node_Str");
                            return;
                        }
                    }
                }
                event.setReplaced("String_Node_Str");
            } else if (aH.matchesItem("String_Node_Str" + subTypeContext)) {
                ItemStack item = aH.getItemFrom("String_Node_Str" + subTypeContext);
                if (specifier.equalsIgnoreCase("String_Node_Str") && (aH.matchesQuantity("String_Node_Str" + specifierContext))) {
                    int qty = aH.getIntegerFrom(specifierContext);
                    event.setReplaced(String.valueOf(event.getPlayer().getInventory().containsAtLeast(item, qty)));
                } else
                    event.setReplaced(String.valueOf(event.getPlayer().getInventory().containsAtLeast(item, 1)));
            }
        } else if (subType.equalsIgnoreCase("String_Node_Str")) {
            int qty = 0;
            if (aH.matchesItem("String_Node_Str" + subTypeContext)) {
                ItemStack item = new ItemStack(aH.getItemFrom("String_Node_Str" + subTypeContext));
                qty = Utilities.countItems(item, event.getPlayer().getInventory());
                for (ItemStack itemstack : event.getPlayer().getInventory().getArmorContents()) {
                    if (itemstack.getType().name() != "String_Node_Str") {
                        if (itemstack.isSimilar(item))
                            qty = qty + itemstack.getAmount();
                    }
                }
            } else {
                qty = Utilities.countItems(event.getPlayer().getInventory());
                for (ItemStack itemstack : event.getPlayer().getInventory().getArmorContents()) {
                    if (itemstack.getType().name() != "String_Node_Str")
                        qty = qty + itemstack.getAmount();
                }
            }
            event.setReplaced(String.valueOf(qty));
        } else if (subType.equalsIgnoreCase("String_Node_Str")) {
            int qty = 0;
            for (ItemStack itemstack : event.getPlayer().getInventory().getContents()) {
                if (itemstack != null)
                    qty++;
            }
            for (ItemStack itemstack : event.getPlayer().getInventory().getArmorContents()) {
                if (itemstack.getType().name() != "String_Node_Str")
                    qty++;
            }
            event.setReplaced(String.valueOf(qty));
        }
    } else if (type.equalsIgnoreCase("String_Node_Str")) {
        event.setReplaced(String.valueOf(event.getPlayer().getExp() * 100));
        if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getExpToLevel()));
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getTotalExperience()));
        else if (subType.equalsIgnoreCase("String_Node_Str"))
            event.setReplaced(String.valueOf(p.getLevel()));
    }
}

Output:
             } else if (aH.matchesItem("String_Node_Str" + subTypeContext)) {
-                ItemStack item = aH.getItemFrom("String_Node_Str" + subTypeContext);
+                ItemStack item = aH.getItemFrom("String_Node_Str" + subTypeContext).getItemStack();
                 if (specifier.equalsIgnoreCase("String_Node_Str") && (aH.matchesQuantity("String_Node_Str" + specifierContext))) {


Input:
public void handleFree(DownloadLink link) throws Exception {
    if (!link.getDownloadURL().contains("String_Node_Str") && !link.getDownloadURL().contains("String_Node_Str"))
        requestFileInformation(link);
    else {
        String fileid = new Regex(link.getDownloadURL(), "String_Node_Str").getMatch(0);
        if (fileid != null)
            br.getPage("String_Node_Str" + fileid);
        else {
            br.getPage(link.getBrowserUrl());
        }
    }
    dl = jd.plugins.BrowserAdapter.openDownload(br, link, link.getDownloadURL(), true, 0);
    if (dl.getConnection().getContentType().contains("String_Node_Str")) {
        br.followConnection();
        throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    dl.startDownload();
}

Output:
     }
-    dl = jd.plugins.BrowserAdapter.openDownload(br, link, link.getDownloadURL(), true, 0);
+    if (link.getDownloadURL().endsWith("String_Node_Str"))
+        dl = jd.plugins.BrowserAdapter.openDownload(br, link, link.getDownloadURL(), true, 0);
+    else
+        dl = jd.plugins.BrowserAdapter.openDownload(br, link, link.getDownloadURL());
     if (dl.getConnection().getContentType().contains("String_Node_Str")) {


Input:
public void destroy() throws Exception {
    if (serverConfigurationManager != null) {
        serverConfigurationManager.restoreToLastConfiguration();
    }
    super.cleanup();
}

Output:
     }
-    super.cleanup();
+    super.cleanUp();
 }


Input:
private void processAdditionalClasses(JavaClass cls, TypeMappingInfo tmi, ArrayList<JavaClass> extraClasses, ArrayList<JavaClass> classesToProcess) {
    Class xmlElementType = null;
    JavaClass javaClass = cls;
    if (tmi != null) {
        Class adapterClass = this.typeMappingInfoToAdapterClasses.get(tmi);
        if (adapterClass != null) {
            JavaClass adapterJavaClass = helper.getJavaClass(adapterClass);
            JavaClass newType = helper.getJavaClass(Object.class);
            for (Object nextMethod : adapterJavaClass.getDeclaredMethods()) {
                JavaMethod method = (JavaMethod) nextMethod;
                if (method.getName().equals("String_Node_Str")) {
                    JavaClass returnType = method.getReturnType();
                    if (!returnType.getQualifiedName().equals(newType.getQualifiedName())) {
                        newType = (JavaClass) returnType;
                        break;
                    }
                }
            }
            if (!helper.isBuiltInJavaType(javaClass)) {
                extraClasses.add(javaClass);
            }
            javaClass = newType;
        }
        java.lang.annotation.Annotation[] annotations = getAnnotations(tmi);
        if (annotations != null) {
            for (int j = 0; j < annotations.length; j++) {
                java.lang.annotation.Annotation nextAnnotation = annotations[j];
                if (nextAnnotation != null) {
                    if (nextAnnotation instanceof XmlElement) {
                        XmlElement javaAnnotation = (XmlElement) nextAnnotation;
                        if (javaAnnotation.type() != XmlElement.DEFAULT.class) {
                            xmlElementType = javaAnnotation.type();
                        }
                    }
                }
            }
        }
    }
    if (areEquals(javaClass, byte[].class) || areEquals(javaClass, JAVAX_ACTIVATION_DATAHANDLER) || areEquals(javaClass, Source.class) || areEquals(javaClass, Image.class) || areEquals(javaClass, JAVAX_MAIL_INTERNET_MIMEMULTIPART)) {
        if (tmi == null || tmi.getXmlTagName() == null) {
            ElementDeclaration declaration = new ElementDeclaration(null, javaClass, javaClass.getQualifiedName(), false, XmlElementDecl.GLOBAL.class);
            declaration.setTypeMappingInfo(tmi);
            this.localElements.add(declaration);
        }
    } else if (javaClass.isArray()) {
        if (!helper.isBuiltInJavaType(javaClass.getComponentType())) {
            extraClasses.add(javaClass.getComponentType());
        }
        Class generatedClass;
        if (null == tmi) {
            generatedClass = arrayClassesToGeneratedClasses.get(javaClass.getName());
        } else {
            generatedClass = CompilerHelper.getExisitingGeneratedClass(tmi, typeMappingInfoToGeneratedClasses, typeMappingInfoToAdapterClasses, helper.getClassLoader());
        }
        if (generatedClass == null) {
            generatedClass = generateWrapperForArrayClass(javaClass, tmi, xmlElementType, extraClasses);
            extraClasses.add(helper.getJavaClass(generatedClass));
            arrayClassesToGeneratedClasses.put(javaClass.getName(), generatedClass);
        }
        generatedClassesToArrayClasses.put(generatedClass, javaClass);
        typeMappingInfoToGeneratedClasses.put(tmi, generatedClass);
    } else if (isCollectionType(javaClass)) {
        JavaClass componentClass;
        if (javaClass.hasActualTypeArguments()) {
            componentClass = (JavaClass) javaClass.getActualTypeArguments().toArray()[0];
            if (!componentClass.isPrimitive()) {
                extraClasses.add(componentClass);
            }
        } else {
            componentClass = helper.getJavaClass(Object.class);
        }
        Class generatedClass = CompilerHelper.getExisitingGeneratedClass(tmi, typeMappingInfoToGeneratedClasses, typeMappingInfoToAdapterClasses, helper.getClassLoader());
        if (generatedClass == null) {
            generatedClass = generateCollectionValue(javaClass, tmi, xmlElementType, extraClasses);
            extraClasses.add(helper.getJavaClass(generatedClass));
        }
        typeMappingInfoToGeneratedClasses.put(tmi, generatedClass);
    } else if (isMapType(javaClass)) {
        JavaClass keyClass;
        JavaClass valueClass;
        if (javaClass.hasActualTypeArguments()) {
            keyClass = (JavaClass) javaClass.getActualTypeArguments().toArray()[0];
            if (!helper.isBuiltInJavaType(keyClass)) {
                extraClasses.add(keyClass);
            }
            valueClass = (JavaClass) javaClass.getActualTypeArguments().toArray()[1];
            if (!helper.isBuiltInJavaType(valueClass)) {
                extraClasses.add(valueClass);
            }
        } else {
            keyClass = helper.getJavaClass(Object.class);
            valueClass = helper.getJavaClass(Object.class);
        }
        Class generatedClass = CompilerHelper.getExisitingGeneratedClass(tmi, typeMappingInfoToGeneratedClasses, typeMappingInfoToAdapterClasses, helper.getClassLoader());
        if (generatedClass == null) {
            generatedClass = generateWrapperForMapClass(javaClass, keyClass, valueClass, tmi);
            extraClasses.add(helper.getJavaClass(generatedClass));
        }
        typeMappingInfoToGeneratedClasses.put(tmi, generatedClass);
    } else {
        processClass(javaClass, classesToProcess);
    }
}

Output:
         JavaClass componentClass;
-        if (javaClass.hasActualTypeArguments()) {
-            componentClass = (JavaClass) javaClass.getActualTypeArguments().toArray()[0];
+        Collection args = javaClass.getActualTypeArguments();
+        if (args.size() > 0) {
+            componentClass = (JavaClass) args.iterator().next();
             if (!componentClass.isPrimitive()) {


Input:
public float getTextRunAdvances(int start, int end, int contextStart, int contextEnd, int flags, float[] advances, int advancesPos, Paint p, int reserved) {
    float ret;
    int contextLen = contextEnd - contextStart;
    int len = end - start;
    if (end <= mGapStart) {
        ret = p.getTextRunAdvances(mText, start, len, contextStart, contextLen, flags, advances, advancesPos, reserved);
    } else if (start >= mGapStart) {
        ret = p.getTextRunAdvances(mText, start + mGapLength, len, contextStart + mGapLength, contextLen, flags, advances, advancesPos, reserved);
    } else {
        char[] buf = TextUtils.obtain(contextLen);
        getChars(contextStart, contextEnd, buf, 0);
        ret = p.getTextRunAdvances(buf, start - contextStart, len, 0, contextLen, flags, advances, advancesPos, reserved);
        TextUtils.recycle(buf);
    }
    return ret;
}

Output:
     if (end <= mGapStart) {
-        ret = p.getTextRunAdvances(mText, start, len, contextStart, contextLen, flags, advances, advancesPos, reserved);
+        ret = p.getTextRunAdvances(mText, start, len, contextStart, contextLen, flags, advances, advancesPos);
     } else if (start >= mGapStart) {


Input:
public void run() {
    TreeViewer treeViewer = getTreeViewer();
    boolean needSelect = false;
    refreshRoot();
    for (String path : paths) {
        File file = new File(path);
        if (!file.exists()) {
            continue;
        }
        needSelect = true;
        String parent = file.getParent();
        List<String> folders = new ArrayList<String>();
        while (parent != null) {
            folders.add(parent);
            parent = new File(parent).getParent();
        }
        for (int i = folders.size() - 1; i >= 0; i--) {
            treeViewer.expandToLevel(folders.get(i), 1);
        }
    }
    if (needSelect) {
        treeViewer.setSelection(new StructuredSelection(paths));
        treeViewer.reveal(paths[0]);
    }
}

Output:
     boolean needSelect = false;
-    refreshRoot();
+    if (forceRefresh) {
+        refreshRoot();
+    }
     for (String path : paths) {


Input:
public String toString(final Tag[] tags) {
    if (tags == null || tags.length == 0) {
        return "String_Node_Str";
    }
    final StringBuilder buffer = new StringBuilder("String_Node_Str");
    for (int i = 0; i < tags.length; i++) {
        final Tag tag = tags[i];
        File file = tag.position().file();
        module = file.getName();
        while (file != null) {
            file = file.getParentFile();
            if (file.getName().equals("String_Node_Str")) {
                file = file.getParentFile();
                if (file != null) {
                    module = file.getName();
                }
                break;
            }
        }
        buffer.append('\n').append(i == 0 ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str" + "String_Node_Str");
        openMavenReportLink(buffer);
        buffer.append("String_Node_Str").append(module).append("String_Node_Str");
        buffer.append("String_Node_Str").append(MAVEN_REPOSITORY_BASE_URL).append("String_Node_Str").append(module).append('/').append(VERSION).append('/').append("String_Node_Str");
        buffer.append("String_Node_Str");
        final Doc holder = tag.holder();
        if (holder instanceof ClassDoc) {
            ClassDoc outer, doc = (ClassDoc) holder;
            while ((outer = doc.containingClass()) != null) {
                doc = outer;
            }
            buffer.append("String_Node_Str");
            openMavenReportLink(buffer);
            buffer.append("String_Node_Str").append(doc.qualifiedName()).append("String_Node_Str");
        }
        buffer.append("String_Node_Str");
    }
    return buffer.append("String_Node_Str").toString();
}

Output:
         buffer.append('\n').append(i == 0 ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str" + "String_Node_Str");
-        openMavenReportLink(buffer);
-        buffer.append("String_Node_Str").append(module).append("String_Node_Str");
+        buffer.append("String_Node_Str").append(MAVEN_REPORTS_BASE_URL).append(module).append("String_Node_Str").append(module).append("String_Node_Str");
         buffer.append("String_Node_Str").append(MAVEN_REPOSITORY_BASE_URL).append("String_Node_Str").append(module).append('/').append(VERSION).append('/').append("String_Node_Str");


Input:
public void setText(String t) {
    lastLine = -1;
    error = false;
    if (Configuration.debugMode.get() && t.length() > truncateLimit) {
        t = t.substring(0, truncateLimit) + "String_Node_Str" + AppStrings.translate("String_Node_Str").replace("String_Node_Str", Integer.toString(truncateLimit));
    }
    super.setText(t);
    setCaretPosition(0);
}

Output:
     error = false;
-    if (Configuration.debugMode.get() && t.length() > truncateLimit) {
+    if (Configuration.debugMode.get() && t != null && t.length() > truncateLimit) {
         t = t.substring(0, truncateLimit) + "String_Node_Str" + AppStrings.translate("String_Node_Str").replace("String_Node_Str", Integer.toString(truncateLimit));


Input:
public Void call() throws Exception {
    while (numCompletedInputs.get() < numInputs) {
        if (numRunningFetchers.get() >= numFetchers || pendingHosts.size() == 0) {
            lock.lock();
            try {
                wakeLoop.await();
            } finally {
                lock.unlock();
            }
            if (shuffleError != null) {
                break;
            }
            if (LOG.isDebugEnabled()) {
                LOG.debug("String_Node_Str" + numCompletedInputs);
            }
            if (numCompletedInputs.get() < numInputs) {
                lock.lock();
                try {
                    int numFetchersToRun = Math.min(pendingHosts.size(), numFetchers - numRunningFetchers.get());
                    int count = 0;
                    for (Iterator<InputHost> inputHostIter = pendingHosts.iterator(); inputHostIter.hasNext(); ) {
                        InputHost inputHost = inputHostIter.next();
                        inputHostIter.remove();
                        if (inputHost.getNumPendingInputs() > 0) {
                            Fetcher fetcher = constructFetcherForHost(inputHost);
                            LOG.info("String_Node_Str" + inputHost);
                            numRunningFetchers.incrementAndGet();
                            ListenableFuture<FetchResult> future = fetcherExecutor.submit(fetcher);
                            Futures.addCallback(future, fetchFutureCallback);
                            if (++count >= numFetchersToRun) {
                                break;
                            }
                        }
                    }
                } finally {
                    lock.unlock();
                }
            }
        }
    }
    if (!fetcherExecutor.isShutdown()) {
        fetcherExecutor.shutdownNow();
    }
    return null;
}

Output:
             }
-            if (shuffleError != null) {
-                break;
-            }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("String_Node_Str" + numCompletedInputs);
-            }
-            if (numCompletedInputs.get() < numInputs) {
-                lock.lock();
-                try {
-                    int numFetchersToRun = Math.min(pendingHosts.size(), numFetchers - numRunningFetchers.get());
-                    int count = 0;
-                    for (Iterator<InputHost> inputHostIter = pendingHosts.iterator(); inputHostIter.hasNext(); ) {
-                        InputHost inputHost = inputHostIter.next();
-                        inputHostIter.remove();
-                        if (inputHost.getNumPendingInputs() > 0) {
-                            Fetcher fetcher = constructFetcherForHost(inputHost);
-                            LOG.info("String_Node_Str" + inputHost);
-                            numRunningFetchers.incrementAndGet();
-                            ListenableFuture<FetchResult> future = fetcherExecutor.submit(fetcher);
-                            Futures.addCallback(future, fetchFutureCallback);
-                            if (++count >= numFetchersToRun) {
-                                break;
-                            }
+        }
+        if (shuffleError != null) {
+            break;
+        }
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("String_Node_Str" + numCompletedInputs);
+        }
+        if (numCompletedInputs.get() < numInputs) {
+            lock.lock();
+            try {
+                int numFetchersToRun = Math.min(pendingHosts.size(), numFetchers - numRunningFetchers.get());
+                int count = 0;
+                while (pendingHosts.peek() != null) {
+                    InputHost inputHost = pendingHosts.take();
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("String_Node_Str" + inputHost);
+                    }
+                    if (inputHost.getNumPendingInputs() > 0) {
+                        LOG.info("String_Node_Str" + inputHost);
+                        Fetcher fetcher = constructFetcherForHost(inputHost);
+                        numRunningFetchers.incrementAndGet();
+                        ListenableFuture<FetchResult> future = fetcherExecutor.submit(fetcher);
+                        Futures.addCallback(future, fetchFutureCallback);
+                        if (++count >= numFetchersToRun) {
+                            break;
+                        }
+                    } else {
+                        if (LOG.isDebugEnabled()) {
+                            LOG.debug("String_Node_Str" + inputHost.getHost() + "String_Node_Str");
                         }


Input:
public String getSQL(SerializerWrite sw, Object params) throws BasicException {
    QBFParameter mydw = new QBFParameter(m_asFindFields);
    if (params == null) {
        return m_sSentNullFilter;
    } else {
        sw.writeValues(mydw, params);
        String sFilter = mydw.getFilter();
        if (sFilter.length() == 0) {
            return m_sSentNullFilter;
        } else {
            return m_sSentBeginPart + "String_Node_Str" + sFilter + "String_Node_Str" + m_sSentEndPart;
        }
    }
}

Output:
     QBFParameter mydw = new QBFParameter(m_asFindFields);
-    if (params == null) {
+    if (sw == null || params == null) {
         return m_sSentNullFilter;