auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private com.google.gerrit.common.data.AccountInfo setAccountFromChangeInfo(ChangeInfo changeInfo) { com.google.gerrit.common.data.AccountInfo accountInfo; Account account; <START> account = new Account(new Account.Id(changeInfo.getOwner().getId())); <END> account.setFullName(changeInfo.getOwner().getName()); account.setUserName(changeInfo.getOwner().getUsername()); account.setPreferredEmail(changeInfo.getOwner().getEmail()); accountInfo = new com.google.gerrit.common.data.AccountInfo(account); return accountInfo; }</code><technical_language>combine line 305</technical_language>

Target:
private com.google.gerrit.common.data.AccountInfo setAccountFromChangeInfo(ChangeInfo changeInfo) { com.google.gerrit.common.data.AccountInfo accountInfo; Account account = new Account(new Account.Id(changeInfo.getOwner().getId())); account.setFullName(changeInfo.getOwner().getName()); account.setUserName(changeInfo.getOwner().getUsername()); account.setPreferredEmail(changeInfo.getOwner().getEmail()); return new com.google.gerrit.common.data.AccountInfo(account); }
Source:
<code>@Override public boolean equals (Object o){ if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DataNode dataNode = (DataNode) o; if (port != dataNode.port) { return false; } <START> return hostname.equals(dataNode.hostname); <END> }</code><technical_language>do need check other fields? objects equal right</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DataNode dataNode = (DataNode) o; if (port != dataNode.port) { return false; } return hostname.equals(dataNode.hostname); }
Source:
<code>private void validateNestedAttributes(ModelNode subModel, AttributeDefinition attr, String absoluteParentName) throws OperationFailedException { AttributeDefinition[] subAttrs = ((ObjectTypeAttributeDefinition) attr).getValueTypes(); for (AttributeDefinition subAttr : subAttrs) { String subAttributeName = subAttr.getName(); String absoluteName = absoluteParentName + "." + subAttributeName; <START> if (!subModel.hasDefined(subAttributeName)) { <END> continue; } if (subAttr.getRequires() != null) { for (final String required : subAttr.getRequires()) { if (!subModel.hasDefined(required)) { throw ControllerLogger.ROOT_LOGGER.requiredAttributeNotSet(absoluteParentName + "." + required, absoluteName); } } } if (!isAllowed(subAttr, subModel)) { String[] alts = subAttr.getAlternatives(); StringBuilder sb = null; if (alts != null) { for (String alt : alts) { if (subModel.hasDefined(alt)) { if (sb == null) { sb = new StringBuilder(); } else { sb.append(", "); } sb.append(absoluteParentName + "." + alt); } } } throw new OperationFailedException(ControllerLogger.ROOT_LOGGER.invalidAttributeCombo(absoluteName, sb)); } handleObjectAttributes(subModel, subAttr, absoluteName); } }</code><technical_language>this is wrong. if (!subModel.hasDefined(absoluteParentName, subAttributeName)) { work</technical_language>

Target:
private void validateNestedAttributes(ModelNode subModel, AttributeDefinition attr, String absoluteParentName) throws OperationFailedException { if (!subModel.isDefined()) { return; } AttributeDefinition[] subAttrs = ((ObjectTypeAttributeDefinition) attr).getValueTypes(); for (AttributeDefinition subAttr : subAttrs) { String subAttributeName = subAttr.getName(); String absoluteName = absoluteParentName + "." + subAttributeName; if (!subModel.hasDefined(subAttributeName) && isRequired(subAttr, subModel)) { throw new OperationFailedException(ControllerLogger.ROOT_LOGGER.required(subAttributeName)); } if (!subModel.hasDefined(subAttributeName)) { continue; } if (subAttr.getRequires() != null) { for (final String required : subAttr.getRequires()) { if (!subModel.hasDefined(required)) { throw ControllerLogger.ROOT_LOGGER.requiredAttributeNotSet(absoluteParentName + "." + required, absoluteName); } } } if (!isAllowed(subAttr, subModel)) { String[] alts = subAttr.getAlternatives(); StringBuilder sb = null; if (alts != null) { for (String alt : alts) { if (subModel.hasDefined(alt)) { if (sb == null) { sb = new StringBuilder(); } else { sb.append(", "); } sb.append(absoluteParentName + "." + alt); } } } throw new OperationFailedException(ControllerLogger.ROOT_LOGGER.invalidAttributeCombo(absoluteName, sb)); } handleObjectAttributes(subModel, subAttr, absoluteName); } }
Source:
<code>private void createBuilderTask(List<Task<? extends Serializable>> rootTasks, boolean shouldCreateAnotherLoadTask) { <START> Task<DependencyCollectionWork> dependencyTask = TaskFactory.get(new DependencyCollectionWork(), conf); <END> setupDependencyTask(rootTasks, dependencyTask); if (shouldCreateAnotherLoadTask) { Task<ReplLoadWork> loadTask = TaskFactory.get(work, conf); dependencyTask.addDependentTask(loadTask); } }</code><technical_language>simpler a dependency collection Task (like base code) event tasks instead of making a long dependency list. is more readable too. Also, is confusing dependency is set if parentTask a child. So, is tail of parent task chain add dependents</technical_language>

Target:
private void createBuilderTask(List<Task<? extends Serializable>> rootTasks, boolean shouldCreateAnotherLoadTask) { if (shouldCreateAnotherLoadTask) { Task<ReplLoadWork> loadTask = TaskFactory.get(work, conf); dependency(rootTasks, loadTask); } }
Source:
<code>public ValidatorFactory getValidatorFactory() { <START> if (validatorFactory == null) <END> { Configuration configuration = Validation.byDefaultProvider().configure(); Configuration<?> conf = configuration.traversableResolver(new IronJacamarTraversableResolver()); validatorFactory = new IronJacamarValidatorFactory(conf.buildValidatorFactory()); } return validatorFactory; }</code><technical_language>passed in constructor a set-method</technical_language>

Target:
public ValidatorFactory getValidatorFactory() { return validatorFactory; }
Source:
<code>public AsyncRegionReplicaReplayRetryingCaller(HashedWheelTimer retryTimer, AsyncClusterConnectionImpl conn, int maxAttempts, long operationTimeoutNs, TableName tableName, byte[] encodedRegionName, byte[] row, List<Entry> entries, int replicaId) { super(retryTimer, conn, ConnectionUtils.getPriority(tableName), conn.connConf.getPauseNs(), conn.connConf.getPauseForCQTBENs(), maxAttempts, operationTimeoutNs, conn.connConf.getWriteRpcTimeoutNs(), conn.connConf.getStartLogErrorsCnt()); this.tableName = tableName; this.encodedRegionName = encodedRegionName; this.row = row; this.entries = entries.toArray(new Entry[0]); this.replicaId = replicaId; <START> this.loc = null; <END> }</code><technical_language>a bit odd this construction call takes HRL figures out 'call' is made</technical_language>

Target:
public AsyncRegionReplicaReplayRetryingCaller(HashedWheelTimer retryTimer, AsyncClusterConnectionImpl conn, int maxAttempts, long operationTimeoutNs, TableName tableName, byte[] encodedRegionName, byte[] row, List<Entry> entries, int replicaId) { super(retryTimer, conn, ConnectionUtils.getPriority(tableName), conn.connConf.getPauseNs(), conn.connConf.getPauseForCQTBENs(), maxAttempts, operationTimeoutNs, conn.connConf.getWriteRpcTimeoutNs(), conn.connConf.getStartLogErrorsCnt()); this.tableName = tableName; this.encodedRegionName = encodedRegionName; this.row = row; this.entries = entries.toArray(new Entry[0]); this.replicaId = replicaId; }
Source:
<code>public static Date parseFromSolrDate(String date) { SimpleDateFormat format = new SimpleDateFormat( <START> "yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.getDefault()); <END> Date ret; try { ret = format.parse(date); return ret; } catch (ParseException e) { log.error(e.getMessage(), e); } return new Date(); }</code><technical_language>This is of points Zulu Time, do configured default Timezone</technical_language>

Target:
public static Date parseFromSolrDate(String date) { SimpleDateFormat format = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss'Z'"); format.setTimeZone(TimeZone.getTimeZone("ZULU")); Date ret; try { ret = format.parse(date); return ret; } catch (ParseException e) { log.error(e.getMessage(), e); } return new Date(); }
Source:
<code>public void getVersionsForProgram(ArtifactId program, boolean onlyActive, ProgramVersions progVer) { ArtifactId teamDefId = atsApi.getAttributeResolver().getSoleAttributeValue(program, AtsAttributeTypes.TeamDefinitionReference, ArtifactId.SENTINEL); if (teamDefId.isValid()) { <START> TeamDefinition jaxTeamDef = <END> atsApi.getConfigService().getConfigurations().getIdToTeamDef().get(teamDefId.getId()); if (jaxTeamDef != null) { progVer.setTeam(ArtifactToken.valueOf(jaxTeamDef.getId(), jaxTeamDef.getName(), atsApi.getAtsBranch())); for (Long versionId : jaxTeamDef.getVersions()) { JaxVersion version = atsApi.getConfigService().getConfigurations().getIdToVersion().get(versionId); boolean verActive = version.isActive(); if (onlyActive && !verActive) { continue; } progVer.addVersion(ArtifactToken.valueOf(version.getId(), version.getName(), atsApi.getAtsBranch())); } } } }</code><technical_language>consider aligning variable name type name</technical_language>

Target:
public void getVersionsForProgram(ArtifactId program, boolean onlyActive, ProgramVersions progVer) { ArtifactId teamDefId = atsApi.getAttributeResolver().getSoleAttributeValue(program, AtsAttributeTypes.TeamDefinitionReference, ArtifactId.SENTINEL); if (teamDefId.isValid()) { TeamDefinition teamDef = atsApi.getConfigService().getConfigurations().getIdToTeamDef().get(teamDefId.getId()); if (teamDef != null) { progVer.setTeam(ArtifactToken.valueOf(teamDef.getId(), teamDef.getName(), atsApi.getAtsBranch())); for (Long versionId : teamDef.getVersions()) { JaxVersion version = atsApi.getConfigService().getConfigurations().getIdToVersion().get(versionId); boolean verActive = version.isActive(); if (onlyActive && !verActive) { continue; } progVer.addVersion(ArtifactToken.valueOf(version.getId(), version.getName(), atsApi.getAtsBranch())); } } } }
Source:
<code>public boolean onOptionsItemSelected(MenuItem item) { <START> if (item.getItemId() == R.id.edit_profile) { <END> router.showUserProfileEditor(getActivity(), username); return true; } else { return super.onOptionsItemSelected(item); } }</code><technical_language>This a switch statement, in case add more menu items later</technical_language>

Target:
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.edit_profile: { router.showUserProfileEditor(getActivity(), username); return true; } default: { return super.onOptionsItemSelected(item); } } }
Source:
<code>public boolean equals(Object o) { <START> return (o == this) || ((o instanceof java.util.Set) && areEqual(delegate, (java.util.Set<?>) o)); <END> }</code><technical_language>This assumes iteration orders of sets same. This implementation AbstractSet.equals</technical_language>

Target:
public boolean equals(Object o) { return TODO(); }
Source:
<code>public void addAggregate(ExpressionType aggType, boolean isDistinct, Integer aggOutputColumn, AbstractExpression aggInputExpr) { m_aggregateTypes.add(aggType); if (isDistinct) { m_aggregateDistinct.add(1); } else { m_aggregateDistinct.add(0); } m_aggregateOutputColumns.add(aggOutputColumn); if (aggType.isNullary()) { assert(aggInputExpr == null); m_aggregateExpressions.add(null); } else { assert(aggInputExpr != null); m_aggregateExpressions.add(aggInputExpr.clone()); } <START> m_workerOrCoordinator.add("WORKER"); <END> }</code><technical_language>aggregate type note this</technical_language>

Target:
public void addAggregate(ExpressionType aggType, boolean isDistinct, Integer aggOutputColumn, AbstractExpression aggInputExpr) { m_aggregateTypes.add(aggType); if (isDistinct) { m_aggregateDistinct.add(1); } else { m_aggregateDistinct.add(0); } m_aggregateOutputColumns.add(aggOutputColumn); if (aggType.isNullary()) { assert(aggInputExpr == null); m_aggregateExpressions.add(null); } else { assert(aggInputExpr != null); m_aggregateExpressions.add(aggInputExpr.clone()); } m_isWorker.add(true); m_isPartition.add(true); }
Source:
<code>public void start() { if (started) { LOG.warn("Skipping attempt to start an already started ContainerHeartbeatMonitor."); return; } LOG.info("Starting ContainerHeartbeatMonitor"); scheduler.scheduleAtFixedRate(() -> { ContainerHeartbeatResponse response = containerHeartbeatClient.requestHeartbeat(); if (!response.isAlive()) { scheduler.schedule(() -> { <START> LOG.error("Gracefully shutdown timeout expired. Force exiting."); <END> System.exit(1); }, SHUTDOWN_TIMOUT_MS, TimeUnit.MILLISECONDS); onContainerExpired.run(); } }, 0, SCHEDULE_MS, TimeUnit.MILLISECONDS); started = true; }</code><technical_language>Minor: s/Gracefully/Graceful</technical_language>

Target:
public void start() { if (started) { LOG.warn("Skipping attempt to start an already started ContainerHeartbeatMonitor."); return; } LOG.info("Starting ContainerHeartbeatMonitor"); scheduler.scheduleAtFixedRate(() -> { ContainerHeartbeatResponse response = containerHeartbeatClient.requestHeartbeat(); if (!response.isAlive()) { scheduler.schedule(() -> { LOG.error("Graceful shutdown timeout expired. Force exiting."); System.exit(1); }, SHUTDOWN_TIMOUT_MS, TimeUnit.MILLISECONDS); onContainerExpired.run(); } }, 0, SCHEDULE_MS, TimeUnit.MILLISECONDS); started = true; }
Source:
<code>protected void onLoad() { super.onLoad(); if (!BrowseCap.isMacintosh()) return; Element parent = getElement().getParentElement().getParentElement(); NodeList<Element> children = DomUtils.querySelectorAll(parent, "div[style*='z-index: -1']"); for (int i = 0; i < children.getLength(); i++) { Element el = children.getItem(i); com.google.gwt.dom.client.Style style = el.getStyle(); boolean doesNotSparkJoy = style.getZIndex() == "-1" && style.getOverflow() == "scroll" && style.getVisibility() == "hidden"; if (doesNotSparkJoy) style.setOverflow(com.google.gwt.dom.client.Style.Overflow.HIDDEN); } <START> children = DomUtils.querySelectorAll(parent, "div[style*='overflow:']"); <END> for (int i = 0; i < children.getLength(); i++) { Element el = children.getItem(i); com.google.gwt.dom.client.Style style = el.getStyle(); style.setOverflowX(Overflow.HIDDEN); } }</code><technical_language>Do need surgically remove nodes DOM this change? IIRC of flashing scrollbars remove surgical element removal horizontal, if suppressing horizontal overflow longer necessary</technical_language>

Target:
protected void onLoad() { super.onLoad(); if (!BrowseCap.isMacintosh()) return; Element parent = getElement().getParentElement().getParentElement(); NodeList<Element> children = DomUtils.querySelectorAll(parent, "div[style*='overflow:']"); for (int i = 0; i < children.getLength(); i++) { Element el = children.getItem(i); com.google.gwt.dom.client.Style style = el.getStyle(); String overflow = style.getOverflow(); if (!StringUtil.isNullOrEmpty(overflow)) style.setOverflowX(Overflow.HIDDEN); } }
Source:
<code>public void testUntrashChildren() { createDocuments(); trashService.trashDocument(doc1); trashService.trashDocument(fold); transactionalFeature.nextTransaction(); fold = session.getDocument(new IdRef(fold.getId())); doc1 = session.getDocument(new IdRef(doc1.getId())); doc2 = session.getDocument(new IdRef(doc2.getId())); assertTrue(fold.isTrashed()); assertTrue(doc1.isTrashed()); assertTrue(doc2.isTrashed()); assertTrue(trashService.isMangledName(fold.getName())); assertTrue(trashService.isMangledName(doc1.getName())); assertFalse(trashService.isMangledName(doc2.getName())); trashService.untrashDocument(fold); transactionalFeature.nextTransaction(); fold = session.getDocument(new IdRef(fold.getId())); doc1 = session.getDocument(new IdRef(doc1.getId())); doc2 = session.getDocument(new IdRef(doc2.getId())); assertFalse(fold.isTrashed()); assertFalse(doc1.isTrashed()); assertFalse(doc2.isTrashed()); assertFalse(trashService.isMangledName(fold.getName())); assertFalse(trashService.isMangledName(doc1.getName())); <START> } <END></code><technical_language>Worth checking doc2 too, check name is mangled</technical_language>

Target:
public void testUntrashChildren() { createDocuments(); trashService.trashDocument(doc1); trashService.trashDocument(fold); transactionalFeature.nextTransaction(); fold = session.getDocument(new IdRef(fold.getId())); doc1 = session.getDocument(new IdRef(doc1.getId())); doc2 = session.getDocument(new IdRef(doc2.getId())); assertTrue(fold.isTrashed()); assertTrue(doc1.isTrashed()); assertTrue(doc2.isTrashed()); assertTrue(trashService.isMangledName(fold.getName())); assertTrue(trashService.isMangledName(doc1.getName())); assertFalse(trashService.isMangledName(doc2.getName())); trashService.untrashDocument(fold); transactionalFeature.nextTransaction(); fold = session.getDocument(new IdRef(fold.getId())); doc1 = session.getDocument(new IdRef(doc1.getId())); doc2 = session.getDocument(new IdRef(doc2.getId())); assertFalse(fold.isTrashed()); assertFalse(doc1.isTrashed()); assertFalse(doc2.isTrashed()); assertFalse(trashService.isMangledName(fold.getName())); assertFalse(trashService.isMangledName(doc1.getName())); assertFalse(trashService.isMangledName(doc2.getName())); }
Source:
<code>private File findFile( String targetFile, File directory ) { <START> File foundFile = null; <END> boolean didFindFile = false; for ( File file : directory.listFiles() ) { if ( file.getName().equals( targetFile ) ) { foundFile = file; didFindFile = true; break; } } if ( !didFindFile ) { fail( "Could not find file " + targetFile ); } return foundFile; }</code><technical_language>this instead? File file = new File( directory, targetFile ); if (!file.exists()) { fail( "Could find file " + targetFile ); } return file;</technical_language>

Target:
private File findFile( String targetFile, File directory ) { File file = new File( directory, targetFile ); if ( !file.exists() ) { fail( "Could not find file " + targetFile ); } return file; }
Source:
<code>void onMessage(final Session session, final String message) { final MessageEnvelope envelope = GSON.fromJson(message, MessageEnvelope.class); messageListeners.stream() .filter( <START> messageListener -> <END> messageListener.messageType.getMessageTypeId().equals(envelope.getMessageTypeId())) .map(messageListener -> messageListener.messageType) .findAny() .ifPresent( messageType -> { final WebSocketMessage payload = (WebSocketMessage) envelope.getPayload(messageType.getPayloadType()); messageListeners.stream() .filter( messageListener -> messageListener .messageType .getMessageTypeId() .equals(envelope.getMessageTypeId())) .forEach( messageListener -> messageListener.listener.accept( WebSocketMessageContext.builder() .messagingBus(this) .senderSession(session) .message(payload) .build())); }); }</code><technical_language>Method onMessage 27 lines of code (exceeds 25 allowed). Consider refactoring</technical_language>

Target:
void onMessage(final Session session, final String message) { final MessageEnvelope envelope = GSON.fromJson(message, MessageEnvelope.class); determineMatchingMessageType(envelope) .ifPresent( messageType -> { final WebSocketMessage payload = envelope.getPayload(messageType.getPayloadType()); getListenersForMessageTypeId(envelope.getMessageTypeId()) .forEach( messageListener -> messageListener.listener.accept( WebSocketMessageContext.builder() .messagingBus(this) .senderSession(session) .message(payload) .build())); }); }
Source:
<code>public void startService(Listener<T> listener) { recomputeNumBuckets(); <START> bucketSlidingTimer = new Timer(); <END> endOfBuckets = expiryPoint + (noOfBuckets * bucketSpan) - 1; logger.debug("bucket properties {}, {}", expiryPeriod, bucketSpan); logger.debug("bucket time params: start {}, expiry {}, end {}", startOfBuckets, expiryPoint, endOfBuckets); super.startService(listener); }</code><technical_language>Please remove if required in this context</technical_language>

Target:
public void startService(Listener<T> listener) { recomputeNumBuckets(); bucketSlidingTimer = new Timer(); endOfBuckets = expiryPoint + expiryPeriod -1; logger.debug("bucket properties {}, {}", expiryPeriod, bucketSpan); logger.debug("bucket time params: start {}, expiry {}, end {}", startOfBuckets, expiryPoint, endOfBuckets); bucketSlidingTimer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { ((BucketStore.ExpirableBucketStore<T>) bucketStore).deleteExpiredBuckets(expiryPoint); } catch (IOException e) { throw new RuntimeException(e); } } }, cleanupTimeInMillis, cleanupTimeInMillis); super.startService(listener); }
Source:
<code>public void testInvalidSinkSemantic() { ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "sinkTable"); final Map<String, String> modifiedOptions = getModifiedOptions( getFullSinkOptions(), options -> { options.put("sink.semantic", "exactly-once"); }); final CatalogTable sinkTable = createKafkaSinkCatalogTable(modifiedOptions); <START> thrown.expect(ValidationException.class); <END> FactoryUtil.createTableSink( null, objectIdentifier, sinkTable, new Configuration(), Thread.currentThread().getContextClassLoader()); }</code><technical_language>Please check exception message too. If expected message is nested in stack, org.apache.flink.core.testutils.FlinkMatchers#containsCause util</technical_language>

Target:
public void testInvalidSinkSemantic() { ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "sinkTable"); final Map<String, String> modifiedOptions = getModifiedOptions( getFullSinkOptions(), options -> { options.put("sink.semantic", "exactly-once"); }); final CatalogTable sinkTable = createKafkaSinkCatalogTable(modifiedOptions); try { FactoryUtil.createTableSink( null, objectIdentifier, sinkTable, new Configuration(), Thread.currentThread().getContextClassLoader()); fail("Connector 'kafka-0.10' doesn't support 'sink.semantic'"); } catch (Exception e) { assertTrue(ExceptionUtils .findThrowableWithMessage(e, "Unsupported options:\n\nsink.semantic") .isPresent()); } }
Source:
<code>public byte[] getContentAsBytes() { if (!hasContent()) { return new byte[0]; } try { InputStream is = getContent(); <START> byte[] bytes = getBytes(is); <END> if (bytes.length > 0 && isGzipped(getEncoding())) { is = new GZIPInputStream(new ByteArrayInputStream(bytes)); return getBytes(is); } return bytes; } catch (IOException e2) { throw new UnirestException(e2); } finally { EntityUtils.consumeQuietly(r.getEntity()); } }</code><technical_language>of all, thanks for PR ! I issue I address. This results in consuming entire InputStream large chunked. This a problem if Unriest download a large payload. leverage available() original InputStream. this method: > Returns estimate of number of bytes read (or skipped over) this input stream blocking, 0, 0 end of stream is detected</technical_language>

Target:
public byte[] getContentAsBytes() { if (!hasContent()) { return new byte[0]; } try { InputStream is = getContent(); if (is.available() > 0 && isGzipped(getEncoding())) { is = new GZIPInputStream(getContent()); } return getBytes(is); } catch (IOException e2) { throw new UnirestException(e2); } finally { EntityUtils.consumeQuietly(r.getEntity()); } }
Source:
<code>public Player(int x, int y, int id) { Random random = new Random(System.currentTimeMillis()); maxHitPoints = random.nextInt(11) + 10; <START> curHitPoints = maxHitPoints/3; <END> attackPower = random.nextInt(10) + 1; this.xPos = x; this.yPos = y; this.unitId = id; }</code><technical_language>needs changed normal</technical_language>

Target:
public Player(int x, int y, int id) { Random random = new Random(System.currentTimeMillis()); maxHitPoints = random.nextInt(11) + 10; curHitPoints = maxHitPoints; attackPower = random.nextInt(10) + 1; this.xPos = x; this.yPos = y; this.unitId = id; }
Source:
<code>default void inputDetail() { or(mandatory(host().id()), <START> mandatory(host().name())); <END> }</code><technical_language>This means host name: POST ... <action> <host> <name>myhost</name> </host> </action> Is correct</technical_language>

Target:
default void inputDetail() { or(mandatory(storageDomain().id()), mandatory(storageDomain().name())); or(optional(disk().name()), optional(disk().alias())); }
Source:
<code>private PathElement resolvePathAttribute(Class<?> entityClass, EntityDictionary dictionary, String fieldName) { <START> Class<?> attributeClass = null; <END> if (dictionary.isAttribute(entityClass, fieldName) || fieldName.equals(dictionary.getIdFieldName(entityClass))) { attributeClass = dictionary.getType(entityClass, fieldName); } return new PathElement(entityClass, attributeClass, fieldName); }</code><technical_language>field type, Object.class</technical_language>

Target:
private PathElement resolvePathAttribute(Class<?> entityClass, EntityDictionary dictionary, String fieldName) { Class<?> attributeClass = Object.class; if (dictionary.isAttribute(entityClass, fieldName) || fieldName.equals(dictionary.getIdFieldName(entityClass))) { attributeClass = dictionary.getType(entityClass, fieldName); } return new PathElement(entityClass, attributeClass, fieldName); }
Source:
<code><START> public void destroy() { END> LOG.info("===================="); LOG.info("Destroyed CountBean"); LOG.info("===================="); TestResultsBean.setPreDestroySessionScoped(true); }</code><technical_language>In order test runs successfully is a debugger required is this some artifact of test development</technical_language>

Target:
public void destroy() { LOG.info("Destroyed CountBean"); TestResultsBean.setPreDestroySessionScoped(true); }
Source:
<code>ClientOperation(int code) { <START> this.code = code; <END> notification = false; }</code><technical_language>this(code, false)</technical_language>

Target:
ClientOperation(int code) { this(code, false); }
Source:
<code>public static String getEntryContentAsString(File file, String entryName) throws IOException { InputStream resultStream = getEntryContentAsStream(file, entryName); <START> return IOUtils.toString(resultStream, Charsets.UTF_8); <END> }</code><technical_language>IOUtils utilities toString do **not** close stream, closed (usually a try-with-resources block)</technical_language>

Target:
public static String getEntryContentAsString(File file, String entryName) throws IOException { try (InputStream resultStream = getEntryContentAsStream(file, entryName)) { return IOUtils.toString(resultStream, Charsets.UTF_8); } }
Source:
<code>private String makeSslErrorPage() { final String warningMsg = getString(R.string.ssl_error_warning); final String exampleMsg = getString(R.string.ssl_error_example); <START> final String continueMsg = getString(R.string.ssl_error_continue); <END> final String certificateMsg = getString(R.string.ssl_error_view_certificate); return String.join("\n", makeHtmlTag(), "<head>", " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">", " <style>", " body {", " background-color:#fafafa;", " margin:auto;", " width:80%;", " margin-top: 96px", " }", " img {", " height:48px;", " width:48px;", " }", " div.warn {", " font-size:" + sp(16) + ";", " line-height:1.28;", " margin-top:16px;", " opacity:0.87;", " }", " div.example, div.vpnwarning {", " font-size:" + sp(14) + ";", " line-height:1.21905;", " margin-top:16px;", " opacity:0.54;", " }", " a {", " color:#4285F4;", " display:inline-block;", " font-size:" + sp(14) + ";", " font-weight:bold;", " height:48px;", " margin-top:24px;", " text-decoration:none;", " text-transform:uppercase;", " }", " a.certificate {", " margin-top:0px;", " }", " </style>", "</head>", "<body>", " <p><img src=quantum_ic_warning_amber_96.png><br>", " <div class=warn>" + warningMsg + "</div>", " <div class=example>" + exampleMsg + "</div>", getVpnMsgOrLinkToBrowser(), " <a class=certificate href=" + mCertificateOutToken + ">" + certificateMsg + "</a>", "</body>", "</html>"); }</code><technical_language>This is unused</technical_language>

Target:
private String makeSslErrorPage() { final String warningMsg = getString(R.string.ssl_error_warning); final String exampleMsg = getString(R.string.ssl_error_example); final String certificateMsg = getString(R.string.ssl_error_view_certificate); return String.join("\n", makeHtmlTag(), "<head>", " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">", " <style>", " body {", " background-color:#fafafa;", " margin:auto;", " width:80%;", " margin-top: 96px", " }", " img {", " height:48px;", " width:48px;", " }", " div.warn {", " font-size:" + sp(16) + ";", " line-height:1.28;", " margin-top:16px;", " opacity:0.87;", " }", " div.example, div.vpnwarning {", " font-size:" + sp(14) + ";", " line-height:1.21905;", " margin-top:16px;", " opacity:0.54;", " }", " a {", " color:#4285F4;", " display:inline-block;", " font-size:" + sp(14) + ";", " font-weight:bold;", " height:48px;", " margin-top:24px;", " text-decoration:none;", " text-transform:uppercase;", " }", " a.certificate {", " margin-top:0px;", " }", " </style>", "</head>", "<body>", " <p><img src=quantum_ic_warning_amber_96.png><br>", " <div class=warn>" + warningMsg + "</div>", " <div class=example>" + exampleMsg + "</div>", getVpnMsgOrLinkToBrowser(), " <a class=certificate href=" + mCertificateOutToken + ">" + certificateMsg + "</a>", "</body>", "</html>"); }
Source:
<code>public void testUnreadableDictionary() throws IOException { final Path liftOutput = Files.createTempFile("tmpouput", ".vcf"); liftOutput.toFile().deleteOnExit(); final Path rejectOutput = Files.createTempFile("tmpreject", ".vcf"); rejectOutput.toFile().deleteOnExit(); final Path input = TEST_DATA_PATH.toPath().resolve("testLiftoverBiallelicIndels.vcf"); final String[] args = new String[]{ "INPUT=" + input.toString(), "OUTPUT=" + liftOutput.toString(), "REJECT=" + rejectOutput.toString(), "CHAIN=" + CHAIN_FILE, "REFERENCE_SEQUENCE=" + REFERENCE_FILE, }; final Path dictionary = REFERENCE_FILE.toPath().resolveSibling(REFERENCE_FILE.getName().replace("fasta", "dict")); dictionary.toFile().setReadable(false); try { runPicardCommandLine(args); <START> } finally { END> dictionary.toFile().setReadable(true); } }</code><technical_language>space</technical_language>

Target:
public void testUnreadableDictionary() throws IOException { final Path liftOutput = Files.createTempFile("tmpouput", ".vcf"); liftOutput.toFile().deleteOnExit(); final Path rejectOutput = Files.createTempFile("tmpreject", ".vcf"); rejectOutput.toFile().deleteOnExit(); final Path input = TEST_DATA_PATH.toPath().resolve("testLiftoverBiallelicIndels.vcf"); final Path tmpCopyDir = Files.createTempDirectory("copy"); tmpCopyDir.toFile().deleteOnExit(); final Path referenceCopy = tmpCopyDir.resolve("refCopy.fasta"); referenceCopy.toFile().deleteOnExit(); Files.copy(REFERENCE_FILE.toPath(), referenceCopy); final Path dictCopy = referenceCopy.resolveSibling(referenceCopy.toFile().getName().replaceAll("fasta$", "dict")); dictCopy.toFile().deleteOnExit(); final Path dictionary = REFERENCE_FILE.toPath().resolveSibling(REFERENCE_FILE.getName().replaceAll("fasta$", "dict")); Files.copy(dictionary, dictCopy); dictCopy.toFile().setReadable(false); final String[] args = new String[]{ "INPUT=" + input, "OUTPUT=" + liftOutput, "REJECT=" + rejectOutput, "CHAIN=" + CHAIN_FILE, "REFERENCE_SEQUENCE=" + referenceCopy, }; runPicardCommandLine(args); }
Source:
<code>private String toE164(String input) { if (input.startsWith("+")) return input; if (prefixEntry != null) { if (prefixEntry.international_prefix_pattern.length() > 0) { <START> Matcher m = Pattern.compile(prefixEntry.international_prefix_pattern).matcher(input); <END> if (m.lookingAt()) return "+" + m.replaceFirst(""); } if (prefixEntry.national_prefix.length() > 0 && input.startsWith(prefixEntry.national_prefix)) { return "+" + prefixEntry.ptsn_country_code + input.substring(prefixEntry.national_prefix.length()); } } return input; }</code><technical_language>store Pattern.compile() result somewhere, for instance in constructor, instead of recompiling time a constant (final least) LGTM</technical_language>

Target:
private String toE164(String input) { if (input.startsWith("+")) return input; if (prefixEntry != null) { if (internationalPrefixPattern != null) { Matcher m = internationalPrefixPattern.matcher(input); if (m.lookingAt()) return "+" + m.replaceFirst(""); } if (prefixEntry.national_prefix.length() > 0 && input.startsWith(prefixEntry.national_prefix)) { return "+" + prefixEntry.ptsn_country_code + input.substring(prefixEntry.national_prefix.length()); } } return input; }
Source:
<code>public synchronized DataCenter getDataCenterById(String id) { DataCenter dataCenter = null; if (dataCenterMap.containsKey(id)) { return dataCenterMap.get(id); } try{ dataCenter = (DataCenter) loadObject(DataCenter.class, id); if (dataCenter == null){ dataCenter = new DataCenter(); dataCenter.setId(id); updateDataCenter(dataCenter); } else { log.info("Data center restored from file, id: {}", id); } } catch (RuntimeException e){ log.error("failed to load dataCenter object"); return dataCenter; } dataCenterMap.put(id, <START> dataCenter); <END> return dataCenter; }</code><technical_language>Do allow store nulls this map</technical_language>

Target:
public synchronized DataCenter getDataCenterById(String id) { DataCenter dataCenter = null; if (dataCenterMap.containsKey(id)) { return dataCenterMap.get(id); } try { dataCenter = loadObject(DataCenter.class, id) != null ? (DataCenter) loadObject(DataCenter.class, id) : reInitializeDataCenter(id); } catch (NullPointerException e) { log.error("failed to fetch datacenter by id, rewrite caches for DC {}", id); } finally { log.info("about to store DC: id object {}", id, dataCenter); dataCenterMap.put(id, dataCenter); } return dataCenter; }
Source:
<code>public void testFormattedAmountFranceAndJPY() throws Exception { final FixedPriceInvoiceItem fixedItem = new FixedPriceInvoiceItem(UUID.randomUUID(), UUID.randomUUID(), null, null, UUID.randomUUID().toString(), UUID.randomUUID().toString(), new LocalDate(), new BigDecimal("1500.00"), Currency.JPY); <START> final Invoice invoiceEUR = new DefaultInvoice(UUID.randomUUID(), new LocalDate(), new LocalDate(), Currency.JPY); <END> invoiceEUR.addInvoiceItem(fixedItem); checkOutput(invoiceEUR, "<tr>\n" + " <td class=\"amount\"><strong>{{invoice.formattedChargedAmount}}</strong></td>\n" + "</tr>\n" + "<tr>\n" + " <td class=\"amount\"><strong>{{invoice.formattedPaidAmount}}</strong></td>\n" + "</tr>\n" + "<tr>\n" + " <td class=\"amount\"><strong>{{invoice.formattedBalance}}</strong></td>\n" + "</tr>", "<tr>\n" + " <td class=\"amount\"><strong>1 500,00 ￥</strong></td>\n" + "</tr>\n" + "<tr>\n" + " <td class=\"amount\"><strong>0,00 ￥</strong></td>\n" + "</tr>\n" + "<tr>\n" + " <td class=\"amount\"><strong>1 500,00 ￥</strong></td>\n" + "</tr>", Locale.FRANCE); }</code><technical_language>Rename invoiceJPY, a bit confusing :smile_cat:</technical_language>

Target:
public void testFormattedAmountFranceAndJPY() throws Exception { final FixedPriceInvoiceItem fixedItem = new FixedPriceInvoiceItem(UUID.randomUUID(), UUID.randomUUID(), null, null, UUID.randomUUID().toString(), UUID.randomUUID().toString(), new LocalDate(), new BigDecimal("1500.00"), Currency.JPY); final Invoice invoice = new DefaultInvoice(UUID.randomUUID(), new LocalDate(), new LocalDate(), Currency.JPY); invoice.addInvoiceItem(fixedItem); checkOutput(invoice, "<tr>\n" + " <td class=\"amount\"><strong>{{invoice.formattedChargedAmount}}</strong></td>\n" + "</tr>\n" + "<tr>\n" + " <td class=\"amount\"><strong>{{invoice.formattedPaidAmount}}</strong></td>\n" + "</tr>\n" + "<tr>\n" + " <td class=\"amount\"><strong>{{invoice.formattedBalance}}</strong></td>\n" + "</tr>", "<tr>\n" + " <td class=\"amount\"><strong>1 500 ￥</strong></td>\n" + "</tr>\n" + "<tr>\n" + " <td class=\"amount\"><strong>0 ￥</strong></td>\n" + "</tr>\n" + "<tr>\n" + " <td class=\"amount\"><strong>1 500 ￥</strong></td>\n" + "</tr>", Locale.FRANCE); }
Source:
<code>public void activate_subscription() { final BoundedContext boundedContext = setupBoundedContextForAggregateRepo(); final SubscriptionService subscriptionService = SubscriptionService.newBuilder() .addBoundedContext(boundedContext) .build(); final String type = boundedContext.getStand() .getAvailableTypes() .iterator() .next() .getTypeName(); <START> final Target target = Target.newBuilder() <END> .setType(type) .setIncludeAll(true) .build(); final Topic topic = Topic.newBuilder() .setTarget(target) .build(); final MemoizeStreamObserver<Subscription> subscriptionObserver = new MemoizeStreamObserver<>(); subscriptionService.subscribe(topic, subscriptionObserver); subscriptionObserver.checkFields(); final MemoizeStreamObserver<SubscriptionUpdate> activationObserver = new MemoizeStreamObserver<>(); subscriptionService.activate(subscriptionObserver.streamFlowValue, activationObserver); final ProjectId projectId = ProjectId.newBuilder().setId("some-id").build(); final Message projectState = Project.newBuilder().setId(projectId).build(); boundedContext.getStand().update(projectId, AnyPacker.pack(projectState)); activationObserver.checkFields(false); }</code><technical_language>Migrate Queries.Targets.allOf(...)</technical_language>

Target:
public void activate_subscription() { final BoundedContext boundedContext = setupBoundedContextForAggregateRepo(); final SubscriptionService subscriptionService = SubscriptionService.newBuilder() .addBoundedContext(boundedContext) .build(); final Target target = getProjectQueryTarget(); final Topic topic = Topic.newBuilder() .setTarget(target) .build(); final MemoizeStreamObserver<Subscription> subscriptionObserver = new MemoizeStreamObserver<>(); subscriptionService.subscribe(topic, subscriptionObserver); subscriptionObserver.verifyState(); final MemoizeStreamObserver<SubscriptionUpdate> activationObserver = new MemoizeStreamObserver<>(); subscriptionService.activate(subscriptionObserver.streamFlowValue, activationObserver); final ProjectId projectId = ProjectId.newBuilder().setId("some-id").build(); final Message projectState = Project.newBuilder().setId(projectId).build(); boundedContext.getStand().update(projectId, AnyPacker.pack(projectState)); activationObserver.verifyState(false); }
Source:
<code>public ReferencePointManager() { <START> referencePointToProjectMapper = new HashMap<IReferencePoint, IFolder>(); <END> }</code><technical_language>move initialization declaration remove constructor</technical_language>

Target:
public ReferencePointManager() { referencePointToProjectMapper = new ConcurrentHashMap<IReferencePoint, IFolder>(); }
Source:
<code>protected boolean validateImages() { return ImagesHandler.PerformImagesChecks(getReturnValue().getCanDoActionMessages(), getVm().getStoragePoolId(), Guid.Empty, <START> hasImages(), hasImages(), hasImages(), hasImages(), true, true, getDiskDao().getAllForVm(getVmId())); <END> }</code><technical_language>of replaced simply true i guess</technical_language>

Target:
protected boolean validateImages() { return ImagesHandler.PerformImagesChecks(getReturnValue().getCanDoActionMessages(), getVm().getStoragePoolId(), Guid.Empty, true, true, true, true, true, true, imagesToCheck); }
Source:
<code>private void runPatchMetadataTests(EPerson asUser, int expectedStatus) throws Exception { context.turnOffAuthorisationSystem(); <START> Site site = SiteBuilder.createSite(context).build(); <END> String token = getAuthToken(asUser.getEmail(), password); new MetadataPatchSuite().runWith(getClient(token), "/api/core/sites/" + site.getID(), expectedStatus); }</code><technical_language>Again, needs a context.restoreAuthSystemState();</technical_language>

Target:
private void runPatchMetadataTests(EPerson asUser, int expectedStatus) throws Exception { context.turnOffAuthorisationSystem(); Site site = SiteBuilder.createSite(context).build(); context.restoreAuthSystemState(); String token = getAuthToken(asUser.getEmail(), password); new MetadataPatchSuite().runWith(getClient(token), "/api/core/sites/" + site.getID(), expectedStatus); }
Source:
<code>public void testSuccessfulSaslAuthenticationWithCredentialStore() throws Exception { for (Provider provider : providers) { Security.insertProviderAt(provider, 1); } cleanCredentialStore(); CredentialStoreBuilder.get().setKeyStoreFile(BASE_STORE_DIRECTORY + "/mycredstore.cs") .setKeyStoreType("JCEKS") .setKeyStorePassword("StorePassword") .addPassword(USERNAME, PASSWORD) .build(); for (Provider provider : providers) { Security.removeProvider(provider.getName()); } SaslServer server = new SaslServerBuilder(PlainSaslServerFactory.class, PLAIN) <START> .setProviderSupplier(ELYTRON_PROVIDER_SUPPLIER) <END> .setUserName(USERNAME) .setPassword(PASSWORD.toCharArray()) .build(); AuthenticationContext context = AuthenticationContext.getContextManager().get(); AuthenticationContextConfigurationClient contextConfigurationClient = AccessController.doPrivileged(AuthenticationContextConfigurationClient.ACTION); SaslClient client = contextConfigurationClient.createSaslClient(new URI(CREDENTIAL_CONFIG_FILE), context.authRules.getConfiguration(), Arrays.asList(new String[]{PLAIN})); assertTrue(client.hasInitialResponse()); byte[] message = client.evaluateChallenge(new byte[0]); assertEquals("\0"+USERNAME+"\0"+PASSWORD,new String(message, StandardCharsets.UTF_8)); server.evaluateResponse(message); assertTrue(server.isComplete()); assertTrue(client.isComplete()); assertEquals(USERNAME, server.getAuthorizationID()); }</code><technical_language>I able required providers (i.e., () -> providers) unused ELYTRON_PROVIDER_SUPPLIER removed</technical_language>

Target:
public void testSuccessfulSaslAuthenticationWithCredentialStore() throws Exception { SaslServer server = new SaslServerBuilder(PlainSaslServerFactory.class, PLAIN) .setProviderSupplier(() -> providers) .setUserName(USERNAME) .setPassword(PASSWORD.toCharArray()) .build(); AuthenticationContext context = AuthenticationContext.getContextManager().get(); AuthenticationContextConfigurationClient contextConfigurationClient = AccessController.doPrivileged(AuthenticationContextConfigurationClient.ACTION); SaslClient client = contextConfigurationClient.createSaslClient(new URI(CREDENTIAL_CONFIG_FILE), context.authRules.getConfiguration(), Arrays.asList(new String[]{PLAIN})); assertTrue(client.hasInitialResponse()); byte[] message = client.evaluateChallenge(new byte[0]); assertEquals("\0"+USERNAME+"\0"+PASSWORD,new String(message, StandardCharsets.UTF_8)); server.evaluateResponse(message); assertTrue(server.isComplete()); assertTrue(client.isComplete()); assertEquals(USERNAME, server.getAuthorizationID()); }
Source:
<code>public Injector init() throws Exception { Map<String, SecureStoreData> secureStores = getAllSecureStores(); Set<String> secureStoreNames = Sets.newTreeSet(secureStores.keySet()); if (secureStoreNames.isEmpty()) { return <START> createInjectorWithCustomSecureStore(DefaultSecureStore.class); <END> } secureStoreNames.add(DefaultSecureStore.NAME); String currentProvider = getCurrentSecureStoreName(); String secureStoreName = ui.readString(currentProvider, secureStoreNames, "Secure store"); if (DefaultSecureStore.NAME.equals(secureStoreName)) { if (!DefaultSecureStore.NAME.equals(currentProvider)) { flags.cfg.unset("gerrit", null, "secureStore"); } return createInjectorWithCustomSecureStore(DefaultSecureStore.class); } SecureStoreData selectedPlugin = secureStores.get(secureStoreName); File installedPlugin = installPlugin(selectedPlugin, ui, site); flags.cfg.setString("gerrit", null, "secureStore", secureStoreName); Class<? extends SecureStore> storeClass = selectedPlugin.load(installedPlugin); return createInjectorWithCustomSecureStore(storeClass); }</code><technical_language>sence. name createInjectorWithSecureStore()</technical_language>

Target:
public Injector init() throws Exception { Map<String, SecureStoreData> secureStores = getAllSecureStores(); Set<String> secureStoreNames = Sets.newTreeSet(secureStores.keySet()); if (secureStoreNames.isEmpty()) { return createInjectorWithDefaultSecureStore(); } secureStoreNames.add(DefaultSecureStore.NAME); String currentProvider = getCurrentSecureStoreName(); String secureStoreName = ui.readString(currentProvider, secureStoreNames, "Secure store"); if (DefaultSecureStore.NAME.equals(secureStoreName)) { if (!DefaultSecureStore.NAME.equals(currentProvider)) { flags.cfg.unset("gerrit", null, SECURE_STORE_CONFIG_NAME); } return createInjectorWithDefaultSecureStore(); } SecureStoreData selectedPlugin = secureStores.get(secureStoreName); File installedPlugin = installPlugin(selectedPlugin, ui, site); flags.cfg.setString("gerrit", null, SECURE_STORE_CONFIG_NAME, secureStoreName); Class<? extends SecureStore> storeClass = selectedPlugin.load(installedPlugin); return createInjectorWithCustomSecureStore(storeClass); }
Source:
<code>private boolean executeSshPowerDown(String version) { boolean ret = false; try ( final EngineSSHClient sshClient = new EngineSSHClient(); final ByteArrayOutputStream cmdOut = new ByteArrayOutputStream(); final ByteArrayOutputStream cmdErr = new ByteArrayOutputStream() ) { try { log.info("Opening SSH power down session on host {}", getVds().getHostName()); sshClient.setVds(getVds()); sshClient.useDefaultKeyPair(); sshClient.connect(); sshClient.authenticate(); log.info("Executing SSH power down command on host {}", getVds().getHostName()); sshClient.executeCommand( Config.<String> getValue(ConfigValues.SshVdsPowerdownCommand, version), null, cmdOut, cmdErr ); ret = true; } catch (Exception ex) { log.error("SSH power down command failed on host '{}': {}\nStdout: {}\nStderr: {}", getVds().getHostName(), ex.getMessage(), cmdOut, cmdErr); log.debug("Exception", ex); } } catch(IOException e) { <START> log.error("IOException"); <END> log.debug("Exception", e); } return ret; }</code><technical_language>Please change to: log.error("Error opening SSH connection '{}': {}", getVds().getHostName(), e.getMessage()); log.debug("Exception", ex);</technical_language>

Target:
private boolean executeSshPowerDown(String version) { boolean ret = false; try ( final EngineSSHClient sshClient = new EngineSSHClient(); final ByteArrayOutputStream cmdOut = new ByteArrayOutputStream(); final ByteArrayOutputStream cmdErr = new ByteArrayOutputStream() ) { try { log.info("Opening SSH power down session on host {}", getVds().getHostName()); sshClient.setVds(getVds()); sshClient.useDefaultKeyPair(); sshClient.connect(); sshClient.authenticate(); log.info("Executing SSH power down command on host {}", getVds().getHostName()); sshClient.executeCommand( Config.<String> getValue(ConfigValues.SshVdsPowerdownCommand, version), null, cmdOut, cmdErr ); ret = true; } catch (Exception ex) { log.error("SSH power down command failed on host '{}': {}\nStdout: {}\nStderr: {}", getVds().getHostName(), ex.getMessage(), cmdOut, cmdErr); log.debug("Exception", ex); } } catch(IOException e) { log.error("Error opening SSH connection to '{}': {}", getVds().getHostName(), e.getMessage()); log.debug("Exception", e); } return ret; }
Source:
<code><START> public int getSpinnerId() { <END> return R.id.brick_ask_spinner; }</code><technical_language>Please revert if</technical_language>

Target:
protected int getSpinnerId() { return R.id.brick_ask_spinner; }
Source:
<code>@Override public boolean matches(RelOptRuleCall call) { LogicalJoin logicalJoin = call.rel(0); <START> return !F.isEmpty(logicalJoin.analyzeCondition().pairs()); <END> }</code><technical_language>cortesian unequality i.e. _select * dealer d1 join dealer d2 d1.id=d2.id d1.product>=d2.product_ joins need covered</technical_language>

Target:
@Override public boolean matches(RelOptRuleCall call) { LogicalJoin logicalJoin = call.rel(0); return !F.isEmpty(logicalJoin.analyzeCondition().pairs()) && logicalJoin.analyzeCondition().isEqui(); }