auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public long getPositionsSizeInBytes(boolean[] positions) { int positionCount = getPositionCount(); checkValidPositions(positions, positionCount); boolean[] entryPositions = new boolean[getRawKeyBlock().getPositionCount()]; int usedEntryCount = 0; int usedPositionCount = 0; int end = Math.min(positionCount, positions.length); for (int i = 0; i < end; ++i) { if (positions[i]) { usedPositionCount++; int entriesStart = getOffsets()[getOffsetBase() + i]; int entriesEnd = getOffsets()[getOffsetBase() + i + 1]; for (int j = entriesStart; j < entriesEnd; j++) { entryPositions[j] = true; } usedEntryCount += (entriesEnd - entriesStart); } } <START> long size = getRawKeyBlock().getPositionsSizeInBytes(entryPositions) + <END> getRawValueBlock().getPositionsSizeInBytes(entryPositions) + (Integer.BYTES + Byte.BYTES) * (long) usedPositionCount + Integer.BYTES * HASH_MULTIPLIER * (long) usedEntryCount; return size; }</code><technical_language>unnecessary change</technical_language>

Target:
public long getPositionsSizeInBytes(boolean[] positions) { int positionCount = getPositionCount(); checkValidPositions(positions, positionCount); boolean[] entryPositions = booleanArrayPool.allocateAndInitialize(getRawKeyBlock().getPositionCount()); int usedEntryCount = 0; int usedPositionCount = 0; int end = Math.min(positionCount, positions.length); for (int i = 0; i < end; ++i) { if (positions[i]) { usedPositionCount++; int entriesStart = getOffsets()[getOffsetBase() + i]; int entriesEnd = getOffsets()[getOffsetBase() + i + 1]; for (int j = entriesStart; j < entriesEnd; j++) { entryPositions[j] = true; } usedEntryCount += (entriesEnd - entriesStart); } } booleanArrayPool.release(entryPositions); return getRawKeyBlock().getPositionsSizeInBytes(entryPositions) + getRawValueBlock().getPositionsSizeInBytes(entryPositions) + (Integer.BYTES + Byte.BYTES) * (long) usedPositionCount + Integer.BYTES * HASH_MULTIPLIER * (long) usedEntryCount; }
Source:
<code>public void configurePipeline(PipelineConfigurer pipelineConfigurer) { super.configurePipeline(pipelineConfigurer); FailureCollector failureCollector = pipelineConfigurer.getStageConfigurer().getFailureCollector(); createRecordTransformConfig.validate(failureCollector); Schema outputSchema = null; if (pipelineConfigurer.getStageConfigurer().getInputSchema() != null) { outputSchema = getOutputSchema(pipelineConfigurer.getStageConfigurer().getInputSchema(), failureCollector); } <START> pipelineConfigurer.getStageConfigurer().setOutputSchema(outputSchema); <END> }</code><technical_language>need handle case fieldMapping is a macro, output schema is in configurePipeline</technical_language>

Target:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) { super.configurePipeline(pipelineConfigurer); FailureCollector failureCollector = pipelineConfigurer.getStageConfigurer().getFailureCollector(); createRecordTransformConfig.validate(failureCollector); if (pipelineConfigurer.getStageConfigurer().getInputSchema() != null && !createRecordTransformConfig.hasFieldsWithMacro()) { final Schema outputSchema = getOutputSchema(pipelineConfigurer.getStageConfigurer().getInputSchema(), failureCollector); pipelineConfigurer.getStageConfigurer().setOutputSchema(outputSchema); } }
Source:
<code>private void applyEnabledProperty(boolean enabled, UIObject obj) { if(enabled) { obj.removeStyleName("disabled"); obj.getElement().removeAttribute(DISABLED); } else { obj.addStyleName("disabled"); obj.getElement().setAttribute(DISABLED, ""); } if(obj instanceof HasWidgets) { <START> for(Widget widget: (HasWidgets) obj) { <END> if(widget instanceof HasEnabled) { setEnabled(widget, enabled); } } } }</code><technical_language>This break Tab component , specially design. Link default disabled styles override loop entire Widget set disable</technical_language>

Target:
private void applyEnabledProperty(boolean enabled, UIObject obj) { if(enabled) { obj.removeStyleName("disabled"); obj.getElement().removeAttribute(DISABLED); } else { obj.addStyleName("disabled"); obj.getElement().setAttribute(DISABLED, ""); } }
Source:
<code>public MetaCommand(Meta meta) { this.meta = meta; <START> this.setCreated(meta.getCreated()); <END> this.setLastModified(meta.getLastModified()); this.setLocation(meta.getLocation()); this.setResourceType(meta.getResourceType()); this.setVersion(meta.getVersion()); }</code><technical_language>delete private setter set meta object. For getter values out of meta object. lines of code</technical_language>

Target:
public MetaCommand(Meta meta) { this.setCreated(meta.getCreated()); this.setLastModified(meta.getLastModified()); this.setLocation(meta.getLocation()); this.setResourceType(meta.getResourceType()); this.setVersion(meta.getVersion()); }
Source:
<code>public String getExportAsString(Dataset dataset, String formatName) { InputStream inputStream = null; InputStreamReader inp = null; try { inputStream = getExport(dataset, formatName); if (inputStream != null) { inp = new InputStreamReader(inputStream,"UTF8"); BufferedReader br = new BufferedReader(inp); StringBuilder sb = new StringBuilder(); String line; while ((line = br.readLine()) != null) { sb.append(line); sb.append('\n'); } br.close(); inp.close(); inputStream.close(); return sb.toString(); } } catch (ExportException | IOException ex) { return null; } finally { try{inp.close();} catch(IOException ic){} <START> try{inputStream.close();} catch(IOException ic){} <END> } return null; }</code><technical_language>Do get NPE if inp inputStream null</technical_language>

Target:
public String getExportAsString(Dataset dataset, String formatName) { InputStream inputStream = null; InputStreamReader inp = null; try { inputStream = getExport(dataset, formatName); if (inputStream != null) { inp = new InputStreamReader(inputStream, "UTF8"); BufferedReader br = new BufferedReader(inp); StringBuilder sb = new StringBuilder(); String line; while ((line = br.readLine()) != null) { sb.append(line); sb.append('\n'); } br.close(); inp.close(); inputStream.close(); return sb.toString(); } } catch (ExportException | IOException ex) { return null; } finally { IOUtils.closeQuietly(inp); IOUtils.closeQuietly(inputStream); } return null; }
Source:
<code>public static String validate(String path) { Path p = new Path(path); if (p.toUri().getScheme() == null) { throw new IllegalArgumentException("Invalid path provided, no scheme in " + path); } <START> return path; <END> }</code><technical_language>want this normalize path returning normalized version Path</technical_language>

Target:
public static String validate(String path) { Path p = new Path(path); if (p.toUri().getScheme() == null) { throw new IllegalArgumentException("Invalid path provided, no scheme in " + path); } return p.toString(); }
Source:
<code><START> public MacPool getMacPoolByName(String macPoolName) { return getAll().stream().filter(e -> e.getName().equals(macPoolName)).findFirst().orElse(null); <END> }</code><technical_language>pls consider proper sql instead of loading mac-pools java code</technical_language>

Target:
public MacPool getMacPoolByName(String macPoolName) { return getCallsHandler().executeRead("GetMacPoolByMacPoolName", macPoolRowMapper, getCustomMapSqlParameterSource().addValue("name", macPoolName)); }
Source:
<code>public static Context wbFromDMN(final JSITContext dmn, final JSITExpression parent, final BiConsumer<String, HasComponentWidths> hasComponentWidthsConsumer) { final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Context result = new Context(id, description, typeRef); final List<JSITContextEntry> jsiContextEntries = dmn.getContextEntry(); for (int i = 0; i < jsiContextEntries.size(); i++) { final JSITContextEntry jsiContextentry = Js.uncheckedCast(jsiContextEntries.get(i)); final ContextEntry ceConverted = ContextEntryPropertyConverter.wbFromDMN(jsiContextentry, hasComponentWidthsConsumer); if (Objects.nonNull(ceConverted)) { ceConverted.setParent(result); result.getContextEntry().add(ceConverted); } } if (JSITFunctionDefinition.instanceOf(parent)) { final JSITFunctionDefinition functionDefinition = Js.uncheckedCast(parent); final String sKind = Js.uncheckedCast(functionDefinition.getKind()); final Kind kind = Kind.fromValue(sKind); <START> if (!Kind.FEEL.equals(kind)) { <END> return result; } } final int contextEntriesCount = result.getContextEntry().size(); if (contextEntriesCount == 0) { result.getContextEntry().add(new ContextEntry()); } else if (!Objects.isNull(result.getContextEntry().get(contextEntriesCount - 1).getVariable())) { result.getContextEntry().add(new ContextEntry()); } return result; }</code><technical_language>Objects.equals please</technical_language>

Target:
public static Context wbFromDMN(final JSITContext dmn, final JSITExpression parent, final BiConsumer<String, HasComponentWidths> hasComponentWidthsConsumer) { final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Context result = new Context(id, description, typeRef); final List<JSITContextEntry> jsiContextEntries = dmn.getContextEntry(); for (int i = 0; i < jsiContextEntries.size(); i++) { final JSITContextEntry jsiContextentry = Js.uncheckedCast(jsiContextEntries.get(i)); final ContextEntry ceConverted = ContextEntryPropertyConverter.wbFromDMN(jsiContextentry, hasComponentWidthsConsumer); if (Objects.nonNull(ceConverted)) { ceConverted.setParent(result); result.getContextEntry().add(ceConverted); } } if (JSITFunctionDefinition.instanceOf(parent)) { final JSITFunctionDefinition functionDefinition = Js.uncheckedCast(parent); final String sKind = Js.uncheckedCast(functionDefinition.getKind()); final Kind kind = Kind.fromValue(sKind); if (!Objects.equals(Kind.FEEL, kind)) { return result; } } final int contextEntriesCount = result.getContextEntry().size(); if (contextEntriesCount == 0) { result.getContextEntry().add(new ContextEntry()); } else if (!Objects.isNull(result.getContextEntry().get(contextEntriesCount - 1).getVariable())) { result.getContextEntry().add(new ContextEntry()); } return result; }
Source:
<code>public static synchronized void logDebug(String message) { <START> if (IntroPlugin.getDefault().isDebugging() && LOG_INFO) { <END> getDefault().getLog().info(message); } }</code><technical_language>LOG_INFO argument</technical_language>

Target:
public static synchronized void logDebug(String message) { if (LOG_INFO && IntroPlugin.getDefault().isDebugging()) { getDefault().getLog().info(message); } }
Source:
<code>public int rank(final Set<ResourceType> resourceTypes, final Collection<ServiceConfiguration<?>> serviceConfigs) { if (SUPPORTED_RESOURCE_TYPES.containsAll(resourceTypes)) { <START> return resourceTypes.size(); <END> } else { return 0; } }</code><technical_language>This is valid if bigger 1, get selected fail</technical_language>

Target:
public int rank(final Set<ResourceType> resourceTypes, final Collection<ServiceConfiguration<?>> serviceConfigs) { if (SUPPORTED_RESOURCE_COMBINATIONS.contains(resourceTypes)) { return resourceTypes.size(); } else { return 0; } }
Source:
<code>private double meanOfPointCollectionRoll( Collection<Points.Point<BasicRollup>> fullPoints ) { long sum = 0; int count = 0; for( Points.Point<BasicRollup> p : fullPoints ) { sum += p.getData().getAverage().toLong(); <START> count++; <END> } return sum / count; }</code><technical_language>do need count? fullPoints.size</technical_language>

Target:
private double meanOfPointCollectionRoll( Collection<Points.Point<BasicRollup>> fullPoints ) { long sum = 0; for( Points.Point<BasicRollup> p : fullPoints ) { sum += p.getData().getAverage().toLong(); } return sum / fullPoints.size(); }
Source:
<code>public TextPainter(final Composite parent) { this.parent = parent; Listener listener = new Listener() { public void handleEvent(Event event) { switch (event.type) { case SWT.Dispose: dispose(); break; } } }; parent.addListener(SWT.Dispose, listener); handCursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND); text = ""; clipping = true; wrapping = true; textTokenizer = TextTokenizerFactory.createDefault(); foregroundColor = parent.getForeground(); hyperlinkColor = buildColor(100, 50, 200); boundaryColor = buildColor(255, 30, 30); FontData fontData = parent.getFont().getFontData()[0]; setFont(fontData.getName(), fontData.getHeight()); Point size = parent.getSize(); bounds = new Rectangle(0, 0, size.x, size.y); navigationListeners = new ArrayList<NavigationListener>(); hyperlinks = new ArrayList<Hyperlink>(); parent.addMouseMoveListener(new MouseMoveListener() { private Cursor defaultCursor = parent.getCursor(); @Override public void mouseMove(MouseEvent e) { for (Hyperlink hyperlink : hyperlinks) { if (hyperlink.contains(e.x, e.y)) { activeHyperlink = hyperlink; break; } else { activeHyperlink = null; } } if (activeHyperlink != null) { parent.setCursor(handCursor); } else { parent.setCursor(defaultCursor); } } }); <START> parent.addMouseListener(new MouseListener() { <END> @Override public void mouseUp(MouseEvent e) { if (activeHyperlink != null) { notifyNavigationListeners(activeHyperlink); } } @Override public void mouseDown(MouseEvent e) @Override public void mouseDoubleClick(MouseEvent e) }); }</code><technical_language>In cases, I prefer MouseAdapter override methods - want change. This nice fix</technical_language>

Target:
public TextPainter(final Composite parent) { this.parent = parent; Listener listener = new Listener() { public void handleEvent(Event event) { switch (event.type) { case SWT.Dispose: dispose(); break; } } }; parent.addListener(SWT.Dispose, listener); handCursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND); text = ""; clipping = true; wrapping = true; textTokenizer = TextTokenizerFactory.createDefault(); foregroundColor = parent.getForeground(); hyperlinkColor = buildColor(100, 50, 200); boundaryColor = buildColor(255, 30, 30); FontData fontData = parent.getFont().getFontData()[0]; setFont(fontData.getName(), fontData.getHeight()); Point size = parent.getSize(); bounds = new Rectangle(0, 0, size.x, size.y); navigationListeners = new ArrayList<NavigationListener>(); hyperlinks = new ArrayList<Hyperlink>(); parent.addMouseMoveListener(new MouseMoveListener() { private Cursor defaultCursor = parent.getCursor(); @Override public void mouseMove(MouseEvent e) { for (Hyperlink hyperlink : hyperlinks) { if (hyperlink.contains(e.x, e.y)) { activeHyperlink = hyperlink; break; } else { activeHyperlink = null; } } if (activeHyperlink != null) { parent.setCursor(handCursor); } else { parent.setCursor(defaultCursor); } } }); parent.addMouseListener(new MouseAdapter() { @Override public void mouseUp(MouseEvent e) { if (activeHyperlink != null) { notifyNavigationListeners(activeHyperlink); } } }); }
Source:
<code>public SearchResultsRest getSearchObjects(final String query, final String dsoType, final String dsoScope, final String configurationName, final List<SearchFilter> searchFilters, final Pageable page) throws InvalidRequestException, BadRequestException { Context context = obtainContext(); DSpaceObject scopeObject = scopeResolver.resolveScope(context, dsoScope); DiscoveryConfiguration configuration = searchConfigurationService .getDiscoveryConfigurationByNameOrDso(configurationName, scopeObject); DiscoverResult searchResult = null; DiscoverQuery discoverQuery = null; try { discoverQuery = queryBuilder .buildQuery(context, scopeObject, configuration, query, searchFilters, dsoType, page); searchResult = searchService.search(context, scopeObject, discoverQuery); } catch (SearchServiceException e) { log.error("Error while searching with Discovery", e); <START> throw new IllegalArgumentException(); <END> } return discoverResultConverter .convert(context, query, dsoType, configurationName, dsoScope, searchFilters, page, searchResult, configuration); }</code><technical_language>change this new IllegalArgumentException("Error while searching Discovery: " + e.getMessage()); new IllegalArgumentException("Error while searching Discovery, this a query syntax exception"); clients aware a specific query syntax</technical_language>

Target:
public SearchResultsRest getSearchObjects(final String query, final String dsoType, final String dsoScope, final String configurationName, final List<SearchFilter> searchFilters, final Pageable page) throws InvalidRequestException, BadRequestException { Context context = obtainContext(); DSpaceObject scopeObject = scopeResolver.resolveScope(context, dsoScope); DiscoveryConfiguration configuration = searchConfigurationService .getDiscoveryConfigurationByNameOrDso(configurationName, scopeObject); DiscoverResult searchResult = null; DiscoverQuery discoverQuery = null; try { discoverQuery = queryBuilder .buildQuery(context, scopeObject, configuration, query, searchFilters, dsoType, page); searchResult = searchService.search(context, scopeObject, discoverQuery); } catch (SearchServiceException e) { log.error("Error while searching with Discovery", e); throw new IllegalArgumentException("Error while searching with Discovery: " + e.getMessage()); } return discoverResultConverter .convert(context, query, dsoType, configurationName, dsoScope, searchFilters, page, searchResult, configuration); }
Source:
<code>private Resource loadPackage(URI uri, URI normalized) { final URI trimmed = uri.trimFragment(); final Resource resource = createResource(trimmed, ContentHandler.UNSPECIFIED_CONTENT_TYPE); if (resource == null) { return null; } if (LOGGER.isDebugEnabled()) { LOGGER.debug("SRS@" + Integer.toHexString(hashCode()) + ".getResource - caching package " + uri); } Resource former = uriCache.putIfAbsent(normalized, resource); if (former != null) { <START> return former; <END> } InputStream stream = null; try { stream = getURIConverter().createInputStream(trimmed, null); resource.load(stream, Collections.emptyMap()); } catch (IOException e) { handleDemandLoadException(resource, e); } finally { if (stream != null) { try { stream.close(); } catch (IOException e) { } } } loadedPackages.add(resource); return resource; }</code><technical_language>I this is dangerous, a resources loaded accessible other threads, try assumption is fully loaded</technical_language>

Target:
private Resource loadPackage(URI uri, URI normalized) { if (uriCache.containsKey(normalized)) { return uriCache.get(normalized); } final URI trimmed = uri.trimFragment(); final Resource resource = createResource(trimmed, ContentHandler.UNSPECIFIED_CONTENT_TYPE); if (resource == null) { return null; } if (LOGGER.isDebugEnabled()) { LOGGER.debug("SRS@" + Integer.toHexString(hashCode()) + ".getResource - caching package " + uri); } InputStream stream = null; try { stream = getURIConverter().createInputStream(trimmed, null); resource.load(stream, Collections.emptyMap()); } catch (IOException e) { handleDemandLoadException(resource, e); } finally { if (stream != null) { try { stream.close(); } catch (IOException e) { } } } Resource former = uriCache.putIfAbsent(normalized, resource); if (former != null) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("SRS@" + Integer.toHexString(hashCode()) + ".getResource - duplicate caching has been avoided for " + uri); } return former; } return resource; }
Source:
<code>public CheckpointMetricsBuilder setAlignmentDurationNanos(long alignmentDurationNanos) { <START> this.alignmentDurationNanos = alignmentDurationNanos; <END> return this; }</code><technical_language>builder pattern</technical_language>

Target:
public CheckpointMetricsBuilder setAlignmentDurationNanos(long alignmentDurationNanos) { checkState(this.alignmentDurationNanos.complete(alignmentDurationNanos), "alignmentDurationNanos has already been completed by someone else"); return this; }
Source:
<code>public void onPlayerFall(final PlayerMoveEvent e) { if (e.getPlayer().isDead()) { return; } if (!IslandGuard.inWorld(e.getPlayer()) || Settings.allowTeleportWhenFalling || !e.getPlayer().getGameMode().equals(GameMode.SURVIVAL) || e.getPlayer().isOp() || e.getPlayer().isFlying() <START> || VaultHelper.checkPerm(e.getPlayer(), "askyblock.bypassfalling")) { <END> fallingPlayers.remove(e.getPlayer().getUniqueId()); return; } if (e.getPlayer().getLocation().getBlock().getRelative(BlockFace.DOWN).getType() == Material.AIR && e.getPlayer().getLocation().getBlock().getType() == Material.AIR) { setFalling(e.getPlayer().getUniqueId()); } else { unsetFalling(e.getPlayer().getUniqueId()); } }</code><technical_language>Please **Settings.PERMPREFIX + "bypassfalling"** instead of **"askyblock** code reused for AcidIsland. :)</technical_language>

Target:
public void onPlayerFall(final PlayerMoveEvent e) { if (e.getPlayer().isDead()) { return; } if (!IslandGuard.inWorld(e.getPlayer()) || Settings.allowTeleportWhenFalling || !e.getPlayer().getGameMode().equals(GameMode.SURVIVAL) || e.getPlayer().isOp() || e.getPlayer().isFlying() || VaultHelper.checkPerm(e.getPlayer(), Settings.PERMPREFIX + "bypassfalling")) { fallingPlayers.remove(e.getPlayer().getUniqueId()); return; } if (e.getPlayer().getLocation().getBlock().getRelative(BlockFace.DOWN).getType() == Material.AIR && e.getPlayer().getLocation().getBlock().getType() == Material.AIR) { setFalling(e.getPlayer().getUniqueId()); } else { unsetFalling(e.getPlayer().getUniqueId()); } }
Source:
<code>public String getAccumuloClasspath() { <START> return verifyNotNull(ADMIN_ACCUMULO_CLASSPATH_PROP, getString(ADMIN_ACCUMULO_CLASSPATH_PROP, ADMIN_ACCUMULO_CLASSPATH_DEFAULT)); <END> }</code><technical_language>this null getString() is passed a default</technical_language>

Target:
public String getAccumuloClasspath() { return getString(ADMIN_ACCUMULO_CLASSPATH_PROP, ADMIN_ACCUMULO_CLASSPATH_DEFAULT); }
Source:
<code>private TaskPartitionState updateJobContextAndGetTaskCurrentState( CurrentStateOutput currentStateOutput, String jobResource, Integer pId, String pName, String instance, JobContext jobCtx, TargetState jobTgtState) { String currentStateString = currentStateOutput.getCurrentState(jobResource, new Partition(pName), instance); if (currentStateString == null) { TaskPartitionState stateFromContext = jobCtx.getPartitionState(pId); <START> if (jobTgtState == TargetState.STOP) { <END> if (stateFromContext == TaskPartitionState.RUNNING || stateFromContext == TaskPartitionState.INIT) { jobCtx.setPartitionState(pId, TaskPartitionState.STOPPED); return TaskPartitionState.STOPPED; } } return stateFromContext == null ? TaskPartitionState.INIT : stateFromContext; } TaskPartitionState currentState = TaskPartitionState.valueOf(currentStateString); jobCtx.setPartitionState(pId, currentState); String taskMsg = currentStateOutput.getInfo(jobResource, new Partition(pName), instance); if (taskMsg != null) { jobCtx.setPartitionInfo(pId, taskMsg); } return currentState; }</code><technical_language>if conditions simplified one. other states in TaskPartitionState? explain concisely giving a special treatment for task states</technical_language>

Target:
private TaskPartitionState updateJobContextAndGetTaskCurrentState( CurrentStateOutput currentStateOutput, String jobResource, Integer pId, String pName, String instance, JobContext jobCtx, TargetState jobTgtState) { String currentStateString = currentStateOutput.getCurrentState(jobResource, new Partition(pName), instance); if (currentStateString == null) { TaskPartitionState stateFromContext = jobCtx.getPartitionState(pId); if (jobTgtState == TargetState.STOP && (stateFromContext == TaskPartitionState.RUNNING || stateFromContext == TaskPartitionState.INIT)) { jobCtx.setPartitionState(pId, TaskPartitionState.STOPPED); return TaskPartitionState.STOPPED; } return stateFromContext == null ? TaskPartitionState.INIT : stateFromContext; } TaskPartitionState currentState = TaskPartitionState.valueOf(currentStateString); jobCtx.setPartitionState(pId, currentState); String taskMsg = currentStateOutput.getInfo(jobResource, new Partition(pName), instance); if (taskMsg != null) { jobCtx.setPartitionInfo(pId, taskMsg); } return currentState; }
Source:
<code>protected void copyFrom(ServiceState s) { mVoiceRegState = s.mVoiceRegState; mDataRegState = s.mDataRegState; mVoiceRoamingType = s.mVoiceRoamingType; mDataRoamingType = s.mDataRoamingType; mVoiceOperatorAlphaLong = s.mVoiceOperatorAlphaLong; mVoiceOperatorAlphaShort = s.mVoiceOperatorAlphaShort; mVoiceOperatorNumeric = s.mVoiceOperatorNumeric; mDataOperatorAlphaLong = s.mDataOperatorAlphaLong; mDataOperatorAlphaShort = s.mDataOperatorAlphaShort; mDataOperatorNumeric = s.mDataOperatorNumeric; mIsManualNetworkSelection = s.mIsManualNetworkSelection; mRilVoiceRadioTechnology = s.mRilVoiceRadioTechnology; mRilDataRadioTechnology = s.mRilDataRadioTechnology; mCssIndicator = s.mCssIndicator; mNetworkId = s.mNetworkId; mSystemId = s.mSystemId; mCdmaRoamingIndicator = s.mCdmaRoamingIndicator; mCdmaDefaultRoamingIndicator = s.mCdmaDefaultRoamingIndicator; mCdmaEriIconIndex = s.mCdmaEriIconIndex; mCdmaEriIconMode = s.mCdmaEriIconMode; mIsEmergencyOnly = s.mIsEmergencyOnly; mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration; mIsUsingCarrierAggregation = s.mIsUsingCarrierAggregation; mChannelNumber = s.mChannelNumber; mCellBandwidths = s.mCellBandwidths == null ? <START> new int[0] : <END> Arrays.copyOf(s.mCellBandwidths, s.mCellBandwidths.length); mLteEarfcnRsrpBoost = s.mLteEarfcnRsrpBoost; mNetworkRegistrationStates = new ArrayList<>(s.mNetworkRegistrationStates); }</code><technical_language>This null</technical_language>

Target:
protected void copyFrom(ServiceState s) { mVoiceRegState = s.mVoiceRegState; mDataRegState = s.mDataRegState; mVoiceRoamingType = s.mVoiceRoamingType; mDataRoamingType = s.mDataRoamingType; mVoiceOperatorAlphaLong = s.mVoiceOperatorAlphaLong; mVoiceOperatorAlphaShort = s.mVoiceOperatorAlphaShort; mVoiceOperatorNumeric = s.mVoiceOperatorNumeric; mDataOperatorAlphaLong = s.mDataOperatorAlphaLong; mDataOperatorAlphaShort = s.mDataOperatorAlphaShort; mDataOperatorNumeric = s.mDataOperatorNumeric; mIsManualNetworkSelection = s.mIsManualNetworkSelection; mRilVoiceRadioTechnology = s.mRilVoiceRadioTechnology; mRilDataRadioTechnology = s.mRilDataRadioTechnology; mCssIndicator = s.mCssIndicator; mNetworkId = s.mNetworkId; mSystemId = s.mSystemId; mCdmaRoamingIndicator = s.mCdmaRoamingIndicator; mCdmaDefaultRoamingIndicator = s.mCdmaDefaultRoamingIndicator; mCdmaEriIconIndex = s.mCdmaEriIconIndex; mCdmaEriIconMode = s.mCdmaEriIconMode; mIsEmergencyOnly = s.mIsEmergencyOnly; mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration; mIsUsingCarrierAggregation = s.mIsUsingCarrierAggregation; mChannelNumber = s.mChannelNumber; mCellBandwidths = s.mCellBandwidths == null ? null : Arrays.copyOf(s.mCellBandwidths, s.mCellBandwidths.length); mLteEarfcnRsrpBoost = s.mLteEarfcnRsrpBoost; mNetworkRegistrationStates = new ArrayList<>(s.mNetworkRegistrationStates); }
Source:
<code>private GrowthStage[] buildGrowthStages(Map<String, GrowthStage> growthStages) { Object[] values = growthStages.values().toArray(); Iterator<String> keys = growthStages.keySet().iterator(); GrowthStage[] stages = new GrowthStage[values.length]; for (int i = 0; i < values.length; i++) { String block = keys.next(); stages[i] = new GrowthStage((GrowthStage) values[i]); try { stages[i].block = blockManager.getBlock(block); } catch (NullPointerException e) { <START> logger.error("Unable to get block: " + block); <END> throw e; } stages[i].block.setKeepActive(true); } return stages; }</code><technical_language>dont catch NPE</technical_language>

Target:
private GrowthStage[] buildGrowthStages(Map<String, GrowthStage> growthStages) { Set<Map.Entry<String, GrowthStage>> entrySet = growthStages.entrySet(); GrowthStage[] stages = new GrowthStage[entrySet.size()]; int i = 0; for (Map.Entry<String, GrowthStage> entry : entrySet) { stages[i] = new GrowthStage(entry.getValue()); stages[i].block = blockManager.getBlock(entry.getKey()); stages[i].block.setKeepActive(true); i++; } return stages; }
Source:
<code>public Firehose connect() throws IOException { final BlockingQueue<Map<String, Object>> queue = new ArrayBlockingQueue<Map<String, Object>>(QUEUE_SIZE); Runnable updateStream = new UpdateStream(new WebJsonSupplier(dimensions, url), queue, new DefaultObjectMapper()); final ExecutorService service = Executors.newSingleThreadExecutor(); service.submit(updateStream); return new Firehose() { private final Runnable doNothingRunnable = Runnables.getNoopRunnable(); @Override public boolean hasMore() { return !(service.isTerminated()); } @Override public InputRow nextRow() { try { Map<String, Object> processedMap = processMap(queue.take()); DateTime date = TimestampParser.createTimestampParser("auto") .apply(processedMap.get(timeDimension).toString()); long seconds = (long) date.getMillis(); if (new DateTime(seconds * 1000).getYear() == new DateTime().getYear()) { seconds = (long) date.getMillis() * 1000; } return new MapBasedInputRow( seconds, renamedDimensions, processedMap ); } catch (Exception e) { throw Throwables.propagate(e); } } private Map<String, Object> renameKeys(Map<String, Object> update) { Map<String, Object> renamedMap = Maps.newHashMap(); for (int iter = 0; iter < dimensions.size(); iter++) { if (update.get(dimensions.get(iter)) != null) { Object obj = update.get(dimensions.get(iter)); renamedMap.put(renamedDimensions.get(iter), obj); } } if (renamedMap.get(timeDimension) == null) { renamedMap.put(timeDimension, System.currentTimeMillis()); } return renamedMap; } <START> private Map<String, Object> processMap(Map<String, Object> map) <END> { Map<String, Object> renamedMap = renameKeys(map); return renamedMap; } @Override public Runnable commit() { return doNothingRunnable; } @Override public void close() throws IOException { service.shutdown(); } }; }</code><technical_language>purpose of this method? appears exist delegate renameKeys()</technical_language>

Target:
public Firehose connect() throws IOException { final UpdateStream updateStream = factory.build(); updateStream.start(); return new Firehose() { Map<String, Object> map; private final Runnable doNothingRunnable = Runnables.getNoopRunnable(); @Override public boolean hasMore() { try { map = updateStream.pollFromQueue(queueWaitTime, TimeUnit.SECONDS); return map != null; } catch (InterruptedException e) { throw Throwables.propagate(e); } } @Override public InputRow nextRow() { try { DateTime date = TimestampParser.createTimestampParser(timeFormat) .apply(map.get(updateStream.getTimeDimension()).toString()); return new MapBasedInputRow( date.getMillis(), new ArrayList(map.keySet()), map ); } catch (Exception e) { throw Throwables.propagate(e); } finally { map = null; } } @Override public Runnable commit() { return doNothingRunnable; } @Override public void close() throws IOException { updateStream.stop(); } }; }
Source:
<code>public Filter toFilter() { if (extractionFn == null) { return new SelectorFilter(dimension, value); } else { final String valueOrNull = Strings.emptyToNull(value); final DruidPredicateFactory predicateFactory = new DruidPredicateFactory() { @Override public Predicate<String> makeStringPredicate() { return new Predicate<String>() { @Override public boolean apply(String input) { return Objects.equals(valueOrNull, input); } }; } @Override public DruidLongPredicate makeLongPredicate() { initLongValue(); if (valueAsLong == null) { return new DruidLongPredicate() { @Override public boolean applyLong(long input) { return false; } }; } else { final long unboxedLong = valueAsLong.longValue(); return new DruidLongPredicate() { @Override public boolean applyLong(long input) { return input == unboxedLong; } }; } } @Override public DruidFloatPredicate makeFloatPredicate() { initFloatValue(); if (valueAsFloat == null) { <START> return new DruidFloatPredicate() <END> { @Override public boolean applyFloat(float input) { return false; } }; } else { final float unboxedFloat = valueAsFloat.floatValue(); return new DruidFloatPredicate() { @Override public boolean applyFloat(float input) { return input == unboxedFloat; } }; } } }; return new DimensionPredicateFilter(dimension, predicateFactory, extractionFn); } }</code><technical_language>Please extract a singleton</technical_language>

Target:
public Filter toFilter() { if (extractionFn == null) { return new SelectorFilter(dimension, value); } else { final String valueOrNull = Strings.emptyToNull(value); final DruidPredicateFactory predicateFactory = new DruidPredicateFactory() { @Override public Predicate<String> makeStringPredicate() { return Predicates.equalTo(valueOrNull); } @Override public DruidLongPredicate makeLongPredicate() { initLongPredicate(); return longPredicate; } @Override public DruidFloatPredicate makeFloatPredicate() { initFloatPredicate(); return floatPredicate; } }; return new DimensionPredicateFilter(dimension, predicateFactory, extractionFn); } }
Source:
<code>private void showWarning(int numItems) { View checkBoxView = View.inflate(this, R.layout.dialog_items_unavailable_warning, null); final CheckBox checkBox = (CheckBox) checkBoxView.findViewById(R.id.checkbox_dont_show_again); DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { if (checkBox.isChecked()) { SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean(getString(R.string.setting_item_unavailable_warning), false); editor.apply(); } if (id == AlertDialog.BUTTON_POSITIVE) { showMenu(); } dialog.cancel(); } }; AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(getString(R.string.title_items_unavailable)); builder.setMessage(String.format(getResources().getQuantityString(R.plurals.items_unavailable_message, numItems, numItems))) .setView(checkBoxView) <START> .setCancelable(false) <END> .setPositiveButton(getString(R.string.items_unavailable_positive_button), listener) .setNegativeButton(getString(R.string.items_unavailable_negative_button), listener).show(); }</code><technical_language>leave cancelable. Canceling is basically hitting ignore, if force hit a incur cognitive load of processing asking</technical_language>

Target:
private void showWarning(int numItems) { View checkBoxView = View.inflate(this, R.layout.dialog_items_unavailable_warning, null); final CheckBox checkBox = (CheckBox) checkBoxView.findViewById(R.id.checkbox_dont_show_again); DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { if (checkBox.isChecked()) { SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean(getString(R.string.setting_item_unavailable_warning), false); editor.apply(); } if (id == AlertDialog.BUTTON_POSITIVE) { showMenu(); } dialog.cancel(); } }; AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(getString(R.string.title_items_unavailable)); builder.setMessage(getResources().getQuantityString(R.plurals.items_unavailable_message, numItems, numItems)) .setView(checkBoxView) .setPositiveButton(getString(R.string.items_unavailable_positive_button), listener) .setNegativeButton(getString(R.string.items_unavailable_negative_button), listener).show(); }
Source:
<code>public WriteSupport<T> getWriteSupport(Configuration configuration){ if (writeSupport != null) return writeSupport; Class<?> writeSupportClass = getWriteSupportClass(configuration); try { <START> return (WriteSupport<T>)Objects.requireNonNull(writeSupportClass, "writeSupportClass").newInstance(); <END> } catch (InstantiationException e) { throw new BadConfigurationException("could not instantiate write support class: " + writeSupportClass, e); } catch (IllegalAccessException e) { throw new BadConfigurationException("could not instantiate write support class: " + writeSupportClass, e); } }</code><technical_language>suggestion return (WriteSupport<T>)Objects.requireNonNull(writeSupportClass, "writeSupportClass null").newInstance();</technical_language>

Target:
public WriteSupport<T> getWriteSupport(Configuration configuration){ if (writeSupport != null) return writeSupport; Class<?> writeSupportClass = getWriteSupportClass(configuration); try { return (WriteSupport<T>) Objects .requireNonNull(writeSupportClass, "writeSupportClass cannot be null") .newInstance(); } catch (InstantiationException | IllegalAccessException e) { throw new BadConfigurationException("could not instantiate write support class: " + writeSupportClass, e); } }
Source:
<code>public static HaxeClass tryResolveClassByQName(@Nullable PsiElement type) { if (type == null || type.getContext() == null) { return null; } <START> HaxeClass result = findClassByQName(type.getText(), type.getContext()); <END> if(result != null) { return result; } String name = getQName(type); result = name == null? tryResolveClassByQNameWhenGetQNameFail(type) : findClassByQName(name, type.getContext()); result = result != null ? result : tryFindHelper(type); result = result != null ? result : findClassByQNameInSuperPackages(type); return result; }</code><technical_language>need this? is code below? For local typedefs</technical_language>

Target:
public static HaxeClass tryResolveClassByQName(@Nullable PsiElement type) { if (type == null || type.getContext() == null) { return null; } final String name = getQName(type); HaxeClass result = name == null ? tryResolveClassByQNameWhenGetQNameFail(type) : findClassByQName(name, type.getContext()); result = result != null ? result : tryFindHelper(type); result = result != null ? result : findClassByQNameInSuperPackages(type); return result; }
Source:
<code>public void close() throws IOException { synchronized (PersistentBinaryDeque.this) { if (m_closed) { return; } <START> if (m_activeSegment != null && !m_segments.isEmpty() && m_activeSegment.m_id != m_segments.lastKey()) { <END> finishWrite(m_activeSegment); } m_activeSegment = null; m_closed = true; m_gapWriter = null; } }</code><technical_language>a serious bug if m_activeSegment != null && m_segments.isEmpty()</technical_language>

Target:
public void close() throws IOException { synchronized (PersistentBinaryDeque.this) { if (m_closed) { return; } if (m_activeSegment!= null && m_activeSegment.m_id != m_segments.lastKey()) { finishActiveSegmentWrite(); } m_closed = true; m_gapWriter = null; } }
Source:
<code>public void testMemoryUsageInTheContextOfMemoryPoolDestruction() { final int bufferSize = 128; final int numBuffers = 10; NetworkBufferPool globalPool = new NetworkBufferPool(numBuffers, bufferSize); MemorySegment segment = globalPool.requestMemorySegment(); <START> assertThat(segment, is(notNullValue())); assertThat(globalPool.getTotalNumberOfMemorySegments(), is(numBuffers)); assertThat(globalPool.getNumberOfAvailableMemorySegments(), is(numBuffers - 1)); assertThat(globalPool.getNumberOfUsedMemorySegments(), is(1)); assertThat(globalPool.getTotalMemory(), is((long) numBuffers * bufferSize)); assertThat(globalPool.getAvailableMemory(), is((long) (numBuffers - 1) * bufferSize)); assertThat(globalPool.getUsedMemory(), is((long) bufferSize)); assertThat(globalPool.getNumberOfRegisteredBufferPools(), is(0)); <END> globalPool.destroy(); assertThat(globalPool.getTotalNumberOfMemorySegments(), is(0)); assertThat(globalPool.getNumberOfAvailableMemorySegments(), is(0)); assertThat(globalPool.getNumberOfUsedMemorySegments(), is(0)); assertThat(globalPool.getTotalMemory(), is(0L)); assertThat(globalPool.getAvailableMemory(), is(0L)); assertThat(globalPool.getUsedMemory(), is(0L)); assertThat(globalPool.getNumberOfRegisteredBufferPools(), is(0)); }</code><technical_language>is this tested in testMemoryUsageInTheContextOfMemorySegmentAllocation</technical_language>

Target:
public void testMemoryUsageInTheContextOfMemoryPoolDestruction() { final int bufferSize = 128; final int numBuffers = 10; NetworkBufferPool globalPool = new NetworkBufferPool(numBuffers, bufferSize); globalPool.destroy(); assertThat(globalPool.getTotalNumberOfMemorySegments(), is(0)); assertThat(globalPool.getNumberOfAvailableMemorySegments(), is(0)); assertThat(globalPool.getNumberOfUsedMemorySegments(), is(0)); assertThat(globalPool.getTotalMemory(), is(0L)); assertThat(globalPool.getAvailableMemory(), is(0L)); assertThat(globalPool.getUsedMemory(), is(0L)); }
Source:
<code>private boolean corporateAddressExists(PaymentWorksNewVendorDetailDTO paymentWorksNewVendorDetailDTO) { <START> if (ObjectUtils.isNotNull(paymentWorksNewVendorDetailDTO.getRequesting_company().getCorp_address())) { <END> return true; } else { return false; } }</code><technical_language>do need check for nulls paymentWorksNewVendorDetailDTO paymentWorksNewVendorDetailDTO.getRequesting_company()</technical_language>

Target:
private boolean corporateAddressExists(PaymentWorksNewVendorDetailDTO paymentWorksNewVendorDetailDTO) { return (ObjectUtils.isNotNull(paymentWorksNewVendorDetailDTO.getRequesting_company().getCorp_address())); }
Source:
<code>public static void main(String[] args) throws Exception { Runtime.getRuntime().addShutdownHook(new ShutDown()); CommandLine cmd = parseArgs(args); String projectVersion = BuildProperties.get().getProperty("project.version"); String appPath = "webapp/target/falcon-webapp-" + projectVersion; if (cmd.hasOption(APP_PATH)) { appPath = cmd.getOptionValue(APP_PATH); } String isSafeMode = "false"; if (cmd.hasOption(SAFE_MODE)) { isSafeMode = cmd.getOptionValue(SAFE_MODE); validateSafemode(isSafeMode); } LOG.info("Setting system property Safemode to : {}", isSafeMode); <START> System.setProperty(StartupProperties.SAFEMODE_PROPERTY, isSafeMode); <END> final String enableTLSFlag = StartupProperties.get().getProperty("falcon.enableTLS"); final int appPort = getApplicationPort(cmd, enableTLSFlag); final boolean enableTLS = isTLSEnabled(enableTLSFlag, appPort); StartupProperties.get().setProperty("falcon.enableTLS", String.valueOf(enableTLS)); startEmbeddedMQIfEnabled(); LOG.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); LOG.info("Server starting with TLS ? on port {}", enableTLS, appPort); LOG.info("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"); server = EmbeddedServer.newServer(appPort, appPath, enableTLS); server.start(); }</code><technical_language>@bvellanki I wondering need a bit stronger mechanism for keeping track of safemode internally. For example, if adds java system property Java command line, in safe mode. Wondering track tracking in a system file - is persistent enables safemode survive restarts a potential enhancement</technical_language>

Target:
public static void main(String[] args) throws Exception { Runtime.getRuntime().addShutdownHook(new ShutDown()); CommandLine cmd = parseArgs(args); String projectVersion = BuildProperties.get().getProperty("project.version"); String appPath = "webapp/target/falcon-webapp-" + projectVersion; if (cmd.hasOption(APP_PATH)) { appPath = cmd.getOptionValue(APP_PATH); } if (cmd.hasOption(SAFE_MODE)) { validateSafemode(cmd.getOptionValue(SAFE_MODE)); boolean isSafeMode = Boolean.parseBoolean(cmd.getOptionValue(SAFE_MODE)); if (isSafeMode) { StartupProperties.createSafemodeFile(); } else { StartupProperties.deleteSafemodeFile(); } } final String enableTLSFlag = StartupProperties.get().getProperty("falcon.enableTLS"); final int appPort = getApplicationPort(cmd, enableTLSFlag); final boolean enableTLS = isTLSEnabled(enableTLSFlag, appPort); StartupProperties.get().setProperty("falcon.enableTLS", String.valueOf(enableTLS)); startEmbeddedMQIfEnabled(); LOG.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); LOG.info("Server starting with TLS ? on port {}", enableTLS, appPort); LOG.info("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"); server = EmbeddedServer.newServer(appPort, appPath, enableTLS); server.start(); }
Source:
<code>public boolean getActionResult(String key, OutputStream out) throws IOException, InterruptedException { <START> return getFromFuture(get(key, out)); <END> }</code><technical_language>Note, OnDiskBlobStore [applies a prefix key](<LINK_0> So, this implementation miss action cache items written OnDiskBlobStore. reason combined cache calls super.getActionResult bsHttp.getActionResult separately</technical_language>

Target:
public ListenableFuture<Boolean> getActionResult(String key, OutputStream out) { return get(key, out, true); }
Source:
<code><START> public void testIdleEvent() throws Exception { <END> OSDelegatingFileTailingMessageProducer adapter = new OSDelegatingFileTailingMessageProducer(); adapter.setOptions(TAIL_OPTIONS_FOLLOW_NAME_ALL_LINES); ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler(); taskScheduler.afterPropertiesSet(); adapter.setTaskScheduler(taskScheduler); final List<FileTailingIdleEvent> events = new ArrayList<>(); adapter.setApplicationEventPublisher(event -> { if (event instanceof FileTailingIdleEvent) { FileTailingIdleEvent tailEvent = (FileTailingIdleEvent) event; logger.warn(event); events.add(tailEvent); } }); File file = new File(testDir, "foo"); file.delete(); FileOutputStream foo = new FileOutputStream(file); for (int i = 0; i < 50; i++) { foo.write(("hello" + i + "\n").getBytes()); } foo.flush(); foo.close(); adapter.setFile(file); QueueChannel outputChannel = new QueueChannel(); adapter.setOutputChannel(outputChannel); adapter.setIdleEventInterval(1000); adapter.afterPropertiesSet(); adapter.start(); Thread.sleep(4000); assertTrue("expected at least one idle event", events.size() > 0); adapter.stop(); }</code><technical_language>name @author list done a change class. I a good test, right is need some improvements</technical_language>

Target:
public void testIdleEvent() throws Exception { OSDelegatingFileTailingMessageProducer adapter = new OSDelegatingFileTailingMessageProducer(); adapter.setOptions(TAIL_OPTIONS_FOLLOW_NAME_ALL_LINES); ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler(); taskScheduler.afterPropertiesSet(); adapter.setTaskScheduler(taskScheduler); CountDownLatch idleCountDownLatch = new CountDownLatch(1); CountDownLatch fileExistCountDownLatch = new CountDownLatch(1); adapter.setApplicationEventPublisher(event -> { if (event instanceof FileTailingIdleEvent) { FileTailingIdleEvent tailEvent = (FileTailingIdleEvent) event; idleCountDownLatch.countDown(); } if (event instanceof FileTailingEvent) { FileTailingEvent fileTailingEvent = (FileTailingEvent) event; if (fileTailingEvent.getMessage().contains("No such file or directory")) { fileExistCountDownLatch.countDown(); } } logger.debug(event); }); File file = mock(File.class); when(file.exists()).thenReturn(false); adapter.setFile(file); QueueChannel outputChannel = new QueueChannel(); adapter.setOutputChannel(outputChannel); adapter.setIdleEventInterval(100); adapter.afterPropertiesSet(); adapter.start(); boolean noFile = fileExistCountDownLatch.await(500, TimeUnit.MILLISECONDS); assertTrue("file does not exist event did not emit ", noFile); boolean noEvent = idleCountDownLatch.await(500, TimeUnit.MILLISECONDS); assertFalse("event should not emit when no file exit", noEvent); when(file.exists()).thenReturn(true); boolean eventRaised = idleCountDownLatch.await(1, TimeUnit.SECONDS); assertTrue("idle event did not emit", eventRaised); adapter.stop(); }
Source:
<code>public Table getTable(final String dbName, final String tableName, boolean throwException) throws HiveException { <START> return this.getTable(dbName, tableName, throwException, true); <END> }</code><technical_language>is this change? this minimally depend if this table is transactional not? if call a non-transactional table</technical_language>

Target:
public Table getTable(final String dbName, final String tableName, boolean throwException) throws HiveException { return this.getTable(dbName, tableName, throwException, false); }