auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void setUp() throws IOException { tmpFolder = new File(InstrumentationRegistry.getTargetContext().getCacheDir(), "ListProjectFilesTestTmp"); <START> if (tmpFolder.exists()) { <END> StorageOperations.deleteDir(tmpFolder); } tmpFolder.mkdirs(); if (EXTERNAL_STORAGE_ROOT_DIRECTORY.exists()) { StorageOperations.deleteDir(EXTERNAL_STORAGE_ROOT_DIRECTORY); } EXTERNAL_STORAGE_ROOT_DIRECTORY.mkdirs(); }</code><technical_language>good catch below! **BUT** aware if (tmpFolder.isDirectory()) { ... } instead of if (tmpFolder.exists()) { ... } if want is a directory delete (deleting a file StorageOperations.deleteDir( is IOException), if exception is want changing some more obvious is want</technical_language>

Target:
public void setUp() throws IOException { tmpFolder = new File(InstrumentationRegistry.getTargetContext().getCacheDir(), "ListProjectFilesTestTmp"); if (tmpFolder.isDirectory()) { StorageOperations.deleteDir(tmpFolder); } tmpFolder.mkdirs(); if (EXTERNAL_STORAGE_ROOT_DIRECTORY.isDirectory()) { StorageOperations.deleteDir(EXTERNAL_STORAGE_ROOT_DIRECTORY); } EXTERNAL_STORAGE_ROOT_DIRECTORY.mkdirs(); }
Source:
<code>public void validateAndImportCertificate() throws CertificateManagerException { if (isHashTokenEmpty()) { <START> if (service.validateTrustStorePassKey(trustStorePasskey)) { <END> String hashToken = service.getHashToken(trustStorePasskey); saveHashToken(hashToken); RequestContext.getCurrentInstance().execute("PF('importPassKeyDlg').hide();"); importSelectedCertificate(hashToken); } else { HelperUtil.addMessageError(IMPORT_PASS_ERR_MSG_ID, INVALID_PASS_ERR_MSG); } } else { importSelectedCertificate(getHashTokenFromSession()); } trustStorePasskey = null; }</code><technical_language>similar issue here. remove validation in client</technical_language>

Target:
public void validateAndImportCertificate() throws CertificateManagerException { if (isHashTokenEmpty()) { String hashToken = service.getHashToken(trustStorePasskey); if (importSelectedCertificate(hashToken)) { saveHashToken(hashToken); RequestContext.getCurrentInstance().execute("PF('importPassKeyDlg').hide();"); } else { HelperUtil.addMessageError(IMPORT_PASS_ERR_MSG_ID, BAD_MISMATCH_TOKEN); } } else { importSelectedCertificate(getHashTokenFromSession()); } trustStorePasskey = null; }
Source:
<code>public <START> static <END> IObservableList<Object> emptyObservableList() { return emptyObservableList(Realm.getDefault(), null); }</code><technical_language>This method parameterized similar Collections.emptyList() for other emptyObservable* methods</technical_language>

Target:
public static <E> IObservableList<E> emptyObservableList() { return emptyObservableList(Realm.getDefault(), null); }
Source:
<code>public static void refreshPackages(Bundle[] bundles) { FrameworkWiring wiring = context.getBundle(Constants.SYSTEM_BUNDLE_LOCATION).adapt(FrameworkWiring.class); final boolean[] flag = new boolean[] { false }; FrameworkListener listener = event -> { if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) { synchronized (flag) { flag[0] = true; flag.notifyAll(); } } }; <START> context.addFrameworkListener(listener); <END> wiring.refreshBundles(asList(bundles)); synchronized (flag) { while (!flag[0]) { try { flag.wait(); } catch (InterruptedException e) { } } } context.removeFrameworkListener(listener); }</code><technical_language>FrameworkWiring.refreshBundles a listener avoid add/remove FrameworkListener calls here</technical_language>

Target:
public static void refreshPackages(Bundle[] bundles) { FrameworkWiring wiring = context.getBundle(Constants.SYSTEM_BUNDLE_LOCATION).adapt(FrameworkWiring.class); final boolean[] flag = new boolean[] { false }; FrameworkListener listener = event -> { if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) { synchronized (flag) { flag[0] = true; flag.notifyAll(); } } }; wiring.refreshBundles(asList(bundles), listener); synchronized (flag) { while (!flag[0]) { try { flag.wait(); } catch (InterruptedException e) { } } } }
Source:
<code>public synchronized void primaryResult(Address from, Object value, boolean success) { Collector<Response> collector = primaryCollectors.get(from); if (trace) { log.tracef("[Collector#%s] PutMap Primary ACK. Address=%s. TopologyId=%s (expected=%s).", <START> id, from, topologyId, this.topologyId); <END> } collector.primaryResult(success ? SuccessfulResponse.create(value) : UnsuccessfulResponse.create(value), success); if (unsolicitedAcks != null) { unsolicitedAcks.removeIf(pendingAcks::remove); } if (pendingAcks.isEmpty()) { acksFuture.complete(null); } }</code><technical_language>topology id needed</technical_language>

Target:
public synchronized void primaryResult(Address from, Object value, boolean success) { Collector<Response> collector = primaryCollectors.get(from); if (trace) { log.tracef("[Collector#%s] PutMap Primary ACK. Address=%s", id, from); } collector.primaryResult(success ? SuccessfulResponse.create(value) : UnsuccessfulResponse.create(value), success); if (unsolicitedAcks != null) { unsolicitedAcks.removeIf(pendingAcks::remove); } if (pendingAcks.isEmpty()) { acksFuture.complete(null); } }
Source:
<code>@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); TcpDiscoverySpi discoverySpi = (TcpDiscoverySpi)cfg.getDiscoverySpi(); <START> discoverySpi.setIpFinder(ipFinder); <END> TestRecordingCommunicationSpi commSpi = new TestRecordingCommunicationSpi(); cfg.setCommunicationSpi(commSpi); DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true)) .setWalMode(WALMode.LOG_ONLY); cfg.setDataStorageConfiguration(memCfg); CacheConfiguration<Integer, byte[]> ccfg1 = new CacheConfiguration<>(); ccfg1.setName(CACHE_1_NAME); ccfg1.setBackups(1); ccfg1.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); ccfg1.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); ccfg1.setAffinity(new RendezvousAffinityFunction(false, 32)); destroyCacheCfg = ccfg1; CacheConfiguration<Integer, byte[]> ccfg2 = new CacheConfiguration<>(); ccfg2.setName(CACHE_2_NAME); ccfg2.setBackups(1); ccfg2.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); ccfg2.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); ccfg2.setAffinity(new RendezvousAffinityFunction(false, 32)); surviveCacheCfg = ccfg2; cfg.setCacheConfiguration(ccfg1, ccfg2); return cfg; }</code><technical_language>default in master sharedStaticIpFinder = new TcpDiscoveryVmIpFinder(true);</technical_language>

Target:
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); TestRecordingCommunicationSpi commSpi = new TestRecordingCommunicationSpi(); cfg.setCommunicationSpi(commSpi); DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true)) .setWalMode(WALMode.LOG_ONLY); cfg.setDataStorageConfiguration(memCfg); CacheConfiguration<Integer, byte[]> ccfg1 = new CacheConfiguration<>(); ccfg1.setName(CACHE_1_NAME); ccfg1.setBackups(1); ccfg1.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); ccfg1.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); ccfg1.setAffinity(new RendezvousAffinityFunction(false, 32)); destroyCacheCfg = ccfg1; CacheConfiguration<Integer, byte[]> ccfg2 = new CacheConfiguration<>(); ccfg2.setName(CACHE_2_NAME); ccfg2.setBackups(1); ccfg2.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); ccfg2.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); ccfg2.setAffinity(new RendezvousAffinityFunction(false, 32)); surviveCacheCfg = ccfg2; cfg.setCacheConfiguration(ccfg1, ccfg2); return cfg; }
Source:
<code>@Override public void accept(long pageId, ByteBuffer buf) { assert buf.position() == 0 : buf.position(); assert buf.order() == ByteOrder.nativeOrder() : buf.order(); if (fileIo == null) { lock.writeLock().lock(); try { if (stopped()) return; if (fileIo == null) fileIo = factory.create(deltaFile); } catch (IOException e) { exCons.accept(e); } finally { lock.writeLock().unlock(); } } lock.readLock().lock(); try { if (stopped()) return; if (checkpointComplete.getAsBoolean()) { int pageIdx = PageIdUtils.pageIndex(pageId); if (!pagesWrittenBits.touch(pageIdx)) return; final ByteBuffer locBuf = localBuff.get(); assert locBuf.capacity() == store.getPageSize(); locBuf.clear(); if (!store.read(pageId, locBuf, true)) return; locBuf.flip(); writePage0(pageId, locBuf); } else { <START> writePage0(pageId, buf); <END> } } catch (Throwable ex) { exCons.accept(ex); } finally { lock.readLock().unlock(); } }</code><technical_language>need mark page written (pagesWrittenBits.touch(pageIdx))</technical_language>

Target:
@Override public void accept(long pageId, ByteBuffer buf) { assert buf.position() == 0 : buf.position(); assert buf.order() == ByteOrder.nativeOrder() : buf.order(); if (deltaFileIo == null) { lock.writeLock().lock(); try { if (stopped()) return; if (deltaFileIo == null) deltaFileIo = ioFactory.create(deltaFile); } catch (IOException e) { acceptException(e); } finally { lock.writeLock().unlock(); } } int pageIdx = -1; lock.readLock().lock(); try { if (stopped()) return; pageIdx = PageIdUtils.pageIndex(pageId); if (checkpointComplete.getAsBoolean()) { if (!writtenPages.touch(pageIdx)) return; final ByteBuffer locBuf = locBuff.get(); assert locBuf.capacity() == store.getPageSize(); locBuf.clear(); if (!store.read(pageId, locBuf, true)) return; locBuf.flip(); writePage0(pageId, locBuf); } else { writePage0(pageId, buf); writtenPages.touch(pageIdx); } } catch (Throwable ex) { acceptException(new IgniteCheckedException("Error during writing pages to delta partition file " + "[pageIdx=" + pageIdx + ", writer=" + this + ']', ex)); } finally { lock.readLock().unlock(); } }
Source:
<code>protected IkasanSolrDocumentSearchResults searchBase(Set<String> moduleName, Set<String> flowNames, Set<String> componentNames , String eventId, String searchString, long startTime, long endTime, int offset, int resultSize, List<String> entityTypes, boolean negateQuery , String sortField, String sortOrder) { SolrQuery query = new SolrQuery(); query.setStart(offset); query.setRows(resultSize); if(sortField != null && !sortField.isEmpty() && sortOrder != null && !sortOrder.isEmpty()) { if(sortOrder.equals("DESCENDING")) { query.setSort(sortField, SolrQuery.ORDER.desc); } else { query.setSort(sortField, SolrQuery.ORDER.asc); } } else { query.setSort(CREATED_DATE_TIME, SolrQuery.ORDER.desc); } String queryFilter; try { queryFilter = super.buildQuery(moduleName, flowNames, componentNames, new Date(startTime), new Date(endTime), searchString, eventId, entityTypes, negateQuery); } catch (IOException e) { throw new RuntimeException(String.format("An error has occurred building Sorl query.", e.getMessage())); } query.setQuery(queryFilter); try { <START> logger.info("query: " + query); <END> QueryRequest req = new QueryRequest(query); req.setBasicAuthCredentials(this.solrUsername, this.solrPassword); QueryResponse rsp = req.process(this.solrClient, SolrConstants.CORE); List<IkasanSolrDocument> beans = rsp.getBeans(IkasanSolrDocument.class); return new IkasanSolrDocumentSearchResults(beans, rsp.getResults().getNumFound(), rsp.getQTime()); } catch (Exception e) { throw new RuntimeException("Caught exception perform general ikasan search!", e); } }</code><technical_language>revert debug</technical_language>

Target:
protected IkasanSolrDocumentSearchResults searchBase(Set<String> moduleName, Set<String> flowNames, Set<String> componentNames , String eventId, String searchString, long startTime, long endTime, int offset, int resultSize, List<String> entityTypes, boolean negateQuery , String sortField, String sortOrder) { SolrQuery query = new SolrQuery(); query.setStart(offset); query.setRows(resultSize); if(sortField != null && !sortField.isEmpty() && sortOrder != null && !sortOrder.isEmpty()) { if(sortOrder.equals("DESCENDING")) { query.setSort(sortField, SolrQuery.ORDER.desc); } else { query.setSort(sortField, SolrQuery.ORDER.asc); } } else { query.setSort(CREATED_DATE_TIME, SolrQuery.ORDER.desc); } String queryFilter; try { queryFilter = super.buildQuery(moduleName, flowNames, componentNames, new Date(startTime), new Date(endTime), searchString, eventId, entityTypes, negateQuery); } catch (IOException e) { throw new RuntimeException(String.format("An error has occurred building Sorl query.", e.getMessage())); } query.setQuery(queryFilter); try { logger.debug("query: " + query); QueryRequest req = new QueryRequest(query); req.setBasicAuthCredentials(this.solrUsername, this.solrPassword); QueryResponse rsp = req.process(this.solrClient, SolrConstants.CORE); List<IkasanSolrDocument> beans = rsp.getBeans(IkasanSolrDocument.class); return new IkasanSolrDocumentSearchResults(beans, rsp.getResults().getNumFound(), rsp.getQTime()); } catch (Exception e) { throw new RuntimeException("Caught exception perform general ikasan search!", e); } }
Source:
<code>public void sweepsOnlyThePrescribedNumberOfBatchesAtATime() { for (int partition = 0; partition < readBatchSize + 1; partition++) { enqueueWriteCommitted(TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(partition)); enqueueWriteCommitted(TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(partition) + 1); } <START> enqueueWriteCommitted(TABLE_CONS, TS_FINE_GRANULARITY); <END> sweepNextBatch(ShardAndStrategy.conservative(CONS_SHARD)); assertReadAtTimestampReturnsSentinel( TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(readBatchSize - 1)); assertTestValueEnqueuedAtGivenTimestampStillPresent( TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(readBatchSize - 1) + 1); assertTestValueEnqueuedAtGivenTimestampStillPresent( TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(readBatchSize)); }</code><technical_language>removed</technical_language>

Target:
public void sweepsOnlyThePrescribedNumberOfBatchesAtATime() { for (int partition = 0; partition < readBatchSize + 1; partition++) { enqueueWriteCommitted(TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(partition)); enqueueWriteCommitted(TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(partition) + 1); } sweepNextBatch(ShardAndStrategy.conservative(CONS_SHARD)); assertReadAtTimestampReturnsSentinel( TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(readBatchSize - 1)); assertTestValueEnqueuedAtGivenTimestampStillPresent( TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(readBatchSize - 1) + 1); assertTestValueEnqueuedAtGivenTimestampStillPresent( TABLE_CONS, LOW_TS + SweepQueueUtils.minTsForFinePartition(readBatchSize)); }
Source:
<code>private void addSELinuxModes(VersionCaps version, SELinuxMode[] values) { if (VersionUtils.greaterOrEqual(version, VERSION_3_5)) { version.setSelinuxModes(new SELinuxModes()); for (SELinuxMode mode: values) { <START> version.getSelinuxModes().getSELinuxModes().add(mode.toString().toLowerCase()); <END> } } }</code><technical_language>This be, need convert case part of "value()" implementation of SELinuxMode</technical_language>

Target:
private void addSELinuxModes(VersionCaps version, SELinuxMode[] values) { if (VersionUtils.greaterOrEqual(version, VERSION_3_5)) { version.setSelinuxModes(new SELinuxModes()); for (SELinuxMode mode: values) { version.getSelinuxModes().getSELinuxModes().add(mode.value()); } } }
Source:
<code>private Task getOptimizeInputTask(RelNode rel, RelSubset group) { if (!rel.getTraitSet().satisfies(group.getTraitSet())) { RelNode passThroughRel = convert(rel, group); if (passThroughRel == null) { <START> if (LOGGER.isDebugEnabled()) { <END> LOGGER.debug("Skip optimizing because of traits: {}", rel); } return null; } final RelNode finalPassThroughRel = passThroughRel; applyGenerator(null, () -> planner.register(finalPassThroughRel, group)); rel = passThroughRel; } boolean unProcess = false; for (RelNode input : rel.getInputs()) { RelOptCost winner = ((RelSubset) input).getWinnerCost(); if (winner == null) { unProcess = true; break; } } if (!unProcess) { return new DeriveTrait(rel, group); } if (rel.getInputs().size() == 1) { return new OptimizeInput1(rel, group); } return new OptimizeInputs(rel, group); }</code><technical_language>check if (LOGGER.isDebugEnabled()) { is redundant</technical_language>

Target:
private Task getOptimizeInputTask(RelNode rel, RelSubset group) { if (!rel.getTraitSet().satisfies(group.getTraitSet())) { RelNode passThroughRel = convert(rel, group); if (passThroughRel == null) { LOGGER.debug("Skip optimizing because of traits: {}", rel); return null; } final RelNode finalPassThroughRel = passThroughRel; applyGenerator(null, () -> planner.register(finalPassThroughRel, group)); rel = passThroughRel; } boolean unProcess = false; for (RelNode input : rel.getInputs()) { RelOptCost winner = ((RelSubset) input).getWinnerCost(); if (winner == null) { unProcess = true; break; } } if (!unProcess) { return new DeriveTrait(rel, group); } if (rel.getInputs().size() == 1) { return new OptimizeInput1(rel, group); } return new OptimizeInputs(rel, group); }
Source:
<code>private void assertJobStatus(String jobId, Status status) { if (status == Status.FAILED || status == Status.KILLED || status == Status.SUSPENDED) { <START> try { <END> log.error(oozieClient.getJobLog(jobId)); } catch (OozieClientException e) { log.warn("Unable to check oozie job log"); } Assert.fail("Job has finished with status: " + status); } log.info("Job has finished sucessfully"); }</code><technical_language>moving this 'try catch' a separate private method? in waitForJobFinish</technical_language>

Target:
private void assertJobStatus(String jobId, Status status) { if (status == Status.FAILED || status == Status.KILLED || status == Status.SUSPENDED) { printOozieJobLog(jobId); Assert.fail("Job has finished with status: " + status); } log.info("Job has finished sucessfully"); }
Source:
<code>public boolean isNormalCube(BlockState state, IBlockReader world, BlockPos pos) { <START> return notNormalBlock; END> }</code><technical_language>right, a copy-paste error</technical_language>

Target:
public boolean isNormalCube(BlockState state, IBlockReader world, BlockPos pos) { return !notNormalBlock; }
Source:
<code>public Object visitValuesCommand(InvocationContext ctx, ValuesCommand command) throws Throwable { Object values = super.visitValuesCommand(ctx, command); if (enabled && !shouldSkipCacheLoader(command)) { final ConcurrentHashSet<Object> processedKeys = new ConcurrentHashSet<Object>(); final List<Object> result = new ArrayList<Object>(); persistenceManager.processOnAllStores(new CollectionKeyFilter(processedKeys), new AdvancedCacheLoader.CacheLoaderTask() { @Override public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException { processedKeys.add(marshalledEntry.getKey()); <START> synchronized (result) { <END> result.add(marshalledEntry.getValue()); } } }, true, false); result.addAll((Collection<Object>)values); return Collections.unmodifiableList(result); } return values; }</code><technical_language>I wondering a ConcurrentLinkedQueue instead? is a collection provides duplicates in a blocking fashion</technical_language>

Target:
public Object visitValuesCommand(InvocationContext ctx, ValuesCommand command) throws Throwable { Object values = super.visitValuesCommand(ctx, command); if (enabled && !shouldSkipCacheLoader(command)) { final ConcurrentLinkedQueue<Object> result = new ConcurrentLinkedQueue<Object>(); persistenceManager.processOnAllStores(null, new AdvancedCacheLoader.CacheLoaderTask() { @Override public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException { result.add(marshalledEntry.getValue()); } }, true, false); result.addAll((Collection<Object>)values); return result; } return values; }
Source:
<code><START> static Application toV4ApplicationDto(final ApplicationEntity applicationEntity) { <END> final ApplicationMetadata.Builder metadataBuilder = new ApplicationMetadata.Builder( applicationEntity.getName(), applicationEntity.getUser(), applicationEntity.getStatus() ) .withVersion(applicationEntity.getVersion()) .withTags(applicationEntity.getTags().stream().map(TagEntity::getTag).collect(Collectors.toSet())); applicationEntity.getType().ifPresent(metadataBuilder::withType); applicationEntity.getDescription().ifPresent(metadataBuilder::withDescription); setDtoMetadata(metadataBuilder, applicationEntity); return new Application( applicationEntity.getUniqueId(), applicationEntity.getCreated(), applicationEntity.getUpdated(), new ExecutionEnvironment( applicationEntity.getConfigs().stream().map(FileEntity::getFile).collect(Collectors.toSet()), applicationEntity.getDependencies().stream().map(FileEntity::getFile).collect(Collectors.toSet()), applicationEntity.getSetupFile().isPresent() ? applicationEntity.getSetupFile().get().getFile() : null ), metadataBuilder.build() ); }</code><technical_language>static conversion hard mock in unit-tests this.</technical_language>

Target:
public static Application toV4ApplicationDto(final ApplicationEntity applicationEntity) { final ApplicationMetadata.Builder metadataBuilder = new ApplicationMetadata.Builder( applicationEntity.getName(), applicationEntity.getUser(), applicationEntity.getStatus() ) .withTags(applicationEntity.getTags().stream().map(TagEntity::getTag).collect(Collectors.toSet())); applicationEntity.getVersion().ifPresent(metadataBuilder::withVersion); applicationEntity.getType().ifPresent(metadataBuilder::withType); applicationEntity.getDescription().ifPresent(metadataBuilder::withDescription); setDtoMetadata(metadataBuilder, applicationEntity); return new Application( applicationEntity.getUniqueId(), applicationEntity.getCreated(), applicationEntity.getUpdated(), new ExecutionEnvironment( applicationEntity.getConfigs().stream().map(FileEntity::getFile).collect(Collectors.toSet()), applicationEntity.getDependencies().stream().map(FileEntity::getFile).collect(Collectors.toSet()), applicationEntity.getSetupFile().isPresent() ? applicationEntity.getSetupFile().get().getFile() : null ), metadataBuilder.build() ); }
Source:
<code>public static Parameter instantiate(SerializationStreamReader reader) throws SerializationException { UUID uuid = UUID_CustomFieldSerializer.instantiate(reader); <START> return Parameter.getByUuid(uuid.toString()); <END> }</code><technical_language>reason for uuid temp parameter :)</technical_language>

Target:
public static Parameter instantiate(SerializationStreamReader reader) throws SerializationException { return Parameter.getByUuid(UUID_CustomFieldSerializer.instantiate(reader).toString()); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof NetworkView)) { return false; } NetworkView other = (NetworkView) obj; if (getCompatibilityVersion() == null) { if (other.getCompatibilityVersion() != null) { return false; } } else if (!getCompatibilityVersion().equals(other.getCompatibilityVersion())) { return false; } if (getDataCenterName() == null) { if (other.getDataCenterName() != null) { return false; } } else if (!getDataCenterName().equals(other.getDataCenterName())) { return false; } <START> if (Objects.equals(getProviderName(), other.getProviderName())) { return false; } <END> if (Objects.equals(getQosName(), other.getQosName())) { return false; } return true; }</code><technical_language>missing</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof NetworkView)) { return false; } NetworkView other = (NetworkView) obj; if (getCompatibilityVersion() == null) { if (other.getCompatibilityVersion() != null) { return false; } } else if (!getCompatibilityVersion().equals(other.getCompatibilityVersion())) { return false; } if (getDataCenterName() == null) { if (other.getDataCenterName() != null) { return false; } } else if (!getDataCenterName().equals(other.getDataCenterName())) { return false; } if (Objects.equals(getProviderName(), other.getProviderName())) { return false; } if (!Objects.equals(getQosName(), other.getQosName())) { return false; } return true; }
Source:
<code>public final Maybe<Integer> findIndex(@Nonnull F<A, Boolean> f) { ImmutableList<A> self = this; int i = 0; while (self instanceof NonEmptyImmutableList) { NonEmptyImmutableList<A> selfNel = (NonEmptyImmutableList<A>) self; <START> boolean result = f.apply(selfNel.head); <END> if (result) { return Maybe.of(i); } self = selfNel.tail(); ++i; } return Maybe.empty(); }</code><technical_language>Inline this</technical_language>

Target:
public final Maybe<Integer> findIndex(@Nonnull F<A, Boolean> f) { ImmutableList<A> self = this; int i = 0; while (self instanceof NonEmptyImmutableList) { NonEmptyImmutableList<A> selfNel = (NonEmptyImmutableList<A>) self; if (f.apply(selfNel.head)) { return Maybe.of(i); } self = selfNel.tail(); ++i; } return Maybe.empty(); }
Source:
<code>public void calcFillSettings(String field, Map<String, Object> attributes) { if (attributes.containsKey("fillUrl")) { super.calcFillSettings(field, attributes); return; } super.calcFillSettings(field, attributes); if (attributes.containsKey("fillUrl")) { try { JellyContext jelly = Functions.getCurrentJellyContext(); Object it = jelly.findVariable("it"); if (it instanceof CredentialsStore) { ModelObject context = ((CredentialsStore) it).getContext(); for (CredentialsSelectHelper.ContextResolver r : ExtensionList .lookup(CredentialsSelectHelper.ContextResolver.class)) { String token = r.getToken(context); if (token != null) { String fillUrl = (String) attributes.get("fillUrl"); <START> if (fillUrl.indexOf('?') != -1) { <END> fillUrl = fillUrl + '&'; } else { fillUrl = fillUrl + '?'; } attributes.put("fillUrl", fillUrl + "$provider=" + r.getClass().getName() + "&" + "$token=" + URLEncoder.encode(token, "UTF-8")); } } } } catch (AssertionError e) { } catch (UnsupportedEncodingException e) { } } }</code><technical_language>Check for null</technical_language>

Target:
public void calcFillSettings(String field, Map<String, Object> attributes) { if (attributes.containsKey("fillUrl")) { super.calcFillSettings(field, attributes); return; } super.calcFillSettings(field, attributes); if (attributes.containsKey("fillUrl")) { try { JellyContext jelly = Functions.getCurrentJellyContext(); Object it = jelly.findVariable("it"); if (it instanceof CredentialsStore) { ModelObject context = ((CredentialsStore) it).getContext(); for (CredentialsSelectHelper.ContextResolver r : ExtensionList .lookup(CredentialsSelectHelper.ContextResolver.class)) { String token = r.getToken(context); if (token != null) { String fillUrl = (String) attributes.get("fillUrl"); if (fillUrl != null) { if (fillUrl.indexOf('?') != -1) { fillUrl = fillUrl + '&'; } else { fillUrl = fillUrl + '?'; } attributes.put("fillUrl", fillUrl + "$provider=" + URLEncoder.encode(r.getClass().getName(), "UTF-8") + "&$token=" + URLEncoder.encode(token, "UTF-8")); } } } } } catch (AssertionError e) { } catch (UnsupportedEncodingException e) { } } }
Source:
<code>@Override public @Nullable IStrategoTerm invoke(ILanguageImpl impl, IContext context, IStrategoTerm input, String strategy) throws MetaborgException { List<MetaborgException> exceptions = Lists.newArrayList(); for(ILanguageComponent component : impl.components()) { <START> if(component.facet(DynamicClassLoadingFacet.class) == null) { <END> continue; } final HybridInterpreter runtime = strategoRuntimeService.runtime(component, context, true); try { final IStrategoTerm result = invoke(runtime, input, strategy); return result; } catch(MetaborgException ex) { exceptions.add(ex); } } throw new AggregateMetaborgException(exceptions); }</code><technical_language>This method next same. refactor out commonalities? Also, I this method call invoke(ILanguageComponent, IContext, IStrategoTerm, String) instead</technical_language>

Target:
@Override public @Nullable IStrategoTerm invoke(ILanguageImpl impl, IContext context, IStrategoTerm input, String strategy) throws MetaborgException { List<MetaborgException> exceptions = Lists.newArrayList(); for(ILanguageComponent component : impl.components()) { if(!IStrategoCommon.hasStrategoFacets(component)) { continue; } final HybridInterpreter runtime = strategoRuntimeService.runtime(component, context, true); try { final IStrategoTerm result = invoke(runtime, input, strategy); return result; } catch(MetaborgException ex) { exceptions.add(ex); } } throw new AggregateMetaborgException(exceptions); }
Source:
<code>public String getPortalLogo() { <START> return SchedulerImagesUnbundled.pps_run; <END> }</code><technical_language>Do need methods return a public static field ? access</technical_language>

Target:
public String getPortalLogo() { return SchedulerImagesUnbundled.PPS_RUN; }
Source:
<code>public Map<String, Object> verifyToken(String token) { Objects.requireNonNull(token); Algorithm algorithm = getAlgorithm(); if (algorithm == null) { log.debug("secret not configured, cannot verify token"); return null; } JWTVerifier verifier = JWT.require(algorithm) .withIssuer(NUXEO_ISSUER) .build(); DecodedJWT jwt; try { jwt = verifier.verify(token); } catch (JWTVerificationException e) { if (log.isTraceEnabled()) { log.trace("token verification failed: " + e.toString()); } return null; } Object payload = getFieldValue(jwt, "payload"); Map<String, JsonNode> tree = getFieldValue(payload, "tree"); Map<String, Object> claims = new HashMap<>(); for (Entry<String, JsonNode> es : tree.entrySet()) { claims.put(es.getKey(), nodeToValue(es.getValue())); <START> } <END> return claims; }</code><technical_language>replaced Map<String, Object> claims = tree.entrySet().stream().collect(Collectors.toMap(Entry::getKey, e -> nodeToValue(e.getValue())))</technical_language>

Target:
public Map<String, Object> verifyToken(String token) { Objects.requireNonNull(token); Algorithm algorithm = getAlgorithm(); if (algorithm == null) { log.debug("secret not configured, cannot verify token"); return null; } JWTVerifier verifier = JWT.require(algorithm) .withIssuer(NUXEO_ISSUER) .build(); DecodedJWT jwt; try { jwt = verifier.verify(token); } catch (JWTVerificationException e) { if (log.isTraceEnabled()) { log.trace("token verification failed: " + e.toString()); } return null; } Object payload = getFieldValue(jwt, "payload"); Map<String, JsonNode> tree = getFieldValue(payload, "tree"); return tree.entrySet().stream().collect(toMap(Entry::getKey, e -> nodeToValue(e.getValue()))); }
Source:
<code>public boolean match(Name name) { <START> if (patterns.stream().anyMatch(pattern -> name.getUrn().startsWith(pattern))) { return true; <END> } return false; }</code><technical_language>returning result of patterns.stream().anyMatch(pattern -> name.getUrn().startsWith(pattern))</technical_language>

Target:
public boolean match(Name name) { return patterns.stream().anyMatch(pattern -> name.getUrn().startsWith(pattern)); }
Source:
<code>private boolean isOffsetUsed(final int bucketOffset) { <START> return tableMemory.getByte(bucketOffset) == 1; <END> }</code><technical_language>== USED_BYTE</technical_language>

Target:
private boolean isOffsetUsed(final int bucketOffset) { return tableMemory.getByte(bucketOffset) == USED_BYTE; }
Source:
<code>default boolean await(Duration timeout) throws IOException { <START> return await(timeout.toMillis()); <END> }</code><technical_language>In other locations code interprets null *forever* - maintain this convention (or fix other code - ClientChannel#waitFor)</technical_language>

Target:
default boolean await(Duration timeout) throws IOException { return timeout != null ? await(timeout.toMillis()) : await(); }
Source:
<code>private void onProxyOverrideComplete() { <START> WebView webView = <END> findViewById(R.id.proxy_override_webview); webView.setWebChromeClient(new WebChromeClient() { @Override public void onReceivedTitle(WebView view, String title) { Log.w(TAG, "Title received: " + title); } }); webView.loadUrl("<LINK_0>"); }</code><technical_language>If loading www.google.com, need enable JavaScript</technical_language>

Target:
private void onProxyOverrideComplete() { mWebView.loadUrl("<LINK_1>"); }
Source:
<code>public void writeColumnDefinition(Appendable out) throws IOException { out.append(" <Column ss:Width=\""); <START> out.append(String.valueOf(columnWidth)); <END> if (styleId != null) { out.append("\" ss:StyleID=\""); out.append(styleId); } out.append("\"/>\n"); }</code><technical_language>Strings.isValid(styleId)</technical_language>

Target:
public void writeColumnDefinition(Appendable out) throws IOException { out.append(" <Column ss:Width=\""); out.append(String.valueOf(columnWidth)); if (Strings.isValid(styleId)) { out.append("\" ss:StyleID=\""); out.append(styleId); } out.append("\"/>\n"); }
Source:
<code>public WinConnection(String host, String username, String password) { this.host = host; this.username = username; this.password = password; this.smbclient = new SMBClient(); <START> this.authentication = new AuthenticationContext(username, password.toCharArray(), null);; <END> }</code><technical_language>suggestion this.authentication = new AuthenticationContext(username, password.toCharArray(), null);</technical_language>

Target:
public WinConnection(String host, String username, String password) { this.host = host; this.username = username; this.password = password; this.smbclient = new SMBClient(); this.authentication = new AuthenticationContext(username, password.toCharArray(), null); }
Source:
<code>public TaskInfo updateTask( Session session, Optional<PlanFragment> fragment, List<TaskSource> sources, OutputBuffers outputBuffers, BlockEncodingSerde blockEncodingSerde) { try { outputBuffer.setOutputBuffers(outputBuffers); SqlTaskExecution taskExecution; synchronized (this) { TaskHolder taskHolder = taskHolderReference.get(); if (taskHolder.isFinished()) { return taskHolder.getFinalTaskInfo(); } taskExecution = taskHolder.getTaskExecution(); if (taskExecution == null) { checkState(fragment.isPresent(), "fragment must be present"); <START> if (fragment.get().getRoot() instanceof OutputNode) { <END> TaskClientOutputContext clientOutputContext = new TaskClientOutputContext( fragment.get().getTypes(), new PagesSerdeFactory(blockEncodingSerde, isExchangeCompressionEnabled(session)).createPagesSerde(), session.toConnectorSession()); this.clientOutputContext.set(Optional.of(clientOutputContext)); } taskExecution = sqlTaskExecutionFactory.create(session, queryContext, taskStateMachine, outputBuffer, fragment.get(), sources); taskHolderReference.compareAndSet(taskHolder, new TaskHolder(taskExecution)); needsPlan.set(false); } } if (taskExecution != null) { taskExecution.addSources(sources); } } catch (Error e) { failed(e); throw e; } catch (RuntimeException e) { failed(e); } return getTaskInfo(); }</code><technical_language>add a check state clientOutputContext is set</technical_language>

Target:
public TaskInfo updateTask( Session session, Optional<PlanFragment> fragment, List<TaskSource> sources, OutputBuffers outputBuffers, BlockEncodingSerde blockEncodingSerde) { try { outputBuffer.setOutputBuffers(outputBuffers); SqlTaskExecution taskExecution; synchronized (this) { TaskHolder taskHolder = taskHolderReference.get(); if (taskHolder.isFinished()) { return taskHolder.getFinalTaskInfo(); } taskExecution = taskHolder.getTaskExecution(); if (taskExecution == null) { checkState(fragment.isPresent(), "fragment must be present"); if (!clientOutputContext.get().isPresent() && fragment.get().getRoot() instanceof OutputNode) { TaskClientOutputContext clientOutputContext = new TaskClientOutputContext( fragment.get().getTypes(), new PagesSerdeFactory(blockEncodingSerde, isExchangeCompressionEnabled(session)).createPagesSerde(), session.toConnectorSession()); this.clientOutputContext.set(Optional.of(clientOutputContext)); } taskExecution = sqlTaskExecutionFactory.create(session, queryContext, taskStateMachine, outputBuffer, fragment.get(), sources); taskHolderReference.compareAndSet(taskHolder, new TaskHolder(taskExecution)); needsPlan.set(false); } } if (taskExecution != null) { taskExecution.addSources(sources); } } catch (Error e) { failed(e); throw e; } catch (RuntimeException e) { failed(e); } return getTaskInfo(); }
Source:
<code>public void setUp() throws Exception { String simpleSchema = "create table blah (" + "ival bigint default 0 not null, " + "PRIMARY KEY(ival));"; builder = new VoltProjectBuilder(); builder.addLiteralSchema(simpleSchema); builder.addProcedures(CrashJVM.class); builder.addProcedures(CrashVoltDBProc.class); cluster = new LocalCluster("collect.jar", 2, 1, 0, BackendTarget.NATIVE_EE_JNI); cluster.setHasLocalServer(false); boolean success = cluster.compile(builder); assert (success); File voltDbRoot; cluster.startUp(true); if (cluster.isNewCli()) { <START> voltDbRoot = new File(cluster.getServerSpecificVoltDBRoot("0")); <END> } else { String voltDbFilePrefix = cluster.getSubRoots().get(0).getPath(); voltDbRoot = new File(voltDbFilePrefix, builder.getPathToVoltRoot().getPath()); } m_voltDbRootPath = voltDbRoot.getPath(); listener = cluster.getListenerAddresses().get(0); client = ClientFactory.createClient(); client.createConnection(listener); m_outputFileName = ""; m_pid = getpid(m_voltDbRootPath); m_prefix = ""; System.setProperty("VOLT_JUSTATEST", "true"); }</code><technical_language>Remove changes</technical_language>

Target:
public void setUp() throws Exception { String simpleSchema = "create table blah (" + "ival bigint default 0 not null, " + "PRIMARY KEY(ival));"; builder = new VoltProjectBuilder(); builder.addLiteralSchema(simpleSchema); builder.addProcedures(CrashJVM.class); builder.addProcedures(CrashVoltDBProc.class); cluster = new LocalCluster("collect.jar", 2, 1, 0, BackendTarget.NATIVE_EE_JNI); cluster.setHasLocalServer(false); boolean success = cluster.compile(builder); assert (success); File voltDbRoot; cluster.startUp(true); if (cluster.isNewCli()) { voltDbRoot = new File(cluster.getServerSpecificRoot("0")); } else { String voltDbFilePrefix = cluster.getSubRoots().get(0).getPath(); voltDbRoot = new File(voltDbFilePrefix, builder.getPathToVoltRoot().getPath()); } m_voltDbRootPath = voltDbRoot.getPath(); listener = cluster.getListenerAddresses().get(0); client = ClientFactory.createClient(); client.createConnection(listener); m_outputFileName = ""; m_pid = getpid(m_voltDbRootPath); m_prefix = ""; System.setProperty("VOLT_JUSTATEST", "true"); }
Source:
<code>protected void checkLeftCurly() { <START> checkCurly("lcurly", getLeftCurly()); <END> }</code><technical_language>I assume in this file is same, a code simplification change</technical_language>

Target:
protected void checkLeftCurly() { final DetailAST lcurly = getLeftCurly(); final int lcurlyPos = expandedTabsColumnNo(lcurly); if (!curlyIndent().isAcceptable(lcurlyPos) && isOnStartOfLine(lcurly)) { logError(lcurly, "lcurly", lcurlyPos, curlyIndent()); } }
Source:
<code><START> private AdminClient createAdminClient() { <END> final Properties properties = new Properties(); properties.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, CLUSTER.bootstrapServers()); return AdminClient.create(properties); }</code><technical_language>method static</technical_language>

Target:
private static AdminClient createAdminClient() { final Properties properties = new Properties(); properties.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, CLUSTER.bootstrapServers()); return AdminClient.create(properties); }
Source:
<code>public void tearDown() throws Exception { Intents.release(); <START> TestUtils.deleteProjects(VisualPlacementBrickTest.class.getSimpleName()); <END> }</code><technical_language>Please delete this, a copy/paste error of a previous developer</technical_language>

Target:
public void tearDown() throws Exception { Intents.release(); baseActivityTestRule.finishActivity(); TestUtils.deleteProjects(SpriteActivityVisualPlacementTest.class.getSimpleName()); }
Source:
<code>public Embedding(Dictionary dictionary, Matrix embedding) { <START> this.dictionary = dictionary; <END> this.embedding = embedding; }</code><technical_language>add Objects.requireNonNull() here</technical_language>

Target:
public Embedding(Dictionary dictionary, Matrix embedding) { this.dictionary = Objects.requireNonNull(dictionary); this.embedding = Objects.requireNonNull(embedding); }
Source:
<code>toFilter(ImmutableList<SubjectParameter<?, ?, ?>> params, LogicalOperator logicalOp) { ImmutableList.Builder<Filter> filters = ImmutableList.builder(); for (SubjectParameter<?, ?, ?> parameter : params) { Column<?, ?> column = parameter.column(); ComparisonOperator comparison = parameter.operator(); Object value = parameter.value(); <START> @Nullable Filter filter; <END> switch (comparison) { case EQUALS: filter = eq(column, value); break; case GREATER_THAN: filter = gt(column, value); break; case GREATER_OR_EQUALS: filter = ge(column, value); break; case LESS_THAN: filter = lt(column, value); break; case LESS_OR_EQUALS: filter = le(column, value); break; default: throw newIllegalStateException("Unsupported comparison operator `%s`", comparison); } filters.add(filter); } ImmutableList<Filter> filterList = filters.build(); CompositeFilter compositeFilter = logicalOp == LogicalOperator.AND ? all(filterList) : either(filterList); return compositeFilter; }</code><technical_language>is this Nullable</technical_language>

Target:
toFilter(ImmutableList<SubjectParameter<?, ?, ?>> params, LogicalOperator logicalOp) { ImmutableList.Builder<Filter> filters = ImmutableList.builder(); for (SubjectParameter<?, ?, ?> parameter : params) { Filter filter = asProtoFilter(parameter); filters.add(filter); } ImmutableList<Filter> filterList = filters.build(); CompositeFilter compositeFilter = logicalOp == LogicalOperator.AND ? all(filterList) : either(filterList); return compositeFilter; }
Source:
<code>public String toString() { String returnString = ""; <START> if(eventData !=null) { <END> for (String key: eventData.keySet()){ String value = eventData.get(key); returnString = returnString + key + ": " + value + ", "; } } return returnString; }</code><technical_language>suggestion if (eventData !=null) {</technical_language>

Target:
public String toString() { return eventData.toString(); }
Source:
<code>private Short getShortValue() { if ( realCellValue.getNumericValue() != null ) { return ( Short ) realCellValue.getNumericValue(); } else if ( realCellValue.getStringValue() == null || realCellValue.getStringValue().isEmpty() ) { return null; } else { <START> return new Short( realCellValue.getStringValue() ); <END> } }</code><technical_language>throw NumberFormatException, catch a default (0?) value</technical_language>

Target:
private Short getShortValue() { if ( realCellValue.getNumericValue() != null ) { return ( Short ) realCellValue.getNumericValue(); } else if ( realCellValue.getStringValue() == null || realCellValue.getStringValue().isEmpty() ) { return null; } else { try { return new Short( realCellValue.getStringValue() ); } catch ( final NumberFormatException nfe ) { return null; } } }
Source:
<code>public URI uploadPackage() { if (s3Client.doesObjectExist(bucket, remoteFilePath)) { s3Client.copyObject(bucket, remoteFilePath, bucket, previousVersionFilePath); } try { s3Client.putObject(bucket, remoteFilePath, packageFileHandler); } catch (SdkClientException e) { LOG.log(Level.SEVERE, "Error writing topology package to " + bucket + " " + remoteFilePath, e); return null; } final URL resourceUrl = s3Client.getUrl(bucket, remoteFilePath); LOG.log(Level.INFO, "Package URL: {0}", resourceUrl); if (resourceUrl == null) { LOG.log(Level.SEVERE, "Resource not found for bucket " + bucket + " and path " + remoteFilePath); return null; } try { return resourceUrl.toURI(); } catch (URISyntaxException e) { <START> LOG.log(Level.SEVERE, e.getMessage()); <END> return null; } }</code><technical_language>please include a helpful error message here, including bad field</technical_language>

Target:
public URI uploadPackage() { if (s3Client.doesObjectExist(bucket, remoteFilePath)) { s3Client.copyObject(bucket, remoteFilePath, bucket, previousVersionFilePath); } try { s3Client.putObject(bucket, remoteFilePath, packageFileHandler); } catch (SdkClientException e) { LOG.log(Level.SEVERE, "Error writing topology package to " + bucket + " " + remoteFilePath, e); return null; } final URL resourceUrl = s3Client.getUrl(bucket, remoteFilePath); LOG.log(Level.INFO, "Package URL: {0}", resourceUrl); if (resourceUrl == null) { LOG.log(Level.SEVERE, "Resource not found for bucket " + bucket + " and path " + remoteFilePath); return null; } try { return resourceUrl.toURI(); } catch (URISyntaxException e) { LOG.log(Level.SEVERE, "Could not convert URL " + resourceUrl + " to URI", e); return null; } }
Source:
<code>public Value valueOf(@Nullable Object object) { if(object == null) { return nullValue(); } Class<?> type = object.getClass(); if(type.equals(Coordinate.class)) { return Factory.newValue(this, (Serializable) object); } if(type.equals(String.class)) { return valueOf((String) object); } if(type.equals(JSONArray.class)) { <START> return valueOf(object.toString()); <END> } if(type.equals(JSONObject.class)) { return valueOf(object.toString()); } throw new IllegalArgumentException( "Cannot construct " + getClass().getSimpleName() + " from type " + object.getClass() + "."); }</code><technical_language>toString()</technical_language>

Target:
public Value valueOf(@Nullable Object object) { if(object == null) { return nullValue(); } return Factory.newValue(this, Coordinate.getCoordinateFrom(object)); }
Source:
<code>public boolean step() { if (componentSystems.hasNext()) { try { currentSystem = componentSystems.next(); currentSystem.postBegin(); <START> } catch(Exception e){ <END> logger.error("Failed to load system : '" + currentSystem.toString() + "'"); } } return !componentSystems.hasNext(); }</code><technical_language>more specific Exception caught here. I NoSuchElement of error, this caught here</technical_language>

Target:
public boolean step() { if (componentSystems.hasNext()) { try { currentSystem = componentSystems.next(); currentSystem.postBegin(); } catch (NoSuchElementException e) { logger.error("Failed to load system : '" + currentSystem.toString() + "'"); } } return !componentSystems.hasNext(); }
Source:
<code>public MarkerAdapter(Consumer<CoreException> reporter) { <START> this.reporter = reporter; <END> }</code><technical_language>is need tolerate input configuration invalidity. Consider requireNotNull for reoirter</technical_language>

Target:
public MarkerAdapter(Consumer<CoreException> reporter) { Objects.requireNonNull(reporter); this.reporter = reporter; }
Source:
<code>public void start() { this.subscriber = Subscriber .newBuilder(ProjectSubscriptionName.of(project, subscriptionName), messageReceiver) .setCredentialsProvider(FixedCredentialsProvider.create(credentials)) .build(); subscriber.addListener(new GooglePubsubFailureHandler(this, formatSubscriptionName(project, subscriptionName)), MoreExecutors.directExecutor()); subscriber.startAsync().awaitRunning(); <START> log.info("Google Pubsub subscriber started"); <END> }</code><technical_language>add subscription & project name this log message</technical_language>

Target:
synchronized public void start() { this.subscriber = Subscriber .newBuilder(ProjectSubscriptionName.of(project, subscriptionName), messageReceiver) .setCredentialsProvider(FixedCredentialsProvider.create(credentials)) .build(); subscriber.addListener(new GooglePubsubFailureHandler(this, formatSubscriptionName(project, subscriptionName)), MoreExecutors.directExecutor()); subscriber.startAsync().awaitRunning(); log.info("Google Pubsub subscriber started for {}", formatSubscriptionName(project, subscriptionName)); }