auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected final void put( ReuseBag bag, final long dataId, final long dataPage, final long dataAddr, int bucket) throws IgniteCheckedException { assert bag == null ^ dataAddr == 0L; for (int lockAttempt = 0; ;) { Stripe stripe = getPageForPut(bucket, bag); final long tailId = stripe.tailId; final long tailPage = acquirePage(tailId); try { long tailAddr = writeLockPage(tailId, tailPage, bucket, lockAttempt++, bag); <START> if (bag != null && bag.isEmpty()) { <END> if (tailAddr != 0L) writeUnlock(tailId, tailPage, tailAddr, false); return; } if (tailAddr == 0L) continue; assert PageIO.getPageId(tailAddr) == tailId : "pageId = " + PageIO.getPageId(tailAddr) + ", tailId = " + tailId; assert PageIO.getType(tailAddr) == PageIO.T_PAGE_LIST_NODE; boolean ok = false; try { PagesListNodeIO io = PageIO.getPageIO(tailAddr); ok = bag != null ? putReuseBag(tailId, tailPage, tailAddr, io, bag, bucket) : putDataPage(tailId, tailPage, tailAddr, io, dataId, dataPage, dataAddr, bucket); if (ok) { stripe.empty = false; return; } } finally { writeUnlock(tailId, tailPage, tailAddr, ok); } } finally { releasePage(tailId, tailPage); } } }</code><technical_language>condition be: if (tailAddr == 0L) { if (bag != null && bag.isEmpty()) return; else continue; }</technical_language>

Target:
protected final void put( ReuseBag bag, final long dataId, final long dataPage, final long dataAddr, int bucket) throws IgniteCheckedException { assert bag == null ^ dataAddr == 0L; for (int lockAttempt = 0; ;) { Stripe stripe = getPageForPut(bucket, bag); if (bag != null && bag.isEmpty()) return; final long tailId = stripe.tailId; final long tailPage = acquirePage(tailId); try { long tailAddr = writeLockPage(tailId, tailPage, bucket, lockAttempt++, bag); if (tailAddr == 0L) { if (bag != null && bag.isEmpty()) return; else continue; } assert PageIO.getPageId(tailAddr) == tailId : "pageId = " + PageIO.getPageId(tailAddr) + ", tailId = " + tailId; assert PageIO.getType(tailAddr) == PageIO.T_PAGE_LIST_NODE; boolean ok = false; try { PagesListNodeIO io = PageIO.getPageIO(tailAddr); ok = bag != null ? putReuseBag(tailId, tailPage, tailAddr, io, bag, bucket) : putDataPage(tailId, tailPage, tailAddr, io, dataId, dataPage, dataAddr, bucket); if (ok) { stripe.empty = false; return; } } finally { writeUnlock(tailId, tailPage, tailAddr, ok); } } finally { releasePage(tailId, tailPage); } } }
Source:
<code>public void generateResults() { try { CStressFeatureVector cs = new CStressFeatureVector(datastreams); <START> PuffMarker pm = new PuffMarker(datastreams); <END> } catch (NotANumberException e) { System.err.println("Generate result error"); } }</code><technical_language>Put this in a separate try-catch block</technical_language>

Target:
public void generateResults() { try { CStressFeatureVector cs = new CStressFeatureVector(datastreams); } catch (NotANumberException e) { System.err.println("Generate result error"); } try { PuffMarker pm = new PuffMarker(datastreams); } catch (NotANumberException e) { System.err.println("PuffMarker: Generate result error"); } }
Source:
<code>protected void starting(Description description) { String methodName = description.getMethodName(); String className = description.getClassName(); baseDir = "target/" + className + "/" + methodName; recoveryDir = "recovery"; try { <START> FileUtils.deleteDirectory(new File(baseDir + "/" + "recovery")); <END> } catch (IOException e) { throw new RuntimeException(e); } }</code><technical_language>File constructor separate parameters</technical_language>

Target:
protected void starting(Description description) { String methodName = description.getMethodName(); String className = description.getClassName(); baseDir = "target/" + className + "/" + methodName; recoveryDir = "recovery"; try { FileUtils.deleteDirectory(new File(baseDir, "recovery")); } catch (IOException e) { throw new RuntimeException(e); } }
Source:
<code>public boolean exists(String name) { <START> return get(name).isPresent(); <END> }</code><technical_language>dao.exist() call it, OK do later</technical_language>

Target:
public boolean exists(String name) { return dao.exists(FileBlob.getStorableKey(name)); }
Source:
<code>public NodeConnectivity getLocalNodeConnectivity() { <START> Optional<NodeState> maybeNodeState = getNode(localEndpoint); <END> if (!maybeNodeState.isPresent()) { throw new IllegalArgumentException("Node not found: " + localEndpoint); } return maybeNodeState.get().getConnectivity(); }</code><technical_language>Rename this localNodeState</technical_language>

Target:
public NodeConnectivity getLocalNodeConnectivity() { NodeState nodeState = getNode(localEndpoint) .orElseThrow(() -> new IllegalArgumentException("Node not found: " + localEndpoint)); return nodeState.getConnectivity(); }
Source:
<code>public Matrix4 setToRotation(double x, double y, double z, double angle) { if (angle == 0) return identity(); <START> return setAll(mQuat.fromAngleAxis(x, y, z, angle)); <END> }</code><technical_language>return angle == 0 ? identity() : setAll(mQuat.fromAngleAxis(x, y, z, angle));</technical_language>

Target:
public Matrix4 setToRotation(double x, double y, double z, double angle) { return angle == 0 ? identity() : setAll(mQuat.fromAngleAxis(x, y, z, angle)); }
Source:
<code><START> public Void decommissionModel(String modelId) { <END> return digitalTwinsAsyncClient.decommissionModel(modelId).block(); }</code><technical_language>Return type keyword void, Void class type</technical_language>

Target:
public void decommissionModel(String modelId) { decommissionModelWithResponse(modelId, Context.NONE); }
Source:
<code>public void reschedulePersistedMessages() { <START> for (ScheduledFuture<?> scheduledFuture : this.delayTasks.values()) { <END> scheduledFuture.cancel(true); } this.delayTasks.clear(); MessageGroup messageGroup = this.messageStore.getMessageGroup(this.messageGroupId); for (final Message<?> message : messageGroup.getMessages()) { this.getTaskScheduler().schedule(new Runnable() { @Override public void run() { long delay = determineDelayForMessage(message); if (delay > 0) { releaseMessageAfterDelay(message, delay); } else { releaseMessage(message); } } }, new Date()); } }</code><technical_language>Needs a ConcurrentHashMap avoid a ConcurrentModificationException. Actually, needs synchronized - a new message arrive iteration clear()</technical_language>

Target:
public synchronized void reschedulePersistedMessages() { MessageGroup messageGroup = this.messageStore.getMessageGroup(this.messageGroupId); for (final Message<?> message : messageGroup.getMessages()) { this.getTaskScheduler().schedule(new Runnable() { @Override public void run() { long delay = determineDelayForMessage(message); if (delay > 0) { releaseMessageAfterDelay(message, delay); } else { releaseMessage(message); } } }, new Date()); } }
Source:
<code>protected R retrieve(File d) throws IOException { if(new File(d,"build.xml").exists()) { try { R b = cons.create(d); b.onLoad(); if (LOGGER.isLoggable(FINEST)) { LOGGER.log(FINEST, "Loaded " + b.getFullDisplayName() + " in " + Thread.currentThread().getName(), new ThisIsHowItsLoaded()); } return b; } catch (IOException e) { LOGGER.log(Level.WARNING, "could not load " + d, e); <START> throw new IOException(); <END> } catch (InstantiationError e) { LOGGER.log(Level.WARNING, "could not load " + d, e); } catch (Exception e) { LOGGER.log(Level.WARNING, "could not load " + d, e); } } return null; }</code><technical_language>In case delete log line above, AbstractLazyLoadRunMap.load logs information</technical_language>

Target:
protected R retrieve(File d) throws IOException { if(new File(d,"build.xml").exists()) { try { R b = cons.create(d); b.onLoad(); if (LOGGER.isLoggable(FINEST)) { LOGGER.log(FINEST, "Loaded " + b.getFullDisplayName() + " in " + Thread.currentThread().getName(), new ThisIsHowItsLoaded()); } return b; } catch (IOException e) { LOGGER.log(Level.WARNING, "could not load " + d, e); } catch (InstantiationError e) { LOGGER.log(Level.WARNING, "could not load " + d, e); } catch (Exception e) { LOGGER.log(Level.WARNING, "could not load " + d, e); } } return null; }
Source:
<code>public static void setup() { @SuppressWarnings("UnusedDeclaration") <START> Class<?> clazz = org.codehaus.janino.CompilerFactory.class; <END> try { cluster = Cluster.builder().addContactPoint(NODE).build(); session = cluster.connect(KEYSPACE); String createMetaTable = "CREATE TABLE IF NOT EXISTS " + KEYSPACE + "." + CassandraTransactionalStore.DEFAULT_META_TABLE + " ( " + CassandraTransactionalStore.DEFAULT_APP_ID_COL + " TEXT, " + CassandraTransactionalStore.DEFAULT_OPERATOR_ID_COL + " INT, " + CassandraTransactionalStore.DEFAULT_WINDOW_COL + " BIGINT, " + "PRIMARY KEY (" + CassandraTransactionalStore.DEFAULT_APP_ID_COL + ", " + CassandraTransactionalStore.DEFAULT_OPERATOR_ID_COL + ") " + ");"; session.execute(createMetaTable); String createTable = "CREATE TABLE IF NOT EXISTS " + KEYSPACE + "." + TABLE_NAME + " (id uuid PRIMARY KEY,age int,lastname text,test boolean,floatvalue float,doubleValue double,set1 set<int>,list1 list<int>,map1 map<text,int>,last_visited timestamp);"; session.execute(createTable); } catch (Throwable e) { DTThrowable.rethrow(e); } }</code><technical_language>Do need this statement</technical_language>

Target:
public static void setup() { try { cluster = Cluster.builder().addContactPoint(NODE).build(); session = cluster.connect(KEYSPACE); String createMetaTable = "CREATE TABLE IF NOT EXISTS " + KEYSPACE + "." + CassandraTransactionalStore.DEFAULT_META_TABLE + " ( " + CassandraTransactionalStore.DEFAULT_APP_ID_COL + " TEXT, " + CassandraTransactionalStore.DEFAULT_OPERATOR_ID_COL + " INT, " + CassandraTransactionalStore.DEFAULT_WINDOW_COL + " BIGINT, " + "PRIMARY KEY (" + CassandraTransactionalStore.DEFAULT_APP_ID_COL + ", " + CassandraTransactionalStore.DEFAULT_OPERATOR_ID_COL + ") " + ");"; session.execute(createMetaTable); String createTable = "CREATE TABLE IF NOT EXISTS " + KEYSPACE + "." + TABLE_NAME + " (id uuid PRIMARY KEY,age int,lastname text,test boolean,floatvalue float,doubleValue double,set1 set<int>,list1 list<int>,map1 map<text,int>,last_visited timestamp);"; session.execute(createTable); } catch (Throwable e) { DTThrowable.rethrow(e); } }
Source:
<code>public <T> Hits<T> search(Query<T> query) throws IOException { if (query.getFields() == null || query.getFields().isEmpty()) { return searchDefault(query); } <START> if (!SortBy.DOC.equals(query.getSortBy())) { <END> throw new IllegalArgumentException("Queries with field selection can't be sorted: " + query.getSortBy()); } return searchByCollector(query); }</code><technical_language>Remove this check merging #139 develop synchronizing this PR develop</technical_language>

Target:
public <T> Hits<T> search(Query<T> query) throws IOException { final QueryProfiler profiler = new QueryProfiler(query, slowLogConfig); final DocumentMapping mapping = getDocumentMapping(query); final org.apache.lucene.search.Query lq = toLuceneQuery(mapping, query); final org.apache.lucene.search.Sort ls = toLuceneSort(mapping, query); final int offset = query.getOffset(); int limit = query.getLimit(); try { profiler.start(Phase.QUERY); final TopFieldDocs topDocs; if (limit < 1) { final int totalHits = searcher.count(lq); topDocs = new TopFieldDocs(totalHits, null, null, 0); } else { if (limit == Integer.MAX_VALUE || limit == Integer.MAX_VALUE - 1 ) { limit = searcher.count(lq); } int maxDoc = searcher.getIndexReader().maxDoc(); if (maxDoc <= 0 || limit < 1) { topDocs = new TopFieldDocs(0, null, null, 0); } else { topDocs = searcher.search(lq, numDocsToRetrieve(offset, limit), ls, query.isWithScores(), false); } } profiler.end(Phase.QUERY); if (topDocs.scoreDocs == null || topDocs.scoreDocs.length < 1) { return new Hits<>(Collections.<T>emptyList(), offset, limit, topDocs.totalHits); } else { profiler.start(Phase.FETCH); final ImmutableList.Builder<T> matches = ImmutableList.builder(); if (query.getFields() != null && !query.getFields().isEmpty()) { fetchFieldDocs(query, mapping, offset, topDocs, matches); } else { fetchScoreDocs(query, mapping, offset, topDocs, matches); } profiler.end(Phase.FETCH); return new Hits<>(matches.build(), offset, limit, topDocs.totalHits); } } finally { profiler.log(log); } }
Source:
<code>public void internalWrite(Server server, Query query, ImmutableList<Result> results) throws Exception { List<String> typeNames = this.getTypeNames(); for (Result result : results) { log.debug(result.toString()); for (Entry<String, Object> values : result.getValues().entrySet()) { if (isNotValidValue(values.getValue())) { log.debug("Skipping message key[{}] with value: {}.", values.getKey(), values.getValue()); continue; } String line = KeyUtils.getKeyString(server, query, result, values, typeNames, rootPrefix); String replaceString = "_"; <START> if (this.invalidCharValue != null){ <END> replaceString = this.invalidCharValue; } line = STATSD_INVALID.matcher(line).replaceAll(replaceString); line += computeActualValue(values.getValue()) + "|" + bucketType + "\n"; doSend(line.trim()); } } }</code><technical_language>Checking nullity of invalidCharValue done in constructor</technical_language>

Target:
public void internalWrite(Server server, Query query, ImmutableList<Result> results) throws Exception { List<String> typeNames = this.getTypeNames(); for (Result result : results) { log.debug(result.toString()); for (Entry<String, Object> values : result.getValues().entrySet()) { if (isNotValidValue(values.getValue())) { log.debug("Skipping message key[{}] with value: {}.", values.getKey(), values.getValue()); continue; } String line = KeyUtils.getKeyString(server, query, result, values, typeNames, rootPrefix); line = STATSD_INVALID.matcher(line).replaceAll(this.replacementForInvalidChar); line += computeActualValue(values.getValue()) + "|" + bucketType + "\n"; doSend(line.trim()); } } }
Source:
<code>public static java.util.Collection<Portlet> getPortlets(final java.lang.String companyId) throws com.liferay.portal.SystemException { try { final PortletFactory portletFactory = PortletManagerFactory.getManager(); return portletFactory.getPortlets(); } catch (final com.liferay.portal.SystemException se) { <START> throw se; <END> } catch (final Exception e) { throw new com.liferay.portal.SystemException(e); } }</code><technical_language>I this catch is necessary next lines } catch (final Exception e) { throw new com.liferay.portal.SystemException(e); }</technical_language>

Target:
public static java.util.Collection<Portlet> getPortlets(final java.lang.String companyId) throws com.liferay.portal.SystemException { try { final PortletFactory portletFactory = PortletManagerFactory.getManager(); return portletFactory.getPortlets(); } catch (final Exception e) { throw new com.liferay.portal.SystemException(e); } }
Source:
<code>public float getLeftMargin(Actor actor) { for (Constraints c : constraints) { if (c.actor == actor) { return marginLeft(c); } } <START> return -1; <END> }</code><technical_language>Hmm. This a weird for default, positive. this 0</technical_language>

Target:
public float getLeftMargin(Actor actor) { for (Constraints c : constraints) { if (c.actor == actor) { return marginLeft(c); } } return 0; }
Source:
<code>public static <A> PriorityQueue<Integer, A> emptyInt() { <START> return priorityQueue(Equal.intEqual, FingerTree.empty(Monoid.intMaxMonoid, (P2<Integer, A> p) -> p._1())); <END> }</code><technical_language>return empty(Monoid.intMaxMonoid, Equal.intEqual);</technical_language>

Target:
public static <A> PriorityQueue<Integer, A> emptyInt() { return empty(Monoid.intMaxMonoid, Equal.intEqual); }
Source:
<code>public synchronized void operationComplete(long operationSequenceId) { Long heapSize = pendingOperationsWithSize.remove(operationSequenceId); if (heapSize != null) { currentWriteBufferSize -= heapSize; notifyAll(); } else { <START> LOG.warn("Something is wrong with BigtableBufferedMutator. Operation %s was not found", <END> operationSequenceId); } }</code><technical_language>Users get scared of WARNING messages, especially vague ones. Consider adding continue removing sentence</technical_language>

Target:
public synchronized void operationComplete(long operationSequenceId) { lastOperationChange = System.currentTimeMillis(); Long heapSize = pendingOperationsWithSize.remove(operationSequenceId); if (heapSize != null) { currentWriteBufferSize -= heapSize; notifyAll(); } else { LOG.warn("An operation completion was recieved multiple times. Your operations completed." + " Please notify Google that this occurred."); } }
Source:
<code>public void addDataToContext() { final String hostNameValue = "host-name-value"; final String entityPathValue = "entity-path-value"; final String userParentSpan = "user-parent-span"; final String openCensusSpanKey = "opencensus-span"; final String hostName = "hostName-key"; final String entityPath = "entity-path-key"; Context parentSpanContext = new Context(openCensusSpanKey, userParentSpan); <START> Context updatedContext = parentSpanContext.addData(hostName, hostNameValue) <END> .addData(entityPath, entityPathValue); System.out.printf("HOSTNAME value: %s%n", updatedContext.getData(hostName).get()); System.out.printf("ENTITY_PATH value: %s%n", updatedContext.getData(entityPath).get()); END: com.azure.core.util.context.addData#object-object }</code><technical_language>hostname hostName</technical_language>

Target:
public void addDataToContext() { final String hostNameValue = "host-name-value"; final String entityPathValue = "entity-path-value"; final String userParentSpan = "user-parent-span"; Context parentSpanContext = new Context(PARENT_SPAN_KEY, userParentSpan); Context updatedContext = parentSpanContext.addData(HOST_NAME_KEY, hostNameValue) .addData(ENTITY_PATH_KEY, entityPathValue); System.out.printf("Hostname value: %s%n", updatedContext.getData(HOST_NAME_KEY).get()); System.out.printf("Entity Path value: %s%n", updatedContext.getData(ENTITY_PATH_KEY).get()); END: com.azure.core.util.context.addData#object-object }
Source:
<code>public Mono<AccessToken> getToken(TokenRequestContext request) { return identityClient.authenticateWithAzureCli(request) <START> .onErrorResume(t -> Mono.error(new CredentialUnavailableException( <END> "AzureCliCredential authentication unavailable.", t))); }</code><technical_language>I onErrorMap more operator this more of a mapping operation resuming (since triggers error stream again)</technical_language>

Target:
public Mono<AccessToken> getToken(TokenRequestContext request) { return identityClient.authenticateWithAzureCli(request); }
Source:
<code>public void initializeDestinationForDatastream(Datastream datastream) { if (!datastream.hasDestination()) { datastream.setDestination(new DatastreamDestination()); } DatastreamDestination destination = datastream.getDestination(); DatastreamSource source = datastream.getSource(); if (!destination.hasConnectionString() || destination.getConnectionString().isEmpty()) { String topicName = getTopicName(datastream.getName()); <START> destination.setConnectionString(getDestination(topicName)); <END> destination.setConnectionString(getDestination(topicName)); } if (!destination.hasPartitions() || destination.getPartitions() <= 0) { if (source.hasPartitions()) { destination.setPartitions(source.getPartitions()); } else { destination.setPartitions(DEFAULT_NUMBER_PARTITIONS); } } }</code><technical_language>lines 50 51 dupe</technical_language>

Target:
public void initializeDestinationForDatastream(Datastream datastream) { if (!datastream.hasDestination()) { datastream.setDestination(new DatastreamDestination()); } DatastreamDestination destination = datastream.getDestination(); DatastreamSource source = datastream.getSource(); if (!destination.hasConnectionString() || destination.getConnectionString().isEmpty()) { String topicName = getTopicName(datastream.getName()); destination.setConnectionString(getDestination(topicName)); } if (!destination.hasPartitions() || destination.getPartitions() <= 0) { if (source.hasPartitions()) { destination.setPartitions(source.getPartitions()); } else { destination.setPartitions(DEFAULT_NUMBER_PARTITIONS); } } }
Source:
<code>public void createArtifacts() { ArtifactId parentArtifact = CoreArtifactTokens.OseeTypesFolder; <START> <END> List<String> names = new ArrayList<>(); names.add("TestArtifact1"); names.add("TestArtifact2"); names.add("TestArtifact3"); List<ArtifactToken> newArtifacts = artifactEndpoint.createArtifacts(COMMON, CoreArtifactTypes.PlainText, parentArtifact, names); Assert.assertFalse(newArtifacts.isEmpty()); }</code><technical_language>Consider Arrays.asList("xxx","yyy", "zzz");</technical_language>

Target:
public void createArtifacts() { ArtifactId parentArtifact = CoreArtifactTokens.OseeTypesFolder; List<String> names = Arrays.asList("TestArtifact1", "TestArtifact2", "TestArtifact3"); List<ArtifactToken> newArtifacts = artifactEndpoint.createArtifacts(COMMON, CoreArtifactTypes.PlainText, parentArtifact, names); Assert.assertFalse(newArtifacts.isEmpty()); }
Source:
<code>protected void afterRelease(MessageGroup messageGroup, Collection<Message<?>> completedMessages, boolean timeout) { int size = messageGroup.getMessages().size(); int sequenceSize = 0; Message<?> message = messageGroup.getOne(); if (message != null){ sequenceSize = new IntegrationMessageHeaderAccessor(message).getSequenceSize(); } if (sequenceSize > 0 && sequenceSize == size){ remove(messageGroup); } else { Object groupId = messageGroup.getGroupId(); if (completedMessages != null) { int lastReleasedSequenceNumber = findLastReleasedSequenceNumber(groupId, completedMessages); this.messageStore.setLastReleasedSequenceNumberForGroup(groupId, lastReleasedSequenceNumber); if (this.messageStore instanceof SimpleMessageStore && completedMessages.size() == messageGroup.size()) { ((SimpleMessageGroup) messageGroup).clear(); <START> ((SimpleMessageGroup) messageGroup).setLastModified(System.currentTimeMillis()); <END> } else { this.messageStore.removeMessagesFromGroup(groupId, completedMessages); } } if (timeout) { this.messageStore.completeGroup(groupId); } } }</code><technical_language>add clear() SimpleMessageStore reset upper bound</technical_language>

Target:
protected void afterRelease(MessageGroup messageGroup, Collection<Message<?>> completedMessages, boolean timeout) { int size = messageGroup.getMessages().size(); int sequenceSize = 0; Message<?> message = messageGroup.getOne(); if (message != null){ sequenceSize = new IntegrationMessageHeaderAccessor(message).getSequenceSize(); } if (sequenceSize > 0 && sequenceSize == size){ remove(messageGroup); } else { Object groupId = messageGroup.getGroupId(); if (completedMessages != null) { int lastReleasedSequenceNumber = findLastReleasedSequenceNumber(groupId, completedMessages); this.messageStore.setLastReleasedSequenceNumberForGroup(groupId, lastReleasedSequenceNumber); if (this.messageStore instanceof SimpleMessageStore && completedMessages.size() == messageGroup.size()) { ((SimpleMessageStore) this.messageStore).clearMessageGroup(groupId); } else { this.messageStore.removeMessagesFromGroup(groupId, completedMessages); } } if (timeout) { this.messageStore.completeGroup(groupId); } } }
Source:
<code>public void setImageGenResults(HashMap<String, View> viewMap, HashMap<String, Bitmap> imageMap) { mapboxMap.getStyle(new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { style.addImages(imageMap); <START> SymbolLayerMapillaryActivity.this.viewMap = viewMap; <END> } }); }</code><technical_language>move this line getStyle callback</technical_language>

Target:
public void setImageGenResults(HashMap<String, View> viewMap, HashMap<String, Bitmap> imageMap) { mapboxMap.getStyle(new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { style.addImages(imageMap); } }); SymbolLayerMapillaryActivity.this.viewMap = viewMap; }
Source:
<code>public void checkGroovyVersion(String whoIsChecking) { <START> if (!isCompatibleGroovyVersion() && !isVersionCheckDisabled()) throw new IncompatibleGroovyVersionException(String.format( <END> "The Spock %s cannot execute because Spock %s is not compatible with Groovy %s. For more information (including enforce mode), " + "see <LINK_0> (section 'Known Issues').\n" + "Spock artifact: %s\n" + "Groovy artifact: %s", whoIsChecking, SpockReleaseInfo.getVersion(), GroovyReleaseInfo.getVersion(), SpockReleaseInfo.getArtifactPath(), GroovyReleaseInfo.getArtifactPath())); }</code><technical_language>I log I log std.err check failed due property, WDYT</technical_language>

Target:
public void checkGroovyVersion(String whoIsChecking) { if (!isCompatibleGroovyVersion()) { if (isVersionCheckDisabled()) { System.err.println(format("Executing Spock %s with NOT compatible Groovy version %s due to set %s system property set. " + "This is unsupported and may result in weird runtime errors!", SpockReleaseInfo.getVersion(), GroovyReleaseInfo.getVersion(), DISABLE_GROOVY_VERSION_CHECK_PROPERTY_NAME)); } else { throw new IncompatibleGroovyVersionException(format( "The Spock %s cannot execute because Spock %s is not compatible with Groovy %s. For more information (including enforce mode), " + "see <LINK_0> (section 'Known Issues').\n" + "Spock artifact: %s\n" + "Groovy artifact: %s", whoIsChecking, SpockReleaseInfo.getVersion(), GroovyReleaseInfo.getVersion(), SpockReleaseInfo.getArtifactPath(), GroovyReleaseInfo.getArtifactPath())); } } }
Source:
<code>public List<String> getEnabledTemplates() { <START> if (enabledTemplates == null) { <END> return new ArrayList<>(); } return enabledTemplates; }</code><technical_language>set private List<String> enabledTemplates = new ArrayList(); worry this. dropwizard/jackson reads config override based yaml if needed (since provided a setter)</technical_language>

Target:
public List<String> getEnabledTemplates() { return enabledTemplates; }
Source:
<code>public void testExecuteIgnoredModule() throws Exception { exit.expectSystemExitWithStatus(-2); exit.checkAssertionAfterwards(() -> { final LocalizedMessage errorCounterMessage = new LocalizedMessage(0, Definitions.CHECKSTYLE_BUNDLE, "Main.errorCounter", new String[] {String.valueOf(1)}, null, getClass(), null); final String expectedExceptionMessage = String.format(Locale.ROOT, errorCounterMessage.getMessage() + "%n"); assertEquals(expectedExceptionMessage, systemOut.getLog()); final String cause = "com.puppycrawl.tools.checkstyle.api.CheckstyleException:" <START> + " cannot initialize module TreeWalker - "; <END> assertTrue(systemErr.getLog().startsWith(cause)); }); Main.main("-c", getPath("config-non-existing-classname-ignore.xml"), "-executeIgnoredModules", getPath("InputMain.java")); }</code><technical_language>Main.errorCounter {1} is 7 times, I propose a field for too, frequent element</technical_language>

Target:
public void testExecuteIgnoredModule() throws Exception { exit.expectSystemExitWithStatus(-2); exit.checkAssertionAfterwards(() -> { final String expectedExceptionMessage = errorCounterOneMessage.getMessage() + EOL; assertEquals(expectedExceptionMessage, systemOut.getLog()); final String cause = "com.puppycrawl.tools.checkstyle.api.CheckstyleException:" + " cannot initialize module TreeWalker - "; assertTrue(systemErr.getLog().startsWith(cause)); }); Main.main("-c", getPath("config-non-existing-classname-ignore.xml"), "-executeIgnoredModules", getPath("InputMain.java")); }
Source:
<code><START> @Override public Vector2i getSize() { <END> return Vector2i.from(128, 128); }</code><technical_language>Fix annotation placement</technical_language>

Target:
public Vector2i getSize() { return Vector2i.from(128, 128); }
Source:
<code>public void stepSetReverseModeAtLocation(final RequestMonitor rm) { MIBreakpoint bp = getBreakPointForReverse(); if (getReverseEnabled() && fReverseService != null && bp != null) { try { fReverseService.enableReverseModeAtBpLocation(getContainerContext(), getReverseMode(), bp, !getUserBreakpointIsOnMain()); rm.done(); } catch (CoreException e) { <START> rm.done(e.getStatus()); <END> } } else { rm.done(); } }</code><technical_language>I accept error here, in case extenders implement new method. I is fail set reverse fail entire session</technical_language>

Target:
public void stepSetReverseModeAtLocation(final RequestMonitor rm) { MIBreakpoint bp = getBreakPointForReverse(); if (getReverseEnabled() && fReverseService != null && bp != null) { fReverseService.enableReverseModeAtBpLocation(getContainerContext(), getReverseMode(), bp, !getUserBreakpointIsOnMain()); rm.done(); } else { rm.done(); } }
Source:
<code><START> public void inviteMember(Long teamId, String username) { <END> User user = userService.getUserByUsername(username).orElseThrow(() -> new UsernameNotFoundException(username)); Team team = getTeamById(teamId).orElseThrow(() -> new TeamNotFoundException(teamId)); String token = UUID.randomUUID().toString(); if (!team.getMembers().contains(user)) { TeamInviteToken inviteToken = new TeamInviteToken(token, user, team); teamInviteTokenRepository.save(inviteToken); try { mailService.sendTeamInviteMail(user, team.getTeamName()); } catch (MessagingException e) { e.printStackTrace(); } } else { throw new IllegalArgumentException("User is already a member of this team"); } }</code><technical_language>a good idea return generated token</technical_language>

Target:
public TeamInviteToken inviteMember(Long teamId, String username) { User user = userService.getUserByUsername(username).orElseThrow(() -> new UsernameNotFoundException(username)); Team team = getTeamById(teamId); if (!team.getMembers().contains(user)) { String token = UUID.randomUUID().toString(); TeamInviteToken inviteToken = new TeamInviteToken(token, user, team); teamInviteTokenRepository.save(inviteToken); try { mailService.sendTeamInviteMail(user, team.getTeamName(), team.getCaptain()); } catch (MessagingException e) { e.printStackTrace(); } return inviteToken; } else { throw new IllegalArgumentException("User is already a member of this team"); } }
Source:
<code>public void onEvent(MachineLogEvent event) { String stream = event.getStream(); String text = event.getText(); <START> if (!isNullOrEmpty(stream) && "stderr".equalsIgnoreCase(stream) && !isNullOrEmpty(text)) { <END> RuntimeIdentityDto identity = event.getRuntimeId(); LOG.error( "Machine error from owner={} env={} workspace={} text={} time={} ", event.getMachineName(), identity.getOwnerId(), identity.getEnvName(), identity.getWorkspaceId(), event.getText(), event.getTime()); } }</code><technical_language>I !isNullOrEmpty(stream) removed</technical_language>

Target:
public void onEvent(MachineLogEvent event) { if ("stderr".equalsIgnoreCase(event.getStream()) && !isNullOrEmpty(event.getText())) { RuntimeIdentityDto identity = event.getRuntimeId(); LOG.error( "Machine `{}` error from owner=`{}` env=`{}` workspace=`{}` text=`{}` time=`{}`", event.getMachineName(), identity.getOwnerId(), identity.getEnvName(), identity.getWorkspaceId(), event.getText(), event.getTime()); } }
Source:
<code>public static FetchedS3Object createS3Object() { <START> FetchedS3Object result = new FetchedS3Object(null); <END> result.setRelocated(true); return result; }</code><technical_language>val</technical_language>

Target:
public static FetchedS3Object createS3Object() { val result = new FetchedS3Object(null); result.setRelocated(true); return result; }
Source:
<code>public void init(@NonNull FrameLayout parent) { mTextureView = new TextureView(parent.getContext()); mTextureView.setLayoutParams( new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT)); mTextureView.setSurfaceTextureListener(new TextureView.SurfaceTextureListener() { @Override public void onSurfaceTextureAvailable(final SurfaceTexture surfaceTexture, final int width, final int height) { mSurfaceTexture = surfaceTexture; tryToProvidePreviewSurface(); } @Override public void onSurfaceTextureSizeChanged(final SurfaceTexture surfaceTexture, final int width, final int height) { Preconditions.checkState(mSurfaceTexture == surfaceTexture); Log.d(TAG, "onSurfaceTextureSizeChanged(width:" + width + ", height: " + height + " )"); } @Override public boolean <START> onSurfaceTextureDestroyed(final <END> SurfaceTexture surfaceTexture) { if (mSurfaceCompleter == null && mSurfaceReleaseFuture != null) { mSurfaceReleaseFuture.addListener(surfaceTexture::release, ContextCompat.getMainExecutor(mTextureView.getContext())); return false; } else { return true; } } @Override public void onSurfaceTextureUpdated(final SurfaceTexture surfaceTexture) { } }); parent.addView(mTextureView); }</code><technical_language>If this is called getPreviewSurfaceProvider, tryToProvidePreviewSurface() a released SurfaceTexture for Surface is providing mSurfaceTexture is null'd out</technical_language>

Target:
public void init(@NonNull FrameLayout parent) { mTextureView = new TextureView(parent.getContext()); mTextureView.setLayoutParams( new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT)); mTextureView.setSurfaceTextureListener(new TextureView.SurfaceTextureListener() { @Override public void onSurfaceTextureAvailable(final SurfaceTexture surfaceTexture, final int width, final int height) { mSurfaceTexture = surfaceTexture; tryToProvidePreviewSurface(); } @Override public void onSurfaceTextureSizeChanged(final SurfaceTexture surfaceTexture, final int width, final int height) { Log.d(TAG, "onSurfaceTextureSizeChanged(width:" + width + ", height: " + height + " )"); } @Override public boolean onSurfaceTextureDestroyed(final SurfaceTexture surfaceTexture) { mSurfaceTexture = null; if (mSurfaceCompleter == null && mSurfaceReleaseFuture != null) { mSurfaceReleaseFuture.addListener(surfaceTexture::release, ContextCompat.getMainExecutor(mTextureView.getContext())); return false; } else { return true; } } @Override public void onSurfaceTextureUpdated(final SurfaceTexture surfaceTexture) { } }); parent.addView(mTextureView); }
Source:
<code>public static void scanNestedAttribute(ByteBuffer buf, AttributeHandler handler) { int start = buf.position(); int end = buf.limit(); <START> while (buf.remaining() > ATTR_HEADER_LEN) { <END> short attrLen = buf.getShort(); short attrId = nested(buf.getShort()); buf.limit(end); handler.use(buf, attrId); buf.position(start); } }</code><technical_language>infinite loop! also, buf.limit is needed</technical_language>

Target:
public static void scanNestedAttribute(ByteBuffer buf, AttributeHandler handler) { int start = buf.position(); if (buf.remaining() > ATTR_HEADER_LEN) { short attrLen = buf.getShort(); short attrId = nested(buf.getShort()); handler.use(buf, attrId); buf.position(start); } }
Source:
<code>public void CompleteUDPPacketTest() throws IOException, BadPcapFileException, BadPacketException { PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP; assumeTrue(trace.exists()); <START> PcapFile dummy = trace.getTrace(); <END> ByteBuffer byteBuffer = fPacket; if (byteBuffer == null) { fail("CompleteUDPPacketTest has failed!"); return; } UDPPacket packet = new UDPPacket(dummy, null, byteBuffer); assertEquals(PcapProtocol.UDP, packet.getProtocol()); assertTrue(packet.hasProtocol(PcapProtocol.UDP)); assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN)); assertFalse(packet.hasProtocol(PcapProtocol.ETHERNET_II)); assertTrue(packet.validate()); assertEquals(473000225, packet.hashCode()); assertFalse(packet.equals(null)); assertEquals(new UDPPacket(dummy, null, byteBuffer), packet); assertEquals(EXPECTED_FIELDS, packet.getFields()); assertEquals(EXPTECTED_TOSTRING, packet.toString()); assertEquals("Src Port: 18057, Dst Port: 39611", packet.getLocalSummaryString()); assertEquals("Source Port: 18057, Destination Port: 39611", packet.getGlobalSummaryString()); assertEquals(new UDPEndpoint(packet, true), packet.getSourceEndpoint()); assertEquals(new UDPEndpoint(packet, false), packet.getDestinationEndpoint()); fPacket.position(8); byte[] payload = new byte[4]; fPacket.get(payload); assertEquals(ByteBuffer.wrap(payload), packet.getPayload()); assertEquals(0x4689, packet.getSourcePort()); assertEquals(0x9ABB, packet.getDestinationPort()); assertEquals(0xA1EC, packet.getTotalLength()); assertEquals(0xFAAF, packet.getChecksum()); }</code><technical_language>I try</technical_language>

Target:
public void CompleteUDPPacketTest() throws IOException, BadPcapFileException, BadPacketException { PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP; assumeTrue(trace.exists()); try (PcapFile dummy = trace.getTrace();) { ByteBuffer byteBuffer = fPacket; if (byteBuffer == null) { fail("CompleteUDPPacketTest has failed!"); return; } UDPPacket packet = new UDPPacket(dummy, null, byteBuffer); assertEquals(PcapProtocol.UDP, packet.getProtocol()); assertTrue(packet.hasProtocol(PcapProtocol.UDP)); assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN)); assertFalse(packet.hasProtocol(PcapProtocol.ETHERNET_II)); assertTrue(packet.validate()); assertEquals(473000225, packet.hashCode()); assertFalse(packet.equals(null)); assertEquals(new UDPPacket(dummy, null, byteBuffer), packet); assertEquals(EXPECTED_FIELDS, packet.getFields()); assertEquals(EXPTECTED_TOSTRING, packet.toString()); assertEquals("Src Port: 18057, Dst Port: 39611", packet.getLocalSummaryString()); assertEquals("Source Port: 18057, Destination Port: 39611", packet.getGlobalSummaryString()); assertEquals(new UDPEndpoint(packet, true), packet.getSourceEndpoint()); assertEquals(new UDPEndpoint(packet, false), packet.getDestinationEndpoint()); fPacket.position(8); byte[] payload = new byte[4]; fPacket.get(payload); assertEquals(ByteBuffer.wrap(payload), packet.getPayload()); assertEquals(0x4689, packet.getSourcePort()); assertEquals(0x9ABB, packet.getDestinationPort()); assertEquals(0xA1EC, packet.getTotalLength()); assertEquals(0xFAAF, packet.getChecksum()); } }
Source:
<code>public void removingEntriesRetentionsEventsInLog() { <START> eventCache.processStartTransactionsUpdate(TIMESTAMPS, SNAPSHOT); <END> eventCache.processStartTransactionsUpdate(TIMESTAMPS_2, SUCCESS); verifyStage(); eventCache.removeTransactionStateFromCache(START_TS); verifyStage(); }</code><technical_language>Reviewed</technical_language>

Target:
public void removingEntriesRetentionsEventsInLog() { setupInitialState(); eventCache.processStartTransactionsUpdate(TIMESTAMPS_2, SUCCESS); verifyStage(); eventCache.removeTransactionStateFromCache(START_TS); verifyStage(); }
Source:
<code>CorfuStreamEntry fromSMREntry(@Nonnull SMREntry entry, final long epoch) { long address = entry.getGlobalAddress(); OperationType operationType; switch(entry.getSMRMethod()) { case "put": case "putAll": operationType = OperationType.UPDATE; break; case "clear": operationType = OperationType.CLEAR; break; case "remove": operationType = OperationType.DELETE; break; default: throw new RuntimeException("SMRMethod "+entry.getSMRMethod() + " cannot be translated to CorfuStreamEntry"); } Object[] args = entry.getSMRArguments(); if (args.length > 0) { if (args.length > 1) { CorfuRecord record = (CorfuRecord) args[1]; return new CorfuStreamEntry((Message)args[0], record.getPayload(), record.getMetadata(), 0, address, operationType); } } <START> return new CorfuStreamEntry((Message)args[0], <END> null, null, 0, address, operationType); }</code><technical_language>this if (args.length > 0) {}</technical_language>

Target:
CorfuStreamEntry fromSMREntry(@Nonnull SMREntry entry, final long epoch) { long address = entry.getGlobalAddress(); OperationType operationType = getOperationType(entry); Object[] args = entry.getSMRArguments(); if (args.length > 0) { if (args.length > 1) { CorfuRecord record = (CorfuRecord) args[1]; return new CorfuStreamEntry((Message)args[0], record.getPayload(), record.getMetadata(), 0, address, operationType); } return new CorfuStreamEntry((Message)args[0], null, null, 0, address, operationType); } return new CorfuStreamEntry(null, null, null, 0, address, operationType); }
Source:
<code>public String toString() { <START> return String.format("%s[%d, %d]", this.getClass().getSimpleName(), min(), max()); <END> }</code><technical_language>include label too</technical_language>

Target:
public String toString() { return String.format("%s[%s:%d, %s:%d]", this.getClass().getSimpleName(), this.minKeyLabel, min(), this.maxKeyLabel, max()); }
Source:
<code>public void onNext(final ActiveContext activeContext) { LOG.log(Level.INFO, "Submitting Task to Context: {0}", activeContext); final String taskId = activeContext.getId(); final Configuration nameResolverConf = NameResolverConfiguration.CONF .set(NameResolverConfiguration.NAME_SERVICE_PORT, nameServer.getPort()) .set(NameResolverConfiguration.NAME_SERVER_HOSTNAME, localAddressProvider.getLocalAddress()) .build(); final Configuration taskConfiguration = TaskConfiguration.CONF .set(TaskConfiguration.IDENTIFIER, taskId) .set(TaskConfiguration.TASK, MistTask.class) .build(); <START> final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder(); <END> jcb.bindNamedParameter(NumExecutors.class, numTaskCores+""); activeContext.submitTask( Configurations.merge(nameResolverConf, taskConfiguration, jcb.build())); }</code><technical_language>jcb.bindNamedParameters</technical_language>

Target:
public void onNext(final ActiveContext activeContext) { LOG.log(Level.INFO, "Submitting Task to Context: {0}", activeContext); final String taskId = activeContext.getId(); final Configuration nameResolverConf = NameResolverConfiguration.CONF .set(NameResolverConfiguration.NAME_SERVICE_PORT, nameServer.getPort()) .set(NameResolverConfiguration.NAME_SERVER_HOSTNAME, localAddressProvider.getLocalAddress()) .build(); final Configuration taskConfiguration = TaskConfiguration.CONF .set(TaskConfiguration.IDENTIFIER, taskId) .set(TaskConfiguration.TASK, MistTask.class) .build(); final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder(); jcb.bindNamedParameter(NumExecutors.class, mistTaskConfigs.getNumTaskExecutors()+""); activeContext.submitTask( Configurations.merge(nameResolverConf, taskConfiguration, jcb.build())); }
Source:
<code>public static void afterAll() throws Exception { <START> if (Strings.isNullOrEmpty(PROJECT_ID)) { <END> return; } try (SecretManagerServiceClient client = SecretManagerServiceClient.create()) { SecretName name = SecretName.of(PROJECT_ID, SECRET_ID); DeleteSecretRequest deleteRequest = DeleteSecretRequest.newBuilder().setName(name.toString()).build(); client.deleteSecret(deleteRequest); } }</code><technical_language>asserting this false - prevent this scenario happening</technical_language>

Target:
public static void afterAll() throws Exception { Assert.assertFalse("missing GOOGLE_CLOUD_PROJECT", Strings.isNullOrEmpty(PROJECT_ID)); try (SecretManagerServiceClient client = SecretManagerServiceClient.create()) { SecretName name = SecretName.of(PROJECT_ID, SECRET_ID); DeleteSecretRequest deleteRequest = DeleteSecretRequest.newBuilder().setName(name.toString()).build(); client.deleteSecret(deleteRequest); } }
Source:
<code><START> private boolean getBoolean(String param) throws ServletException { <END> String n = getInitParameter(param); if (n == null) return false; else if (StringUtils.equalsIgnoreCase("yes", n) || StringUtils.equalsIgnoreCase("true", n) || StringUtils.equalsIgnoreCase("1", n) || StringUtils.equalsIgnoreCase("on", n)) return true; else if (StringUtils.equalsIgnoreCase("no", n) || StringUtils.equalsIgnoreCase("false", n) || StringUtils.equalsIgnoreCase("0", n) || StringUtils.equalsIgnoreCase("off", n)) return false; else throw new ServletException("Invalid boolean " + param + " = " + n); }</code><technical_language>this bit of code done well? Worth moving some utility class reuse, in case want e.g. add y n list</technical_language>

Target:
private boolean getBoolean(String param) throws ServletException { String n = getInitParameter(param); if (n == null) return false; try { return StringUtils.toBoolean(n); } catch (IllegalArgumentException err) { throw new ServletException("Invalid boolean " + param + " = " + n); } }
Source:
<code>public CalculationResult execute(ScenarioMarketData marketData) { <START> Result<?> result; <END> try { DefaultCalculationMarketData calculationData = new DefaultCalculationMarketData(marketData, marketDataMappings); result = Result.success(function.execute(target, calculationData, reportingRules)); } catch (Exception e) { result = Result.failure(e); } return CalculationResult.of(target, rowIndex, columnIndex, result); }</code><technical_language>Result.of(Supplier) result.wrap(Supplier) catch exception</technical_language>

Target:
public CalculationResult execute(ScenarioMarketData marketData) { DefaultCalculationMarketData calculationData = new DefaultCalculationMarketData(marketData, marketDataMappings); Result<?> result = Result.of(() -> function.execute(target, calculationData, reportingRules)); return CalculationResult.of(target, rowIndex, columnIndex, result); }
Source:
<code>public <T> T getService(long consumerID, ServiceConfiguration<T> unknownConfiguration) { if (unknownConfiguration instanceof OffHeapResourceIdentifier) { OffHeapResourceIdentifier identifier = (OffHeapResourceIdentifier) unknownConfiguration; return (T) identifier.getServiceType().cast(resources.get(identifier)); } else if (OffHeapResources.class.isAssignableFrom(unknownConfiguration.getServiceType())) { return (T) new OffHeapResources() { @Override public Set<OffHeapResourceIdentifier> getAllIdentifiers() { <START> return resources.keySet(); <END> } }; } else { throw new IllegalArgumentException("Unexpected configuration type " + unknownConfiguration.getClass()); } }</code><technical_language>Please, do simply return keySet - enables remove operations. Return a read-only set of names instead</technical_language>

Target:
public <T> T getService(long consumerID, ServiceConfiguration<T> unknownConfiguration) { if (unknownConfiguration instanceof OffHeapResourceIdentifier) { OffHeapResourceIdentifier identifier = (OffHeapResourceIdentifier) unknownConfiguration; return (T) identifier.getServiceType().cast(resources.get(identifier)); } else if (OffHeapResources.class.isAssignableFrom(unknownConfiguration.getServiceType())) { return (T) new OffHeapResources() { @Override public Set<String> getAllIdentifiers() { Set<String> names = new HashSet<String>(); for (OffHeapResourceIdentifier identifier: resources.keySet()) { names.add(identifier.getName()); } return Collections.unmodifiableSet(names); } }; } else { throw new IllegalArgumentException("Unexpected configuration type " + unknownConfiguration.getClass()); } }
Source:
<code>public void performSearchOnNonEmptyQuery(Set<SearchBasedFetcher> fetchers) { CompositeSearchBasedFetcher compositeFetcher = new CompositeSearchBasedFetcher(fetchers); List<BibEntry> compositeResult = compositeFetcher.performSearch("quantum"); for (SearchBasedFetcher fetcher : fetchers) { try { Assertions.assertTrue(compositeResult.containsAll(fetcher.performSearch("quantum"))); } catch (FetcherException e) { <START> LOGGER.warn(String.format("Fetcher %s failed ", fetcher.getName()), e); <END> } } }</code><technical_language>Maybe, debug more then</technical_language>

Target:
public void performSearchOnNonEmptyQuery(Set<SearchBasedFetcher> fetchers) { CompositeSearchBasedFetcher compositeFetcher = new CompositeSearchBasedFetcher(fetchers, Integer.MAX_VALUE); List<BibEntry> compositeResult = compositeFetcher.performSearch("quantum"); for (SearchBasedFetcher fetcher : fetchers) { try { Assertions.assertTrue(compositeResult.containsAll(fetcher.performSearch("quantum"))); } catch (FetcherException e) { LOGGER.debug(String.format("Fetcher %s failed ", fetcher.getName()), e); } } }
Source:
<code>private void rebuildIndexes(Connection conn, Configuration conf, ArrayList<String> tableList) { if (!upgrade) { return; } if (!rebuild) { return; } <START> <END> for (String table: tableList) { rebuildIndexes(conn, conf, table); } }</code><technical_language>Do want log type of options provided IndexUpgradeTool for debugging purposes</technical_language>

Target:
private void rebuildIndexes(Connection conn, Configuration conf, ArrayList<String> tableList) { if (!upgrade || !rebuild) { return; } for (String table: tableList) { rebuildIndexes(conn, conf, table); } }