auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void handle(S3GuardFsck.ComparePair comparePair) { if (!comparePair.containsViolation()) { <START> LOG.debug("There is no violation in the compare pair: " + toString()); <END> return; } StringBuilder sB = new StringBuilder(); sB.append(newLine) .append("On path: ").append(comparePair.getPath()).append(newLine); for (S3GuardFsck.Violation violation : comparePair.getViolations()) { try { ViolationHandler handler = violation.getHandler() .getDeclaredConstructor(S3GuardFsck.ComparePair.class) .newInstance(comparePair); final String errorStr = handler.getError(); sB.append(errorStr); } catch (NoSuchMethodException e) { LOG.error("Can not find declared constructor for handler: {}", violation.getHandler()); } catch (IllegalAccessException | InstantiationException | InvocationTargetException e) { LOG.error("Can not instantiate handler: {}", violation.getHandler()); } sB.append(newLine); } LOG.error(sB.toString()); }</code><technical_language>do ("{}", this) toString is invoked debug level log</technical_language>

Target:
public void handle(S3GuardFsck.ComparePair comparePair) { if (!comparePair.containsViolation()) { LOG.debug("There is no violation in the compare pair: {}", comparePair); return; } StringBuilder sB = new StringBuilder(); sB.append(newLine) .append("On path: ").append(comparePair.getPath()).append(newLine); handleComparePair(comparePair, sB); LOG.error(sB.toString()); }
Source:
<code>private ValueHelper getHelperByType(String type) { ValueHelper valueHelper; try { if (type == null) { type = "String"; } Class<?> cls = Class.forName("org.ovirt.engine.core.config.entity.helper." + type + "ValueHelper"); valueHelper = (ValueHelper) cls.newInstance(); } catch (Exception e) { <START> LoggerFactory.getLogger(EngineConfig.class).debug("Unable to find " + type + " type. Using default string type."); <END> valueHelper = new StringValueHelper(); } return valueHelper; }</code><technical_language>{}</technical_language>

Target:
private ValueHelper getHelperByType(String type) { ValueHelper valueHelper; try { if (type == null) { type = "String"; } Class<?> cls = Class.forName("org.ovirt.engine.core.config.entity.helper." + type + "ValueHelper"); valueHelper = (ValueHelper) cls.newInstance(); } catch (Exception e) { LoggerFactory.getLogger(EngineConfig.class) .debug("Unable to find type. Using default string type.", type); valueHelper = new StringValueHelper(); } return valueHelper; }
Source:
<code>private synchronized void scheduleTxnPolling() { List<Integer> keysToBeReaped = subscriptions.entrySet() .stream() .filter(e -> e.getValue().isReadyToBeReaped()) .map(e -> e.getKey()) .collect(Collectors.toList()); keysToBeReaped.forEach(k -> subscriptions.remove(k)); List<StreamingSubscriptionContext> lockedStreamingSubscriptionContexts = subscriptions.values() .stream() .filter(sc -> sc.acquire()) .collect(Collectors.toList()); if (!lockedStreamingSubscriptionContexts.isEmpty()) { log.trace("Locked StreamingSubscriptionContexts for processing", lockedStreamingSubscriptionContexts.size()); <START> if (transactionPoller != null) { <END> runtime.getStreamsView().getOpenedStreams().remove(transactionPoller.getTxnStream()); } transactionPoller = new TransactionPoller(runtime, lockedStreamingSubscriptionContexts); pollerExecutor.submit(transactionPoller); } }</code><technical_language>I need get rid of this. create a new stream poll ? If need create a new stream object poll, get unsafe stream reference, create one, JVM GC GC it</technical_language>

Target:
private synchronized void scheduleTxnPolling() { List<Integer> keysToBeReaped = subscriptions.entrySet() .stream() .filter(e -> e.getValue().isReadyToBeReaped()) .map(e -> e.getKey()) .collect(Collectors.toList()); keysToBeReaped.forEach(k -> subscriptions.remove(k)); List<StreamingSubscriptionContext> lockedStreamingSubscriptionContexts = subscriptions.values() .stream() .filter(sc -> sc.acquire()) .collect(Collectors.toList()); if (!lockedStreamingSubscriptionContexts.isEmpty()) { log.trace("Locked StreamingSubscriptionContexts for processing", lockedStreamingSubscriptionContexts.size()); pollerExecutor.submit(new TransactionPoller(runtime, lockedStreamingSubscriptionContexts)); } }
Source:
<code>public boolean requestRouteToHost(int networkType, int hostAddress) { enforceChangePermission(); if (!ConnectivityManager.isNetworkTypeValid(networkType)) { return false; } <START> NetworkStateTracker tracker = mNetTrackers[networkType]; <END> if (tracker == null || !tracker.getNetworkInfo().isConnected() || tracker.isTeardownRequested()) { if (DBG) { Slog.d(TAG, "requestRouteToHost on down network (" + networkType + ") - dropped"); } return false; } return tracker.requestRouteToHost(hostAddress); }</code><technical_language>mark this deprecated. gut function in favor of calling requestRouteToHostAddress, casting hostAddress a InetAddress</technical_language>

Target:
public boolean requestRouteToHost(int networkType, int hostAddress) { InetAddress inetAddress = NetworkUtils.lookupHost(hostAddress); if (inetAddress == null) { return false; } return requestRouteToHostAddress(networkType, inetAddress.getHostAddress()); }
Source:
<code>public String toHaskellType(final int fixity) { StringBuilder out = new StringBuilder(); out.append(this.constructor); for (Type arg : this.args) { out.append(" "); out.append(arg.toHaskellType(10)); } if (fixity > 9 && this.args.length > 0) <START> return "(" + out.toString() + ")"; <END> return out.toString(); }</code><technical_language>Code style is braces for one-liners</technical_language>

Target:
public String toHaskellType(final int fixity) { StringBuilder out = new StringBuilder(); out.append(this.constructor); for (Type arg : this.args) { out.append(" "); out.append(arg.toHaskellType(10)); } if (fixity > 9 && this.args.length > 0) { return "(" + out.toString() + ")"; } return out.toString(); }
Source:
<code><START> public FenceExecutor(VDS vds) { <END> if (! vds.getId().equals(Guid.Empty)) { VDS dbVds = DbFacade.getInstance().getVdsDao().get(vds.getId()); if (vds.getVdsGroupId() == null) { vds.setVdsGroupId(dbVds.getVdsGroupId()); } if (vds.getPmProxyPreferences() == null) { vds.setPmProxyPreferences(dbVds.getPmProxyPreferences()); } } this._vds = vds; this.proxyLocator = new FenceProxyLocator(_vds, fencingPolicy); this.architectureHelper = new VdsArchitectureHelper(); }</code><technical_language>Please add this(vds, null); move rest of code 2nd constructor. this approach get rid of FindBugs error</technical_language>

Target:
public FenceExecutor(VDS vds) { this(vds, null); }
Source:
<code>public void refresh() { Map<IOpenShiftConnection, ConnectionWrapper> updated = new HashMap<>(); boolean changed = false; synchronized (connections) { HashMap<IOpenShiftConnection, ConnectionWrapper> oldWrappers = new HashMap<>(connections); connections.clear(); <START> for (IConnection r : ConnectionsRegistrySingleton.getInstance().getAll()) { <END> if (!(r instanceof IOpenShiftConnection)) { return; } IOpenShiftConnection connection= (IOpenShiftConnection) r; ConnectionWrapper existingWrapper = oldWrappers.remove(connection); if (existingWrapper == null) { ConnectionWrapper newWrapper = new ConnectionWrapper(this, connection); connections.put(connection, newWrapper); changed = true; } else { connections.put(connection, existingWrapper); updated.put(connection, existingWrapper); } } if (!oldWrappers.isEmpty()) { changed = true; } } if (changed) { fireChanged(); } updated.keySet().forEach(r -> { ConnectionWrapper wrapper = updated.get(r); wrapper.updateWith(r); }); for (ConnectionWrapper connection : connections.values()) { connection.refresh(); } }</code><technical_language>registry.getAll(Class)</technical_language>

Target:
public void refresh() { Map<IOpenShiftConnection, ConnectionWrapper> updated = new HashMap<>(); boolean changed = false; synchronized (connections) { HashMap<IOpenShiftConnection, ConnectionWrapper> oldWrappers = new HashMap<>(connections); connections.clear(); for (IOpenShiftConnection connection : ConnectionsRegistrySingleton.getInstance().getAll(IOpenShiftConnection.class)) { ConnectionWrapper existingWrapper = oldWrappers.remove(connection); if (existingWrapper == null) { ConnectionWrapper newWrapper = new ConnectionWrapper(this, connection); connections.put(connection, newWrapper); changed = true; } else { connections.put(connection, existingWrapper); updated.put(connection, existingWrapper); } } if (!oldWrappers.isEmpty()) { changed = true; } } if (changed) { fireChanged(this); } updated.keySet().forEach(r -> { ConnectionWrapper wrapper = updated.get(r); wrapper.updateWith(r); }); for (ConnectionWrapper connection : getConnections()) { connection.refresh(); } }
Source:
<code>public void normalize(DockerEnvironment dockerEnvironment, RuntimeIdentity identity) throws InfrastructureException { String networkId = identity.getWorkspaceId() + "_" + identity.getEnvName(); dockerEnvironment.setNetwork(networkId); Map<String, DockerContainerConfig> containers = dockerEnvironment.getContainers(); for (Map.Entry<String, DockerContainerConfig> containerEntry : containers.entrySet()) { DockerContainerConfig containerConfig = containerEntry.getValue(); String userName; try { User user = userDao.getById(identity.getOwnerId()); userName = user == null ? identity.getOwnerId() : user.getName(); } catch (NotFoundException | ServerException e) { userName = identity.getOwnerId(); } containerConfig.setContainerName( containerNameGenerator.generateContainerName( identity.getWorkspaceId(), containerConfig.getId(), <START> userName, <END> containerEntry.getKey())); } normalizeNames(dockerEnvironment); }</code><technical_language>owner id is better. @garagatyi WDYT</technical_language>

Target:
public void normalize(DockerEnvironment dockerEnvironment, RuntimeIdentity identity) throws InfrastructureException { String networkId = identity.getWorkspaceId() + "_" + identity.getEnvName(); dockerEnvironment.setNetwork(networkId); Map<String, DockerContainerConfig> containers = dockerEnvironment.getContainers(); for (Map.Entry<String, DockerContainerConfig> containerEntry : containers.entrySet()) { DockerContainerConfig containerConfig = containerEntry.getValue(); containerConfig.setContainerName( containerNameGenerator.generateContainerName( identity.getWorkspaceId(), containerConfig.getId(), identity.getOwnerId(), containerEntry.getKey())); } normalizeNames(dockerEnvironment); }
Source:
<code>public OptionPointSensitivity priceSensitivityNormalVolatility(IborFutureOption futureOption, RatesProvider prov, NormalVolatilityIborFutureParameters parameters, double futurePrice) { ArgChecker.isTrue(futureOption.getPremiumStyle().equals(FutureOptionPremiumStyle.DAILY_MARGIN), "premium style should be DAILY_MARGIN"); NormalVolatilityIborFutureParameters normalParameters = (NormalVolatilityIborFutureParameters) parameters; EuropeanVanillaOption option = createOption(futureOption, parameters); IborFutureOptionSensitivityKey key = createKey(futureOption, futurePrice, parameters); NormalFunctionData normalPoint = createData(key, normalParameters); double[] priceAdjoint = new double[3]; <START> NORMAL_FUNCTION.getPriceAdjoint(option, normalPoint, priceAdjoint); <END> return new OptionPointSensitivity(key, priceAdjoint[1], futureOption.getUnderlying().getProduct().getCurrency()); }</code><technical_language>Redundant computation of CDF avoided getVega</technical_language>

Target:
public OptionPointSensitivity priceSensitivityNormalVolatility(IborFutureOption futureOption, RatesProvider prov, NormalVolatilityIborFutureParameters parameters, double futurePrice) { ArgChecker.isTrue(futureOption.getPremiumStyle().equals(FutureOptionPremiumStyle.DAILY_MARGIN), "premium style should be DAILY_MARGIN"); NormalVolatilityIborFutureParameters normalParameters = (NormalVolatilityIborFutureParameters) parameters; EuropeanVanillaOption option = createOption(futureOption, parameters); IborFutureOptionSensitivityKey key = createKey(futureOption, futurePrice, parameters); NormalFunctionData normalPoint = createData(key, normalParameters); return new OptionPointSensitivity(key, NORMAL_FUNCTION.getVega(option, normalPoint), futureOption.getUnderlying().getProduct().getCurrency()); }
Source:
<code>public void testConfigManualPercent() { final Injector injector = createInjector(); final String propertyPrefix = "druid.query.scheduler"; final JsonConfigProvider<QuerySchedulerProvider> provider = JsonConfigProvider.of( propertyPrefix, QuerySchedulerProvider.class ); final Properties properties = new Properties(); properties.put(propertyPrefix + ".numThreads", "10"); properties.put(propertyPrefix + ".laning.strategy", "manual"); properties.put(propertyPrefix + ".laning.isLimitPercent", "true"); properties.put(propertyPrefix + ".laning.lanes.one", "1"); properties.put(propertyPrefix + ".laning.lanes.twenty", "20"); provider.inject(properties, injector.getInstance(JsonConfigurator.class)); final QueryScheduler scheduler = provider.get().get().get(); Assert.assertEquals(10, scheduler.getTotalAvailableCapacity()); Assert.assertEquals(1, scheduler.getLaneAvailableCapacity("one")); <START> Assert.assertEquals(2, scheduler.getLaneAvailableCapacity("twenty")); <END> }</code><technical_language>test negative case (like lane name "three") get NO_CAPACITY</technical_language>

Target:
public void testConfigManualPercent() { final Injector injector = createInjector(); final String propertyPrefix = "druid.query.scheduler"; final JsonConfigProvider<QuerySchedulerProvider> provider = JsonConfigProvider.of( propertyPrefix, QuerySchedulerProvider.class ); final Properties properties = new Properties(); properties.put(propertyPrefix + ".numThreads", "10"); properties.put(propertyPrefix + ".laning.strategy", "manual"); properties.put(propertyPrefix + ".laning.isLimitPercent", "true"); properties.put(propertyPrefix + ".laning.lanes.one", "1"); properties.put(propertyPrefix + ".laning.lanes.twenty", "20"); provider.inject(properties, injector.getInstance(JsonConfigurator.class)); final QueryScheduler scheduler = provider.get().get().get(); Assert.assertEquals(10, scheduler.getTotalAvailableCapacity()); Assert.assertEquals(1, scheduler.getLaneAvailableCapacity("one")); Assert.assertEquals(2, scheduler.getLaneAvailableCapacity("twenty")); Assert.assertEquals(QueryScheduler.UNAVAILABLE, scheduler.getLaneAvailableCapacity("non-existent")); }
Source:
<code>public XACML3HigherOrderFunction(String functionName) { Integer i = (Integer) (idMap.get(functionName)); if (i == null) { throw new IllegalArgumentException("Unknown function: " + functionName); } functionId = i.intValue(); try { identifier = new URI(functionName); } catch (URISyntaxException use) { <START> throw new IllegalArgumentException("Invalid URI"); <END> } }</code><technical_language>wrap original exception</technical_language>

Target:
public XACML3HigherOrderFunction(String functionName) { Integer i = ID_MAP.get(functionName); if (i == null) { throw new IllegalArgumentException("Unknown function: " + functionName); } functionId = i; try { identifier = new URI(functionName); } catch (URISyntaxException e) { throw new IllegalArgumentException("Invalid URI", e); } }
Source:
<code>public void handleGet() { if (operation == Operation.METADATA) { getVariants().add(getFormatGet(false).toRepresentation(new ResourceMetadata(resource, this))); } else { if (resource.getType() == Type.UNDEFINED) { throw new RestletException("Undefined resource path.", Status.CLIENT_ERROR_NOT_FOUND); } else { Representation rep; if (getRequest().getMethod().equals(Method.HEAD)) { rep = RESTUtils.emptyBody(); rep.setMediaType(getMediaType(resource)); } else if (resource.getType() == Type.DIRECTORY) { rep = getFormatGet(false).toRepresentation(new ResourceDirectory(resource, this)); } else { rep = new InputRepresentation(resource.in(), getMediaType(resource)); } rep.setModificationDate(new Date(resource.lastmodified())); getVariants().add(rep); if (!"".equals(resource.path())) { getResponseHeaders().add("Resource-parent", "/" + resource.parent().path()); } <START> getResponseHeaders().add("Resource-type", resource.getType().toString().toLowerCase()); <END> } } super.handleGet(); }</code><technical_language>@NielsCharlier please remark in docs conventional capitalisation. I Resource-Parent Resource-Type</technical_language>

Target:
public void handleGet() { if (operation == Operation.METADATA) { getVariants().add(getFormatGet(false).toRepresentation(new ResourceMetadata(resource, this))); } else { if (resource.getType() == Type.UNDEFINED) { throw new RestletException("Undefined resource path.", Status.CLIENT_ERROR_NOT_FOUND); } else { Representation rep; if (getRequest().getMethod().equals(Method.HEAD)) { rep = RESTUtils.emptyBody(); rep.setMediaType(getMediaType(resource)); } else if (resource.getType() == Type.DIRECTORY) { rep = getFormatGet(false).toRepresentation(new ResourceDirectory(resource, this)); } else { rep = new InputRepresentation(resource.in(), getMediaType(resource)); } rep.setModificationDate(new Date(resource.lastmodified())); getVariants().add(rep); if (!"".equals(resource.path())) { getResponseHeaders().add("Resource-Parent", "/" + resource.parent().path()); } getResponseHeaders().add("Resource-Type", resource.getType().toString().toLowerCase()); } } super.handleGet(); }
Source:
<code>public final void run() { setWorkerState(WorkerState.RUNNING); LOG.info("Running ReplicationSourceShipper Thread for wal group: {}", this.walGroupId); while (isActive()) { if (!source.isPeerEnabled()) { sleepForRetries("Replication is disabled", sleepForRetries, 1, maxRetriesMultiplier); continue; } try { WALEntryBatch entryBatch = entryReader.poll(getEntriesTimeout); LOG.debug("Shipper from source got entry batch from reader: {}", source.getQueueId(), entryBatch); if (entryBatch == null) { continue; } if (entryBatch == WALEntryBatch.NO_MORE_DATA) { noMoreData(); } else { shipEdits(entryBatch); } } catch (InterruptedException e) { LOG.trace("Interrupted while waiting for next replication entry batch", e); Thread.currentThread().interrupt(); <START> } catch (ReplicationRuntimeException rre) { <END> LOG.warn("Interrupted while waiting for next replication entry batch", rre); Thread.currentThread().interrupt(); } } if (!isFinished()) { setWorkerState(WorkerState.STOPPED); } else { source.removeWorker(this); postFinish(); } }</code><technical_language>I do this catch (InterruptedException | ReplicationRuntimeException e) { blabla }</technical_language>

Target:
public final void run() { setWorkerState(WorkerState.RUNNING); LOG.info("Running ReplicationSourceShipper Thread for wal group: {}", this.walGroupId); while (isActive()) { if (!source.isPeerEnabled()) { sleepForRetries("Replication is disabled", sleepForRetries, 1, maxRetriesMultiplier); continue; } try { WALEntryBatch entryBatch = entryReader.poll(getEntriesTimeout); LOG.debug("Shipper from source got entry batch from reader: {}", source.getQueueId(), entryBatch); if (entryBatch == null) { continue; } if (entryBatch == WALEntryBatch.NO_MORE_DATA) { noMoreData(); } else { shipEdits(entryBatch); } } catch (InterruptedException | ReplicationRuntimeException e) { LOG.warn("Interrupted while waiting for next replication entry batch", e); Thread.currentThread().interrupt(); } } if (!isFinished()) { setWorkerState(WorkerState.STOPPED); } else { source.removeWorker(this); postFinish(); } }
Source:
<code>protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { Class<?> c = findLoadedClass(name); <START> List<String> things = Arrays.asList("java", "com.sun", "sun", "org.xml", "org.w3c"); <END> if(things.stream().filter(s -> name.startsWith(s)).count() > 0){ try { c = system.loadClass(name); } catch (ClassNotFoundException e3) { } } if (c == null) { try { c = findClass(name); } catch (ClassNotFoundException e) { try { c = super.loadClass(name, resolve); } catch (ClassNotFoundException e2) { try { for (ClassLoader cl : CoreClassLoaders.getInstance().getAll()) { c = cl.loadClass(name); if (c != null) break; } } catch (ClassNotFoundException e3) { if (system != null) { c = system.loadClass(name); } } } } } if (resolve) resolveClass(c); if (c == null) throw new ClassNotFoundException(name); return c; }</code><technical_language>a more descriptive name things</technical_language>

Target:
protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { Class<?> c = findLoadedClass(name); if (name.startsWith("java") || name.startsWith("com.sun") || name.startsWith("sun") || name.startsWith("org.xml") || name.startsWith("org.w3c")) { try { c = system.loadClass(name); } catch (ClassNotFoundException e3) { } } if (c == null) { try { c = findClass(name); } catch (ClassNotFoundException e) { try { c = super.loadClass(name, resolve); } catch (ClassNotFoundException e2) { try { for (ClassLoader cl : CoreClassLoaders.getInstance().getAll()) { c = cl.loadClass(name); if (c != null) break; } } catch (ClassNotFoundException e3) { if (system != null) { c = system.loadClass(name); } } } } } if (resolve) resolveClass(c); if (c == null) throw new ClassNotFoundException(name); return c; }
Source:
<code>public void test43() throws Exception { ClassNode cls = getClassNode(TestCls.class); String code = cls.getCode().toString(); <START> assertThat(code, containsOne("continue;")); <END> }</code><technical_language>Oh, I see, sorry. check method is clear :(</technical_language>

Target:
public void test43() throws Exception { getClassNode(TestCls.class); }
Source:
<code>private void updateDefaultNameSpaces(final Node<Definition<DMNDiagram>, ?> diagramNode) { final DMNDiagram dmnDiagram = diagramNode.getContent().getDefinition(); final Definitions dmnDefinitions = dmnDiagram.getDefinitions(); if (!dmnDefinitions.getNsContext().containsValue(DMNModelInstrumentedBase.URI_FEEL)) { dmnDefinitions.getNsContext().put(DMNModelInstrumentedBase.PREFIX_FEEL, DMNModelInstrumentedBase.URI_FEEL); } if (!dmnDefinitions.getNsContext().containsValue(DMNModelInstrumentedBase.URI_DMN)) { dmnDefinitions.getNsContext().put(DMNModelInstrumentedBase.PREFIX_DMN, DMNModelInstrumentedBase.URI_DMN); } if (!dmnDefinitions.getNsContext().containsValue(DMNModelInstrumentedBase.URI_KIE)) { dmnDefinitions.getNsContext().put(DMNModelInstrumentedBase.PREFIX_KIE, DMNModelInstrumentedBase.URI_KIE); <START> } <END> }</code><technical_language>Nice possibility streams: java private void updateDefaultNameSpaces(final Node<Definition<DMNDiagram>, ?> diagramNode) { final DMNDiagram dmnDiagram = diagramNode.getContent().getDefinition(); final Definitions dmnDefinitions = dmnDiagram.getDefinitions(); Stream.of(DMNModelInstrumentedBase.Namespace.values()) .filter(namespace -> !dmnDefinitions.getNsContext().containsValue(namespace.getUri())) .forEach(namespace -> dmnDefinitions.getNsContext().put(namespace.getPrefix(), namespace.getUri())); } // if declare enum public enum Namespace { FEEL("feel", org.kie.dmn.model.v1_1.DMNModelInstrumentedBase.URI_FEEL), DMN("dmn", org.kie.dmn.model.v1_1.DMNModelInstrumentedBase.URI_DMN), KIE("kie", org.kie.dmn.model.v1_1.DMNModelInstrumentedBase.URI_KIE); private String prefix; private String uri; Namespace(final String prefix, final String uri) { this.prefix = prefix; this.uri = uri; } public String getPrefix() { return prefix; } public String getUri() { return uri; } }</technical_language>

Target:
private void updateDefaultNameSpaces(final Node<Definition<DMNDiagram>, ?> diagramNode) { final DMNDiagram dmnDiagram = diagramNode.getContent().getDefinition(); final Definitions dmnDefinitions = dmnDiagram.getDefinitions(); Stream.of(DMNModelInstrumentedBase.Namespace.values()) .filter(namespace -> !dmnDefinitions.getNsContext().containsValue(namespace.getUri())) .forEach(namespace -> dmnDefinitions.getNsContext().put(namespace.getPrefix(), namespace.getUri())); }
Source:
<code>private String writeTextOutput(StringBuilder output, PlanRepresentation plan, int level, NodeRepresentation node) { output.append(indentString(level)) .append("- ") .append(node.getType()) .append(node.getIdentifier()) .append(" => [") .append(node.getOutputs()) .append("]\n"); String statsAndCost = node.getStats(); if (statsAndCost.isEmpty()) { output.append(indentMultilineString(statsAndCost, level + 2)); } if (!node.getDetails().isEmpty()) { String details = indentMultilineString(node.getDetails(), level + 2); output.append(details); if (!details.endsWith("\n")) { output.append('\n'); } <START> } <END> List<NodeRepresentation> children = node.getChildren().stream() .map(plan::getNode) .filter(Optional::isPresent) .map(Optional::get) .collect(toList()); for (NodeRepresentation child : children) { writeTextOutput(output, plan, level + 1, child); } return output.toString(); }</code><technical_language>this a static method</technical_language>

Target:
private String writeTextOutput(StringBuilder output, PlanRepresentation plan, int level, NodeRepresentation node) { output.append(indentString(level)) .append("- ") .append(node.getName()) .append(node.getIdentifier()) .append(" => [") .append(node.getOutputs()) .append("]\n"); String estimates = printEstimates(plan, node); if (!estimates.isEmpty()) { output.append(indentMultilineString(estimates, level + 2)); } String stats = printStats(plan, node); if (!stats.isEmpty()) { output.append(indentMultilineString(stats, level + 2)); } if (!node.getDetails().isEmpty()) { String details = indentMultilineString(node.getDetails(), level + 2); output.append(details); if (!details.endsWith("\n")) { output.append('\n'); } } List<NodeRepresentation> children = node.getChildren().stream() .map(plan::getNode) .filter(Optional::isPresent) .map(Optional::get) .collect(toList()); for (NodeRepresentation child : children) { writeTextOutput(output, plan, level + 1, child); } return output.toString(); }
Source:
<code>private boolean hasAtLeastOneResolvedMining() { if (fResolvedMinings == null || fResolvedMinings.length == 0) { return false; } <START> return Stream.of(fResolvedMinings).anyMatch(mining -> mining != null); <END> }</code><technical_language>mining -> mining != null replaced Objects::nonNull</technical_language>

Target:
private boolean hasAtLeastOneResolvedMining() { if (fResolvedMinings == null || fResolvedMinings.length == 0) { return false; } return Stream.of(fResolvedMinings).anyMatch(Objects::nonNull); }
Source:
<code>public int compare(boolean b1, boolean b2) { <START> throw new UnsupportedOperationException(); <END> }</code><technical_language>include a helpful message. is a good idea throw exception message. Some code strip out stack trace leave message (which is a bad practice) this produce null. helpful explain a more this exception thrown, "compare(boolean,boolean) called a non-boolean comparator"</technical_language>

Target:
public int compare(boolean b1, boolean b2) { throw new UnsupportedOperationException( "compare(boolean, boolean) was called on a non-boolean comparator: " + toString()); }
Source:
<code>public double similarity(MatrixRow a, MatrixRow b) { double adota = 0.0; double bdotb = 0.0; double adotb = 0.0; int na = a.getNumCols(); int nb = b.getNumCols(); int i = 0, j = 0; int ca = a.getColIndex(i); int cb = b.getColIndex(j); if( (i != 0 || j != 0) ) { while (i < na && j < nb) { if (ca < cb) { <START> float va = a.getColValue(i++); <END> adota += va * va; ca = a.getColIndex(i); } else if (ca > cb) { float vb = b.getColValue(j++); bdotb += vb * vb; cb = b.getColIndex(j); } else { float va = a.getColValue(i++); float vb = b.getColValue(j++); adota += va * va; bdotb += vb * vb; adotb += va * vb; ca = a.getColIndex(i); cb = b.getColIndex(j); } } } for (; i < na; i++) { float va = a.getColValue(i); adota += va * va; } for (; j < nb; j++) { float vb = b.getColValue(j); bdotb += vb * vb; } if (adota * bdotb * adotb == 0) { return 0.0; } else { return adotb / Math.sqrt(adota * bdotb); } }</code><technical_language>I so. test it? unit tests run</technical_language>

Target:
public double similarity(MatrixRow a, MatrixRow b) { double adota = 0.0; double bdotb = 0.0; double adotb = 0.0; int na = a.getNumCols(); int nb = b.getNumCols(); int i = 0, j = 0; if((na == 0 || nb == 0)) { return 0; } int ca = a.getColIndex(i); int cb = b.getColIndex(j); while (i < na && j < nb) { if (ca < cb) { float va = a.getColValue(i++); adota += va * va; ca = a.getColIndex(i); } else if (ca > cb) { float vb = b.getColValue(j++); bdotb += vb * vb; cb = b.getColIndex(j); } else { float va = a.getColValue(i++); float vb = b.getColValue(j++); adota += va * va; bdotb += vb * vb; adotb += va * vb; ca = a.getColIndex(i); cb = b.getColIndex(j); } } for (; i < na; i++) { float va = a.getColValue(i); adota += va * va; } for (; j < nb; j++) { float vb = b.getColValue(j); bdotb += vb * vb; } if (adota * bdotb * adotb == 0) { return 0.0; } else { return adotb / Math.sqrt(adota * bdotb); } }
Source:
<code>private byte evaluateFilter(int position, int index, int length) { if (filter.testLength(length)) { int currentPosLength = dictionaryBlock.getSliceLength(index); Slice data = dictionaryBlock.getSlice(index, 0, currentPosLength); if (isCharType && length != currentPosLength) { data = Chars.padSpaces(data, maxCodePointCount); } <START> if (filter.testBytes(data.getBytes(), 0, length)) { <END> if (outputRequired) { values[outputPositionCount] = index; } outputPositions[outputPositionCount] = position; outputPositionCount++; return Status.FILTER_PASSED; } } return Status.FILTER_FAILED; }</code><technical_language>Nit: currentPosLength -> currentLength</technical_language>

Target:
private byte evaluateFilter(int position, int index, int length) { if (filter.testLength(length)) { int currentLength = dictionary.getSliceLength(index); Slice data = dictionary.getSlice(index, 0, currentLength); if (isCharType && length != currentLength) { data = Chars.padSpaces(data, maxCodePointCount); } if (filter.testBytes(data.getBytes(), 0, length)) { if (outputRequired) { values[outputPositionCount] = index; } outputPositions[outputPositionCount] = position; outputPositionCount++; return FILTER_PASSED; } } return FILTER_FAILED; }
Source:
<code>public int getBucket(Page page, int position) { if (typeInfos.isPresent()) { return getHiveBucket(bucketCount, typeInfos.get(), page, position); } else if (types.isPresent()) { return HiveBucketing.getBucket(bucketCount, types.get(), page, position); } else { <START> throw new GenericInternalException("either hiveTypes or types should be present"); <END> } }</code><technical_language>VerifyException</technical_language>

Target:
public int getBucket(Page page, int position) { switch (bucketFunctionType) { case HIVE_COMPATIBLE: return getHiveBucket(bucketCount, typeInfos.get(), page, position); case PRESTO_NATIVE: return HiveBucketing.getBucket(bucketCount, types.get(), page, position); default: throw new IllegalArgumentException("Unsupported bucket function type " + bucketFunctionType); } }
Source:
<code>private List<Field> findCategoryFields(final ContentType contentType) { return contentType.fields() <START> .stream().filter(field -> field instanceof CategoryField) <END> .collect(CollectionsUtils.toImmutableList()); }</code><technical_language>do CategoryField.class:: isInstance</technical_language>

Target:
private List<Field> findCategoryFields(final ContentType contentType) { return contentType.fields() .stream().filter(CategoryField.class::isInstance) .collect(CollectionsUtils.toImmutableList()); }
Source:
<code>private Optional<String> getHolidayUserFile(ZonedDateTime date, String filename) throws MalformedURLException { <START> URL url = new URL("file:" + filename); <END> Set<Holiday> days = getHolidayManager(url).getHolidays(date.toLocalDate(), date.toLocalDate()); return days.isEmpty() ? Optional.empty() : Optional.of(days.iterator().next().getPropertiesKey()); }</code><technical_language>checked anywhere, this file exists..</technical_language>

Target:
private Optional<String> getHolidayUserFile(ZonedDateTime date, String filename) throws MalformedURLException, FileNotFoundException { if (Files.exists(Paths.get(filename))) { URL url = new URL("file:" + filename); Set<Holiday> days = getHolidayManager(url).getHolidays(date.toLocalDate(), date.toLocalDate()); return days.isEmpty() ? Optional.empty() : Optional.of(days.iterator().next().getPropertiesKey()); } else { throw new FileNotFoundException(); } }
Source:
<code>public void searchAudit() { AuditService impl = new AuditServiceImpl(); this.auditRecordList = impl.createMockAuditRecord(); if (this.auditRecordList.isEmpty() && this.auditRecordList == null) { <START> this.auditMessage = "Audit Records not found"; <END> auditFound = false; } else { this.auditMessage = "Audit Records Found"; auditFound = true; } }</code><technical_language>do a null check empty check. NullChecker.isNotNullish here</technical_language>

Target:
public void searchAudit() { AuditService impl = new AuditServiceImpl(); this.auditRecordList = impl.createMockAuditRecord(); if (NullChecker.isNullish(this.auditRecordList)) { this.auditMessage = "Audit Records not found"; auditFound = false; } else { this.auditMessage = "Audit Records Found"; auditFound = true; } }
Source:
<code>public void shouldIncludeProfileIfPresent() throws Throwable { QueryStatistics queryStatistics = mock( QueryStatistics.class ); when( queryStatistics.containsUpdates() ).thenReturn( false ); Result result = mock( Result.class ); when( result.getQueryExecutionType() ).thenReturn( explained( READ_ONLY ) ); when( result.getQueryStatistics() ).thenReturn( queryStatistics ); when( result.getNotifications() ).thenReturn( Collections.emptyList() ); when( result.getExecutionPlanDescription() ).thenReturn( plan( "Join", map( "arg1", 1 ), 2, 4, 3, 1, singletonList( "id1" ), plan( "Scan", map( "arg2", 1 ), 2, 4, 7, 1, singletonList( "id2" ) ) ) ); TransactionalContext tc = mock( TransactionalContext.class ); CypherAdapterStream stream = new CypherAdapterStream( result, Clock.systemUTC() ); Map<String,Object> meta = metadataOf( stream ); Map<String,Object> expectedChild = map( "args", map( "arg2", 1 ), "identifiers", Iterators.asSet("id2"), "operatorType", "Scan", "children", Collections.EMPTY_LIST, "rows", 1L, "dbHits", 2L, "pageCacheHits", 4L, "pageCacheMisses", 7L, "pageCacheHitRatio", 4.0 / 11 ); Map<String,Object> expectedProfile = map( "args", map( "arg1", 1 ), "identifiers", Iterators.asSet("id1"), "operatorType", "Join", "children", Arrays.asList( expectedChild ), "rows", 1L, "dbHits", 2L, "pageCacheHits", 4L, "pageCacheMisses", 3L, "pageCacheHitRatio", 4.0 / 7 ); <START> assertThat( meta.get( "profile" ), equalTo( expectedProfile )); <END> }</code><technical_language>of values in a map a double if want compare doubles other need some kind of comparison precision in ExecutionPlanConverterTest.profileStatisticConversion</technical_language>

Target:
public void shouldIncludeProfileIfPresent() throws Throwable { QueryStatistics queryStatistics = mock( QueryStatistics.class ); when( queryStatistics.containsUpdates() ).thenReturn( false ); Result result = mock( Result.class ); when( result.getQueryExecutionType() ).thenReturn( explained( READ_ONLY ) ); when( result.getQueryStatistics() ).thenReturn( queryStatistics ); when( result.getNotifications() ).thenReturn( Collections.emptyList() ); when( result.getExecutionPlanDescription() ).thenReturn( plan( "Join", map( "arg1", 1 ), 2, 4, 3, 1, singletonList( "id1" ), plan( "Scan", map( "arg2", 1 ), 2, 4, 7, 1, singletonList( "id2" ) ) ) ); TransactionalContext tc = mock( TransactionalContext.class ); CypherAdapterStream stream = new CypherAdapterStream( result, Clock.systemUTC() ); Map<String,Object> meta = metadataOf( stream ); Map<String,Object> expectedChild = map( "args", map( "arg2", 1 ), "identifiers", Iterators.asSet("id2"), "operatorType", "Scan", "children", Collections.EMPTY_LIST, "rows", 1L, "dbHits", 2L, "pageCacheHits", 4L, "pageCacheMisses", 7L, "pageCacheHitRatio", 4.0 / 11 ); Map<String,Object> expectedProfile = map( "args", map( "arg1", 1 ), "identifiers", Iterators.asSet("id1"), "operatorType", "Join", "children", Arrays.asList( expectedChild ), "rows", 1L, "dbHits", 2L, "pageCacheHits", 4L, "pageCacheMisses", 3L, "pageCacheHitRatio", 4.0 / 7 ); assertMapEqualsWithDelta( (Map<String,Object>)meta.get( "profile" ), expectedProfile, 0.0001 ); }
Source:
<code>public void delete(Sprite spriteToDelete) { if (spriteToDelete.isClone) { throw new IllegalStateException("You are deleting a clone: this means you also delete the files that are " + "referenced by the original sprite because clones are shallow copies regarding files."); } for (LookData look : spriteToDelete.getLookList()) { try { lookController.delete(look); } catch (IOException e) { Log.e(TAG, Log.getStackTraceString(e)); } } for (SoundInfo sound : spriteToDelete.getSoundList()) { try { soundController.delete(sound); } catch (IOException e) { Log.e(TAG, Log.getStackTraceString(e)); } } <START> File projectDirectory = ProjectManager.getInstance().getCurrentProject().getDirectory(); <END> try { new DeviceVariableAccessor(projectDirectory).deleteAllLocalVariables(spriteToDelete); } catch (IOException e) { Log.e(TAG, Log.getStackTraceString(e)); } }</code><technical_language>this doesnt break right backpack is handling user variables correctly. (so this is working of another bug) this delete method is backpack deletes a sprite in backpack, delete in currently loaded project aswell</technical_language>

Target:
public void delete(Sprite spriteToDelete) { if (spriteToDelete.isClone) { throw new IllegalStateException("You are deleting a clone: this means you also delete the files that are " + "referenced by the original sprite because clones are shallow copies regarding files."); } for (LookData look : spriteToDelete.getLookList()) { try { lookController.delete(look); } catch (IOException e) { Log.e(TAG, Log.getStackTraceString(e)); } } for (SoundInfo sound : spriteToDelete.getSoundList()) { try { soundController.delete(sound); } catch (IOException e) { Log.e(TAG, Log.getStackTraceString(e)); } } }
Source:
<code>int removeExecutionLogsByTime(final long millis, final int recordCleanupLimit) throws ExecutorManagerException { int totalRecordsRemoved = 0; int removedRecords; do { removedRecords = removeExecutionLogsBatch(millis, recordCleanupLimit); logger.debug("Removed batch of execution logs. Count of records removed in this batch: " + removedRecords); <START> totalRecordsRemoved = totalRecordsRemoved + removedRecords; <END> } while (removedRecords == recordCleanupLimit); return totalRecordsRemoved; }</code><technical_language>consider adding sleep of 1 recommended DBA? Reference: <LINK_0></technical_language>

Target:
int removeExecutionLogsByTime(final long millis, final int recordCleanupLimit) throws ExecutorManagerException { int totalRecordsRemoved = 0; int removedRecords; do { removedRecords = removeExecutionLogsBatch(millis, recordCleanupLimit); logger.debug("Removed batch of execution logs. Count of records removed in this batch: " + removedRecords); totalRecordsRemoved = totalRecordsRemoved + removedRecords; try { Thread.sleep(1000L); } catch (InterruptedException e) { logger.error("Execution logs cleanup thread's sleep was interrupted.", e); } } while (removedRecords == recordCleanupLimit); return totalRecordsRemoved; }
Source:
<code>private void drawText(Batch batch, String text, float posX, float posY, String color) { Paint paint = new Paint(); float textSizeInPx = size; paint.setTextSize(textSizeInPx); <START> if (color == null || color.length() < 7 || color.charAt(0) != '#' || color.length() > 8) { <END> paint.setColor(Color.BLACK); } else { int[] rgb; color = color.toUpperCase(); rgb = calculateColorRGBs(color); paint.setColor((0xFF000000) | (rgb[0] << 16) | (rgb[1] << 8) | (rgb[2])); batch.setColor((float) rgb[0] / 255, (float) rgb[1] / 255, (float) rgb[2] / 255, 1); } paint.setAntiAlias(true); float xOffset = posX - 3.0f; int width = (int) (paint.measureText(text)); boolean isTextArabic = false; if (textContainsArabic(text)) { isTextArabic = true; xOffset -= width; paint.setTextAlign(Paint.Align.RIGHT); } else { paint.setTextAlign(Paint.Align.LEFT); } float baseline = -paint.ascent(); int height = (int) (baseline + paint.descent()); Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); width = isTextArabic ? width : 0; canvas.drawText(text, width, baseline, paint); Texture tex = new Texture(bitmap.getWidth(), bitmap.getHeight(), Pixmap.Format.RGBA8888); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, tex.getTextureObjectHandle()); GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, 0); bitmap.recycle(); batch.draw(tex, xOffset, posY - textSizeInPx); batch.flush(); tex.dispose(); }</code><technical_language>please this a regex put in a separate method</technical_language>

Target:
private void drawText(Batch batch, String text, float posX, float posY, String color) { Paint paint = new Paint(); float textSizeInPx = textSize; paint.setTextSize(textSizeInPx); if (isValidColorString(color)) { color = color.toUpperCase(); int[] rgb; rgb = calculateColorRGBs(color); paint.setColor((0xFF000000) | (rgb[0] << 16) | (rgb[1] << 8) | (rgb[2])); batch.setColor((float) rgb[0] / 255, (float) rgb[1] / 255, (float) rgb[2] / 255, 1); } else { paint.setColor(Color.BLACK); } paint.setAntiAlias(true); float xOffset = 3.0f; int canvasWidth = 0; int bitmapWidth = (int) (paint.measureText(text)); paint.setTextAlign(Paint.Align.LEFT); float baseline = -paint.ascent(); int height = (int) (baseline + paint.descent()); Bitmap bitmap = Bitmap.createBitmap(bitmapWidth, height, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); canvas.drawText(text, canvasWidth, baseline, paint); Texture tex = new Texture(bitmap.getWidth(), bitmap.getHeight(), Pixmap.Format.RGBA8888); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, tex.getTextureObjectHandle()); GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, 0); bitmap.recycle(); batch.draw(tex, posX - xOffset, posY - textSizeInPx); batch.flush(); tex.dispose(); }
Source:
<code>public void getProviderCertificateChain(AsyncQuery aQuery, Provider provider) { aQuery.converterCallback = new IAsyncConverter() { @Override public Object Convert(Object source, AsyncQuery _asyncQuery) { if (source == null) { <START> return new ArrayList<CertificateInfo>(); <END> } return source; } }; Frontend.getInstance().runQuery(VdcQueryType.GetProviderCertificateChain, new ProviderQueryParameters(provider), aQuery); }</code><technical_language>if matter much, 'better' of empty list is: return Collections.emptyList(); In this case need type: return Collections.<CertificateInfo>emptyList(); compiler infer proper return type</technical_language>

Target:
public void getProviderCertificateChain(AsyncQuery aQuery, Provider provider) { aQuery.converterCallback = new IAsyncConverter() { @Override public Object Convert(Object source, AsyncQuery _asyncQuery) { if (source == null) { return Collections.<CertificateInfo> emptyList(); } return source; } }; Frontend.getInstance().runQuery(VdcQueryType.GetProviderCertificateChain, new ProviderQueryParameters(provider), aQuery); }
Source:
<code><START> public TryBackToAllSnapshotsOfVmParameters() { <END> dstSnapshotId = Guid.Empty; }</code><technical_language>please init true if continue this convention</technical_language>

Target:
public TryBackToAllSnapshotsOfVmParameters() { dstSnapshotId = Guid.Empty; restoreMemory = true; }
Source:
<code>private void print() { if (canceled) { out.print("[CANCELED] "); } else if (total == IProgressMonitor.UNKNOWN) { <START> switch (animationFrame) { <END> case 0: out.print("[-] "); break; case 1: out.print("[\\] "); break; case 2: out.print("[|] "); break; case 3: out.print("[/] "); break; } animationFrame = (animationFrame + 1) % 4; } else { out.printf("[%2d%%] ", worked / total); } out.print(task); if (subTask != null) { out.printf(" - %s", subTask); } out.print('\r'); }</code><technical_language>I suggest short this switch java char[] symbols = {'-', '\\', '|', '/'}; out.printf("[%c] ", symbols[animationFrame]);</technical_language>

Target:
private void print() { if (canceled) { out.print("[CANCELED] "); } else if (total == IProgressMonitor.UNKNOWN) { out.print(animationFrames[animationFrameId]); animationFrameId = (animationFrameId + 1) % animationFrames.length; } else { out.printf("[%2d%%] ", worked / total); } out.print(task); if (subTask != null) { out.printf(" - %s", subTask); } out.print('\r'); }
Source:
<code>public PipelineResultIteration(AggregateIterable<Document> aggIter, Map<String, String> varToOriginalName, BindingSet bindings) { aggIter.batchSize(BATCH_SIZE); this.cursor = aggIter.iterator(); this.varToOriginalName = varToOriginalName; this.bindings = bindings; lookahead(); <START> } <END></code><technical_language>of need null checked</technical_language>

Target:
public PipelineResultIteration(AggregateIterable<Document> aggIter, Map<String, String> varToOriginalName, BindingSet bindings) { this.varToOriginalName = Preconditions.checkNotNull(varToOriginalName); this.bindings = Preconditions.checkNotNull(bindings); Preconditions.checkNotNull(aggIter); aggIter.batchSize(BATCH_SIZE); this.cursor = aggIter.iterator(); }
Source:
<code>public Observable<Cursor> getDataPoints(@NonNull Long surveyGroupId, @Nullable Double latitude, @Nullable Double longitude, @Nullable Integer orderBy) { int safeOrderBy; if (orderBy == null) { safeOrderBy = Constants.ORDER_BY_NONE; } else { safeOrderBy = orderBy; } <START> switch (safeOrderBy) { <END> case Constants.ORDER_BY_DISTANCE: case Constants.ORDER_BY_DATE: case Constants.ORDER_BY_STATUS: case Constants.ORDER_BY_NAME: return briteSurveyDbAdapter .getFilteredSurveyedLocales(surveyGroupId, latitude, longitude, safeOrderBy); default: return briteSurveyDbAdapter.getSurveyedLocales(surveyGroupId); } }</code><technical_language>switch statement redundant alternatives. if statement solve same</technical_language>

Target:
public Observable<Cursor> getDataPoints(@NonNull Long surveyGroupId, @Nullable Double latitude, @Nullable Double longitude, @Nullable Integer orderBy) { if (isRequestFiltered(orderBy)) { return briteSurveyDbAdapter .getFilteredDataPoints(surveyGroupId, latitude, longitude, orderBy); } else { return briteSurveyDbAdapter.getDataPoints(surveyGroupId); } }
Source:
<code>public void testGetSqlQueryAllInvalidRows() throws SQLException { SourceTargetColumnNames columnNames = <START> new SourceTargetColumnNames.DataSourceColNames(pDataTable, pIndexTable, false); <END> String sqlStr = IndexScrutinyTableOutput.getSqlQueryAllInvalidRows(conn, columnNames, SCRUTINY_TIME_MILLIS); assertEquals("SELECT \"SOURCE_TABLE\" , \"TARGET_TABLE\" , \"SCRUTINY_EXECUTE_TIME\" , \"SOURCE_ROW_PK_HASH\" , \"SOURCE_TS\" , \"TARGET_TS\" , \"HAS_TARGET_ROW\" , \"ID\" , \"PK_PART2\" , \"NAME\" , \"ZIP\" , \":ID\" , \":PK_PART2\" , \"0:NAME\" , \"0:ZIP\" FROM PHOENIX_INDEX_SCRUTINY(\"ID\" INTEGER,\"PK_PART2\" TINYINT,\"NAME\" VARCHAR,\"ZIP\" BIGINT,\":ID\" INTEGER,\":PK_PART2\" TINYINT,\"0:NAME\" VARCHAR,\"0:ZIP\" BIGINT) WHERE (\"SOURCE_TABLE\",\"TARGET_TABLE\",\"SCRUTINY_EXECUTE_TIME\") IN (('TEST_SCHEMA.TEST_INDEX_COLUMN_NAMES_UTIL','TEST_SCHEMA.TEST_ICN_INDEX',1502908914193))", sqlStr); }</code><technical_language>a new constructor takes extra boolean parameter eliminate changing existing code</technical_language>

Target:
public void testGetSqlQueryAllInvalidRows() throws SQLException { SourceTargetColumnNames columnNames = new SourceTargetColumnNames.DataSourceColNames(pDataTable, pIndexTable); String sqlStr = IndexScrutinyTableOutput.getSqlQueryAllInvalidRows(conn, columnNames, SCRUTINY_TIME_MILLIS); assertEquals("SELECT \"SOURCE_TABLE\" , \"TARGET_TABLE\" , \"SCRUTINY_EXECUTE_TIME\" , \"SOURCE_ROW_PK_HASH\" , \"SOURCE_TS\" , \"TARGET_TS\" , \"HAS_TARGET_ROW\" , \"ID\" , \"PK_PART2\" , \"NAME\" , \"ZIP\" , \":ID\" , \":PK_PART2\" , \"0:NAME\" , \"0:ZIP\" FROM PHOENIX_INDEX_SCRUTINY(\"ID\" INTEGER,\"PK_PART2\" TINYINT,\"NAME\" VARCHAR,\"ZIP\" BIGINT,\":ID\" INTEGER,\":PK_PART2\" TINYINT,\"0:NAME\" VARCHAR,\"0:ZIP\" BIGINT) WHERE (\"SOURCE_TABLE\",\"TARGET_TABLE\",\"SCRUTINY_EXECUTE_TIME\") IN (('TEST_SCHEMA.TEST_INDEX_COLUMN_NAMES_UTIL','TEST_SCHEMA.TEST_ICN_INDEX',1502908914193))", sqlStr); }
Source:
<code>public BaseDaoTestCase() { <START> Assume.assumeTrue("Uninitialized TestCase, cannot proceed. Look above for causing exception.", initialized); <END> }</code><technical_language>please static import</technical_language>

Target:
public BaseDaoTestCase() { assumeTrue("Uninitialized TestCase, cannot proceed. Look above for causing exception.", initialized); }