auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
Canvas build() { VLayout vl = new VLayout(); this.treeGrid = new TreeGrid(); treeGrid.setWidth100(); treeGrid.setHeight100(); treeGrid.setShowHeader(false); treeGrid.setSelectionType(SelectionStyle.SINGLE); TreeGridField field = new TreeGridField("name"); field.setCanSort(true); field.setSortByDisplayField(true); treeGrid.setFields(field); treeGrid.setSortField("name"); this.tree = new Tree(); tree.setModelType(TreeModelType.PARENT); tree.setNameProperty("name"); tree.setIdField(NODE_ID); this.treeGrid.setData(this.tree); this.treeGrid.addNodeClickHandler(event -> { TreeNode n = event.getNode(); if (n instanceof TNode) { TNode tn = (TNode) n; ignoreNodeSelectedEvent = true; TreeView.this.controller.selectNode(tn.rmNode); } else if (n instanceof TNS) { TNS tn = (TNS) n; ignoreNodeSelectedEvent = true; TreeView.this.controller.selectNodeSource(tn.rmNS); } else if (n instanceof THost) { THost tn = (THost) n; ignoreNodeSelectedEvent = true; TreeView.this.controller.selectHost(tn.rmHost); } }); this.treeGrid.addNodeContextClickHandler(event -> { Object releated = null; final TreeNode treeNode = event.getNode(); if (treeNode instanceof TNode) { TNode tn = (TNode) treeNode; releated = tn.rmNode; } else if (treeNode instanceof TNS) { TNS tn = (TNS) treeNode; releated = tn.rmNS; } else if (treeNode instanceof THost) { THost tn = (THost) treeNode; releated = tn.rmHost; } final Menu menu = ContextMenu.createContextMenuFromTreeView(controller, releated, tree); treeGrid.setContextMenu(menu); }); vl.addMember(treeGrid); return vl; }

Target:
Canvas build() { VLayout vl = new VLayout(); this.treeGrid = new TreeGrid(); treeGrid.setWidth100(); treeGrid.setHeight100(); treeGrid.setShowHeader(false); treeGrid.setSelectionType(SelectionStyle.SINGLE); TreeGridField field = new TreeGridField("name"); field.setCanSort(true); field.setSortByDisplayField(true); treeGrid.setFields(field); treeGrid.setSortField("name"); this.tree = new Tree(); tree.setModelType(TreeModelType.PARENT); tree.setNameProperty("name"); tree.setIdField(NODE_ID); this.treeGrid.setData(this.tree); this.treeGrid.addNodeClickHandler(event -> { TreeNode n = event.getNode(); if (n instanceof TNode) { TNode tn = (TNode) n; ignoreNodeSelectedEvent = true; TreeView.this.controller.selectNode(tn.rmNode); } else if (n instanceof TNS) { TNS tn = (TNS) n; ignoreNodeSelectedEvent = true; TreeView.this.controller.selectNodeSource(tn.rmNS); } else if (n instanceof THost) { THost tn = (THost) n; ignoreNodeSelectedEvent = true; TreeView.this.controller.selectHost(tn.rmHost); } }); this.treeGrid.addNodeContextClickHandler(event -> { Object related = null; final TreeNode treeNode = event.getNode(); if (treeNode instanceof TNode) { TNode tn = (TNode) treeNode; related = tn.rmNode; } else if (treeNode instanceof TNS) { TNS tn = (TNS) treeNode; related = tn.rmNS; } else if (treeNode instanceof THost) { THost tn = (THost) treeNode; related = tn.rmHost; } final Menu menu = ContextMenu.createContextMenuFromTreeView(controller, related, tree); treeGrid.setContextMenu(menu); }); vl.addMember(treeGrid); return vl; }
Source:
public void testAuthentication() throws Exception { deployContrib("org.nuxeo.ecm.platform.login.cas2.test", "OSGI-INF/login-yes-contrib.xml"); applyInlineDeployments(); initRequest(); setLoginPasswordInHeader("Administrator", "Administrator", request); naf.doFilter(request, response, chain); String loginError = (String) request.getAttribute(NXAuthConstants.LOGIN_ERROR); LoginContext loginContext = (LoginContext) request.getAttribute("org.nuxeo.ecm.login.context"); assertNull(loginError); assertNotNull(loginContext); assertEquals("Administrator", ((Principal) loginContext.getSubject().getPrincipals().toArray()[0]).getName()); }

Target:
public void testAuthentication() throws Exception { pushInlineDeployments("org.nuxeo.ecm.platform.login.cas2.test:OSGI-INF/login-yes-contrib.xml"); initRequest(); setLoginPasswordInHeader("Administrator", "Administrator", request); naf.doFilter(request, response, chain); String loginError = (String) request.getAttribute(NXAuthConstants.LOGIN_ERROR); LoginContext loginContext = (LoginContext) request.getAttribute("org.nuxeo.ecm.login.context"); assertNull(loginError); assertNotNull(loginContext); assertEquals("Administrator", ((Principal) loginContext.getSubject().getPrincipals().toArray()[0]).getName()); }
Source:
private QueryParams getParams(GridSettings settings) { QueryParams result; if (settings.getSidx().equals("")) { result = new QueryParams(settings.getPage(), settings.getRows(), new Order("date", Order.Direction.DESC)); } else { if (settings.getSord().equals("asc")) { result = new QueryParams(settings.getPage(), settings.getRows(), new Order(settings.getSidx(), Order.Direction.ASC)); } else { result = new QueryParams(settings.getPage(), settings.getRows(), new Order(settings.getSidx(), Order.Direction.DESC)); } } return result; }

Target:
private QueryParams getParams(GridSettings settings) { QueryParams result; if (StringUtils.isEmpty(settings.getSidx())) { result = new QueryParams(settings.getPage(), settings.getRows(), new Order("date", Order.Direction.DESC)); } else { if ("asc".equals(settings.getSord())) { result = new QueryParams(settings.getPage(), settings.getRows(), new Order(settings.getSidx(), Order.Direction.ASC)); } else { result = new QueryParams(settings.getPage(), settings.getRows(), new Order(settings.getSidx(), Order.Direction.DESC)); } } return result; }
Source:
private static Path getCmRoot(Path path) throws IOException { Path cmroot = null; HdfsEncryptionShim pathEncryptionShim = hadoopShims.createHdfsEncryptionShim(path.getFileSystem(conf), conf); if (!pathEncryptionShim.isPathEncrypted(path)) { cmroot = cmRootMapping.get(NO_ENCRYPTION); } else { EncryptionZone encryptionZone = pathEncryptionShim.getEncryptionZoneForPath(path); cmroot = cmRootMapping.get(encryptionZone.getPath()); if (cmroot == null) { synchronized (instance) { cmroot = new Path(path.getFileSystem(conf).getUri() + encryptionZone.getPath() + MetastoreConf.getVar(conf, ConfVars.REPLCMENCRYPTEDDIR)); FileSystem cmFs = cmroot.getFileSystem(conf); if (!cmFs.exists(cmroot)) { cmFs.mkdirs(cmroot); cmFs.setPermission(cmroot, new FsPermission("700")); } cmRootMapping.put(encryptionZone.getPath(), cmroot); } } } return cmroot; }

Target:
static Path getCmRoot(Path path) throws IOException { Path cmroot = null; String cmrootDir = fallbackNonEncryptedCmRootDir; String encryptionZonePath = NO_ENCRYPTION; if (enabled) { HdfsEncryptionShim pathEncryptionShim = hadoopShims.createHdfsEncryptionShim(path.getFileSystem(conf), conf); if (pathEncryptionShim.isPathEncrypted(path)) { encryptionZonePath = path.getFileSystem(conf).getUri() + pathEncryptionShim.getEncryptionZoneForPath(path).getPath(); cmrootDir = encryptionZonePath + Path.SEPARATOR + encryptedCmRootDir; } if (encryptionZones.containsKey(encryptionZonePath)) { cmroot = new Path(encryptionZones.get(encryptionZonePath)); } else { cmroot = new Path(cmrootDir); synchronized (instance) { if (!encryptionZones.containsKey(encryptionZonePath)) { createCmRoot(cmroot); encryptionZones.put(encryptionZonePath, cmrootDir); } } } } return cmroot; }
Source:
public static ResourceNode getRootResourceNodeFromResource(ResourceCapabilityTree tree, IResource resource) { log.debug("Looking for IRootResource associated with this resource: " + resource); log.trace("Looking for ResourceNode in the tree containing this resource: " + resource); ResourceNode resourceNode = getResourceNodeWithContent(tree.getRootResourceNode(), resource); if (resourceNode == null) { log.warn("Resource not located in the tree! Resource: " + resource); return null; } while (true) { if (resourceNode.getContent() != null && resourceNode.getContent() instanceof IRootResource) { log.trace("IRootResource Resource Node found for resource: " + resourceNode.getContent()); return resourceNode; } CapabilityNode capabilityNode = ((CapabilityNode) resourceNode.getParent()); if (capabilityNode == null) { log.warn("No IRootResource found in the tree for resource: " + resource); return null; } resourceNode = capabilityNode.getParent(); } }

Target:
public static ResourceNode getRootResourceNodeFromResource(ResourceCapabilityTree tree, IResource resource) { log.debug("Looking for IRootResource associated with this resource: " + resource); log.trace("Looking for ResourceNode in the tree containing this resource: " + resource); ResourceNode resourceNode = getResourceNodeWithContent(tree.getRootResourceNode(), resource); if (resourceNode == null) { log.warn("Resource not located in the tree! Resource: " + resource); return null; } while (true) { if (resourceNode.getContent() instanceof IRootResource) { log.trace("IRootResource Resource Node found for resource: " + resourceNode.getContent()); return resourceNode; } CapabilityNode capabilityNode = ((CapabilityNode) resourceNode.getParent()); if (capabilityNode == null) { log.warn("No IRootResource found in the tree for resource: " + resource); return null; } resourceNode = capabilityNode.getParent(); } }
Source:
public SecretAsyncClient buildAsyncClient() { Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration().clone() : configuration; URL buildEndpoint = getBuildEndpoint(buildConfiguration); if (buildEndpoint == null) { throw logger.logExceptionAsError( new IllegalStateException( KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED))); } SecretServiceVersion serviceVersion = version != null ? version : SecretServiceVersion.getLatest(); if (pipeline != null) { return new SecretAsyncClient(vaultUrl, pipeline, serviceVersion); } if (credential == null) { throw logger.logExceptionAsError( new IllegalStateException( KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.CREDENTIAL_REQUIRED))); } final List<HttpPipelinePolicy> policies = new ArrayList<>(); policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), properties.get(SDK_VERSION), buildConfiguration)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new KeyVaultCredentialPolicy(credential)); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); return new SecretAsyncClient(vaultUrl, pipeline, serviceVersion); }

Target:
public SecretAsyncClient buildAsyncClient() { Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration().clone() : configuration; URL buildEndpoint = getBuildEndpoint(buildConfiguration); if (buildEndpoint == null) { throw logger.logExceptionAsError( new IllegalStateException( KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED))); } SecretServiceVersion serviceVersion = version != null ? version : SecretServiceVersion.getLatest(); if (pipeline != null) { return new SecretAsyncClient(vaultUrl, pipeline, serviceVersion); } if (credential == null) { throw logger.logExceptionAsError( new IllegalStateException( KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.CREDENTIAL_REQUIRED))); } final List<HttpPipelinePolicy> policies = new ArrayList<>(); String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new KeyVaultCredentialPolicy(credential)); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); return new SecretAsyncClient(vaultUrl, pipeline, serviceVersion); }
Source:
public static Bundle getBundleByMap(Map<String, Object> row){ Bundle b = new Bundle(); b.setId(row.get("id").toString()); b.setName(row.get("name").toString()); b.setPublishDate((Date)row.get("publish_date")); b.setExpireDate((Date)row.get("expire_date")); b.setOwner(row.get("owner")!=null?row.get("owner").toString():""); b.setForcePush(row.get("force_push") == null ? false :DbConnectionFactory.isDBTrue(row.get("force_push").toString())); return b; }

Target:
public static Bundle getBundleByMap(Map<String, Object> row){ Bundle b = new Bundle(); b.setId(row.get("id").toString()); b.setName(row.get("name").toString()); b.setPublishDate((Date)row.get("publish_date")); b.setExpireDate((Date)row.get("expire_date")); b.setOwner(UtilMethods.isSet(row.get("owner"))?row.get("owner").toString():""); b.setForcePush(UtilMethods.isSet(row.get("force_push")) && DbConnectionFactory .isDBTrue(row.get("force_push").toString())); return b; }
Source:
void verifyMetadata(MessageMetadata metadata) throws Exception { if (metadata.getMessageMetadataType() != MessageType.LOG_ENTRY_MESSAGE || metadata.getSnapshotTimestamp() != srcGlobalSnapshot) { log.error("Wrong message metadata {}, expecting type snapshot {}", metadata, MessageType.LOG_ENTRY_MESSAGE, srcGlobalSnapshot); throw new Exception("wrong type of message"); } }

Target:
void verifyMetadata(MessageMetadata metadata) throws Exception { if (metadata.getMessageMetadataType() != MessageType.LOG_ENTRY_MESSAGE) { log.error("Wrong message metadata {}, expecting type snapshot {}", metadata, MessageType.LOG_ENTRY_MESSAGE, srcGlobalSnapshot); throw new Exception("wrong type of message"); } }
Source:
public Optional<Image> getErrorImage() { return Optional.of(errorImage); }

Target:
public Optional<Image> getErrorImage() { return Optional.ofNullable(errorImage); }
Source:
private boolean isOneToManyAndAdd(ReferenceChange diff, boolean mergeRightToLeft) { if (diff.getReference().getEOpposite() == null) { return false; } boolean isOneToMany = diff.getReference().isMany() && !diff.getReference().getEOpposite().isMany(); boolean isManyToOne = !diff.getReference().isMany() && diff.getReference().getEOpposite().isMany(); return (isOneToMany || isManyToOne) && isAdd(diff, mergeRightToLeft); }

Target:
private boolean isOneToManyAndAdd(ReferenceChange diff, boolean mergeRightToLeft) { final boolean hasOpposite = diff.getReference().getEOpposite() != null; final boolean isOneToMany = hasOpposite && diff.getReference().isMany() && !diff.getReference().getEOpposite().isMany(); final boolean isManyToOne = hasOpposite && !diff.getReference().isMany() && diff.getReference().getEOpposite().isMany(); return (isOneToMany || isManyToOne) && isAdd(diff, mergeRightToLeft); }
Source:
private Long getTargetTxnId(String replPolicy, long sourceTxnId, Statement stmt) throws SQLException { ResultSet rs; String s = "select RTM_TARGET_TXN_ID from REPL_TXN_MAP where RTM_SRC_TXN_ID = " + sourceTxnId + " and RTM_REPL_POLICY = " + quoteString(replPolicy); LOG.debug("Going to execute query <" + s + ">"); rs = stmt.executeQuery(s); if (!rs.next()) { LOG.info("Target txn is missing for the input source txn for ReplPolicy: " + quoteString(replPolicy) + " , srcTxnId: " + sourceTxnId); return -1L; } LOG.debug("targetTxnid for srcTxnId " + sourceTxnId + " is " + rs.getLong(1)); return rs.getLong(1); }

Target:
private Long getTargetTxnId(String replPolicy, long sourceTxnId, Statement stmt) throws SQLException { ResultSet rs = null; try { String s = "select RTM_TARGET_TXN_ID from REPL_TXN_MAP where RTM_SRC_TXN_ID = " + sourceTxnId + " and RTM_REPL_POLICY = " + quoteString(replPolicy); LOG.debug("Going to execute query <" + s + ">"); rs = stmt.executeQuery(s); if (!rs.next()) { LOG.info("Target txn is missing for the input source txn for ReplPolicy: " + quoteString(replPolicy) + " , srcTxnId: " + sourceTxnId); return -1L; } LOG.debug("targetTxnid for srcTxnId " + sourceTxnId + " is " + rs.getLong(1)); return rs.getLong(1); } catch (SQLException e) { LOG.warn("failed to get target txn ids " + e.getMessage()); throw e; } finally { close(rs); } }
Source:
public void editLinesFromStart() { int state = state_; state_ = (state_ + 1) % 4; if (cursorChangedHandler_ == null) cursorChangedHandler_ = editor_.addCursorChangedHandler(this); if (range_ == null) range_ = getSelectionExtent(); isPerformingEditLinesAction_ = true; switch (state) { case 0: editLinesFromStart(false, false); break; case 1: editLinesFromStart(false, true); break; case 2: editLinesFromStart(true, false); break; case 3: editLinesFromStart(true, true); break; } isPerformingEditLinesAction_ = false; }

Target:
public void editLinesFromStart() { int state = state_; state_ = (state_ + 1) % 4; if (cursorChangedHandler_ == null) cursorChangedHandler_ = editor_.addCursorChangedHandler(this); if (range_ == null) range_ = getSelectionExtent(); try { isPerformingEditLinesAction_ = true; switch (state) { case 0: editLinesFromStart(false, false); break; case 1: editLinesFromStart(false, true); break; case 2: editLinesFromStart(true, false); break; case 3: editLinesFromStart(true, true); break; } } catch (Exception e) { Debug.logException(e); } finally { isPerformingEditLinesAction_ = false; } }
Source:
public BoundedSource<Result> createSourceWithKeys(byte[] startKey, byte[] stopKey, long size) { return new SourceWithKeys(startKey, stopKey, size); }

Target:
BoundedSource<Result> createSourceWithKeys(byte[] startKey, byte[] stopKey, long size) { return new SourceWithKeys(startKey, stopKey, size); }
Source:
public static void fireNow(@NonNull final SCMHeadEvent<?> event) { executorService().execute(new Dispatcher(event)); }

Target:
public static void fireNow(@NonNull final SCMHeadEvent<?> event) { executorService().execute(new DispatcherImpl(event)); }
Source:
public void test() { connect(); waitResponse(5000); click(jq("@button")); waitResponse(); Assert.assertEquals("true", getZKLog()); }

Target:
public void test() { Assert.assertEquals(404, getStatusCode(getAddress() + "/zkau/web/something.js.map")); }
Source:
public ServiceConfigurator configure(OperationContext context, ModelNode model) throws OperationFailedException { this.mode = ModelNodes.asEnum(MODE.resolveModelAttribute(context, model), TransactionMode.class); this.locking = ModelNodes.asEnum(LOCKING.resolveModelAttribute(context, model), LockingMode.class); this.timeout = STOP_TIMEOUT.resolveModelAttribute(context, model).asLong(); this.transactionDependency = !EnumSet.of(TransactionMode.NONE, TransactionMode.BATCH).contains(this.mode) ? new ServiceDependency(context.getCapabilityServiceName(LOCAL_TRANSACTION_PROVIDER.getName(), null)) : null; this.tsrServiceName = this.mode == TransactionMode.NON_XA ? context.getCapabilityServiceName(TRANSACTION_SYNCHRONIZATION_REGISTRY.getName(), null) : null; return this; }

Target:
public ServiceConfigurator configure(OperationContext context, ModelNode model) throws OperationFailedException { this.mode = ModelNodes.asEnum(MODE.resolveModelAttribute(context, model), TransactionMode.class); this.locking = ModelNodes.asEnum(LOCKING.resolveModelAttribute(context, model), LockingMode.class); this.timeout = STOP_TIMEOUT.resolveModelAttribute(context, model).asLong(); this.transactionDependency = !EnumSet.of(TransactionMode.NONE, TransactionMode.BATCH).contains(this.mode) ? new ServiceDependency(context.getCapabilityServiceName(LOCAL_TRANSACTION_PROVIDER.getName(), null)) : null; this.tsrDependency = this.mode == TransactionMode.NON_XA ? new ServiceSupplierDependency<>(context.getCapabilityServiceName(TRANSACTION_SYNCHRONIZATION_REGISTRY.getName(), null)) : null; return this; }
Source:
public Cursor selectAll() { return select("", new String[] {}, null); }

Target:
public Cursor selectAll() { return select(null, null, null); }
Source:
public void testDistExecScript() throws InterruptedException, ExecutionException, IOException { ScriptingManager scriptingManager = getScriptingManager(manager(0)); Cache<String, String> cache = cache(0); loadData(cache, "/macbeth.txt"); loadScript(scriptingManager, "/wordCountStream.js"); CompletableFuture<Map<String, Long>> resultsFuture = scriptingManager.runScript("wordCountStream.js", new TaskContext().cache(cache(0))); Map<String, Long> results = resultsFuture.get(); assertEquals(3209, results.size()); assertTrue(results.get("macbeth").equals(Long.valueOf(287))); }

Target:
public void testDistExecScript() throws InterruptedException, ExecutionException, IOException { ScriptingManager scriptingManager = getScriptingManager(manager(0)); Cache<String, String> cache = cache(0); loadData(cache, "/macbeth.txt"); loadScript(scriptingManager, "/wordCountStream.js"); CompletableFuture<Map<String, Long>> resultsFuture = scriptingManager.runScript("wordCountStream.js", new TaskContext().cache(cache(0))); Map<String, Long> results = resultsFuture.get(); assertEquals(3209, results.size()); assertEquals(results.get("macbeth"), Long.valueOf(287)); }
Source:
public void visitFunctionCall(FunctionCallTree tree) { String functionName = CheckUtils.getFunctionName(tree); if (STREAM_CONTEXT_CREATE.equals(functionName)) { SeparatedList<ExpressionTree> arguments = tree.arguments(); if (!arguments.isEmpty()) { checkSSLConfig(arguments.get(0)); } } if (STREAM_SOCKET_ENABLE_CRYPTO.equals(functionName)) { SeparatedList<ExpressionTree> arguments = tree.arguments(); if (arguments.size() > 2) { checkWeakProtocol(getAssignedValue(arguments.get(2)), STREAM_SOCKET_ENABLE_CRYPTO); } } super.visitFunctionCall(tree); }

Target:
public void visitFunctionCall(FunctionCallTree tree) { String functionName = CheckUtils.getFunctionName(tree); if (STREAM_CONTEXT_CREATE.equals(functionName)) { List<ExpressionTree> arguments = tree.arguments(); if (!arguments.isEmpty()) { checkSSLConfig(arguments.get(0)); } } if (STREAM_SOCKET_ENABLE_CRYPTO.equals(functionName)) { SeparatedList<ExpressionTree> arguments = tree.arguments(); if (arguments.size() > 2) { checkWeakProtocol(getAssignedValue(arguments.get(2)), STREAM_SOCKET_ENABLE_CRYPTO); } } super.visitFunctionCall(tree); }
Source:
public EventGridServiceVersion getServiceVersion() { return EventGridServiceVersion.V2018_01_01; }

Target:
public EventGridServiceVersion getServiceVersion() { return this.serviceVersion; }
Source:
public boolean prepare() { if (!prepareCalled) { prepareCalled = true; List<Subtitle> subtitles = playlist.subtitles; for(Subtitle subtitle: subtitles) { Format format = new Format(subtitle.name, MimeTypes.TEXT_VTT, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, subtitle.language); MediaFormat trackFormat = MediaFormat.createTextFormat(tracks.size(), format.mimeType, format.bitrate, C.MATCH_LONGEST_US, format.language, 0); if (subtitle.isDefault) { tracks.add(TRACK_DEFAULT, new ExposedTrack(trackFormat, format, subtitle.uri)); } else { tracks.add(new ExposedTrack(trackFormat, format, subtitle.uri)); } } } return true; }

Target:
public boolean prepare() { if (!prepareCalled) { prepareCalled = true; List<Subtitle> subtitles = playlist.subtitles; for(Subtitle subtitle: subtitles) { Format format = new Format(subtitle.name, MimeTypes.TEXT_VTT, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE, subtitle.language); MediaFormat trackFormat = MediaFormat.createTextFormat(format.id, format.mimeType, format.bitrate, C.MATCH_LONGEST_US, format.language, 0); if (subtitle.isDefault) { tracks.add(TRACK_DEFAULT, new ExposedTrack(trackFormat, format, subtitle.uri)); } else { tracks.add(new ExposedTrack(trackFormat, format, subtitle.uri)); } } } return true; }
Source:
private void sendLayoutError(ViewVisitor.CantVisitException exception) { if (mEditorConnection == null || !mEditorConnection.isValid()) { return; } final OutputStream out = mEditorConnection.getBufferedOutputStream(); final OutputStreamWriter writer = new OutputStreamWriter(out); final JsonWriter j = new JsonWriter(writer); try { j.beginObject(); j.name("type").value("layout_error"); j.name("exception_type").value(exception.getExceptionType()); j.name("cid").value(exception.getName()); j.endObject(); j.flush(); } catch (final IOException e) { Log.e(LOGTAG, "Can't write track_message to server", e); } finally { try { j.close(); } catch (final IOException e) { Log.e(LOGTAG, "Can't close writer.", e); } } }

Target:
private void sendLayoutError(ViewVisitor.CantVisitException exception) { if (mEditorConnection == null || !mEditorConnection.isValid()) { return; } final OutputStream out = mEditorConnection.getBufferedOutputStream(); final OutputStreamWriter writer = new OutputStreamWriter(out); final JsonWriter j = new JsonWriter(writer); try { j.beginObject(); j.name("type").value("layout_error"); j.name("exception_type").value(exception.getExceptionType()); j.name("cid").value(exception.getName()); j.endObject(); } catch (final IOException e) { Log.e(LOGTAG, "Can't write track_message to server", e); } finally { try { j.close(); } catch (final IOException e) { Log.e(LOGTAG, "Can't close writer.", e); } } }
Source:
public List<Task<? extends Serializable>> handle(Context context) throws SemanticException { DropConstraintMessage msg = deserializer.getDropConstraintMessage(context.dmd.getPayload()); String actualDbName = context.isDbNameEmpty() ? msg.getDB() : context.dbName; String actualTblName = context.isTableNameEmpty() ? msg.getTable() : context.tableName; String constraintName = msg.getConstraint(); AlterTableDesc dropConstraintsDesc = new AlterTableDesc(actualDbName + "." + actualTblName, constraintName, context.eventOnlyReplicationSpec()); Task<DDLWork> dropConstraintsTask = TaskFactory.get(new DDLWork(readEntitySet, writeEntitySet, dropConstraintsDesc), context.hiveConf); List<Task<? extends Serializable>> tasks = new ArrayList<Task<? extends Serializable>>(); tasks.add(dropConstraintsTask); context.log.debug("Added drop constrain task : {}:{}", dropConstraintsTask.getId(), actualTblName); databasesUpdated.put(actualDbName, context.dmd.getEventTo()); return Collections.singletonList(dropConstraintsTask); }

Target:
public List<Task<? extends Serializable>> handle(Context context) throws SemanticException { DropConstraintMessage msg = deserializer.getDropConstraintMessage(context.dmd.getPayload()); String actualDbName = context.isDbNameEmpty() ? msg.getDB() : context.dbName; String actualTblName = context.isTableNameEmpty() ? msg.getTable() : context.tableName; String constraintName = msg.getConstraint(); AlterTableDesc dropConstraintsDesc = new AlterTableDesc(actualDbName + "." + actualTblName, constraintName, context.eventOnlyReplicationSpec()); Task<DDLWork> dropConstraintsTask = TaskFactory.get(new DDLWork(readEntitySet, writeEntitySet, dropConstraintsDesc), context.hiveConf); List<Task<? extends Serializable>> tasks = new ArrayList<Task<? extends Serializable>>(); tasks.add(dropConstraintsTask); context.log.debug("Added drop constrain task : {}:{}", dropConstraintsTask.getId(), actualTblName); databasesUpdated.put(actualDbName, context.dmd.getEventTo()); tablesUpdated.put(actualDbName + "." + actualTblName, context.dmd.getEventTo()); return Collections.singletonList(dropConstraintsTask); }
Source:
public void actionPerformed(ActionEvent event) { MainApplication.worker.submit(() -> this.submitChangeset()); }

Target:
public void actionPerformed(ActionEvent event) { MainApplication.worker.execute(() -> this.submitChangeset()); }
Source:
public List<PredefinedNewsDefinition> getHiddenPredefinedNewsDefinitions(Long setId, Set<String> roles) { try { String query = "from PredefinedNewsDefinition def " + "where not exists (from def.userConfigurations config where config.newsSet.id = :setId) "; for (int i = 0; i < roles.size(); i++) { query = query.concat( "and :role" + i + " not in elements(def.defaultRoles) "); } Query q = this.getSession().createQuery(query); q.setLong("setId", setId); int count = 0; for (String role : roles) { q.setString("role" + count, role); count++; } return (List<PredefinedNewsDefinition>) q.list(); } catch (HibernateException ex) { throw convertHibernateAccessException(ex); } }

Target:
public List<PredefinedNewsDefinition> getHiddenPredefinedNewsDefinitions(Long setId, Set<String> roles) { try { String query = "FROM PredefinedNewsDefinition def " + "WHERE NOT EXISTS (FROM def.userConfigurations config WHERE config.newsSet.id = :setId) "; for (int i = 0; i < roles.size(); i++) { query = query.concat( "AND :role" + i + " NOT IN elements(def.defaultRoles) "); } Query q = this.getSession().createQuery(query); q.setLong("setId", setId); int count = 0; for (String role : roles) { q.setString("role" + count, role); count++; } return (List<PredefinedNewsDefinition>) q.list(); } catch (HibernateException ex) { throw convertHibernateAccessException(ex); } }
Source:
protected SimpleFluentIterable(Iterable<TYPE> iterable) { List<TYPE> copy = FluentIterable.copyToList(iterable); this.iterable = copy; }

Target:
protected SimpleFluentIterable(Iterable<TYPE> iterable) { this.iterable = iterable; }
Source:
private PendingWorkerNums notifyAllocatedWorkerRegistered(ResourceID resourceID) { WorkerResourceSpec workerResourceSpec = allocatedNotRegisteredWorkerResourceSpecs.remove(resourceID); if (workerResourceSpec == null) { return PendingWorkerNums.ZERO; } return new PendingWorkerNums( requestedNotAllocatedWorkerCounter.getNum(workerResourceSpec), requestedNotRegisteredWorkerCounter.decreaseAndGet(workerResourceSpec)); }

Target:
private void notifyAllocatedWorkerRegistered(ResourceID resourceID) { WorkerResourceSpec workerResourceSpec = allocatedNotRegisteredWorkerResourceSpecs.remove(resourceID); if (workerResourceSpec == null) { return; } requestedNotRegisteredWorkerCounter.decreaseAndGet(workerResourceSpec); }
Source:
public BeanArchiveBuilder handle(String path) { BeanArchiveBuilder builder = super.handle(path); if (builder == null) { return null; } for (String className : builder.getClasses()) { addToIndex(servletContext .getResourceAsStream(WebAppBeanArchiveScanner.WEB_INF_CLASSES_FILE_PATH + File.separator + className.replace(DOT, SLASH) + Files.CLASS_FILE_EXTENSION)); } builder.setAttribute(JandexDiscoveryStrategy.INDEX_ATTRIBUTE_NAME, buildIndex()); return builder; }

Target:
public BeanArchiveBuilder handle(String path) { BeanArchiveBuilder builder = super.handle(path); if (builder == null) { return null; } builder.setAttribute(Jandex.INDEX_ATTRIBUTE_NAME, buildIndex()); return builder; }
Source:
public void testFunctionInvocationOnInterface() { SampleImplementation impl = new SampleImplementation(); Optional<String> description = getDescriptionForFunction(s -> impl.interfaceFunction(s)); assertTrue(description.isPresent()); if (JDK_VERSION.equals(JDK_1_8_0_72)) { assertNameMatch("(impl,s) -> interfaceFunction(_)", "testFunctionInvocationOnInterface", CLASSNAME, description.get().toString()); } else { assertNameMatch("s -> interfaceFunction(_)", "testFunctionInvocationOnInterface", CLASSNAME, description.get().toString()); } }

Target:
public void testFunctionInvocationOnInterface() { SampleImplementation impl = new SampleImplementation(); Optional<String> description = getDescriptionForFunction(s -> impl.interfaceFunction(s)); assertTrue(description.isPresent()); assertNameMatch("interfaceFunction(_)", "testFunctionInvocationOnInterface", CLASSNAME, description.get().toString()); }
Source:
public void addInfoMessages() { mainPanel.clear(); if (!hasResults) { infoLabel.setText("~ No results found ~"); infoLabel.setStyleName(this.resources.filterDropdownStyle().noResultText()); } mainPanel.add(infoLabel); }

Target:
public void addInfoMessages() { mainPanel.clear(); if (!hasResults) { infoLabel.setText(NO_RESULT_TEXT); infoLabel.setStyleName(this.resources.filterDropdownStyle().noResultText()); } mainPanel.add(infoLabel); }
Source:
public PasswordPolicy setResetEmailStatus(EmailStatus status) { setProperty(RESET_EMAIL_STATUS, status.name()); return this; }

Target:
public PasswordPolicy setResetEmailStatus(EmailStatus status) { Assert.notNull(status, "status cannot be null."); setProperty(RESET_EMAIL_STATUS, status.name()); return this; }
Source:
public void nettyIsDisabled() { final Logger logger = LoggerFactory.getLogger("io.netty"); final Logger logger2 = LoggerFactory.getLogger("io.netty.channel"); Assert.assertFalse(logger.isErrorEnabled()); Assert.assertFalse(logger2.isErrorEnabled()); }

Target:
public void nettyIsDisabled() { final Logger logger = LoggerFactory.getLogger("io.netty"); final Logger logger2 = LoggerFactory.getLogger("io.netty.channel"); assertThat(logger.isErrorEnabled()).isFalse(); assertThat(logger2.isErrorEnabled()).isFalse(); }
Source:
public static String obtainComponentName(NamedComponent component) { String name = component.getComponentName(); if (name.startsWith('_' + IntegrationConfigUtils.BASE_PACKAGE)) { name = name.substring(('_' + IntegrationConfigUtils.BASE_PACKAGE).length() + 1); } return name; }

Target:
public static String obtainComponentName(NamedComponent component) { String name = component.getComponentName(); if (name.charAt(0) == '_' && name.startsWith(INTERNAL_COMPONENT_PREFIX)) { name = name.substring((INTERNAL_COMPONENT_PREFIX).length() + 1); } return name; }
Source:
public boolean addAll(Collection<? extends ValueType> toAdd) { try (final Handle handle = rdbi.open()) { for (final ValueType value : toAdd) { final String valueAsString = serializationHelper.encode(value); handle.jedis().rpush(key, valueAsString); if (size() > maxSize) { handle.jedis().lpop(key); } } } return true; }

Target:
public boolean addAll(Collection<? extends ValueType> toAdd) { for (final ValueType value : toAdd) { try (Handle handle = rdbi.open()) { String valueStr = serializationHelper.encode(value); final int newSize = handle.attach(RedisCircularBufferDAO.class).add(key, valueStr, maxSize); boolean success = newSize >= 0 && newSize <= maxSize; if (!success) { return false; } } } return true; }
Source:
public static Community[] findAll(Context context) throws SQLException { TableRowIterator tri = null; try { String query = "SELECT c.* FROM community c " + "LEFT JOIN metadatavalue m on (m.resource_id = c.community_id and m.resource_type_id = ? and m.metadata_field_id = ?) "; if("oracle".equals(ConfigurationManager.getProperty("db.name"))){ query += " ORDER BY cast(m.text_value as varchar2(128))"; }else{ query += " ORDER BY m.text_value"; } tri = DatabaseManager.query(context, query, Constants.COMMUNITY, MetadataField.findByElement(context, MetadataSchema.find(context, MetadataSchema.DC_SCHEMA).getSchemaID(), "title", null).getFieldID() ); } catch (SQLException e) { log.error("Find all Communities - ",e); throw e; } List<Community> communities = new ArrayList<Community>(); try { while (tri.hasNext()) { TableRow row = tri.next(); Community fromCache = (Community) context.fromCache( Community.class, row.getIntColumn("community_id")); if (fromCache != null) { communities.add(fromCache); } else { communities.add(new Community(context, row)); } } } finally { if (tri != null) { tri.close(); } } Community[] communityArray = new Community[communities.size()]; communityArray = (Community[]) communities.toArray(communityArray); return communityArray; }

Target:
public static Community[] findAll(Context context) throws SQLException { TableRowIterator tri = null; try { String query = "SELECT c.* FROM community c " + "LEFT JOIN metadatavalue m on (m.resource_id = c.community_id and m.resource_type_id = ? and m.metadata_field_id = ?) "; if(DatabaseManager.isOracle()){ query += " ORDER BY cast(m.text_value as varchar2(128))"; }else{ query += " ORDER BY m.text_value"; } tri = DatabaseManager.query(context, query, Constants.COMMUNITY, MetadataField.findByElement(context, MetadataSchema.find(context, MetadataSchema.DC_SCHEMA).getSchemaID(), "title", null).getFieldID() ); } catch (SQLException e) { log.error("Find all Communities - ",e); throw e; } List<Community> communities = new ArrayList<Community>(); try { while (tri.hasNext()) { TableRow row = tri.next(); Community fromCache = (Community) context.fromCache( Community.class, row.getIntColumn("community_id")); if (fromCache != null) { communities.add(fromCache); } else { communities.add(new Community(context, row)); } } } finally { if (tri != null) { tri.close(); } } Community[] communityArray = new Community[communities.size()]; communityArray = (Community[]) communities.toArray(communityArray); return communityArray; }
Source:
public void close(){ this.shutdown(); }

Target:
public void close() throws ExecutionException, InterruptedException { this.shutdown().get(); }
Source:
public synchronized Sha256Hash hashForSignatureWitness( int inputIndex, Script scriptCode, Coin prevValue, SigHash type, boolean anyoneCanPay) { byte[] connectedScript = scriptCode.getProgram(); return hashForSignatureWitness(inputIndex, connectedScript, prevValue, type, anyoneCanPay); }

Target:
public synchronized Sha256Hash hashForSignatureWitness( int inputIndex, Script scriptCode, Coin prevValue, SigHash type, boolean anyoneCanPay) { return hashForSignatureWitness(inputIndex, scriptCode.getProgram(), prevValue, type, anyoneCanPay); }
Source:
private void addPreferences() { mFooterCategory = (PreferenceCategory) findPreference(PREF_KEY_FOOTER_CATEGORY); mOffMessagePreference = new FooterPreference(mFooterCategory.getContext()); final CharSequence title = getText(R.string.adb_wireless_list_empty_off); mOffMessagePreference.setTitle(title); mFooterCategory.addPreference(mOffMessagePreference); final CharSequence deviceNameTitle = getText(R.string.my_device_info_device_name_preference_title); }

Target:
private void addPreferences() { mDeviceNamePreference = (Preference) findPreference(PREF_KEY_ADB_DEVICE_NAME); mPairingMethodsCategory = (PreferenceCategory) findPreference(PREF_KEY_PAIRING_METHODS_CATEGORY); mCodePairingPreference = (Preference) findPreference(PREF_KEY_ADB_CODE_PAIRING); mCodePairingPreference.setOnPreferenceClickListener(preference -> { launchDevicePairingFragment(); return true; }); mQrcodePairingPreference = (Preference) findPreference(PREF_KEY_ADB_QRCODE_PAIRING); mQrcodePairingPreference.setOnPreferenceClickListener(preference -> { launchQrcodeScannerFragment(); return true; }); mPairedDevicesCategory = (PreferenceCategory) findPreference(PREF_KEY_PAIRED_DEVICES_CATEGORY); mFooterCategory = (PreferenceCategory) findPreference(PREF_KEY_FOOTER_CATEGORY); mOffMessagePreference = new FooterPreference(mFooterCategory.getContext()); final CharSequence title = getText(R.string.adb_wireless_list_empty_off); mOffMessagePreference.setTitle(title); mFooterCategory.addPreference(mOffMessagePreference); }
Source:
MissingFieldStreamReader(Type type) { requireNonNull(type, "type is required"); this.outputType = type; }

Target:
MissingFieldStreamReader(Type type) { this.outputType = requireNonNull(type, "type is required"); }
Source:
protected void parseInterfaceCriteria(final XMLExtendedStreamReader reader, final Namespace expectedNs, final ModelNode interfaceModel) throws XMLStreamException { if (reader.nextTag() == END_ELEMENT) { return; } requireNamespace(reader, expectedNs); Element element = Element.forName(reader.getLocalName()); switch (element) { case ANY_ADDRESS: case ANY_IPV4_ADDRESS: case ANY_IPV6_ADDRESS: { interfaceModel.get(Element.ANY_ADDRESS.getLocalName()).set(true); requireNoContent(reader); requireNoContent(reader); return; } } do { requireNamespace(reader, expectedNs); element = Element.forName(reader.getLocalName()); switch (element) { case ANY: parseCompoundInterfaceCriterion(reader, expectedNs, interfaceModel.get(ANY).setEmptyObject()); break; case NOT: parseCompoundInterfaceCriterion(reader, expectedNs, interfaceModel.get(NOT).setEmptyObject()); break; default: { parseSimpleInterfaceCriterion(reader, interfaceModel, false); break; } } } while (reader.nextTag() != END_ELEMENT); }

Target:
protected void parseInterfaceCriteria(final XMLExtendedStreamReader reader, final Namespace expectedNs, final ModelNode interfaceModel) throws XMLStreamException { if (reader.nextTag() == END_ELEMENT) { return; } requireNamespace(reader, expectedNs); Element element = Element.forName(reader.getLocalName()); switch (element) { case ANY_IPV4_ADDRESS: case ANY_IPV6_ADDRESS: { if(expectedNs.getMajorVersion() >= 3) { throw ParseUtils.unexpectedElement(reader); } else { throw ParseUtils.unsupportedElement(reader, Element.ANY_ADDRESS.getLocalName()); } } case ANY_ADDRESS: { interfaceModel.get(Element.ANY_ADDRESS.getLocalName()).set(true); requireNoContent(reader); requireNoContent(reader); return; } } do { requireNamespace(reader, expectedNs); element = Element.forName(reader.getLocalName()); switch (element) { case ANY: parseCompoundInterfaceCriterion(reader, expectedNs, interfaceModel.get(ANY).setEmptyObject()); break; case NOT: parseCompoundInterfaceCriterion(reader, expectedNs, interfaceModel.get(NOT).setEmptyObject()); break; default: { parseSimpleInterfaceCriterion(reader, interfaceModel, false); break; } } } while (reader.nextTag() != END_ELEMENT); }
Source:
private Response getConfigurationHelper(String environmentId, String feedId, String resourcePath, DataEntity.Role dataType) { String tenantId = getTenantId(); CanonicalPath resource = composeCanonicalPath(tenantId, environmentId, feedId, resourcePath); Resources.Single resourceSingle = inventory.inspect(resource, Resources.Single.class); DataEntity entity; switch (dataType) { case configuration: entity = resourceSingle.configuration().get(null).entity(); break; case connectionConfiguration: entity = resourceSingle.connectionConfiguration().get(null).entity(); break; default: throw new IllegalArgumentException("Unsupported data type: " + dataType.toString()); } return Response.ok(entity).build(); }

Target:
private Response getConfigurationHelper(String environmentId, String feedId, String resourcePath, DataEntity.Role dataType) { String tenantId = getTenantId(); CanonicalPath resource = composeCanonicalPath(tenantId, environmentId, feedId, resourcePath); DataEntity data = inventory.inspect(resource, Resources.Single.class).data().get(dataType).entity(); return Response.ok(data).build(); }
Source:
public static boolean isExpired(String key){ AttestationValue value = getValueFromCache(key); if (value != null && value.getVtime() != null){ if (System.currentTimeMillis() - value.getVtime().getTime() <= cacheTimeout) return false; } return true; }

Target:
public boolean isExpired(String key) { AttestationValue value = attestationValues.get(key); if (value != null && value.getVtime() != null) { if (System.currentTimeMillis() - value.getVtime().getTime() <= cacheTimeout) { return false; } } return true; }
Source:
public boolean overlaps(long start, long end) { if (end >= start) return overlaps(start) && overlaps(end); return false; }

Target:
public boolean overlaps(long start, long end) { final Long min = stats.get(Attribute.MIN_REVISION_VERSION); final Long max = stats.get(Attribute.MAX_REVISION_VERSION); if(end >= start && min != null && max != null) { final LongRange range = new LongRange(start, end); for (long i = min; i <= max; i++) { if(range.containsLong(i)) { return true; } } } return false; }
Source:
private NuageVspPluginClientLoader(String nuagePluginClientJarLocation) { try { _loader = URLClassLoader.newInstance(new URL[] {new URL("jar:file:" + nuagePluginClientJarLocation + "!/")}, getClass().getClassLoader()); } catch (MalformedURLException e) { e.printStackTrace(); } }

Target:
private NuageVspPluginClientLoader(String nuagePluginClientJarLocation) { try { _loader = URLClassLoader.newInstance(new URL[] {new URL("jar:file:" + nuagePluginClientJarLocation + "!/")}, getClass().getClassLoader()); } catch (MalformedURLException e) { throw new IllegalArgumentException(e); } }
Source:
public void deleteDatastreamDestination(Datastream datastream, List<Datastream> allDatastreams) { Stream<Datastream> duplicateDatastreams = allDatastreams.stream().filter(d -> d.getDestination().equals(datastream.getDestination()) && !d.getName().equalsIgnoreCase(datastream.getName())); if(duplicateDatastreams.count() == 0) { _transportProvider.dropTopic(datastream.getDestination()); } }

Target:
public void deleteDatastreamDestination(Datastream datastream, List<Datastream> allDatastreams) { Objects.requireNonNull(datastream, "Datastream should not be null"); Objects.requireNonNull(datastream.getDestination(), "Datastream destination should not be null"); Objects.requireNonNull(allDatastreams, "allDatastreams should not be null"); Stream<Datastream> duplicateDatastreams = allDatastreams.stream().filter(d -> d.getDestination().equals(datastream.getDestination()) && !d.getName().equalsIgnoreCase(datastream.getName())); if(duplicateDatastreams.count() == 0) { _transportProvider.dropTopic(datastream.getDestination()); } else { LOG.info(String.format("There are existing datastreams %s with the same destination (%s) as datastream %s ", duplicateDatastreams, datastream.getDestination(), datastream.getName())); } }
Source:
public void open(ExecutionContext executionContext) throws ItemStreamException { ProcessBuilder processBuilder = new ProcessBuilder("perl", annotationParameters.getVepPath(), "--cache", "--cache_version", annotationParameters.getVepCacheVersion(), "-dir", annotationParameters.getVepCachePath(), "--species", annotationParameters.getVepCacheSpecies(), "--fasta", annotationParameters.getInputFasta(), "--fork", annotationParameters.getVepNumForks(), "--buffer_size", chunkSize.toString(), "-o", "STDOUT", "--force_overwrite", "--offline", "--everything" ); logger.debug("VEP annotation parameters = " + Arrays.toString(processBuilder.command().toArray())); logger.info("Starting VEP process"); process = null; try { process = processBuilder.start(); } catch (IOException e) { throw new ItemStreamException(e); } perlStdin = new BufferedOutputStream(process.getOutputStream()); InputStream perlStdout = process.getInputStream(); String vepOutput = annotationParameters.getVepOutput(); writingOk = new AtomicBoolean(false); outputCapturer = new Thread(() -> { long written = 0; try (GZIPOutputStream outputStream = new GZIPOutputStream(new FileOutputStream(vepOutput))) { written = connectStreams(new BufferedInputStream(perlStdout), outputStream); writingOk.set(true); } catch (IOException e) { logger.error("Writing the VEP output to " + vepOutput + " failed. ", e); } logger.info("Finished writing VEP output (" + written + " bytes written) to " + vepOutput); }); logger.info("Starting writing VEP output to " + vepOutput); outputCapturer.start(); }

Target:
public void open(ExecutionContext executionContext) throws ItemStreamException { vepProcess.open(); }