auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static SegmentElements parse(String dataSource, String identifier) { <START> if (!identifier.startsWith(dataSource + DataSegment.delimiter)) { <END> return null; } String remaining = identifier.substring(dataSource.length() + 1); String[] splits = remaining.split(DataSegment.delimiter); if (splits.length < 2) { return null; } DateTimeFormatter formatter = ISODateTimeFormat.dateTime(); DateTime start = formatter.parseDateTime(splits[0]); DateTime end = formatter.parseDateTime(splits[1]); String version = splits.length > 2 ? splits[2] : null; String trail = splits.length > 3 ? join(splits, DataSegment.delimiter, 3, splits.length) : null; return new SegmentElements( dataSource, new Interval(start.getMillis(), end.getMillis()), version, trail ); }</code><technical_language>String.format instead? In general try avoid '+' for String concatentation</technical_language>

Target:
private static SegmentIdentifierParts parse(String dataSource, String identifier) { if (!identifier.startsWith(String.format("%s_", dataSource))) { LOGGER.info("Invalid identifier %s", identifier); return null; } String remaining = identifier.substring(dataSource.length() + 1); String[] splits = remaining.split(DataSegment.delimiter); if (splits.length < 3) { LOGGER.info("Invalid identifier %s", identifier); return null; } DateTimeFormatter formatter = ISODateTimeFormat.dateTime(); DateTime start = formatter.parseDateTime(splits[0]); DateTime end = formatter.parseDateTime(splits[1]); String version = splits[2]; String trail = splits.length > 3 ? join(splits, DataSegment.delimiter, 3, splits.length) : null; return new SegmentIdentifierParts( dataSource, new Interval(start.getMillis(), end.getMillis()), version, trail ); }
Source:
<code>public CompletionStage<?> invokeAsync(ComponentRegistry componentRegistry) throws Throwable { final boolean trace = log.isTraceEnabled(); LogFactory.pushNDC(cacheName, trace); try { if (applyState) { StateConsumer stateConsumer = componentRegistry.getStateTransferManager().getStateConsumer(); <START> return (CompletionStage) stateConsumer.applyState(getOrigin(), topologyId, pushTransfer, stateChunks); <END> } else { StateReceiver stateReceiver = componentRegistry.getConflictManager().running().getStateReceiver(); stateReceiver.receiveState(getOrigin(), topologyId, stateChunks); } return CompletableFutures.completedNull(); } finally { LogFactory.popNDC(trace); } }</code><technical_language>Redundant cast</technical_language>

Target:
public CompletionStage<?> invokeAsync(ComponentRegistry componentRegistry) throws Throwable { final boolean trace = log.isTraceEnabled(); LogFactory.pushNDC(cacheName, trace); try { if (applyState) { StateConsumer stateConsumer = componentRegistry.getStateTransferManager().getStateConsumer(); return stateConsumer.applyState(getOrigin(), topologyId, pushTransfer, stateChunks); } else { StateReceiver stateReceiver = componentRegistry.getConflictManager().running().getStateReceiver(); stateReceiver.receiveState(getOrigin(), topologyId, stateChunks); } return CompletableFutures.completedNull(); } finally { LogFactory.popNDC(trace); } }
Source:
<code>public Page getOutput() { if (finished) { return null; } if (unfinishedWork != null) { boolean workDone = unfinishedWork.process(); aggregationBuilder.updateMemory(); if (!workDone) { return null; } unfinishedWork = null; } if (outputPages == null) { if (finishing) { if (!inputProcessed && produceDefaultOutput) { finished = true; return getGlobalAggregationOutput(); } if (aggregationBuilder == null) { finished = true; return null; } } <START> if (!finishing && (aggregationBuilder == null || !aggregationBuilder.isFull()) && pendingInput == null) { <END> return null; } outputPages = aggregationBuilder.buildResult(); } if (!outputPages.process()) { return null; } if (outputPages.isFinished()) { resetAggregationBuilder(); return null; } return outputPages.getResult(); }</code><technical_language>This work poorly if is a lot of small groups (e.g: flush small pages constantly resetAggregationBuilder). Additional condition aggregationBuilder accumulated enough groups</technical_language>

Target:
public Page getOutput() { if (finished) { return null; } if (unfinishedWork != null) { boolean workDone = unfinishedWork.process(); aggregationBuilder.updateMemory(); if (!workDone) { return null; } unfinishedWork = null; } if (outputPages == null) { if (finishing) { if (!inputProcessed && produceDefaultOutput) { finished = true; return getGlobalAggregationOutput(); } if (aggregationBuilder == null) { finished = true; return null; } } if (!finishing && (aggregationBuilder == null || !aggregationBuilder.isFull())) { return null; } outputPages = aggregationBuilder.buildResult(); } if (!outputPages.process()) { return null; } if (outputPages.isFinished()) { closeAggregationBuilder(); return null; } return outputPages.getResult(); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) <START> return false; <END> AsyncTaskEntity other = (AsyncTaskEntity) obj; return ObjectUtils.objectsEqual(taskId, other.taskId) && ObjectUtils.objectsEqual(entityId, other.entityId) && ObjectUtils.objectsEqual(entityType, other.entityType); }</code><technical_language>please add brackets of ifs</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } AsyncTaskEntity other = (AsyncTaskEntity) obj; return ObjectUtils.objectsEqual(taskId, other.taskId) && ObjectUtils.objectsEqual(entityId, other.entityId) && ObjectUtils.objectsEqual(entityType, other.entityType); }
Source:
<code>public Response get(@PathParam("path") String path, @QueryParam("command") String commandStr) { ZooKeeperCommand cmd; try { cmd = ZooKeeperCommand.valueOf(commandStr); } catch (Exception e) { <START> return badRequest("Invalid ZooKeeper command: " + commandStr); <END> } ServerContext _serverContext = (ServerContext) _application.getProperties().get(ContextPropertyKeys.SERVER_CONTEXT.name()); _zkBaseDataAccessor = _serverContext.getByteArrayZkBaseDataAccessor(); path = "/" + path; switch (cmd) { case exists: return exists(path); case getBinaryData: return getData(path, cmd); case getStringData: return getData(path, cmd); case getChildren: return getChildren(path); default: LOG.error("Unsupported command :" + commandStr); return badRequest("Unsupported command :" + commandStr); } }</code><technical_language>In opinion, exceptions for control flow performance implications. I a options reach want : 1. Guava's Enums: Enums.getIfPresent(). public static ZooKeeperCommand getIfPresent(String command) { return Enums.getIfPresent(ZooKeeperCommand.class, command).orNull(); } 2. Static map index: private static final Map<String, ZooKeeperCommand> namesMap = Maps.newHashMapWithExpectedSize(ZooKeeperCommand.values().length); static { for (ZooKeeperCommand command : ZooKeeperCommand.values()) { namesMap.put(suit.name(), command); } } public static ZooKeeperCommand lookupByName(String name) { return namesMap.get(name); }</technical_language>

Target:
public Response get(@PathParam("path") String path, @QueryParam("command") String commandStr) { ZooKeeperCommand cmd = getZooKeeperCommandIfPresent(commandStr); if (cmd == null) { return badRequest("Invalid ZooKeeper command: " + commandStr); } ServerContext _serverContext = (ServerContext) _application.getProperties().get(ContextPropertyKeys.SERVER_CONTEXT.name()); _zkBaseDataAccessor = _serverContext.getByteArrayZkBaseDataAccessor(); path = "/" + path; if (!isPathValid(path)) { String errMsg = "The given path is not a valid ZooKeeper path: " + path; LOG.info(errMsg); return badRequest(errMsg); } switch (cmd) { case exists: return exists(_zkBaseDataAccessor, path); case getBinaryData: return getBinaryData(_zkBaseDataAccessor, path); case getStringData: return getStringData(_zkBaseDataAccessor, path); case getChildren: return getChildren(_zkBaseDataAccessor, path); default: String errMsg = "Unsupported command: " + commandStr; LOG.error(errMsg); return badRequest(errMsg); } }
Source:
<code>public void fetchesRawContent() throws Exception { <START> final String raw = "the raw"; <END> final MkContainer container = new MkGrizzlyContainer().next( new MkAnswer.Simple(HttpURLConnection.HTTP_OK, raw) ).start(); final InputStream stream = new RtContent( new ApacheRequest(container.home()), this.repo(), "raw" ).raw(); try { MatcherAssert.assertThat( IOUtils.toString(stream), Matchers.is(raw) ); MatcherAssert.assertThat( container.take().headers().get(HttpHeaders.ACCEPT).get(0), Matchers.is("application/vnd.github.v3.raw") ); } finally { stream.close(); container.stop(); } }</code><technical_language>some Unicode chars in it, for testing. for example "the raw \u20ac\u0000"</technical_language>

Target:
public void fetchesRawContent() throws Exception { final String raw = "the raw \u20ac"; final MkContainer container = new MkGrizzlyContainer().next( new MkAnswer.Simple(HttpURLConnection.HTTP_OK, raw) ).start(); final InputStream stream = new RtContent( new ApacheRequest(container.home()), this.repo(), "raw" ).raw(); try { MatcherAssert.assertThat( IOUtils.toString(stream, Charsets.UTF_8), Matchers.is(raw) ); MatcherAssert.assertThat( container.take().headers().get(HttpHeaders.ACCEPT).get(0), Matchers.is("application/vnd.github.v3.raw") ); } finally { stream.close(); container.stop(); } }
Source:
<code>public void phaseStarted(LocalSearchPhaseScope phaseScope) { super.phaseStarted(phaseScope); if (initialLevel != null) { for (double initialLevelLevel : ScoreUtils.extractLevelDoubles(initialLevel)) { if (initialLevelLevel < 0.0) { throw new IllegalArgumentException("The initial level (" + initialLevel + ") cannot have negative level (" + initialLevelLevel + ")."); } } initialLevelScoreLevels = ScoreUtils.extractLevelDoubles(initialLevel); levelScoreLevels = initialLevelScoreLevels; } else { initialLevelScoreLevelsNegative = ScoreUtils.extractLevelDoubles(phaseScope.getBestScore()); logger.info(phaseScope.getBestScore().toShortString()); levelScoreLevels = initialLevelScoreLevelsNegative; for (int i = 0; i < levelScoreLevels.length; i++) { <START> <END> if (Math.abs(levelScoreLevels[i]) < THRESHOLD) { logger.info(Double.toString(levelScoreLevels[i])); continue; } levelScoreLevels[i] = -levelScoreLevels[i]+5; logger.info(Double.toString(levelScoreLevels[i])); } } levelsLength = levelScoreLevels.length; }</code><technical_language>Redundant line</technical_language>

Target:
public void phaseStarted(LocalSearchPhaseScope phaseScope) { super.phaseStarted(phaseScope); if (initialWaterLevel != null) { for (double initialLevelLevel : ScoreUtils.extractLevelDoubles(initialWaterLevel)) { if (initialLevelLevel < 0.0) { throw new IllegalArgumentException("The initial level (" + initialWaterLevel + ") cannot have negative level (" + initialLevelLevel + ")."); } } currentWaterLevel = initialWaterLevel; } else { currentWaterLevel = phaseScope.getBestScore().negate(); } }
Source:
<code>final SQLException checkException(final SQLException sqle) { final String sqlState = sqle.getSQLState(); if (sqlState != null) { if (sqlState.startsWith("08") || SQL_ERRORS.contains(sqlState)) { <START> if (delegate != ClosedConnection.CLOSED_CONNECTION) { <END> LOGGER.warn("{} - Connection marked as broken because of SQLSTATE({}), ErrorCode({})", poolEntry.getPoolName(), delegate, sqlState, sqle.getErrorCode(), sqle); leakTask.cancel(); poolEntry.evict("(connection is broken)"); delegate = ClosedConnection.CLOSED_CONNECTION; } } else { final SQLException nse = sqle.getNextException(); if (nse != null && nse != sqle) { checkException(nse); } } } return sqle; }</code><technical_language>merge conditional in 149 147</technical_language>

Target:
final SQLException checkException(final SQLException sqle) { final String sqlState = sqle.getSQLState(); if (sqlState != null && delegate != ClosedConnection.CLOSED_CONNECTION) { if (sqlState.startsWith("08") || SQL_ERRORS.contains(sqlState)) { LOGGER.warn("{} - Connection marked as broken because of SQLSTATE({}), ErrorCode({})", poolEntry.getPoolName(), delegate, sqlState, sqle.getErrorCode(), sqle); leakTask.cancel(); poolEntry.evict("(connection is broken)"); delegate = ClosedConnection.CLOSED_CONNECTION; } else { final SQLException nse = sqle.getNextException(); if (nse != null && nse != sqle) { checkException(nse); } } } return sqle; }
Source:
<code>public AzureBlobStorageImpl() { <START> new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(); <END> }</code><technical_language>I this is regression. Please check generator version <LINK_0></technical_language>

Target:
public AzureBlobStorageImpl() { this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build()); }
Source:
<code>private List<Vector3i> getBlockLocations(Location<World> worldLocation, int height, int width) { WorldBorder worldBorder = (WorldBorder) worldLocation.getExtent().getWorldBorder(); int worldBorderMinX = GenericMath.floor(worldBorder.minX()); int worldBorderMinZ = GenericMath.floor(worldBorder.minZ()); int worldBorderMaxX = GenericMath.floor(worldBorder.maxX()); int worldBorderMaxZ = GenericMath.floor(worldBorder.maxZ()); int worldMaxY = worldLocation.getExtent().getBlockMax().getY(); Vector3i vectorLocation = worldLocation.getBlockPosition(); int minY = GenericMath.clamp(vectorLocation.getY() - height, 0, worldMaxY); int maxY = GenericMath.clamp(vectorLocation.getY() + height, 0, worldMaxY); int minX = GenericMath.clamp(vectorLocation.getX() - width, worldBorderMinX, worldBorderMaxX); int maxX = GenericMath.clamp(vectorLocation.getX() + width, worldBorderMinX, worldBorderMaxX); int minZ = GenericMath.clamp(vectorLocation.getZ() - width, worldBorderMinZ, worldBorderMaxZ); int maxZ = GenericMath.clamp(vectorLocation.getZ() + width, worldBorderMinZ, worldBorderMaxZ); List<Vector3i> vectors = new ArrayList<>(); for (int x = minX; x <= maxX; x++) { for (int y = minY; y <= maxY; y++) { for (int z = minZ; z <= maxZ; z++) { vectors.add(new Vector3i(x, y, z)); } } } return vectors.stream() <START> .sorted((first, second) -> Integer.compare(vectorLocation.distanceSquared(first), vectorLocation.distanceSquared(second))) <END> .collect(Collectors.toList()); }</code><technical_language>This be: java .sorted(Comparator.comparingInt(vectorLocation::distanceSquared)) easier read</technical_language>

Target:
private Stream<Vector3i> getBlockLocations(Location<World> worldLocation, int height, int width) { WorldBorder worldBorder = (WorldBorder) worldLocation.getExtent().getWorldBorder(); int worldBorderMinX = GenericMath.floor(worldBorder.minX()); int worldBorderMinZ = GenericMath.floor(worldBorder.minZ()); int worldBorderMaxX = GenericMath.floor(worldBorder.maxX()); int worldBorderMaxZ = GenericMath.floor(worldBorder.maxZ()); int worldMaxY = worldLocation.getExtent().getBlockMax().getY(); Vector3i vectorLocation = worldLocation.getBlockPosition(); int minY = GenericMath.clamp(vectorLocation.getY() - height, 0, worldMaxY); int maxY = GenericMath.clamp(vectorLocation.getY() + height, 0, worldMaxY); int minX = GenericMath.clamp(vectorLocation.getX() - width, worldBorderMinX, worldBorderMaxX); int maxX = GenericMath.clamp(vectorLocation.getX() + width, worldBorderMinX, worldBorderMaxX); int minZ = GenericMath.clamp(vectorLocation.getZ() - width, worldBorderMinZ, worldBorderMaxZ); int maxZ = GenericMath.clamp(vectorLocation.getZ() + width, worldBorderMinZ, worldBorderMaxZ); List<Vector3i> vectors = new ArrayList<>(); for (int x = minX; x <= maxX; x++) { for (int y = minY; y <= maxY; y++) { for (int z = minZ; z <= maxZ; z++) { vectors.add(new Vector3i(x, y, z)); } } } return vectors.stream().sorted(Comparator.comparingInt(vectorLocation::distanceSquared)); }
Source:
<code>public void onArenaStarts(PAStartEvent event) { Map<String, dObject> context = new HashMap<String, dObject>(); Arena arena = event.getArena(); context.put("arena", new Element(arena.getName())); ArrayList<dPlayer> fighters = new ArrayList<dPlayer>(); for (ArenaPlayer player : event.getArena().getFighters()) fighters.add(new dPlayer(player.get())); context.put("fighters", new dList(fighters)); OldEventManager.doEvents(Arrays.asList ("pvparena starts"), <START> null, context); <END> }</code><technical_language>.. wot</technical_language>

Target:
public void onArenaStarts(PAStartEvent event) { Map<String, dObject> context = new HashMap<String, dObject>(); Arena arena = event.getArena(); context.put("arena", new Element(arena.getName())); ArrayList<dPlayer> fighters = new ArrayList<dPlayer>(); for (ArenaPlayer player : event.getArena().getFighters()) fighters.add(new dPlayer(player.get())); context.put("fighters", new dList(fighters)); OldEventManager.doEvents(Arrays.asList ("pvparena starts", "arena starts"), null, context); }
Source:
<code>protected void doInit() { <START> this.setBeanFactory(this.getBeanFactory()); <END> this.initialized = true; if (this.evaluationContext == null) { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.getBeanFactory()); TypeLocator typeLocator = this.evaluationContext.getTypeLocator(); if (typeLocator instanceof StandardTypeLocator) { ((StandardTypeLocator) typeLocator).registerImport(Query.class.getPackage().getName()); } } if (this.mongoTemplate == null) { this.mongoTemplate = new MongoTemplate(this.mongoDbFactory, this.mongoConverter); } }</code><technical_language>This nothing. remove</technical_language>

Target:
protected void doInit() { Assert.state(this.queryExpression != null, "no query specified"); Assert.state(this.collectionNameExpression != null, "no collection name specified"); if (this.evaluationContext == null) { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.getBeanFactory()); TypeLocator typeLocator = this.evaluationContext.getTypeLocator(); if (typeLocator instanceof StandardTypeLocator) { ((StandardTypeLocator) typeLocator).registerImport(Query.class.getPackage().getName()); } } if (this.mongoTemplate == null) { this.mongoTemplate = new MongoTemplate(this.mongoDbFactory, this.mongoConverter); } }
Source:
<code>public void incrementUsageCount(Long templateId) { try { Template toUpdate = em.find(Template.class, templateId); Long usage = toUpdate.getUsageCount(); usage++; toUpdate.setUsageCount(usage); em.merge(toUpdate); } catch (Exception e) { <START> logger.log(Level.INFO, "Increment usage count failed on template id {0}. ", templateId); <END> } }</code><technical_language>this log a higher level</technical_language>

Target:
public void incrementUsageCount(Long templateId) { Template toUpdate = em.find(Template.class, templateId); Long usage = toUpdate.getUsageCount(); usage++; toUpdate.setUsageCount(usage); em.merge(toUpdate); }
Source:
<code>public static String canonicalNameFromTypeMirror(final TypeMirror type) { final StringBuilder result = new StringBuilder(); type.accept(new SimpleTypeVisitor6<Void, Void>() { @Override public Void visitDeclared(DeclaredType declaredType, Void v) { TypeElement typeElement = (TypeElement) declaredType.asElement(); result.append(typeElement.toString()); return null; } @Override public Void visitPrimitive(PrimitiveType primitiveType, Void v) { return null; } @Override public Void visitArray(ArrayType arrayType, Void v) { result.append(arrayType.getComponentType().toString()); <START> result.append("[]"); <END> return null; } @Override public Void visitTypeVariable(TypeVariable typeVariable, Void v) { return null; } @Override protected Void defaultAction(TypeMirror typeMirror, Void v) { throw new UnsupportedOperationException( "Unexpected TypeKind " + typeMirror.getKind() + " for " + typeMirror); } }, null); return result.toString(); }</code><technical_language>curious . . . idea if this works for lookups in processing env</technical_language>

Target:
public static String canonicalNameFromTypeMirror(final TypeMirror type) { final StringBuilder result = new StringBuilder(); type.accept(new SimpleTypeVisitor6<Void, Void>() { @Override public Void visitDeclared(DeclaredType declaredType, Void v) { TypeElement typeElement = (TypeElement) declaredType.asElement(); result.append(typeElement.toString()); return null; } @Override public Void visitPrimitive(PrimitiveType primitiveType, Void v) { throw new UnsupportedOperationException( "Unexpected TypeKind " + primitiveType.getKind() + " for " + primitiveType); } @Override public Void visitArray(ArrayType arrayType, Void v) { throw new UnsupportedOperationException( "Unexpected TypeKind " + arrayType.getKind() + " for " + arrayType); } @Override public Void visitTypeVariable(TypeVariable typeVariable, Void v) { throw new UnsupportedOperationException( "Unexpected TypeKind " + typeVariable.getKind() + " for " + typeVariable); } @Override protected Void defaultAction(TypeMirror typeMirror, Void v) { throw new UnsupportedOperationException( "Unexpected TypeKind " + typeMirror.getKind() + " for " + typeMirror); } }, null); return result.toString(); }
Source:
<code>public synchronized void increaseToAtLeast(long newTimestamp) { long current = this.timestamp; if (newTimestamp > current) { <START> this.timestamp = newTimestamp; <END> } }</code><technical_language>OK. I suppose significant gains do current altogether</technical_language>

Target:
public synchronized void increaseToAtLeast(long newTimestamp) { if (newTimestamp > this.timestamp) { this.timestamp = newTimestamp; } }
Source:
<code>private String tfsSdkCommandTCLAdapterClassName() { String className = "com.thoughtworks.go.tfssdk14.TfsSDKCommandTCLAdapter"; <START> if (new SystemEnvironment().get(SystemEnvironment.TFS_SDK_10)) { <END> className = "com.thoughtworks.go.tfssdk10.TfsSDKCommandTCLAdapter"; } return className; }</code><technical_language>rely SystemEnvironment agent side get this value</technical_language>

Target:
private String tfsSdkCommandTCLAdapterClassName() { return "com.thoughtworks.go.tfssdk.TfsSDKCommandTCLAdapter"; }
Source:
<code>private void mappingUnifiedNativeNormalAd(NendAdNative ad, boolean shouldReturnUrlsForImageAssets, Bitmap adImageBitmap, Bitmap logoImageBitmap) { Context context = forwarder.contextWeakReference.get(); <START> if (context == null) { Log.e(TAG, "Your context may be released..."); forwarder.failedToLoad(AdRequest.ERROR_CODE_INVALID_REQUEST); } else { <END> forwarder.unifiedNativeAdMapper = new NendUnifiedNativeNormalAdMapper( context, forwarder, ad, (shouldReturnUrlsForImageAssets || adImageBitmap != null ? new NendNativeMappedImage( forwarder.contextWeakReference.get(), adImageBitmap, Uri.parse(ad.getAdImageUrl())) : null ), (shouldReturnUrlsForImageAssets || logoImageBitmap != null ? new NendNativeMappedImage( forwarder.contextWeakReference.get(), logoImageBitmap, Uri.parse(ad.getLogoImageUrl())) : null ) ); forwarder.adLoaded(); } }</code><technical_language>return this if() block remove else block eliminate nesting</technical_language>

Target:
private void mappingUnifiedNativeNormalAd(NendAdNative ad, boolean shouldReturnUrlsForImageAssets, Bitmap adImageBitmap, Bitmap logoImageBitmap) { Context context = forwarder.getContextFromWeakReference(); if (context == null) { Log.e(TAG, "Your context may be released..."); forwarder.failedToLoad(AdRequest.ERROR_CODE_INVALID_REQUEST); return; } NendNativeMappedImage adImage = null; if (shouldReturnUrlsForImageAssets || adImageBitmap != null) { adImage = new NendNativeMappedImage(context, adImageBitmap, Uri.parse(ad.getAdImageUrl())); } NendNativeMappedImage logoImage = null; if (shouldReturnUrlsForImageAssets || logoImageBitmap != null) { logoImage = new NendNativeMappedImage(context, logoImageBitmap, Uri.parse(ad.getLogoImageUrl())); } forwarder.unifiedNativeAdMapper = new NendUnifiedNativeNormalAdMapper(context, forwarder, ad, adImage, logoImage); forwarder.adLoaded(); }
Source:
<code><START> private void submitSearch(@Nullable final String query, boolean delayed) { <END> mSearchQuery = query; if (query == null || query.length() < MIN_SEARCH_QUERY_SIZE) { mAdapter.clear(); showEmptyView(true); return; } if (delayed) { mHandler.postDelayed(new Runnable() { @Override public void run() { if (StringUtils.equals(query, mSearchQuery)) { submitSearch(query, false); } } }, 500); } else { requestStockMedia(query, 1); } }</code><technical_language>this is activity related, I this in ViewModel. need clear adapter manually handle empty view. This creates inconsistency view view model. If search through, remove current data in view model post update observer pattern do thing. a suggestion handle empty view previously. is example of this starts [here](<LINK_0></technical_language>

Target:
private void submitSearch(@Nullable final String query, boolean delayed) { mSearchQuery = query; if (delayed) { mHandler.postDelayed(new Runnable() { @Override public void run() { if (StringUtils.equals(query, mSearchQuery)) { submitSearch(query, false); } } }, 500); } else { fetchStockMedia(query, 1); } }
Source:
<code>protected void <START> writeAttributeRaw(String <END> attributeName, String attributeValue) throws XMLStreamException { try { outputStream.write(" ".getBytes(StandardCharsets.UTF_8)); outputStream.write(attributeName.getBytes(StandardCharsets.UTF_8)); outputStream.write("=\"".getBytes(StandardCharsets.UTF_8)); String escapedValue = attributeValue.replace("&", "&amp;"); escapedValue = escapedValue.replace("<", "&lt;"); escapedValue = escapedValue.replace(">", "&gt;"); escapedValue = escapedValue.replace("\"", "&quot;"); escapedValue = escapedValue.replace("\n", "&#10;"); outputStream.write(escapedValue.getBytes(StandardCharsets.UTF_8)); outputStream.write("\" ".getBytes(StandardCharsets.UTF_8)); } catch (IOException e) { throw new XMLStreamException("Could not write raw attribute", e); } }</code><technical_language>This name reflect is more escaping "writeAttribute" function</technical_language>

Target:
protected void writeAttributeRaw(String attributeName, String attributeValue) throws XMLStreamException { try (Writer osWriter = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8)) { osWriter.write(" "); osWriter.write(attributeName); osWriter.write("=\""); osWriter.write(attributeValue); osWriter.write("\" "); } catch (IOException e) { throw new XMLStreamException("Could not write raw attribute", e); } }
Source:
<code><START> private void processSelectionChanged() { <END> List<T> selectedItems = getSelectedItems(); selectedIndexes.clear(); model.getItems().forEach(item -> { if (selectedItems.contains(item)) { selectedIndexes.add(model.getItemsAsList().indexOf(item)); } }); updateInfoPanel(); }</code><technical_language>suggestion above, I this method necessary</technical_language>

Target:
private void processSelectionChanged() { List<T> selectedItems = selectionModel.getSelectedObjects(); selectedIndexes.clear(); model.getItems().forEach(item -> { if (selectedItems.contains(item)) { selectedIndexes.add(model.getItemsAsList().indexOf(item)); } }); updateInfoPanel(); }
Source:
<code>private Locale getLocale() { final ServiceReference<EMFFormsLocaleProvider> serviceReference = bundleContext .getServiceReference(EMFFormsLocaleProvider.class); if (serviceReference == null) { <START> return null; <END> } final EMFFormsLocaleProvider localeProvider = bundleContext.getService(serviceReference); final Locale result = localeProvider.getLocale(); bundleContext.ungetService(serviceReference); return result; }</code><technical_language>null is handled in callers</technical_language>

Target:
private String getLocale() { final ServiceReference<EMFFormsLocaleProvider> serviceReference = bundleContext .getServiceReference(EMFFormsLocaleProvider.class); if (serviceReference == null) { return null; } final EMFFormsLocaleProvider localeProvider = bundleContext.getService(serviceReference); final Locale result = localeProvider.getLocale(); bundleContext.ungetService(serviceReference); return result.getLanguage(); }
Source:
<code>public ThePresentationReconcilerGreen() { RuleBasedScanner scanner= new RuleBasedScanner(); IRule[] rules = new IRule[1]; rules[0]= new SingleLineRule("'", "'", new Token(new TextAttribute(new Color(Display.getCurrent(), new RGB(255, <START> 0, 0))))); <END> scanner.setRules(rules); DefaultDamagerRepairer dr= new DefaultDamagerRepairer(scanner); this.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); this.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); }</code><technical_language>Currently red, RGB(0, 255, 0)</technical_language>

Target:
public ThePresentationReconcilerGreen() { RuleBasedScanner scanner= new RuleBasedScanner(); IRule[] rules = new IRule[1]; rules[0]= new SingleLineRule("'", "'", new Token(new TextAttribute(new Color(Display.getCurrent(), new RGB(0, 255, 0))))); scanner.setRules(rules); DefaultDamagerRepairer dr= new DefaultDamagerRepairer(scanner); this.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); this.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); }
Source:
<code>protected void doStart() throws Exception { super.doStart(); <START> initSecurityProvider(); <END> RestConfiguration config = CamelContextHelper.getRestConfiguration(getCamelContext(), getComponentName()); if (config.getComponentProperties() != null && !config.getComponentProperties().isEmpty()) { setProperties(this, config.getComponentProperties()); } }</code><technical_language>init if security provider is null</technical_language>

Target:
protected void doStart() throws Exception { super.doStart(); if (this.securityProvider == null) { initSecurityProvider(); } RestConfiguration config = CamelContextHelper.getRestConfiguration(getCamelContext(), getComponentName()); if (config.getComponentProperties() != null && !config.getComponentProperties().isEmpty()) { setProperties(this, config.getComponentProperties()); } }
Source:
<code><START> private @NonNull static List<Definition> createIntDefs(int size, int bits) { <END> List<Definition> defs = new ArrayList<>(size); for (int i = 0; i < size; i++) { String content = "test" + i; defs.add(new IntegerDefinition(IntegerDeclaration.createDeclaration(bits, false, 16, ByteOrder.LITTLE_ENDIAN, Encoding.UTF8, content, 24), null, content, i)); } return defs; }</code><technical_language>@NonNull line</technical_language>

Target:
private static List<Definition> createIntDefs(int size, int bits) { List<Definition> defs = new ArrayList<>(size); for (int i = 0; i < size; i++) { String content = "test" + i; defs.add(new IntegerDefinition(IntegerDeclaration.createDeclaration(bits, false, 16, ByteOrder.LITTLE_ENDIAN, Encoding.UTF8, content, 24), null, content, i)); } return defs; }
Source:
<code>public InstrumentationContext<List<ValidationError>> beginValidation(InstrumentationValidationParameters parameters) { return whenCompleted((errors, throwable) -> { if ((errors != null && errors.size() > 0) || throwable != null) { return; } QueryTraversal queryTraversal = newQueryTraversal(parameters); <START> Map<QueryVisitorFieldEnvironment, List<Integer>> valuesByParent = new LinkedHashMap<>(); <END> queryTraversal.visitPostOrder(new QueryVisitorStub() { @Override public void visitField(QueryVisitorFieldEnvironment env) { int childsComplexity = 0; QueryVisitorFieldEnvironment thisNodeAsParent = new QueryVisitorFieldEnvironment(env.getField(), env.getFieldDefinition(), env.getParentType(), env.getParentEnvironment(), env.getArguments(), env.getSelectionSetContainer()); if (valuesByParent.containsKey(thisNodeAsParent)) { childsComplexity = valuesByParent.get(thisNodeAsParent).stream().mapToInt(Integer::intValue).sum(); } int value = calculateComplexity(env, childsComplexity); valuesByParent.putIfAbsent(env.getParentEnvironment(), new ArrayList<>()); valuesByParent.get(env.getParentEnvironment()).add(value); } }); int totalComplexity = valuesByParent.get(null).stream().mapToInt(Integer::intValue).sum(); if (totalComplexity > maxComplexity) { throw mkAbortException(totalComplexity, maxComplexity); } }); }</code><technical_language>put a builder QueryVisitorFieldEnvironment. allow evolve more easily time</technical_language>

Target:
public InstrumentationContext<List<ValidationError>> beginValidation(InstrumentationValidationParameters parameters) { return whenCompleted((errors, throwable) -> { if ((errors != null && errors.size() > 0) || throwable != null) { return; } QueryTraversal queryTraversal = newQueryTraversal(parameters); Map<QueryVisitorFieldEnvironment, List<Integer>> valuesByParent = new LinkedHashMap<>(); queryTraversal.visitPostOrder(new QueryVisitorStub() { @Override public void visitField(QueryVisitorFieldEnvironment env) { int childsComplexity = 0; QueryVisitorFieldEnvironment thisNodeAsParent = new QueryVisitorFieldEnvironmentImpl(env.getField(), env.getFieldDefinition(), env.getParentType(), env.getParentEnvironment(), env.getArguments(), env.getSelectionSetContainer()); if (valuesByParent.containsKey(thisNodeAsParent)) { childsComplexity = valuesByParent.get(thisNodeAsParent).stream().mapToInt(Integer::intValue).sum(); } int value = calculateComplexity(env, childsComplexity); valuesByParent.putIfAbsent(env.getParentEnvironment(), new ArrayList<>()); valuesByParent.get(env.getParentEnvironment()).add(value); } }); int totalComplexity = valuesByParent.get(null).stream().mapToInt(Integer::intValue).sum(); if (totalComplexity > maxComplexity) { throw mkAbortException(totalComplexity, maxComplexity); } }); }
Source:
<code>public void finish(OwlTelescopeReporter telescope) { processSeenContent(telescope); processTopLevelSeries(telescope); processStandAloneEpisodes(telescope); if (cached.values().size() > 0) { log.warn("{} extracted but unwritten", cached.values().size()); for (Entry<String, Collection<ModelWithPayload<? extends Content>>> mapping : cached.asMap().entrySet()) { log.warn(mapping.toString()); } for(ModelWithPayload<? extends Content> content : cached.values()) { telescope.reportFailedEvent( content.getModel().getId(), "Content has been extracted but not written", EntityType.CONTENT, content.getPayload() ); } <START> } <END> seenContainer.clear(); cached.clear(); topLevelSeries.clear(); standAloneEpisodes.clear(); checkForDeletedContent(telescope); seenContent.clear(); }</code><technical_language>reason for sesparate loop. get values entrySet (i.e. 'mapping') 'mapping.value()'</technical_language>

Target:
public void finish(OwlTelescopeReporter telescope) { processSeenContent(telescope); processTopLevelSeries(telescope); processStandAloneEpisodes(telescope); if (cached.values().size() > 0) { log.warn("{} extracted but unwritten", cached.values().size()); for (Entry<String, Collection<ModelWithPayload<? extends Content>>> mapping : cached.asMap().entrySet()) { log.warn(mapping.toString()); for(ModelWithPayload<? extends Content> map : mapping.getValue()) { telescope.reportFailedEvent( map.getModel().getId(), "Content has been extracted but not written", EntityType.CONTENT, map.getPayload() ); } } } seenContainer.clear(); cached.clear(); topLevelSeries.clear(); standAloneEpisodes.clear(); checkForDeletedContent(telescope); seenContent.clear(); }
Source:
<code>public void transform(StructuredRecord in, Emitter<StructuredRecord> emitter) throws Exception { String body = in.get(config.field); <START> if (body == null) { <END> return; } try { org.apache.commons.csv.CSVParser parser = org.apache.commons.csv.CSVParser.parse(body, csvFormat); List<CSVRecord> records = parser.getRecords(); for (CSVRecord record : records) { emitter.emit(createStructuredRecord(record, in)); } } catch (IOException e) { throw Throwables.propagate(e); } }</code><technical_language>lets add a short blurb in field description in .md doc file describing records a null field get filtered out</technical_language>

Target:
public void transform(StructuredRecord in, Emitter<StructuredRecord> emitter) throws Exception { String body = in.get(config.field); try { if (body == null) { emitter.emit(createStructuredRecord(null, in)); } else { org.apache.commons.csv.CSVParser parser = org.apache.commons.csv.CSVParser.parse(body, csvFormat); List<CSVRecord> records = parser.getRecords(); for (CSVRecord record : records) { emitter.emit(createStructuredRecord(record, in)); } } } catch (IOException e) { throw Throwables.propagate(e); } }
Source:
<code>private static String encodingParams(final List<String> paramValues, final String encoding) throws UnsupportedEncodingException { if (null == paramValues) { return null; } <START> StringBuilder sb = new StringBuilder(); <END> for (Iterator<String> iter = paramValues.iterator(); iter.hasNext();) { sb.append(iter.next()).append("="); sb.append(URLEncoder.encode(iter.next(), encoding)); if (iter.hasNext()) { sb.append("&"); } } return sb.toString(); }</code><technical_language>Please name, stringBuilder</technical_language>

Target:
private static String encodingParams(final List<String> paramValues, final String encoding) throws UnsupportedEncodingException { if (null == paramValues || 0 == paramValues.size()) { return null; } StringBuilder stringBuilder = new StringBuilder(); for (Iterator<String> iter = paramValues.iterator(); iter.hasNext();) { stringBuilder.append(iter.next()).append("="); stringBuilder.append(URLEncoder.encode(iter.next(), encoding)); if (iter.hasNext()) { stringBuilder.append("&"); } } return stringBuilder.toString(); }
Source:
<code>public void addNotification() throws Exception { Notification notification = null; for (int i = 1; i <= NO_OF_DEVICES; i++) { DeviceIdentifier testDeviceIdentifier = new DeviceIdentifier(DEVICE_ID_PREFIX + i, DEVICE_TYPE); notification = TestDataHolder.getNotification(i, Notification.Status.NEW.toString(), testDeviceIdentifier.toString(), TEST_NOTIFICATION_DESCRIPTION, DEVICE_ID_PREFIX + i, NOTIFICATION_OPERATION_ID, DEVICE_TYPE); Assert.assertTrue(notificationManagementService.addNotification(testDeviceIdentifier, notification)); } try { notificationManagementService.addNotification(new DeviceIdentifier(DEVICE_ID_PREFIX + 123, DEVICE_TYPE), notification); <START> Assert.fail(); <END> } catch (EntityDoesNotExistException ignored) { } }</code><technical_language>this is failing always? If this is test exceptions, annotation based testing. Testng annotation based testing for testing Exceptions</technical_language>

Target:
public void addNotification() throws NotificationManagementException { for (int i = 1; i <= NO_OF_DEVICES; i++) { DeviceIdentifier testDeviceIdentifier = new DeviceIdentifier(DEVICE_ID_PREFIX + i, DEVICE_TYPE); Notification notification = TestDataHolder.getNotification(i, Notification.Status.NEW.toString(), testDeviceIdentifier.toString(), TEST_NOTIFICATION_DESCRIPTION, DEVICE_ID_PREFIX + i, NOTIFICATION_OPERATION_ID, DEVICE_TYPE); Assert.assertTrue(notificationManagementService.addNotification(testDeviceIdentifier, notification)); } }
Source:
<code>public void testGetById(){ StorageDevice storageDevice = dao.getById(EXISTING_STORAGE_DEVICE_ID_1); assertNotNull("Failed to retrive storage device", storageDevice); <START> assertEquals("Failed to retrive corrective storage device", storageDevice.getId(), EXISTING_STORAGE_DEVICE_ID_1); <END> storageDevice = dao.getById(NON_EXISTING_STORAGE_DEVICE_ID); assertNull(storageDevice); }</code><technical_language>expected arg, actual arg</technical_language>

Target:
public void testGetById(){ StorageDevice storageDevice = dao.getById(EXISTING_STORAGE_DEVICE_ID_1); assertNotNull("Failed to retrive storage device", storageDevice); assertEquals("Failed to retrive corrective storage device", EXISTING_STORAGE_DEVICE_ID_1, storageDevice.getId()); storageDevice = dao.getById(NON_EXISTING_STORAGE_DEVICE_ID); assertNull(storageDevice); }
Source:
<code>private static SrlBankProblem extractBankProblem(final DBObject dbObject, final String problemBankId, final boolean isAdmin) { final SrlBankProblem.Builder exactProblem = SrlBankProblem.newBuilder(); exactProblem.setId(problemBankId); exactProblem.setQuestionText((String) dbObject.get(QUESTION_TEXT)); if (isAdmin) { exactProblem.setSolutionId((String) dbObject.get(SOLUTION_ID)); } exactProblem.setCourseTopic((String) dbObject.get(COURSE_TOPIC)); exactProblem.setSubTopic((String) dbObject.get(SUB_TOPIC)); exactProblem.setSource((String) dbObject.get(SOURCE)); exactProblem.setQuestionType(Util.QuestionType.valueOf((Integer) dbObject.get(QUESTION_TYPE))); try { if (dbObject.containsField(DatabaseStringConstants.SPECIAL_QUESTION_DATA)) { exactProblem.setSpecialQuestionData( SlideManager.createElementFromQuery((DBObject) dbObject.get(DatabaseStringConstants.SPECIAL_QUESTION_DATA))); } } catch (DatabaseAccessException e) { LOG.error("Error parsing lecture element", e); <START> e.printStackTrace(); <END> } exactProblem.addAllOtherKeywords((ArrayList) dbObject.get(KEYWORDS)); if (dbObject.get(SCRIPT) != null) { exactProblem.setScript((String) dbObject.get(SCRIPT)); } return exactProblem.build(); }</code><technical_language>print stack trace console log it</technical_language>

Target:
private static SrlBankProblem extractBankProblem(final DBObject dbObject, final String problemBankId, final boolean isAdmin) { final SrlBankProblem.Builder exactProblem = SrlBankProblem.newBuilder(); exactProblem.setId(problemBankId); exactProblem.setQuestionText((String) dbObject.get(QUESTION_TEXT)); if (isAdmin) { exactProblem.setSolutionId((String) dbObject.get(SOLUTION_ID)); } exactProblem.setCourseTopic((String) dbObject.get(COURSE_TOPIC)); exactProblem.setSubTopic((String) dbObject.get(SUB_TOPIC)); exactProblem.setSource((String) dbObject.get(SOURCE)); exactProblem.setQuestionType(Util.QuestionType.valueOf((Integer) dbObject.get(QUESTION_TYPE))); try { if (dbObject.containsField(DatabaseStringConstants.SPECIAL_QUESTION_DATA)) { exactProblem.setSpecialQuestionData( SlideManager.createElementFromQuery((DBObject) dbObject.get(DatabaseStringConstants.SPECIAL_QUESTION_DATA))); } } catch (DatabaseAccessException e) { LOG.error("Error parsing lecture element", e); } exactProblem.addAllOtherKeywords((ArrayList) dbObject.get(KEYWORDS)); if (dbObject.get(SCRIPT) != null) { exactProblem.setScript((String) dbObject.get(SCRIPT)); } return exactProblem.build(); }
Source:
<code>private void setupAttribution() { Page page = parentFragment.getPage(); pageLicenseText.setText(Html.fromHtml(activity.getString(R.string.content_license_html))); pageLicenseText.setMovementMethod(new LinkMovementMethodExt(linkHandler)); if (page.isMainPage() || page.isFilePage()) { pageLastUpdatedText.setVisibility(View.GONE); } else { String lastUpdatedHtml = "<a href=\"" + page.getTitle().getUriForAction("history") + "\">" + activity.getString(R.string.last_updated_text, formatDateRelative(page.getPageProperties().getLastModified()) + "</a>"); String discussionHtml = "<a href=\"" + page.getTitle().getPrefixedUri("Talk") + "\">" + activity.getString(R.string.talk_page_link_text) + "</a>"; <START> pageLastUpdatedText.setText(Html.fromHtml(lastUpdatedHtml + " -- " + discussionHtml)); <END> pageLastUpdatedText.setMovementMethod(new LinkMovementMethodExt(linkHandler)); pageLastUpdatedText.setVisibility(View.VISIBLE); } }</code><technical_language>minor nit: &mdash; instead of "--"</technical_language>

Target:
private void setupAttribution() { Page page = parentFragment.getPage(); pageLicenseText.setText(Html.fromHtml(activity.getString(R.string.content_license_html))); pageLicenseText.setMovementMethod(new LinkMovementMethodExt(linkHandler)); if (page.isMainPage() || page.isFilePage()) { pageLastUpdatedText.setVisibility(View.GONE); } else { String lastUpdatedHtml = "<a href=\"" + page.getTitle().getUriForAction("history") + "\">" + activity.getString(R.string.last_updated_text, formatDateRelative(page.getPageProperties().getLastModified()) + "</a>"); String discussionHtml = "<a href=\"" + page.getTitle().getPrefixedUri("Talk") + "\">" + activity.getString(R.string.talk_page_link_text) + "</a>"; pageLastUpdatedText.setText(Html.fromHtml(lastUpdatedHtml + " &mdash; " + discussionHtml)); pageLastUpdatedText.setMovementMethod(new LinkMovementMethodExt(linkHandler)); pageLastUpdatedText.setVisibility(View.VISIBLE); } }
Source:
<code>public void onReceive(Context context, Intent intent) { String command = intent.getStringExtra(COMMAND); List<String> supportedCommands = Arrays.asList(COMMAND_ENABLE, COMMAND_DISABLE); if (!supportedCommands.contains(command)) { Log.e(TAG, String.format("Cannot identify the command [%s]", command)); setResultCode(Activity.RESULT_CANCELED); return; } boolean isSuccessful; AbstractSettingHandler handler = getHandler(context); if (handler == null) { setResultCode(Activity.RESULT_CANCELED); return; } if (command.equals(COMMAND_ENABLE)) { <START> isSuccessful = getHandler(context).enable(); <END> } else { isSuccessful = getHandler(context).disable(); } setResultCode(isSuccessful ? Activity.RESULT_OK : Activity.RESULT_CANCELED); }</code><technical_language>handler instead of calling getHandler</technical_language>

Target:
public void onReceive(Context context, Intent intent) { String command = intent.getStringExtra(COMMAND); List<String> supportedCommands = Arrays.asList(COMMAND_ENABLE, COMMAND_DISABLE); if (!supportedCommands.contains(command)) { Log.e(TAG, String.format("Cannot identify the command [%s]", command)); setResultCode(Activity.RESULT_CANCELED); return; } boolean isSuccessful; AbstractSettingHandler handler = getHandler(context); if (handler == null) { setResultCode(Activity.RESULT_CANCELED); return; } if (command.equals(COMMAND_ENABLE)) { isSuccessful = handler.enable(); } else { isSuccessful = handler.disable(); } setResultCode(isSuccessful ? Activity.RESULT_OK : Activity.RESULT_CANCELED); }
Source:
<code>private void initializeNetworkList() { AsyncDataProvider.getInstance().getAllDataCenterNetworks(new AsyncQuery<>(networks -> { Set<Guid> iscsiBonded = isBondExist() ? new HashSet<>(getIscsiBond().getNetworkIds()) : Collections.emptySet(); List<Network> selected = networks.stream().filter(n -> iscsiBonded.contains(n.getId())).collect(Collectors.toList()); <START> networks = networks.stream().filter(n -> !n.isExternal()).collect(Collectors.toList()); <END> filterNonRequiredNetworks(networks, selected); }), getStoragePool().getId()); }</code><technical_language>do line 69 iteration of selected shorter</technical_language>

Target:
private void initializeNetworkList() { AsyncDataProvider.getInstance().getAllDataCenterNetworks(new AsyncQuery<>(networks -> { Set<Guid> iscsiBonded = isBondExist() ? new HashSet<>(getIscsiBond().getNetworkIds()) : Collections.emptySet(); networks = networks.stream().filter(n -> !n.isExternal()).collect(Collectors.toList()); List<Network> selected = networks.stream().filter(n -> iscsiBonded.contains(n.getId())).collect(Collectors.toList()); filterNonRequiredNetworks(networks, selected); }), getStoragePool().getId()); }
Source:
<code>public void reInitSysProc(CatalogContext catalogContext, CatalogSpecificPlanner csp) { assert(m_procedure != null); if (! m_isSysProc) { return; } <START> assert(m_procedure instanceof VoltSystemProcedure); <END> ((VoltSystemProcedure) m_procedure).initSysProc(m_site, catalogContext.cluster, catalogContext.getClusterSettings(), catalogContext.getNodeSettings()); m_csp = csp; }</code><technical_language>This assert is needed hit line 228 if procedure is a VoltSystemProcedure</technical_language>

Target:
public void reInitSysProc(CatalogContext catalogContext, CatalogSpecificPlanner csp) { assert(m_procedure != null); if (! m_isSysProc) { return; } ((VoltSystemProcedure) m_procedure).initSysProc(m_site, catalogContext.cluster, catalogContext.getClusterSettings(), catalogContext.getNodeSettings()); m_csp = csp; }
Source:
<code><START> public FluoConfiguration resolveFluoConfiguration(String appName) { <END> try { return getAppConfiguration(appName); } catch (FluoException e) { FluoConfiguration config = new FluoConfiguration(getFluoConfiguration()); config.setApplicationName(appName); return config; } }</code><technical_language>if this place print it. I thinking useful print config file ended using</technical_language>

Target:
public FluoConfiguration resolveFluoConfiguration(String appName) { return resolveFluoConfiguration(appName, true); }