auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private StormTopology tryReadTopologyFromName(final String topoName) throws NotAliveException, AuthorizationException, IOException { <START> IStormClusterState state = stormClusterState; <END> String topoId = state.getTopoId(topoName) .orElseThrow(() -> new WrappedNotAliveException(topoName + " is not alive")); return tryReadTopology(topoId, topoCache); }</code><technical_language>This redundant</technical_language>

Target:
private StormTopology tryReadTopologyFromName(final String topoName) throws NotAliveException, AuthorizationException, IOException { return tryReadTopology(toTopoId(topoName), topoCache); }
Source:
<code>protected QueryIterator nextStage(Binding binding) { QueryIterator iter = exec(binding, argSubject, predicate, argObject, super.getExecContext()) ; if ( iter == null ) iter = IterLib.noResults(execCxt) ; <START> return iter ; <END> }</code><technical_language>This change is potentially significant. execution context change execution a new context derived current is produced please L108/L109</technical_language>

Target:
protected QueryIterator nextStage(Binding binding) { QueryIterator iter = exec(binding, argSubject, predicate, argObject, getExecContext()) ; if ( iter == null ) iter = IterLib.noResults(getExecContext()) ; return iter ; }
Source:
<code>public void shouldBeAbleToInstantiateEncryptionAlgorithms() { for (HashAlgorithm algorithm : HashAlgorithm.values()) { if (!HashAlgorithm.CUSTOM.equals(algorithm) && !HashAlgorithm.PLAINTEXT.equals(algorithm)) { if (HashAlgorithm.ARGON2.equals(algorithm)) { try { System.loadLibrary("argon2"); } catch (UnsatisfiedLinkError e) { System.out.println("[WARNING] Cannot find argon2 library, skipping test suite"); <START> return; <END> } } EncryptionMethod method = injector.createIfHasDependencies(algorithm.getClazz()); if (method == null) { fail("Could not create '" + algorithm.getClazz() + "' - forgot to provide some class?"); } HashedPassword hashedPassword = method.computeHash("pwd", "name"); assertThat("Salt should not be null if method.hasSeparateSalt(), and vice versa. Method: '" + method + "'", StringUtils.isEmpty(hashedPassword.getSalt()), equalTo(!method.hasSeparateSalt())); assertThat("Hash should not be empty for method '" + method + "'", StringUtils.isEmpty(hashedPassword.getHash()), equalTo(false)); } } }</code><technical_language>continue here</technical_language>

Target:
public void shouldBeAbleToInstantiateEncryptionAlgorithms() { for (HashAlgorithm algorithm : HashAlgorithm.values()) { if (!HashAlgorithm.CUSTOM.equals(algorithm) && !HashAlgorithm.PLAINTEXT.equals(algorithm)) { if (HashAlgorithm.ARGON2.equals(algorithm) && !Argon2.isLibraryLoaded()) { System.out.println("[WARNING] Cannot find argon2 library, skipping integration test"); continue; } EncryptionMethod method = injector.createIfHasDependencies(algorithm.getClazz()); if (method == null) { fail("Could not create '" + algorithm.getClazz() + "' - forgot to provide some class?"); } HashedPassword hashedPassword = method.computeHash("pwd", "name"); assertThat("Salt should not be null if method.hasSeparateSalt(), and vice versa. Method: '" + method + "'", StringUtils.isEmpty(hashedPassword.getSalt()), equalTo(!method.hasSeparateSalt())); assertThat("Hash should not be empty for method '" + method + "'", StringUtils.isEmpty(hashedPassword.getHash()), equalTo(false)); } } }
Source:
<code>public TransferObserver upload(String key, InputStream inputStream) throws IOException { <START> File file = File.createTempFile(UUID.randomUUID().toString(), ".tmp"); if (inputStream != null) { try { OutputStream outStream = new FileOutputStream(file); byte[] buffer = new byte[1024]; int bytesRead; while ((bytesRead = inputStream.read(buffer)) != -1) { outStream.write(buffer, 0, bytesRead); outStream.flush(); } inputStream.close(); outStream.close(); } catch (Exception e) { file = null; } } <END> return upload(key, file); }</code><technical_language>reusing this code in other method overload well. moving this logic a separate method minimize duplicate code</technical_language>

Target:
public TransferObserver upload(String key, InputStream inputStream) throws IOException { return upload(key, inputStream, UploadOptions.builder().build()); }
Source:
<code><START> public StorageServerConnectionParametersBase(StorageServerConnections connection, Guid vdsId, boolean force) { this(connection, vdsId); setForce(force); } <END></code><technical_language>I hate additional constructors - add signature, pass false in places call it. IntelliJ able do this pretty easily</technical_language>

Target:
public StorageServerConnectionParametersBase(StorageServerConnections connection, Guid vdsId, boolean force) { setStorageServerConnection(connection); setVdsId(vdsId); setForce(force); }
Source:
<code>public static void setGlobalStaticConstants(Configuration conf) throws IOException { Kmer.setGlobalKmerLength(Integer.parseInt(conf.get(KMER_LENGTH))); ExternalableTreeSet.setupManager(conf, new Path(conf.get("hadoop.tmp.dir", "/tmp"))); ExternalableTreeSet.setCountLimit(1000); if (conf.get(READ_LENGTHS) != null) { readLengths = new ArrayList<>(); for (String length : conf.get(READ_LENGTHS).split(",")) { readLengths.add(Integer.valueOf(length)); } } Byte libraryId = 0; if (conf.get(OUTER_DISTANCE_MEANS) != null) { outerDistanceMeans = new HashMap<>(); for (String mean : conf.get(OUTER_DISTANCE_MEANS).split(",")) { <START> outerDistanceMeans.put(libraryId++, Integer.valueOf(mean)); <END> } } libraryId = 0; if (conf.get(OUTER_DISTANCE_STD_DEVS) != null) { outerDistanceMeans = new HashMap<>(); for (String stddev : conf.get(OUTER_DISTANCE_STD_DEVS).split(",")) { outerDistanceStdDevs.put(libraryId++, Integer.valueOf(stddev)); } } debug = conf.get(GenomixJobConf.DEBUG_KMERS) != null; if (debugKmers == null) { debugKmers = new ArrayList<VKmer>(); if (conf.get(GenomixJobConf.DEBUG_KMERS) != null) { for (String kmer : conf.get(GenomixJobConf.DEBUG_KMERS).split(",")) { debugKmers.add(new VKmer(kmer)); } } } }</code><technical_language>If libraryId is ++, HashMap</technical_language>

Target:
public static void setGlobalStaticConstants(Configuration conf) throws IOException { Kmer.setGlobalKmerLength(Integer.parseInt(conf.get(KMER_LENGTH))); ExternalableTreeSet.setupManager(conf, new Path("/user/tmp")); ExternalableTreeSet.setCountLimit(1000); if (conf.get(READ_LENGTHS) != null) { readLengths = new ArrayList<>(); for (String length : conf.get(READ_LENGTHS).split(",")) { readLengths.add(Integer.valueOf(length)); } } Byte libraryId = 0; if (conf.get(OUTER_DISTANCE_MEANS) != null) { outerDistanceMeans = new HashMap<>(); for (String mean : conf.get(OUTER_DISTANCE_MEANS).split(",")) { outerDistanceMeans.put(libraryId++, Integer.valueOf(mean)); } } libraryId = 0; if (conf.get(OUTER_DISTANCE_STD_DEVS) != null) { outerDistanceStdDevs = new HashMap<>(); for (String stddev : conf.get(OUTER_DISTANCE_STD_DEVS).split(",")) { outerDistanceStdDevs.put(libraryId++, Integer.valueOf(stddev)); } } debug = conf.get(GenomixJobConf.DEBUG_KMERS) != null; if (debugKmers == null) { debugKmers = new ArrayList<VKmer>(); if (conf.get(GenomixJobConf.DEBUG_KMERS) != null) { for (String kmer : conf.get(GenomixJobConf.DEBUG_KMERS).split(",")) { debugKmers.add(new VKmer(kmer)); } } } }
Source:
<code>BlobOutputStream(final AppendBlobAsyncClient parentBlob, final AppendBlobAccessConditions accessCondition) throws StorageException { <START> this(parentBlob, accessCondition != null ? new BlobAccessConditions().modifiedAccessConditions( <END> accessCondition.modifiedAccessConditions()).leaseAccessConditions(accessCondition.leaseAccessConditions()) : new BlobAccessConditions(), accessCondition != null ? accessCondition.appendPositionAccessConditions() : null, null, null, accessCondition != null ? ( accessCondition.appendPositionAccessConditions().appendPosition() != null ? accessCondition.appendPositionAccessConditions().appendPosition() : parentBlob.getProperties().block().value().blobSize() ) : 0, BlobType.APPEND_BLOB, BlockBlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE); }</code><technical_language>This is hard discern. I add constructor above</technical_language>

Target:
BlobOutputStream(final AppendBlobAsyncClient parentBlob, final AppendBlobAccessConditions accessCondition) throws StorageException { this((BlobAsyncClient) parentBlob); this.streamType = BlobType.APPEND_BLOB; this.accessCondition = new BlobAccessConditions(); if (accessCondition != null) { this.appendPositionAccessConditions = accessCondition.appendPositionAccessConditions(); this.accessCondition = new BlobAccessConditions().modifiedAccessConditions(accessCondition.modifiedAccessConditions()).leaseAccessConditions(accessCondition.leaseAccessConditions()); if (accessCondition.appendPositionAccessConditions().appendPosition() != null) { this.initialBlobOffset = accessCondition.appendPositionAccessConditions().appendPosition(); } else { this.initialBlobOffset = parentBlob.getProperties().block().blobSize(); } } this.internalWriteThreshold = (int) BlockBlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; }
Source:
<code>public List<String> lines() { <START> return Arrays.asList(contents.split("\\r?\\n")); <END> }</code><technical_language>I added method in Utils for</technical_language>

Target:
public List<String> lines() { return Arrays.asList(Utils.splitLines(contents)); }
Source:
<code>public AppenderatorDriverAddResult add( InputRow row, String sequenceName ) throws IOException { <START> return append(row, sequenceName, null, true, true); <END> }</code><technical_language>is BatchAppenderatorDriver skipping lineage check now? I thought more segment interval if running in non-incremental-publishing mode</technical_language>

Target:
public AppenderatorDriverAddResult add( InputRow row, String sequenceName ) throws IOException { return append(row, sequenceName, null, false, true); }
Source:
<code>protected void interruptQuery() { try { <START> long interruptTimeInMillies = interruptTime * 60 * 1000; <END> long differenceInMillies = interruptTimeInMillies - ((new Date()).getTime() - submittedOn.getTime()); if(differenceInMillies > 0) { log.debug("Sleeping for {}", differenceInMillies); Thread.sleep(differenceInMillies); } if(!task.isDone()) { log.debug("Interrupting the task"); task.cancel(true); updateAsyncQueryStatus(QueryStatus.TIMEDOUT, id); } } catch (InterruptedException e) { log.error("InterruptedException: {}", e.getMessage()); } }</code><technical_language>configurable</technical_language>

Target:
protected void interruptQuery() { try { long interruptTimeMillies = calculateTimeOut(maxRunTimeMinutes, submittedOn); if (interruptTimeMillies > 0) { log.debug("Waiting on the future with the given timeout for {}", interruptTimeMillies); task.get(interruptTimeMillies, TimeUnit.MILLISECONDS); } } catch (InterruptedException e) { log.error("InterruptedException: {}", e); } catch (ExecutionException e) { log.error("ExecutionException: {}", e); } catch (TimeoutException e) { log.error("TimeoutException: {}", e); task.cancel(true); asyncQueryDao.updateStatus(asyncQuery, QueryStatus.TIMEDOUT); } }
Source:
<code>public CdmaSubscriptionListPreference(Context context, AttributeSet attrs) { super(context, attrs); mPhone = PhoneFactory.getDefaultPhone(); mHandler = new CdmaSubscriptionButtonHandler(); <START> int cdmaSubscriptionMode = Secure.getInt(mPhone.getContext().getContentResolver(), <END> android.provider.Settings.Secure.CDMA_SUBSCRIPTION_MODE, preferredSubscriptionMode); setValue(Integer.toString(cdmaSubscriptionMode)); }</code><technical_language>this a subroutine called setCurrentValue</technical_language>

Target:
public CdmaSubscriptionListPreference(Context context, AttributeSet attrs) { super(context, attrs); mPhone = PhoneFactory.getDefaultPhone(); mHandler = new CdmaSubscriptionButtonHandler(); setCurrentCdmaSubscriptionModeValue(); }
Source:
<code>private void assertToStringContainsLuceneQueryInformation(String fullTextQueryToString) { String queryString = ContextHelper.getSearchIntegrator( fullTextSession ) .createHSQuery( luceneQuery, Foo.class ) .getQueryString(); <START> assertThat( "Unexpected toString implementation. The string should contain Lucene query information", <END> fullTextQueryToString, CoreMatchers.containsString( queryString ) ); }</code><technical_language>minor: is a Lucene query Elasticsearch</technical_language>

Target:
private void assertToStringContainsLuceneQueryInformation(String fullTextQueryToString) { String queryString = ContextHelper.getSearchIntegrator( fullTextSession ) .createHSQuery( luceneQuery, Foo.class ) .getQueryString(); assertThat( "Unexpected toString implementation. The string should contain a string representation of the internal query.", fullTextQueryToString, CoreMatchers.containsString( queryString ) ); }
Source:
<code>protected IndentLevel curlyIndent() { int offset = 0; final DetailAST lcurly = getLeftCurly(); if (isOnStartOfLine(lcurly) <START> && !TokenUtil.isOfType(lcurly.getParent(), TokenTypes.ARRAY_INIT)) { <END> offset = getBraceAdjustment(); } final IndentLevel level = new IndentLevel(getIndent(), offset); return IndentLevel.addAcceptable(level, level.getLastIndentLevel() + getLineWrappingIndentation()); }</code><technical_language>curlyIndent is returning expected indentation for left right curlies. If parent of ARRAY_INIT ARRAY_INIT (which is a non-brace), brace adjustment is for braces. basicOffset lineWrappingIndentation instead</technical_language>

Target:
protected IndentLevel curlyIndent() { int offset = 0; final DetailAST lcurly = getLeftCurly(); if (isOnStartOfLine(lcurly) && lcurly.getParent().getType() != TokenTypes.ARRAY_INIT) { offset = getBraceAdjustment(); } final IndentLevel level = new IndentLevel(getIndent(), offset); return IndentLevel.addAcceptable(level, level.getLastIndentLevel() + getLineWrappingIndentation()); }
Source:
<code>public void updateShouldReturnTheRequest() throws Exception { final AtomicReference<Request> bodyRef = new AtomicReference<>(); final CountDownLatch latch = new CountDownLatch(1); final RestAdapter adapter = new RestAdapter.Builder().setEndpoint(MOCK_URL).setClient(new Client() { @Override public Response execute(Request request) throws IOException { bodyRef.set(request); latch.countDown(); <START> return null; <END> } }).build(); final UserCardService userCardService = adapter.create(UserCardService.class); userCardService.update("foobar", new HashMap<String, Object>(), new RetrofitPromise<Card>()); latch.await(); Assert.assertEquals(bodyRef.get().getUrl(), String.format("%s/v0/me/cards/%s", MOCK_URL, "foobar")); Assert.assertEquals(bodyRef.get().getMethod(), "PATCH"); }</code><technical_language>Add newline return</technical_language>

Target:
public void updateShouldReturnTheRequest() throws Exception { final AtomicReference<Request> bodyRef = new AtomicReference<>(); final CountDownLatch latch = new CountDownLatch(1); final RestAdapter adapter = new RestAdapter.Builder().setEndpoint(MOCK_URL).setClient(new Client() { @Override public Response execute(Request request) throws IOException { bodyRef.set(request); latch.countDown(); return null; } }).build(); final UserCardService userCardService = adapter.create(UserCardService.class); userCardService.update("foobar", new HashMap<String, Object>(), new RetrofitPromise<Card>()); latch.await(); Assert.assertEquals(bodyRef.get().getMethod(), "PATCH"); Assert.assertEquals(bodyRef.get().getUrl(), String.format("%s/v0/me/cards/%s", MOCK_URL, "foobar")); }
Source:
<code>protected synchronized void allocateContainer(RMContainer rmContainer, boolean launchedOnNode) { super.allocateContainer(rmContainer, launchedOnNode); Resource allocated = rmContainer.getAllocatedResource(); if (!Resources.isNone(allocated)) { <START> for (FSAppAttempt app: resourcesPreemptedPerApp.keySet()) { <END> if (app.getApplicationAttemptId().equals( rmContainer.getApplicationAttemptId())) { Resource reserved = resourcesPreemptedPerApp.get(app); Resource fulfilled = Resources.componentwiseMin(reserved, allocated); Resources.subtractFrom(reserved, fulfilled); Resources.subtractFrom(totalResourcesPreempted, fulfilled); if (Resources.isNone(reserved)) { resourcesPreemptedPerApp.remove(app); } break; } } } }</code><technical_language>this is a map, a map.get()</technical_language>

Target:
protected synchronized void allocateContainer(RMContainer rmContainer, boolean launchedOnNode) { super.allocateContainer(rmContainer, launchedOnNode); Resource allocated = rmContainer.getAllocatedResource(); if (!Resources.isNone(allocated)) { FSAppAttempt app = appIdToAppMap.get(rmContainer.getApplicationAttemptId()); if (app != null) { Resource reserved = resourcesPreemptedForApp.get(app); Resource fulfilled = Resources.componentwiseMin(reserved, allocated); Resources.subtractFrom(reserved, fulfilled); Resources.subtractFrom(totalResourcesPreempted, fulfilled); if (Resources.isNone(reserved)) { resourcesPreemptedForApp.remove(app); appIdToAppMap.remove(rmContainer.getApplicationAttemptId()); } } } else { LOG.error("Allocated empty container" + rmContainer.getContainerId()); } }
Source:
<code>private boolean migrate(GoPluginDescriptor pluginDescriptor) { String pluginId = pluginDescriptor.id(); boolean isElasticAgentPlugin = pluginManager.isPluginOfType(ELASTIC_AGENT_EXTENSION, pluginId); if (!isElasticAgentPlugin) { return true; } LOG.debug("Migrating elastic agent information for plugin", pluginId); Plugin plugin = pluginSqlMapDao.findPlugin(pluginId); String pluginConfiguration = plugin.getConfiguration(); HashMap<String, String> pluginSettings = (pluginConfiguration == null) ? new HashMap<>() : JsonHelper.fromJson(pluginConfiguration, HashMap.class); ReplaceElasticAgentInformationCommand command = new ReplaceElasticAgentInformationCommand(clusterProfilesService, elasticProfileService, elasticAgentExtension, pluginDescriptor, pluginSettings); boolean updated = update(command, pluginDescriptor); if (updated) { <START> LOG.debug("Done Migrating elastic agent information for plugin", pluginId); <END> if (!pluginManager.resolveExtensionVersion(pluginId, ELASTIC_AGENT_EXTENSION, ElasticAgentExtension.SUPPORTED_VERSIONS).equals(ElasticAgentExtensionV4.VERSION)) { LOG.debug("Deleting stale plugin settings for plugin, after successful plugin config migration", pluginId); pluginSqlMapDao.deletePluginIfExists(pluginId); } else { LOG.debug("Skip deleting plugin settings for plugin, as the plugin implements elastic agent v4 extension which uses plugin settings", pluginId); } } else { LOG.debug("Failed migrating elastic agent information for plugin", pluginId); } return updated; }</code><technical_language>Done migrating elastic agent configurations for plugin id: '{}'</technical_language>

Target:
private boolean migrate(GoPluginDescriptor pluginDescriptor) { String pluginId = pluginDescriptor.id(); boolean isElasticAgentPlugin = pluginManager.isPluginOfType(ELASTIC_AGENT_EXTENSION, pluginId); if (!isElasticAgentPlugin) { return true; } LOG.debug("Migrating elastic agent configurations for plugin with id: '{}'", pluginId); Plugin plugin = pluginSqlMapDao.findPlugin(pluginId); String pluginConfiguration = plugin.getConfiguration(); HashMap<String, String> pluginSettings = (pluginConfiguration == null) ? new HashMap<>() : JsonHelper.fromJson(pluginConfiguration, HashMap.class); ReplaceElasticAgentInformationCommand command = new ReplaceElasticAgentInformationCommand(clusterProfilesService, elasticProfileService, elasticAgentExtension, pluginDescriptor, pluginSettings); boolean updated = update(command, pluginDescriptor); if (updated) { LOG.debug("Done migrating elastic agent configurations for plugin with id: '{}'", pluginId); if (!pluginManager.resolveExtensionVersion(pluginId, ELASTIC_AGENT_EXTENSION, ElasticAgentExtension.SUPPORTED_VERSIONS).equals(ElasticAgentExtensionV4.VERSION)) { LOG.debug("Deleting stale plugin settings for plugin with id '{}' after successfully migrating elastic agent configurations", pluginId); pluginSqlMapDao.deletePluginIfExists(pluginId); } else { LOG.debug("Skip deleting plugin settings for plugin with id '{}', as the plugin implements elastic agent v4 extension which uses plugin settings", pluginId); } } return updated; }
Source:
<code>public byte[] getCacheKey() { final CacheKeyBuilder builder = new CacheKeyBuilder( <START> AggregatorUtil.QUANTILES_DOUBLES_SKETCH_TO_QUANTILES_CACHE_TYPE_ID).appendCacheable(field); <END> for (final double value : fractions) { builder.appendDouble(value); } return builder.build(); }</code><technical_language>this constant</technical_language>

Target:
public byte[] getCacheKey() { final CacheKeyBuilder builder = new CacheKeyBuilder( PostAggregatorIds.MOMENTS_SKETCH_TO_QUANTILES_CACHE_TYPE_ID ) .appendCacheable(field) .appendDoubleArray(fractions); return builder.build(); }
Source:
<code>protected boolean ConcreteCheckExistingStorageDomain(Pair<storage_domain_static, SANState> domainFromIrs) { boolean returnValue = false; <START> if (!StringUtils.isEmpty(getStorageDomain().getStorageStaticData().getstorage()) <END> && !StringUtils.isEmpty(domainFromIrs.getFirst().getstorage())) { returnValue = (StringUtils.equals(domainFromIrs.getFirst().getstorage(), getStorageDomain().getStorageStaticData() .getstorage())); } if (!returnValue) { addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL); } else if (domainFromIrs.getSecond() != null && SANState.OK != domainFromIrs.getSecond()) { returnValue = false; getReturnValue().getCanDoActionMessages().add( VdcBllMessages.ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_LUNS_PROBLEM.toString()); } return returnValue; }</code><technical_language>replace "!StringUtils.isEmpty" "StringUtils.isNotEmpty"</technical_language>

Target:
protected boolean ConcreteCheckExistingStorageDomain(Pair<storage_domain_static, SANState> domainFromIrs) { boolean returnValue = false; if (StringUtils.isNotEmpty(getStorageDomain().getStorageStaticData().getstorage()) && StringUtils.isNotEmpty(domainFromIrs.getFirst().getstorage())) { returnValue = (StringUtils.equals(domainFromIrs.getFirst().getstorage(), getStorageDomain().getStorageStaticData() .getstorage())); } if (!returnValue) { addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL); } else if (domainFromIrs.getSecond() != null && SANState.OK != domainFromIrs.getSecond()) { returnValue = false; getReturnValue().getCanDoActionMessages().add( VdcBllMessages.ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_LUNS_PROBLEM.toString()); } return returnValue; }
Source:
<code>public final Message<?> transform(Message<?> message) { Object result = this.messageProcessor.processMessage(message); if (result == null) { return null; } if (result instanceof Message<?>) { return (Message<?>) result; } MessageHeaders requestHeaders = message.getHeaders(); AbstractIntegrationMessageBuilder<?> messageBuilder = getMessageBuilderFactory() .withPayload(result); <START> if (this.selectiveHeaderPropagation) { <END> Map<String, Object> headersToCopy = new HashMap<>(requestHeaders); headersToCopy.entrySet() .removeIf(entry -> PatternMatchUtils.simpleMatch(this.notPropagatedHeaders, entry.getKey())); messageBuilder.copyHeadersIfAbsent(headersToCopy); } else { messageBuilder.copyHeadersIfAbsent(requestHeaders); } return messageBuilder.build(); }</code><technical_language>move this a utility avoid duplicating code (be careful tangles, )</technical_language>

Target:
public final Message<?> transform(Message<?> message) { Object result = this.messageProcessor.processMessage(message); if (result == null) { return null; } if (result instanceof Message<?>) { return (Message<?>) result; } MessageHeaders requestHeaders = message.getHeaders(); return getMessageBuilderFactory() .withPayload(result) .filterAndCopyHeadersIfAbsent(requestHeaders, this.selectiveHeaderPropagation ? this.notPropagatedHeaders : null) .build(); }
Source:
<code><START> public boolean isAbstract() { <END> return (declaringMapper != null && declaringMapper.getTypeElement().getKind().isInterface()) || executable.getModifiers().contains( Modifier.ABSTRACT ); }</code><technical_language>This needs represent implementation created for this method, right? do return overridesMethod() || !isDefault()? need do else, this pick Java 8 default methods. I need consider Java 8 default methods consider abstract methods</technical_language>

Target:
public boolean isAbstract() { return executable.getModifiers().contains( Modifier.ABSTRACT ); }
Source:
<code>public void start(BundleContext context) throws Exception { super.start(context); plugin = this; reviewManager = new ActiveReviewManager(); UIJob job = new UIJob(INITIALIZE_TASK_REVIEW_MAPPING_STORE_JOB) { @Override public IStatus runInUIThread(IProgressMonitor monitor) { taskReviewsMappingStore = new TaskReviewsMappingsStore(TasksUiPlugin.getTaskDataManager(), TasksUiPlugin.getRepositoryManager()); TasksUiPlugin.getTaskList().addChangeListener(taskReviewsMappingStore); <START> return ASYNC_FINISH; <END> } }; job.schedule(0); }</code><technical_language>return Status.OK_Status here. ASYNC_FINISH is for job schedules some action another thread, e.g. Display.asyncExec</technical_language>

Target:
public void start(BundleContext context) throws Exception { super.start(context); plugin = this; reviewManager = new ActiveReviewManager(); UIJob job = new UIJob(INITIALIZE_TASK_REVIEW_MAPPING_STORE_JOB) { @Override public IStatus runInUIThread(IProgressMonitor monitor) { taskReviewsMappingStore = new TaskReviewsMappingsStore(TasksUiPlugin.getTaskDataManager(), TasksUiPlugin.getRepositoryManager()); TasksUiPlugin.getTaskList().addChangeListener(taskReviewsMappingStore); return Status.OK_STATUS; } }; job.schedule(); }
Source:
<code>private Query compileViewQuery(Session session, String sql, boolean literalsChecked, String viewName) { Prepared p; session.setParsingCreateView(true,viewName); try { p = session.prepare(sql, false, literalsChecked); } finally { session.setParsingCreateView(false,viewName); } if (!(p instanceof Query)) { throw DbException.getSyntaxError(sql, 0); } Query q = (Query) p; <START> if(isTableExpression){ <END> q.setNeverLazy(true); } return q; }</code><technical_language>setNeverLazy(true) for recursive CTE, no</technical_language>

Target:
private Query compileViewQuery(Session session, String sql, boolean literalsChecked, String viewName) { Prepared p; session.setParsingCreateView(true, viewName); try { p = session.prepare(sql, false, literalsChecked); } finally { session.setParsingCreateView(false, viewName); } if (!(p instanceof Query)) { throw DbException.getSyntaxError(sql, 0); } Query q = (Query) p; if (isTableExpression && allowRecursive) { q.setNeverLazy(true); } return q; }
Source:
<code>CompletableFuture<LedgerMetadata> closeRecovered() { long lac, len; synchronized (this) { lac = lastAddConfirmed; len = length; } LOG.info("Closing recovered ledger at entry {}", getId(), lac); CompletableFuture<LedgerMetadata> f = new MetadataUpdateLoop( clientCtx.getLedgerManager(), getId(), this::getLedgerMetadata, (metadata) -> metadata.isInRecovery(), (metadata) -> { LedgerMetadataBuilder builder = LedgerMetadataBuilder.from(metadata); Optional<Long> lastEnsembleKey = metadata.getLastEnsembleKey(); <START> checkState(lastEnsembleKey.isPresent(), <END> "Metadata shouldn't have been created without at least one ensemble"); newEnsemblesFromRecovery.entrySet().forEach( (e) -> { if (lastEnsembleKey.get().equals(e.getKey())) { builder.replaceEnsembleEntry(e.getKey(), e.getValue()); } else { builder.newEnsembleEntry(e.getKey(), e.getValue()); } }); return builder.closingAt(lac, len).build(); }, this::setLedgerMetadata).run(); f.thenRun(() -> newEnsemblesFromRecovery.clear()); return f; }</code><technical_language>error this assertion handled MULoop ? resulting CompletableFuture fail ? Do test cases</technical_language>

Target:
CompletableFuture<LedgerMetadata> closeRecovered() { long lac, len; synchronized (this) { lac = lastAddConfirmed; len = length; } LOG.info("Closing recovered ledger at entry {}", getId(), lac); CompletableFuture<LedgerMetadata> f = new MetadataUpdateLoop( clientCtx.getLedgerManager(), getId(), this::getLedgerMetadata, (metadata) -> metadata.isInRecovery(), (metadata) -> { LedgerMetadataBuilder builder = LedgerMetadataBuilder.from(metadata); Optional<Long> lastEnsembleKey = metadata.getLastEnsembleKey(); checkState(lastEnsembleKey.isPresent(), "Metadata shouldn't have been created without at least one ensemble"); synchronized (metadataLock) { newEnsemblesFromRecovery.entrySet().forEach( (e) -> { checkState(e.getKey() >= lastEnsembleKey.get(), "Once a ledger is in recovery, noone can add ensembles without closing"); if (lastEnsembleKey.get().equals(e.getKey())) { builder.replaceEnsembleEntry(e.getKey(), e.getValue()); } else { builder.newEnsembleEntry(e.getKey(), e.getValue()); } }); } return builder.closingAt(lac, len).build(); }, this::setLedgerMetadata).run(); f.thenRun(() -> { synchronized (metadataLock) { newEnsemblesFromRecovery.clear(); } }); return f; }
Source:
<code>private void openRegion(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException, ProcedureSuspendedException { ServerName loc = regionNode.getRegionLocation(); if (loc == null) { LOG.warn("No location specified for {}, jump back to state to get one", getRegion(), RegionStateTransitionState.REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE); setNextState(RegionStateTransitionState.REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE); return; } final boolean isMeta = regionNode.getRegionInfo().isMetaRegion(); final boolean isMetaAvailable = !env.getAssignmentManager().isMetaRegionInTransition(); if (!isMeta && !isMetaAvailable) { throw new ProcedureSuspendedException(); } <START> env.getAssignmentManager().regionOpening(regionNode); <END> addChildProcedure(new OpenRegionProcedure(this, getRegion(), loc)); setNextState(RegionStateTransitionState.REGION_STATE_TRANSITION_CONFIRM_OPENED); }</code><technical_language>Good add a message open region for ${regionNameAsString} is suspended</technical_language>

Target:
private void openRegion(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException, ProcedureSuspendedException { ServerName loc = regionNode.getRegionLocation(); if (loc == null) { LOG.warn("No location specified for {}, jump back to state to get one", getRegion(), RegionStateTransitionState.REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE); setNextState(RegionStateTransitionState.REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE); return; } final boolean isMeta = regionNode.getRegionInfo().isMetaRegion(); final boolean isMetaAvailable = env.getMasterServices() .isRegionOnline(RegionInfoBuilder.FIRST_META_REGIONINFO); if (!isMeta && !isMetaAvailable) { throw new ProcedureSuspendedException(); } env.getAssignmentManager().regionOpening(regionNode); addChildProcedure(new OpenRegionProcedure(this, getRegion(), loc)); setNextState(RegionStateTransitionState.REGION_STATE_TRANSITION_CONFIRM_OPENED); }
Source:
<code>private TriggerEventRequest buildTriggerForForm(Config config, CommcareApplicationJson application, FormSchemaJson form) { String applicationName = application.getApplicationName(); String formName = form.getFormName(); String displayName = DisplayNameHelper.buildDisplayName(RECEIVED_FORM, formName, applicationName, config.getName()); if (application.getCommcareAppId() != null) { return new TriggerEventRequest(displayName, FORMS_EVENT + "." + config.getName() + "." + form.getXmlns() + application.getCommcareAppId(), null, buildTriggerParameters(form), FORMS_EVENT); } else { <START> return new TriggerEventRequest(displayName, FORMS_EVENT + "." + config.getName() + "." + form.getXmlns(), <END> null, buildTriggerParameters(form), FORMS_EVENT); } }</code><technical_language>of all, return statement. verify if commcareAppId is null in line</technical_language>

Target:
private TriggerEventRequest buildTriggerForForm(Config config, CommcareApplicationJson application, FormSchemaJson form) { String applicationName = application.getApplicationName(); String formName = form.getFormName(); String displayName = DisplayNameHelper.buildDisplayName(RECEIVED_FORM, formName, applicationName, config.getName()); String appId = (application.getCommcareAppId() != null) ? application.getCommcareAppId() : ""; return new TriggerEventRequest(displayName, FORMS_EVENT + "." + config.getName() + "." + form.getXmlns() + appId, null, buildTriggerParameters(form), FORMS_EVENT); }
Source:
<code>private void loadIndex() { File storeFolder = folders.getBase(); File index = new File(storeFolder, INDEX_FILE_NAME); if (index.exists() && index.length() > 0) { try { <START> InputStream stream = new FileInputStream(index); <END> ObjectInputStream ois = new ObjectInputStream(stream); try { diskDatas.clear(); for (DiskData diskData : (List<DiskData>)ois.readObject()) { diskData.pageStore = this; diskDatas.put(diskData.sessionIdentifier, diskData); } } finally { stream.close(); ois.close(); } } catch (Exception e) { log.error("Couldn't load DiskPageStore index from file " + index + ".", e); } } Files.remove(index); }</code><technical_language>nit: try-with-resources</technical_language>

Target:
private void loadIndex() { File storeFolder = folders.getBase(); File index = new File(storeFolder, INDEX_FILE_NAME); if (index.exists() && index.length() > 0) { try (InputStream stream = new FileInputStream(index)) { ObjectInputStream ois = new ObjectInputStream(stream); diskDatas.clear(); for (DiskData diskData : (List<DiskData>)ois.readObject()) { diskData.pageStore = this; diskDatas.put(diskData.sessionIdentifier, diskData); } } catch (Exception e) { log.error("Couldn't load DiskPageStore index from file " + index + ".", e); } } Files.remove(index); }
Source:
<code>public Container(final ContainerHeader containerHeader, final long containerByteOffset) { this.containerHeader = containerHeader; this.containerByteOffset = containerByteOffset; compressionHeader = null; <START> slices = Collections.EMPTY_LIST; <END> }</code><technical_language>Collections.emptyList() is generally preferred. suggestion slices = Collections.emptyList();</technical_language>

Target:
public Container(final ContainerHeader containerHeader, final long containerByteOffset) { this.containerHeader = containerHeader; this.containerByteOffset = containerByteOffset; compressionHeader = null; slices = Collections.emptyList(); }
Source:
<code>public boolean hasNext() { if (numInflight == parallelism) { return false; } else { return replicaIterator.hasNext(); <START> } <END> }</code><technical_language>shorten this java return numInFlight < parallelism && replicaIterator.hasNext()</technical_language>

Target:
public boolean hasNext() { return inflightCount < parallelism && replicaIterator.hasNext(); }
Source:
<code>private void learnIdentifierConstraints(IdentifierTree tree, SymbolicValue sv) { if (THIS_SUPER.contains(tree.name())) { programState = programState.addConstraint(sv, ObjectConstraint.NOT_NULL); return; } Tree declaration = tree.symbol().declaration(); if (!isFinalField(tree.symbol()) || declaration == null) { return; } ExpressionTree initializer = ((VariableTree) declaration).initializer(); if (initializer == null) { return; } initializer = ExpressionUtils.skipParentheses(initializer); if (initializer.is(Tree.Kind.NULL_LITERAL)) { programState = programState.addConstraint(sv, ObjectConstraint.NULL); } else if (initializer.is(Tree.Kind.NEW_CLASS, Tree.Kind.NEW_ARRAY, Tree.Kind.STRING_LITERAL) || isNonNullMethodInvocation(initializer) || isNonBooleanPrimitiveTypeExpression(initializer)) { programState = programState.addConstraint(sv, ObjectConstraint.NOT_NULL); } else if (initializer.is(Tree.Kind.BOOLEAN_LITERAL)) { <START> boolean boleanValue = Boolean.parseBoolean(((LiteralTree) initializer).value()); <END> programState = programState .addConstraint(sv, ObjectConstraint.NOT_NULL) .addConstraint(sv, boleanValue ? BooleanConstraint.TRUE : BooleanConstraint.FALSE); } }</code><technical_language>typo</technical_language>

Target:
private void learnIdentifierConstraints(IdentifierTree tree, SymbolicValue sv) { if (THIS_SUPER.contains(tree.name())) { programState = programState.addConstraint(sv, ObjectConstraint.NOT_NULL); return; } Tree declaration = tree.symbol().declaration(); if (!isFinalField(tree.symbol()) || declaration == null) { return; } ExpressionTree initializer = ((VariableTree) declaration).initializer(); if (initializer == null) { return; } initializer = ExpressionUtils.skipParentheses(initializer); if (initializer.is(Tree.Kind.NULL_LITERAL)) { programState = programState.addConstraint(sv, ObjectConstraint.NULL); } else if (initializer.is(Tree.Kind.NEW_CLASS, Tree.Kind.NEW_ARRAY, Tree.Kind.STRING_LITERAL) || isNonNullMethodInvocation(initializer) || isNonBooleanPrimitiveTypeExpression(initializer)) { programState = programState.addConstraint(sv, ObjectConstraint.NOT_NULL); } else if (initializer.is(Tree.Kind.BOOLEAN_LITERAL)) { boolean booleanValue = Boolean.parseBoolean(((LiteralTree) initializer).value()); programState = programState .addConstraint(sv, ObjectConstraint.NOT_NULL) .addConstraint(sv, booleanValue ? BooleanConstraint.TRUE : BooleanConstraint.FALSE); } }
Source:
<code>public void shouldCollectUnlimitedNumberOfBadEntries() throws Exception { <START> List<String> nodeIds = new ArrayList<>(); <END> for ( int i = 0; i < 10_000; i++ ) { nodeIds.add( "A" ); } importTool( "--into", dbRule.getStoreDirAbsolutePath(), "--nodes", nodeData( true, Configuration.COMMAS, nodeIds, TRUE ).getAbsolutePath(), "--skip-duplicate-nodes", "--bad-tolerance", "-" ); }</code><technical_language>Collections.nCopies( 10_000, "A" ) do trick instead</technical_language>

Target:
public void shouldCollectUnlimitedNumberOfBadEntries() throws Exception { List<String> nodeIds = Collections.nCopies( 10_000, "A" ); importTool( "--into", dbRule.getStoreDirAbsolutePath(), "--nodes", nodeData( true, Configuration.COMMAS, nodeIds, TRUE ).getAbsolutePath(), "--skip-duplicate-nodes", "--bad-tolerance", "true" ); }
Source:
<code>public static Map<AnelCommandType, State> parseData(byte[] data, AnelState state) throws Exception { final String string = new String(data); final String[] arr = string.split(":"); if (arr.length < 26 && arr.length != 16) { throw new IllegalArgumentException( "Data with 16 or at least 26 values expected but " + arr.length + " received: " + string); } if (!arr[0].equals("NET-PwrCtrl")) { throw new IllegalArgumentException("Data must start with 'NET-PwrCtrl' but it didn't: " + arr[0]); } if (!state.host.equals(arr[2]) && !state.host.equalsIgnoreCase(arr[1].trim())) { return Collections.emptyMap(); } final Map<AnelCommandType, State> result = new LinkedHashMap<AnelCommandType, State>(); checkForNameChange(arr, state, result); if (arr.length >= 15) { checkForStateChanges(arr, state, result); } if (arr.length >= 24) { checkForIOChanges(arr, state, result); } if (arr.length >= 25) { checkForTemperatureChange(arr, state, result); } final int sensorDataIndex = findSensorDataIndex(arr, 26); if (sensorDataIndex > 0) { checkForSensorChanges(arr, state, result, sensorDataIndex); } <START> final int powerDataIndex = findPowerDataIndex(arr, 26); <END> if (powerDataIndex > 0) { } return result; }</code><technical_language>Please remove this block a body</technical_language>

Target:
public static Map<AnelCommandType, State> parseData(byte[] data, AnelState state) throws Exception { final String string = new String(data); final String[] arr = string.split(":"); if (arr.length < 26 && arr.length != 16) { throw new IllegalArgumentException( "Data with 16 or at least 26 values expected but " + arr.length + " received: " + string); } if (!arr[0].equals("NET-PwrCtrl")) { throw new IllegalArgumentException("Data must start with 'NET-PwrCtrl' but it didn't: " + arr[0]); } if (!state.host.equals(arr[2]) && !state.host.equalsIgnoreCase(arr[1].trim())) { return Collections.emptyMap(); } final Map<AnelCommandType, State> result = new LinkedHashMap<AnelCommandType, State>(); checkForNameChange(arr, state, result); if (arr.length >= 15) { checkForStateChanges(arr, state, result); } if (arr.length >= 24) { checkForIOChanges(arr, state, result); } if (arr.length >= 25) { checkForTemperatureChange(arr, state, result); } final int sensorDataIndex = findNameAndNumberPatternIndex(arr, 26, "s", 3); if (sensorDataIndex > 0) { checkForSensorChanges(arr, state, result, sensorDataIndex); } return result; }
Source:
<code>public void updateMembers(IEntityGroup group) throws GroupsException { String groupName = group.getLocalKey(); GcAddMember gcAddMember = new GcAddMember().assignGroupName(groupName); Iterator<IGroupMember> membersIterator = group.getChildren().iterator(); while (membersIterator != null && membersIterator.hasNext()) { <START> IGroupMember iGroupMember = membersIterator.next(); <END> EntityIdentifier entityIdentifier = iGroupMember .getEntityIdentifier(); String identifier = entityIdentifier.getKey(); gcAddMember.addSubjectIdentifier(identifier); } gcAddMember.execute(); }</code><technical_language>changed for loop</technical_language>

Target:
public void updateMembers(IEntityGroup group) throws GroupsException { String groupName = group.getLocalKey(); GcAddMember gcAddMember = new GcAddMember().assignGroupName(groupName); for (IGroupMember iGroupMember : group.getChildren()) { EntityIdentifier entityIdentifier = iGroupMember.getEntityIdentifier(); String identifier = entityIdentifier.getKey(); gcAddMember.addSubjectIdentifier(identifier); } gcAddMember.execute(); }
Source:
<code>public static Configuration getCfg() { <START> return new ConfigurationCreator().getInstance(); <END> }</code><technical_language>default ConfigurationCreator here, specialized one</technical_language>

Target:
public static Configuration getCfg() throws IOException { return new CustomConfigurationCreator(new DefaultEnvironment(environmentType)).getInstance(); }
Source:
<code>public int onStartCommand(Intent intent, int flags, int startId) { <START> Log.i("LocalService", "setting the location from service"); <END> String longitude = intent.getStringExtra("longitude"); String latitude = intent.getStringExtra("latitude"); mock = new MockLocationProvider(LocationManager.GPS_PROVIDER, this); mock.pushLocation(Double.valueOf(latitude), Double.valueOf(longitude)); return START_NOT_STICKY; }</code><technical_language>log location is set (long/lat), setting a location</technical_language>

Target:
public int onStartCommand(Intent intent, int flags, int startId) { String longitude = intent.getStringExtra("longitude"); String latitude = intent.getStringExtra("latitude"); Log.i("LocationService", "setting the location from service with longitude: "+longitude+" latitude: "+latitude); mock = new MockLocationProvider(LocationManager.GPS_PROVIDER, this); mock.pushLocation(Double.valueOf(latitude), Double.valueOf(longitude)); return START_NOT_STICKY; }
Source:
<code>public void wrongKeyTypeThrowsException() throws IllegalAccessException, InstantiationException, LegalSPITesterException { kvStore2 = factory.newStore(); V value = factory.createValue(1); try { if (this.factory.getKeyType() == String.class) { kvStore2.putIfAbsent(1.0f, value); } else { kvStore2.putIfAbsent("key", value); } throw new AssertionError("Expected ClassCastException because the key is of the wrong type"); } catch (CacheAccessException cae) { <START> assertThat(cae.getCause(), instanceOf(ClassCastException.class)); <END> throw new LegalSPITesterException("Warning, an exception is thrown due to the SPI test"); } }</code><technical_language>Wait, changes test semantics. do if is a ClassCastException throw otherwise</technical_language>

Target:
public void wrongKeyTypeThrowsException() throws IllegalAccessException, InstantiationException, LegalSPITesterException { kvStore2 = factory.newStore(); V value = factory.createValue(1); try { if (this.factory.getKeyType() == String.class) { kvStore2.putIfAbsent(1.0f, value); } else { kvStore2.putIfAbsent("key", value); } throw new AssertionError("Expected ClassCastException because the key is of the wrong type"); } catch (ClassCastException e) { } catch (CacheAccessException e) { throw new LegalSPITesterException("Warning, an exception is thrown due to the SPI test"); } }
Source:
<code>public static TimestampIncrementingOffset fromMap(Map<String, ?> map) { TimestampIncrementingOffset offset = new TimestampIncrementingOffset(); if (map == null || map.isEmpty()) return offset; Object incr = map.get(INCREMENTING_FIELD); if (incr != null) offset.setIncrementingOffset((Long) incr); Object millis = map.get(TIMESTAMP_MILLIS_FIELD); if (millis != null) { Timestamp ts = new Timestamp((Long) millis); <START> ts.setNanos((Integer) map.get(TIMESTAMP_NANOS_FIELD)); <END> offset.setTimestampOffset(ts); } return offset; }</code><technical_language>For backwards-compat: this field missing</technical_language>

Target:
public static TimestampIncrementingOffset fromMap(Map<String, ?> map) { if (map == null || map.isEmpty()) return new TimestampIncrementingOffset(null, null); Long incr = (Long) map.get(INCREMENTING_FIELD); Long millis = (Long) map.get(TIMESTAMP_FIELD); Timestamp ts = null; if (millis != null) { ts = new Timestamp(millis); Integer nanos = (Integer) map.get(TIMESTAMP_NANOS_FIELD); if (nanos != null) ts.setNanos(nanos); } return new TimestampIncrementingOffset(ts, incr); }
Source:
<code>public void testUnmarshallTopLevelEmptyEventProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_CATCHING_INTERMEDIATE_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); IntermediateConditionalEvent emptyTopEvent = getCatchingIntermediateNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, HAS_NO_OUTGOING_EDGE); assertGeneralSet(emptyTopEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); assertConditionalEventExecutionSet(emptyTopEvent.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT_DEFAULT_VALUE, CONDITION_EXPRESSION_LANGUAGE, CONDITION_ERPRESSION_TYPE, CANCELLING, <START> ""); <END> }</code><technical_language>suggestion EMPTY_VALUE);</technical_language>

Target:
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_CATCHING_INTERMEDIATE_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); IntermediateConditionalEvent emptyTopEvent = getCatchingIntermediateNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, HAS_NO_OUTGOING_EDGE); assertGeneralSet(emptyTopEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); assertConditionalEventExecutionSet(emptyTopEvent.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT_DEFAULT_VALUE, CONDITION_EXPRESSION_LANGUAGE, CONDITION_ERPRESSION_TYPE, CANCELLING, EMPTY_VALUE); }
Source:
<code>public void setOpenFLPath(String openFLPath) { removeListener(); if (openFLPath.isEmpty()) { openFLPath = "project.xml"; } final VirtualFile projectXmlFile = VirtualFileManager.getInstance().findFileByUrl(openFLPath); if (projectXmlFile != null) { myAdapter = new VirtualFileAdapter() { @Override public void contentsChanged(@NotNull VirtualFileEvent event) { super.contentsChanged(event); if (event.getFile().equals(projectXmlFile)) { <START> HaxeCompilerCompletionContributor.clearOpenFLDisplayArguments(); <END> } } }; VirtualFileManager.getInstance().addVirtualFileListener(myAdapter); } }</code><technical_language>clear of cache entries. listening to. Otherwise, this is slow for large projects (such TiVo's :-). So, pass a key here</technical_language>

Target:
public void setOpenFLPath(String openFLPath) { removeListener(); if (moduleSettings.getBuildConfig() != HaxeModuleSettingsBaseImpl.USE_OPENFL) { return; } if (openFLPath.isEmpty()) { openFLPath = "project.xml"; } final VirtualFile projectXmlFile = VirtualFileManager.getInstance().findFileByUrl(openFLPath); if (projectXmlFile != null) { myAdapter = new VirtualFileAdapter() { @Override public void contentsChanged(@NotNull VirtualFileEvent event) { super.contentsChanged(event); if (event.getFile().equals(projectXmlFile)) { String targetFlag = moduleSettings.getOpenFLTarget().getTargetFlag(); HaxeCompilerCompletionContributor.clearOpenFLDisplayArguments(mMyModule, targetFlag); } } }; VirtualFileManager.getInstance().addVirtualFileListener(myAdapter); } }
Source:
<code><START> public <S extends ReadSupport> ParquetInputFormat(Class<S> readSupportClass) { <END> this.readSupportClass = readSupportClass; }</code><technical_language>type parameter T dropped here</technical_language>

Target:
public <S extends ReadSupport<T>> ParquetInputFormat(Class<S> readSupportClass) { this.readSupportClass = readSupportClass; }