auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void check( Value value, StringBuilder pathBuilder ) throws TypeCheckingException <START> { <END> if ( checkNativeType( value, nativeType ) == false ) { throw new TypeCheckingException( "Invalid native type for node " + pathBuilder.toString() + ": expected " + nativeType + ", found " + (( value.valueObject() == null ) ? "void" : value.valueObject().getClass().getName()) ); } if ( subTypes != null ) { for( Entry< String, Type > entry : subTypes.entrySet() ) { checkSubType( entry.getKey(), entry.getValue(), value, new StringBuilder( pathBuilder ) ); } for( String childName : value.children().keySet() ) { if ( subTypes.containsKey( childName ) == false ) { throw new TypeCheckingException( "Unexpected child node: " + pathBuilder.toString() + "." + childName ); } } } }</code><technical_language>reverted</technical_language>

Target:
protected void check( Value value, StringBuilder pathBuilder ) throws TypeCheckingException { if ( checkNativeType( value, nativeType ) == false ) { throw new TypeCheckingException( "Invalid native type for node " + pathBuilder.toString() + ": expected " + nativeType + ", found " + (( value.valueObject() == null ) ? "void" : value.valueObject().getClass().getName()) ); } if ( subTypes != null ) { final int l = pathBuilder.length(); for( Entry< String, Type > entry : subTypes.entrySet() ) { checkSubType( entry.getKey(), entry.getValue(), value, pathBuilder ); pathBuilder.setLength( l ); } for( String childName : value.children().keySet() ) { if ( subTypes.containsKey( childName ) == false ) { throw new TypeCheckingException( "Unexpected child node: " + pathBuilder.toString() + "." + childName ); } } } }
Source:
<code>public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource, Group group) throws InternalErrorException { if(!CacheManager.isCacheDisabled() && !perun.getCacheManager().wasCacheUpdatedInTransaction()) { List<Integer> attrIds = new ArrayList<>(); for (Service service : services) { <START> attrIds.addAll(getRequiredAttributeIds(service)); <END> } List<Attribute> attrs = perun.getCacheManager().getAttributesByIds(attrIds, new Holder(group.getId(), Holder.HolderType.GROUP), new Holder(resource.getId(), Holder.HolderType.RESOURCE)); return this.setValuesOfAttributes(sess, attrs, group, resource); } try { return jdbc.query("select " + getAttributeMappingSelectQuery("grp_res") + " from attr_names " + "join service_required_attrs on id=service_required_attrs.attr_id and service_required_attrs.service_id " + Compatibility.getStructureForInClause() + "left join group_resource_attr_values grp_res on id=grp_res.attr_id and group_id=? and resource_id=? " + "where namespace in (?,?,?)", new GroupResourceAttributeRowMapper(sess, this, group, resource), services.stream().map(Service::getId).collect(Collectors.toList()), group.getId(), resource.getId(), AttributesManager.NS_GROUP_RESOURCE_ATTR_DEF, AttributesManager.NS_GROUP_RESOURCE_ATTR_OPT, AttributesManager.NS_GROUP_RESOURCE_ATTR_VIRT); } catch (EmptyResultDataAccessException ex) { return new ArrayList<>(); } catch (RuntimeException ex) { throw new InternalErrorException(ex); } }</code><technical_language>sure, attribute IDs unique, overlap for multiple services</technical_language>

Target:
public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource, Group group) { if(!CacheManager.isCacheDisabled() && !perun.getCacheManager().wasCacheUpdatedInTransaction()) { Set<Integer> attrIds = new HashSet<>(); for (Service service : services) { attrIds.addAll(getRequiredAttributeIds(service)); } List<Attribute> attrs = perun.getCacheManager().getAttributesByIds(new ArrayList<>(attrIds), new Holder(group.getId(), Holder.HolderType.GROUP), new Holder(resource.getId(), Holder.HolderType.RESOURCE)); return this.setValuesOfAttributes(sess, attrs, group, resource); } try { return jdbc.query("select " + getAttributeMappingSelectQuery("grp_res") + " from attr_names " + "join service_required_attrs on id=service_required_attrs.attr_id and service_required_attrs.service_id " + Compatibility.getStructureForInClause() + "left join group_resource_attr_values grp_res on id=grp_res.attr_id and group_id=? and resource_id=? " + "where namespace in (?,?,?)", new GroupResourceAttributeRowMapper(sess, this, group, resource), services.stream().map(Service::getId).collect(Collectors.toList()), group.getId(), resource.getId(), AttributesManager.NS_GROUP_RESOURCE_ATTR_DEF, AttributesManager.NS_GROUP_RESOURCE_ATTR_OPT, AttributesManager.NS_GROUP_RESOURCE_ATTR_VIRT); } catch (EmptyResultDataAccessException ex) { return new ArrayList<>(); } catch (RuntimeException ex) { throw new InternalErrorException(ex); } }
Source:
<code>public SessionDataStore getSessionDataStore(SessionHandler handler) { <START> AttributeSharingSessionDataStore dataStore = new AttributeSharingSessionDataStore(); <END> return dataStore; }</code><technical_language>return a new dataStore</technical_language>

Target:
public SessionDataStore getSessionDataStore(SessionHandler handler) { return new AttributeSharingSessionDataStore(); }
Source:
<code>public Widget getWidget(Sitemap sitemap, String id) { if (id.length() > 0) { Widget w = getWidget(id); if (w == null) { w = getDefaultWidget(null, id); } if (w != null) { w.setItem(id); } else { try { w = sitemap.getChildren().get(Integer.valueOf(id.substring(0, 2))); for (int i = 2; i < id.length(); i += 2) { w = ((LinkableWidget) w).getChildren().get(Integer.valueOf(id.substring(i, i + 2))); } <START> } catch (NumberFormatException | IndexOutOfBoundsException e) { <END> } } return resolveDefault(w); } logger.warn("Cannot find page for id '{}'.", id); return null; }</code><technical_language>check lines if is bounds. cheaper control flow IOOBE</technical_language>

Target:
public Widget getWidget(Sitemap sitemap, String id) { if (id.length() > 0) { Widget w = getWidget(id); if (w == null) { w = getDefaultWidget(null, id); } if (w != null) { w.setItem(id); } else { try { int widgetID = Integer.valueOf(id.substring(0, 2)); if (widgetID < sitemap.getChildren().size()) { w = sitemap.getChildren().get(widgetID); for (int i = 2; i < id.length(); i += 2) { int childWidgetID = Integer.valueOf(id.substring(i, i + 2)); if (childWidgetID < ((LinkableWidget) w).getChildren().size()) { w = ((LinkableWidget) w).getChildren().get(childWidgetID); } } } } catch (NumberFormatException e) { } } return resolveDefault(w); } logger.warn("Cannot find page for id '{}'.", id); return null; }
Source:
<code>private boolean promptRun(CDK3Server cdk3) { String home = cdk3.getMinishiftHome(); final int[] retmain = new int[1]; if (new File(home).exists()) { Display.getDefault().syncExec(() -> { if( shell == null ) shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); <START> MessageBox messageBox = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL); <END> String msgText = "Setup CDK will delete all existing contents of {0}. Are you sure you want to continue?"; String msg = NLS.bind(msgText, home); messageBox.setMessage(msg); messageBox.setText("Warning: Folder already exists!"); retmain[0] = messageBox.open(); }); if (retmain[0] != SWT.OK) { return false; } } return true; }</code><technical_language>This part of code get replaced changes in manually merged commit, file changed, I if rebase replacing is more convenient</technical_language>

Target:
private boolean promptRun(CDK3Server cdk3) { String home = cdk3.getMinishiftHome(); final int[] retmain = new int[1]; if (new File(home).exists()) { Display.getDefault().syncExec(() -> { if( shell == null ) shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); String title = "Warning: Folder already exists!"; String msgText = "Setup CDK will delete all existing contents of {0}. Are you sure you want to continue?"; String msg = NLS.bind(msgText, home); MessageDialog messageDialog = new MessageDialog(shell, title, null, msg, MessageDialog.WARNING, new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0); retmain[0] = messageDialog.open(); }); if (retmain[0] != IDialogConstants.OK_ID) { return false; } } return true; }
Source:
<code>public void testCountrySearch() throws Exception { <START> System.out.println("testCountrySearch"); <END> ELFGeoLocatorCountries countries = new ELFGeoLocatorCountries(); String response = IOHelper.readString(getClass().getResourceAsStream("ASDIService.xml")); countries.parseCountryMap(response); String adminNames = countries.getAdminNamesForFilter("no"); assertTrue(adminNames.equals("Norway polar - GN<OR>Norway - GN")); String countryName = countries.getAdminCountry(new Locale("en"), "Norway polar - GN", true); assertTrue(countryName.equals("Norway")); }</code><technical_language>Remove sout</technical_language>

Target:
public void testCountrySearch() throws Exception { ELFGeoLocatorCountries countries = new ELFGeoLocatorCountries(); String response = IOHelper.readString(getClass().getResourceAsStream("ASDIService.xml")); countries.parseCountryMap(response); String adminNames = countries.getAdminNamesFilter("no"); String countryName = countries.getAdminCountry(new Locale("en"), "Norway polar - GN", true); assertTrue(countryName.equals("Norway")); }
Source:
<code>public void testBulkEditBeforeUpdate() { List<DocumentModel> docs = createTestDocuments(); DocumentModel sourceDoc = buildSimpleDocumentModel(); bulkEditService.updateDocuments(session, sourceDoc, docs); <START> TagService tagService = Framework.getService(TagService.class); <END> String username = session.getPrincipal().getName(); for (DocumentModel doc : docs) { tagService.tag(session, doc.getId(), "tag", username); } TransactionHelper.commitOrRollbackTransaction(); TransactionHelper.startTransaction(); DocumentModel doc = session.getDocument(docs.get(0).getRef()); assertEquals("new title", doc.getPropertyValue("dc:title")); assertEquals("new creator", doc.getProperty("dc:creator").getValue()); assertFalse("new description".equals(doc.getPropertyValue("dc:description"))); assertFalse("new source".equals(doc.getPropertyValue("dc:source"))); List<Tag> tags = tagService.getDocumentTags(session, doc.getId(), username); assertEquals(1, tags.size()); assertEquals("tag", tags.get(0).getLabel()); assertEquals("0.1+", doc.getVersionLabel()); DocumentModel version = session.getLastDocumentVersion(doc.getRef()); assertEquals("doc1", version.getPropertyValue("dc:title")); assertEquals("0.1", version.getVersionLabel()); tags = tagService.getDocumentTags(session, version.getId(), username); assertEquals(0, tags.size()); }</code><technical_language>simply inject service</technical_language>

Target:
public void testBulkEditBeforeUpdate() { List<DocumentModel> docs = createTestDocuments(); DocumentModel sourceDoc = buildSimpleDocumentModel(); bulkEditService.updateDocuments(session, sourceDoc, docs); String username = session.getPrincipal().getName(); for (DocumentModel doc : docs) { tagService.tag(session, doc.getId(), "tag", username); } TransactionHelper.commitOrRollbackTransaction(); TransactionHelper.startTransaction(); DocumentModel doc = session.getDocument(docs.get(0).getRef()); assertEquals("new title", doc.getPropertyValue("dc:title")); assertEquals("new creator", doc.getProperty("dc:creator").getValue()); assertFalse("new description".equals(doc.getPropertyValue("dc:description"))); assertFalse("new source".equals(doc.getPropertyValue("dc:source"))); List<Tag> tags = tagService.getDocumentTags(session, doc.getId(), username); assertEquals(1, tags.size()); assertEquals("tag", tags.get(0).getLabel()); assertEquals("0.1+", doc.getVersionLabel()); DocumentModel version = session.getLastDocumentVersion(doc.getRef()); assertEquals("doc1", version.getPropertyValue("dc:title")); assertEquals("0.1", version.getVersionLabel()); tags = tagService.getDocumentTags(session, version.getId(), username); assertEquals(0, tags.size()); }
Source:
<code>public Object doInHibernate(Session session) throws HibernateException, XWikiException { XWikiContext context = R54693PhenoTips1500DataMigration.this.getXWikiContext(); DocumentReference classReference = new DocumentReference(context.getDatabase(), "PhenoTips", "PatientClass"); Query q = session.createQuery("select distinct o.name from BaseObject o, StringProperty p where o.className = '" + R54693PhenoTips1500DataMigration.this.serializer.serialize(classReference) <START> + "and p.id.id = o.id and p.id.name =" + this.propertyName + "'"); <END> @SuppressWarnings("unchecked") List<StringProperty> properties = q.list(); R54693PhenoTips1500DataMigration.this.logger.debug("Found global mode of inheritance properties", properties.size()); for (StringProperty oldProperty : properties) { try { DBStringListProperty newProperty = new DBStringListProperty(); newProperty.setName(oldProperty.getName()); newProperty.setId(oldProperty.getId()); List<String> newValue = new ArrayList<String>(); if (oldProperty.getValue() != null) { newValue.add(oldProperty.getValue()); newProperty.setValue(newValue); } session.delete(oldProperty); session.save(newProperty); } catch (Exception e) { R54693PhenoTips1500DataMigration.this.logger .warn("Failed to update a global mode of inheritance property. Exception message: {}", e.getMessage()); } } return null; }</code><technical_language>Broken query, this: + "' p.id.id = o.id p.id.name = '" + this.propertyName + "'");</technical_language>

Target:
public Object doInHibernate(Session session) throws HibernateException, XWikiException { XWikiContext context = R54693PhenoTips1500DataMigration.this.getXWikiContext(); DocumentReference classReference = new DocumentReference(context.getDatabase(), "PhenoTips", "PatientClass"); Query q = session.createQuery("select distinct o.name from BaseObject o, StringProperty p where o.className = '" + R54693PhenoTips1500DataMigration.this.serializer.serialize(classReference) + "'and p.id.id = o.id and p.id.name = '" + this.propertyName + "'"); @SuppressWarnings("unchecked") List<StringProperty> properties = q.list(); R54693PhenoTips1500DataMigration.this.logger.debug("Found global mode of inheritance properties", properties.size()); for (StringProperty oldProperty : properties) { try { DBStringListProperty newProperty = new DBStringListProperty(); newProperty.setName(oldProperty.getName()); newProperty.setId(oldProperty.getId()); List<String> newValue = new ArrayList<String>(); if (oldProperty.getValue() != null) { newValue.add(oldProperty.getValue()); newProperty.setValue(newValue); } session.delete(oldProperty); session.save(newProperty); } catch (Exception e) { R54693PhenoTips1500DataMigration.this.logger .warn("Failed to update a global mode of inheritance property. Exception message: {}", e.getMessage()); } } return null; }
Source:
<code>public double getRate() { double rate = super.getRate(); <START> if (Math.abs(rate / lastYawRate) > NavX.MAX_RATE_INCREASE_FACTOR_PER_TICK) { <END> return lastYawRate; } lastYawRate = rate; return rate; }</code><technical_language>I this issues zero non-zero values</technical_language>

Target:
public double getRate() { double rate = super.getRate(); if (Math.abs(rate - lastYawRate) > NavX.MAX_DEGREES_PER_SECOND_PER_TICK) { return lastYawRate; } lastYawRate = rate; return rate; }
Source:
<code>public V putIfAbsent(final K key, final V value) throws CacheWriterException { putObserver.begin(); <START> getObserver.begin(); <END> statusTransitioner.checkAvailable(); checkNonNull(key, value); final AtomicBoolean installed = new AtomicBoolean(false); final Function<K, V> mappingFunction = memoize(new Function<K, V>() { @Override public V apply(final K k) { if (cacheWriter != null) { try { cacheWriter.write(k, null, value); } catch (Exception e) { throw newCacheWriterException(e); } } installed.set(true); return value; } }); try { ValueHolder<V> inCache = store.computeIfAbsent(key, mappingFunction); if (installed.get()) { return null; } else { return inCache.value(); } } catch (CacheAccessException e) { V computedValue = null; putObserver.end(PutOutcome.FAILURE); try { computedValue = mappingFunction.apply(key); if (cacheWriter != null) { store.remove(key); } else { final Store.ValueHolder<V> holder = store.get(key); if (holder == null) { resilienceStrategy.possiblyInconsistent(key, e); } else { return holder.value(); } } } catch (CacheAccessException e1) { resilienceStrategy.possiblyInconsistent(key, e, e1); } return installed.get() ? null : computedValue; } finally { if (installed.get()) { putObserver.end(PutOutcome.ADDED); getObserver.end(GetOutcome.MISS_NO_LOADER); } else { getObserver.end(GetOutcome.HIT_NO_LOADER); } } }</code><technical_language>This is weird... mess get latency numbers too. do though. a PutIfAbsentOutcome type, JSR-107 get counts sum counts of independent operation outcomes table</technical_language>

Target:
public V putIfAbsent(final K key, final V value) throws CacheWriterException { putIfAbsentObserver.begin(); statusTransitioner.checkAvailable(); checkNonNull(key, value); final AtomicBoolean installed = new AtomicBoolean(false); final Function<K, V> mappingFunction = memoize(new Function<K, V>() { @Override public V apply(final K k) { if (cacheWriter != null) { try { cacheWriter.write(k, null, value); } catch (Exception e) { throw newCacheWriterException(e); } } installed.set(true); return value; } }); try { ValueHolder<V> inCache = store.computeIfAbsent(key, mappingFunction); if (installed.get()) { return null; } else { return inCache.value(); } } catch (CacheAccessException e) { V computedValue = null; putIfAbsentObserver.end(PutIfAbsentOutcome.FAILURE); try { computedValue = mappingFunction.apply(key); if (cacheWriter != null) { store.remove(key); } else { final Store.ValueHolder<V> holder = store.get(key); if (holder == null) { resilienceStrategy.possiblyInconsistent(key, e); } else { return holder.value(); } } } catch (CacheAccessException e1) { resilienceStrategy.possiblyInconsistent(key, e, e1); } return installed.get() ? null : computedValue; } finally { if (installed.get()) { putIfAbsentObserver.end(PutIfAbsentOutcome.PUT); } else { putIfAbsentObserver.end(PutIfAbsentOutcome.HIT); } } }
Source:
<code>public void testAddNewerBlock() { CachedBlockQueue queue = new CachedBlockQueue(10000L, 1000L); CachedBlock cb1 = new CachedBlock(5000L, "cb1", 1L); cb1.recordSize(new AtomicLong(5000L)); CachedBlock cb2 = new CachedBlock(5000, "cb2", 2L); cb2.recordSize(new AtomicLong(5000L)); CachedBlock cb3 = new CachedBlock(5000, "cb3", 3L); <START> cb3.recordSize(new AtomicLong(5000L)); <END> assertTrue(queue.add(cb1)); assertTrue(queue.add(cb2)); assertFalse(queue.add(cb3)); assertEquals(2, queue.size()); }</code><technical_language>recordSize() calls removed called in constructor of test class</technical_language>

Target:
public void testAddNewerBlock() { CachedBlockQueue queue = new CachedBlockQueue(10000L, 1000L); CachedBlock cb1 = new CachedBlock(5000L, "cb1", 1L); CachedBlock cb2 = new CachedBlock(5000, "cb2", 2L); CachedBlock cb3 = new CachedBlock(5000, "cb3", 3L); assertTrue(queue.add(cb1)); assertTrue(queue.add(cb2)); assertFalse(queue.add(cb3)); assertEquals(2, queue.size()); assertEquals(Arrays.asList("cb1", "cb2"), queue.getBlocks().stream().map(cb -> cb.getName()).collect(Collectors.toList())); }
Source:
<code>public ConvertedEntity convert(Object entity) { <START> if (!appliesTo(entity)) { <END> return null; } ProtobufValueWrapper valueWrapper = (ProtobufValueWrapper) entity; WrappedMessageTagHandler tagHandler = new WrappedMessageTagHandler(valueWrapper, serializationContext); try { Descriptor wrapperDescriptor = serializationContext.getMessageDescriptor(WrappedMessage.PROTOBUF_TYPE_NAME); ProtobufParser.INSTANCE.parse(tagHandler, wrapperDescriptor, valueWrapper.getBinary()); } catch (IOException e) { throw new CacheException(e); } String entityName = valueWrapper.getMessageDescriptor().getFullName(); boolean skip = !indexedMessageTypes.contains(entityName); byte[] messageBytes = tagHandler.getMessageBytes(); return new ProtobufConvertedEntity(skip, entityName, messageBytes); }</code><technical_language>I wrong, I this check is unnecessary callers call appliesTo calling this</technical_language>

Target:
public ConvertedEntity convert(Object entity) { ProtobufValueWrapper valueWrapper = (ProtobufValueWrapper) entity; WrappedMessageTagHandler tagHandler = new WrappedMessageTagHandler(valueWrapper, serializationContext); try { Descriptor wrapperDescriptor = serializationContext.getMessageDescriptor(WrappedMessage.PROTOBUF_TYPE_NAME); ProtobufParser.INSTANCE.parse(tagHandler, wrapperDescriptor, valueWrapper.getBinary()); } catch (IOException e) { throw new CacheException(e); } Descriptor messageDescriptor = valueWrapper.getMessageDescriptor(); if (messageDescriptor == null) { return new ProtobufConvertedEntity(true, null, null); } String entityName = messageDescriptor.getFullName(); boolean skip = !indexedMessageTypes.contains(entityName); byte[] messageBytes = tagHandler.getMessageBytes(); return new ProtobufConvertedEntity(skip, entityName, messageBytes); }
Source:
<code>public void cleanup() throws IOException { try { LOGGER.info("stopping mesosDriver.."); Main.getInjector().getInstance(MyriadDriverManager.class).stopDriver(false); LOGGER.info("stopped mesosDriver.."); <START> } catch (Exception e) { <END> throw new RuntimeException("Failed to stop myriad", e); } LOGGER.info("Stopped myriad."); }</code><technical_language>Nit: specific exceptions</technical_language>

Target:
public void cleanup() throws IOException { try { LOGGER.info("stopping mesosDriver.."); Status status = Main.getInjector().getInstance(MyriadDriverManager.class) .stopDriver(false); if (status.getNumber() != Status.DRIVER_STOPPED_VALUE) { throw new IllegalStateException("Error occurred while stopping MyriadDirver: " + "Unexpected driver status: " + status.name()); } LOGGER.info("stopped mesosDriver.."); } catch (Exception e) { throw new IOException("Failed to stop myriad", e); } LOGGER.info("Stopped myriad."); }
Source:
<code>void appendDetailText(IStatus status, StringBuffer buffer, int indent, boolean includeTopLevelMessage) { if (includeTopLevelMessage) { for (int i = 0; i < indent; i++) buffer.append(NESTING_INDENT); if (status.getMessage() != null) buffer.append(status.getMessage()); } Throwable t = status.getException(); if (t != null) { buffer.append('\n'); for (int i = 0; i <= indent; i++) buffer.append(NESTING_INDENT); if (t instanceof CoreException) { IStatus exceptionStatus = ((CoreException) t).getStatus(); if (exceptionStatus != null && exceptionStatus.getMessage() != null) buffer.append(exceptionStatus.getMessage()); else { String details = t.getLocalizedMessage(); if (details != null) buffer.append(details); } } else { String details = t.getLocalizedMessage(); if (details != null) buffer.append(details); } } IStatus[] children = status.getChildren(); <START> for (IStatus children1 : children) { <END> if (buffer.length() > 0) buffer.append('\n'); appendDetailText(children1, buffer, indent + 1, true); } }</code><technical_language>child</technical_language>

Target:
void appendDetailText(IStatus status, StringBuffer buffer, int indent, boolean includeTopLevelMessage) { if (includeTopLevelMessage) { for (int i = 0; i < indent; i++) buffer.append(NESTING_INDENT); if (status.getMessage() != null) buffer.append(status.getMessage()); } Throwable t = status.getException(); if (t != null) { buffer.append('\n'); for (int i = 0; i <= indent; i++) buffer.append(NESTING_INDENT); if (t instanceof CoreException) { IStatus exceptionStatus = ((CoreException) t).getStatus(); if (exceptionStatus != null && exceptionStatus.getMessage() != null) buffer.append(exceptionStatus.getMessage()); else { String details = t.getLocalizedMessage(); if (details != null) buffer.append(details); } } else { String details = t.getLocalizedMessage(); if (details != null) buffer.append(details); } } IStatus[] children = status.getChildren(); for (IStatus child : children) { if (buffer.length() > 0) buffer.append('\n'); appendDetailText(child, buffer, indent + 1, true); } }
Source:
<code>private void destructElements(Nd nd, long nextElementAddress, int count) { ITypeFactory<T> factory = this.elementType.getFactory(); int size = getElementSize(); for <START> (; count > 0; count--) { <END> factory.destruct(nd, nextElementAddress); nextElementAddress += size; } }</code><technical_language>matter, I prefer "(int i = 0; i < count; ++i)" I recognize pattern faster</technical_language>

Target:
private void destructElements(Nd nd, long nextElementAddress, int count) { ITypeFactory<T> factory = this.elementType.getFactory(); int size = getElementSize(); while (--count >= 0) { factory.destruct(nd, nextElementAddress); nextElementAddress += size; } }
Source:
<code>@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); trace(this, "Starting XWalk webview..."); this.simprints = new SimprintsSupport(this); this.photoGrabber = new PhotoGrabber(this); this.mrdt = new MrdtSupport(this); try { this.smsSender = new SmsSender(this); } catch(Exception ex) { <START> warn(ex, "Failed to create SmsSender."); <END> } this.settings = SettingsStore.in(this); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main); if(settings.allowsConfiguration() && settings.getAppUrl().contains("app.medicmobile.org")) { View webviewContainer = findViewById(R.id.lytWebView); webviewContainer.setPadding(10, 10, 10, 10); webviewContainer.setBackgroundColor(R.drawable.warning_background); } container = (XWalkView) findViewById(R.id.wbvMain); configureUseragent(); enableLocationUpdates(); setUpUiClient(container); enableRemoteChromeDebugging(); enableJavascript(container); enableStorage(container); enableUrlHandlers(container); browseToRoot(); if(settings.allowsConfiguration()) { toast(redactUrl(settings.getAppUrl())); } }</code><technical_language>more warning here? this kind of fail</technical_language>

Target:
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); trace(this, "Starting XWalk webview..."); this.simprints = new SimprintsSupport(this); this.photoGrabber = new PhotoGrabber(this); this.mrdt = new MrdtSupport(this); try { this.smsSender = new SmsSender(this); } catch(Exception ex) { error(ex, "Failed to create SmsSender."); } this.settings = SettingsStore.in(this); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main); if(settings.allowsConfiguration() && settings.getAppUrl().contains("app.medicmobile.org")) { View webviewContainer = findViewById(R.id.lytWebView); webviewContainer.setPadding(10, 10, 10, 10); webviewContainer.setBackgroundColor(R.drawable.warning_background); } container = (XWalkView) findViewById(R.id.wbvMain); configureUseragent(); enableLocationUpdates(); setUpUiClient(container); enableRemoteChromeDebugging(); enableJavascript(container); enableStorage(container); enableUrlHandlers(container); browseToRoot(); if(settings.allowsConfiguration()) { toast(redactUrl(settings.getAppUrl())); } }
Source:
<code>public Optional<ConstructorDeclaration> getDefaultConstructor() { <START> for (BodyDeclaration<?> bd : getMembers()) { <END> if (bd instanceof ConstructorDeclaration) { ConstructorDeclaration cd = (ConstructorDeclaration) bd; if (cd.getParameters().isEmpty()) { return Optional.of(cd); } } } return Optional.empty(); }</code><technical_language>replaced in a more functional way: return getMembers().stream() .filter(bd -> bd instanceof ConstructorDeclaration) .map(bd -> (ConstructorDeclaration) bd) .filter(cd -> cd.getParameters().isEmpty()) .findFirst();</technical_language>

Target:
public Optional<ConstructorDeclaration> getDefaultConstructor() { return getMembers().stream() .filter(bd -> bd instanceof ConstructorDeclaration) .map(bd -> (ConstructorDeclaration) bd) .filter(cd -> cd.getParameters().isEmpty()) .findFirst(); }
Source:
<code><START> private void resetConfig() { <END> mySqlConfigProps.setProperty(DB_URL, ""); mySqlConfigProps.setProperty(DB_USER, ""); mySqlConfigProps.setProperty(DB_PASSWORD, ""); mySqlConfigProps.setProperty(UPDATER_POLLING_INTERVAL_SECONDS, "0"); mySqlConfigProps.setProperty(UPDATE_DISABLED, "false"); }</code><technical_language>Nit: move private method bottom</technical_language>

Target:
public void resetConfig() { mySqlConfigProps.setProperty(DB_URL, ""); mySqlConfigProps.setProperty(DB_USER, ""); mySqlConfigProps.setProperty(DB_PASSWORD, ""); mySqlConfigProps.setProperty(UPDATER_POLLING_INTERVAL_SECONDS, "0"); mySqlConfigProps.setProperty(UPDATE_DISABLED, "false"); }
Source:
<code>public static boolean fastpassBinaryExists(@NotNull VirtualFile file) { <START> Optional<VirtualFile> buildRoot2 = PantsUtil.findBuildRoot(file); <END> return buildRoot2.map(b -> Paths.get(b.getPath()) .resolve("fastpass/bin/fastpass").toFile().exists()) .orElse(false); }</code><technical_language>buildRoot2</technical_language>

Target:
public static boolean fastpassBinaryExists(@NotNull VirtualFile file) { Optional<VirtualFile> buildRoot = PantsUtil.findBuildRoot(file); return buildRoot.map(b -> Paths.get(b.getPath()) .resolve("fastpass/bin/fastpass").toFile().exists()) .orElse(false); }
Source:
<code>public Maintainable toMaintenance() { final StatusTransitioner.Transition st = internalToMaintenance(); try { final Maintainable maintainable = new Maintainable() { @Override public void create() { PersistentUserManagedEhcache.this.create(); } @Override public void destroy() { PersistentUserManagedEhcache.this.destroy(); } @Override public void close() { internalExitMaintenance().succeeded(); } }; st.succeeded(); return maintainable; } catch (RuntimeException e) { <START> st.failed(e); END> } throw new AssertionError("Should not reach this line... ever!"); }</code><technical_language>change contract of failed(t) return StatusTranstionException throwing it? this becomes: java return maintainable; } catch (RuntimeException e) { throw st.failed(e); } }</technical_language>

Target:
public Maintainable toMaintenance() { final StatusTransitioner.Transition st = statusTransitioner.maintenance(); try { final Maintainable maintainable = new Maintainable() { @Override public void create() { PersistentUserManagedEhcache.this.create(); } @Override public void destroy() { PersistentUserManagedEhcache.this.destroy(); } @Override public void close() { statusTransitioner.exitMaintenance().succeeded(); } }; st.succeeded(); return maintainable; } catch (RuntimeException e) { throw st.failed(e); } }
Source:
<code>public void touchSession() { if (hasTimedOut()) { logSessionData(); sessionData = new SessionData(); <START> sessionData.setStartTime(System.currentTimeMillis()); <END> } sessionData.setLastTouchTime(System.currentTimeMillis()); }</code><technical_language>I if useful not, ensure start time touch time identical values moving currentTimeMillis() calls a single local. in constructor (or this method?)</technical_language>

Target:
public void touchSession() { long now = System.currentTimeMillis(); if (hasTimedOut()) { logSessionData(); sessionData = new SessionData(); sessionData.setStartTime(now); } sessionData.setLastTouchTime(now); }
Source:
<code>public boolean equals(Object o) { <START> if (this == o) return true; <END> if (o == null || getClass() != o.getClass()) return false; BlacklistStatus that = (BlacklistStatus) o; return blacklisted == that.blacklisted; }</code><technical_language>[Checkstyle] ERROR: 'if' construct '{}'s</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BlacklistStatus that = (BlacklistStatus) o; return blacklisted == that.blacklisted; }
Source:
<code>public void testCreateNewFileWithOutMatchingToMountDirOrFallbackDirPath() throws Exception { Configuration conf = new Configuration(); ConfigUtil.addLink(conf, "/user1/hive/warehouse/partition-0", new Path(targetTestRoot.toString()).toUri()); Path fallbackTarget = new Path(targetTestRoot, "fallbackDir"); fsTarget.mkdirs(fallbackTarget); ConfigUtil.addLinkFallback(conf, fallbackTarget.toUri()); try (FileSystem vfs = FileSystem.get(viewFsDefaultClusterUri, conf)) { Path p = new Path("/user2/test.file"); <START> Path test = Path.mergePaths(fallbackTarget, p); <END> assertFalse(fsTarget.exists(test)); assertFalse(fsTarget.exists(test.getParent())); vfs.createNewFile(p); assertTrue(fsTarget.exists(test)); } }</code><technical_language>give this variable a more meaningful name</technical_language>

Target:
public void testCreateNewFileWithOutMatchingToMountDirOrFallbackDirPath() throws Exception { Configuration conf = new Configuration(); ConfigUtil.addLink(conf, "/user1/hive/warehouse/partition-0", new Path(targetTestRoot.toString()).toUri()); Path fallbackTarget = new Path(targetTestRoot, "fallbackDir"); fsTarget.mkdirs(fallbackTarget); ConfigUtil.addLinkFallback(conf, fallbackTarget.toUri()); try (FileSystem vfs = FileSystem.get(viewFsDefaultClusterUri, conf)) { Path vfsTestFile = new Path("/user2/test.file"); Path testFileInFallback = Path.mergePaths(fallbackTarget, vfsTestFile); assertFalse(fsTarget.exists(testFileInFallback)); assertFalse(fsTarget.exists(testFileInFallback.getParent())); vfs.create(vfsTestFile).close(); assertTrue(fsTarget.exists(testFileInFallback)); } }
Source:
<code>public Map<String, Supplier<URI>> get() { Map<String, URI> regionToUris = api.getAvailabilityZoneAndRegionApi().get().describeRegions(); Map<String, Supplier<URI>> result = Maps.transformValues(regionToUris, Suppliers2.<URI>ofInstanceFunction()); if (whitelistedRegionIds.isEmpty()) { return result; } <START> return Maps.filterKeys(result, Predicates.in(whitelistedRegionIds)); <END> }</code><technical_language>This works for me. I if this is slightly more efficient, avoids transforming values returned: Map<String, URI> regionToUris = api.getAvailabilityZoneAndRegionApi().get().describeRegions(); if (!whitelistedRegionIds.isEmpty()) { regionToUris = Maps.filterKeys(regionToUris, Predicates.in(whitelistedRegionIds)); } return Maps.transformValues(regionToUris, Suppliers2.<URI>ofInstanceFunction()); fine leaving as-is if prefer</technical_language>

Target:
public Map<String, Supplier<URI>> get() { ImmutableMap.Builder<String, Supplier<URI>> result = ImmutableMap.builder(); for (Entry<String, URI> regionUrl : api.getAvailabilityZoneAndRegionApi().get().describeRegions().entrySet()) { if (whitelistedRegionIds.isEmpty() || whitelistedRegionIds.contains(regionUrl.getKey())) { result.put(regionUrl.getKey(), Suppliers.ofInstance(regionUrl.getValue())); } } return result.build(); }
Source:
<code>public String getMethod() { <START> return METHOD_PATCH; <END> }</code><technical_language>If do end keeping IRequestImpl.java constant for PATCH</technical_language>

Target:
public String getMethod() { return IRequest.Method.PATCH; }
Source:
<code>public String getType(@NotNull Uri uri) { final int match = URI_MATCHER.match(uri); String cachedMimeType = sMimeTypeCache.get(match); if (cachedMimeType != null) { return cachedMimeType; } final Class<? extends Model> type = getModelType(uri); final boolean single = ((match % 2) == 0); StringBuilder mimeType = new StringBuilder(); <START> mimeType.append(Resources.getSystem().getString(R.string.MIME_type_vendor_specific)); <END> mimeType.append("."); mimeType.append(sAuthority); mimeType.append("."); mimeType.append(single ? "item" : "dir"); mimeType.append("/"); mimeType.append(Resources.getSystem().getString(R.string.MIME_type_vendor_specific)); mimeType.append("."); mimeType.append(sAuthority); mimeType.append("."); mimeType.append(Cache.getTableName(type)); sMimeTypeCache.append(match, mimeType.toString()); return mimeType.toString(); }</code><technical_language>Place in ApplicationConstants instead</technical_language>

Target:
public String getType(@NotNull Uri uri) { final int match = URI_MATCHER.match(uri); String cachedMimeType = sMimeTypeCache.get(match); if (cachedMimeType != null) { return cachedMimeType; } final Class<? extends Model> type = getModelType(uri); final boolean single = ((match % 2) == 0); StringBuilder mimeType = new StringBuilder(); mimeType.append(ApplicationConstants.MIME_TYPE_VND); mimeType.append("."); mimeType.append(sAuthority); mimeType.append("."); mimeType.append(single ? "item" : "dir"); mimeType.append("/"); mimeType.append(ApplicationConstants.MIME_TYPE_VND); mimeType.append("."); mimeType.append(sAuthority); mimeType.append("."); mimeType.append(Cache.getTableName(type)); sMimeTypeCache.append(match, mimeType.toString()); return mimeType.toString(); }
Source:
<code>public void setUp() { formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss"); aliasA = new Alias("namespaceA", "valueA"); aliasB = new Alias("namespaceB", "valueB"); aliases.add(aliasA); aliases.add(aliasB); aliasMap = new HashMap<>(); aliasMap.put(AVAILABILITY_TIME, formatter.parseDateTime(DATE_A)); aliasMap.put(AVAILABILITY_END_TIME, formatter.parseDateTime(DATE_B)); aliasMap.put(ALIASES, aliases.stream().collect(MoreCollectors.toImmutableSet())); Map<String, Object> aliasesAsHashMap = Maps.newHashMap(); <START> Map<String, String> aliasAMap = Maps.newHashMap(); <END> aliasAMap.put("namespace", "namespaceA"); aliasAMap.put("value", "valueA"); Map<String, String> aliasBMap = Maps.newHashMap(); aliasBMap.put("namespace", "namespaceB"); aliasBMap.put("value", "valueB"); hashMapMap = new HashMap<>(); hashMapMap.put(AVAILABILITY_TIME, formatter.parseDateTime(DATE_A)); hashMapMap.put(AVAILABILITY_END_TIME, formatter.parseDateTime(DATE_B)); hashMapMap.put(ALIASES, Lists.newArrayList(aliasAMap, aliasBMap)); expectedEsLocation = new EsLocation(); expectedEsLocation.availabilityTime(formatter.parseDateTime(DATE_A).toDate()); expectedEsLocation.availabilityEndTime(formatter.parseDateTime(DATE_B).toDate()); expectedEsLocation.aliases(aliases); expectedMap = expectedEsLocation.toMap(); }</code><technical_language>use: ImmutableMap.of( "keyA", "valueA", "keyB", "valueB" ); More succinct readable way</technical_language>

Target:
public void setUp() { formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss"); aliasA = new Alias("namespaceA", "valueA"); aliasB = new Alias("namespaceB", "valueB"); aliases.add(aliasA); aliases.add(aliasB); Map<String, String> aliasAMap = ImmutableMap.of( "namespace", "namespaceA", "value", "valueA" ); Map<String, String> aliasBMap = ImmutableMap.of( "namespace", "namespaceB", "value", "valueB" ); locationMap = ImmutableMap.of( AVAILABILITY_TIME, formatter.parseDateTime(DATE_A), AVAILABILITY_END_TIME, formatter.parseDateTime(DATE_B), ALIASES, Lists.newArrayList(aliasAMap, aliasBMap) ); EsLocation expectedEsLocation = new EsLocation() .availabilityTime(formatter.parseDateTime(DATE_A).toDate()) .availabilityEndTime(formatter.parseDateTime(DATE_B).toDate()) .aliases(aliases); expectedMap = expectedEsLocation.toMap(); }
Source:
<code>public Map<Cell, byte[]> get(TableReference tableRef, Set<Cell> cells) { if (cells.isEmpty()) { log.info("Attempted get on '{}' table with empty cells argument", tableRef); return ImmutableMap.of(); } try { return getColCacheForTable(tableRef).getAll(cells).entrySet() .stream() .filter(entry -> entry.getValue().length > 0) <START> .collect(Collectors.toConcurrentMap(entry -> entry.getKey(), entry -> entry.getValue())); <END> } catch (ExecutionException | UncheckedExecutionException e) { throw Throwables.throwUncheckedException(e.getCause()); } }</code><technical_language>collect concurrent map</technical_language>

Target:
public Map<Cell, byte[]> get(TableReference tableRef, Set<Cell> cells) { if (cells.isEmpty()) { log.info("Attempted get on '{}' table with empty cells argument", tableRef); return ImmutableMap.of(); } try { return getColCacheForTable(tableRef).getAll(cells).entrySet() .stream() .filter(entry -> entry.getValue().length > 0) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } catch (ExecutionException | UncheckedExecutionException e) { throw Throwables.throwUncheckedException(e.getCause()); } }
Source:
<code>private static Object handleGenericRecord(GenericData.Record record) { <START> return record.get(0); <END> }</code><technical_language>Is record guaranteed non-empty</technical_language>

Target:
private static Object handleGenericRecord(GenericData.Record record) { List<Field> fields = record.getSchema().getFields(); if (fields.isEmpty()) { return null; } Map<Object, Object> convertedMap = new HashMap<>(); for (Field field : fields) { String fieldName = field.name(); convertedMap.put(fieldName, convert(record.get(fieldName))); } return convertedMap; }
Source:
<code>default <R> SortedSet<R> collect(PartialFunction<? super T, ? extends R> partialFunction) { Objects.requireNonNull(partialFunction, "partialFunction is null"); <START> return filter(partialFunction::isDefinedAt).map(partialFunction::apply); <END> }</code><technical_language>modified TreeSet.ofAll(iterator().filter().map()) avoid creating temporary BitSet</technical_language>

Target:
default <R> SortedSet<R> collect(PartialFunction<? super T, ? extends R> partialFunction) { Objects.requireNonNull(partialFunction, "partialFunction is null"); return TreeSet.ofAll(naturalComparator(), iterator().collect(partialFunction)); }
Source:
<code>private void pushJetpackMonitorSettings() { WordPress.getRestClientUtils().setJetpackMonitor( mSite.getSiteId(), mJpSettings.monitorActive, new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { mRemoteJpSettings.monitorActive = response.optBoolean("active"); mJpSettings.monitorActive = mRemoteJpSettings.monitorActive; String status = mJpSettings.jetpackProtectEnabled ? "activated" : "deactivated"; AppLog.d(AppLog.T.API, "Jetpack Monitor module " + status); notifySavedOnUiThread(null); } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { AppLog.w(AppLog.T.API, "Error updating Jetpack Monitor module: " + error); notifySavedOnUiThread(error); } }); final Map<String, String> params = serializeJetpackParams(); if (params == null || params.isEmpty()) return; <START> WordPress.getRestClientUtils().setJetpackSettings( <END> mSite.getSiteId(), new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { AppLog.d(AppLog.T.API, "Jetpack Monitor module options updated"); mRemoteJpSettings.emailNotifications = mJpSettings.emailNotifications; mRemoteJpSettings.wpNotifications = mJpSettings.wpNotifications; notifySavedOnUiThread(null); } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { AppLog.w(AppLog.T.API, "Error updating Jetpack Monitor module options: " + error); notifySavedOnUiThread(error); } }, params); }</code><technical_language>I this is a method called pushJetpackMonitorSettings</technical_language>

Target:
private void pushJetpackMonitorSettings() { final Map<String, String> params = serializeJetpackMonitorParams(); if (params.isEmpty()) { return; } final JetpackSettingsModel sentJpData = new JetpackSettingsModel(mJpSettings); WordPress.getRestClientUtilsV1_1().setJetpackMonitorSettings( mSite.getSiteId(), params, new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { AppLog.d(AppLog.T.API, "Jetpack Monitor module updated"); mRemoteJpSettings.emailNotifications = sentJpData.emailNotifications; mRemoteJpSettings.wpNotifications = sentJpData.wpNotifications; notifySavedOnUiThread(null); } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { AppLog.w(AppLog.T.API, "Error updating Jetpack Monitor module: " + error); notifySavedOnUiThread(error); } }); }
Source:
<code>public String getForkNodeConnectionString() { <START> return "tcp://127.0.0.1:" + serverPort; <END> }</code><technical_language>add some kind of authentication, exchange a time token (UUID). other program machine connect this server start pushing data (leading out of memory other nasty things). do in a follow patch (this is huge), create a JIRA set blocker</technical_language>

Target:
public String getForkNodeConnectionString() { return "tcp://" + localHost + ":" + localPort; }
Source:
<code>@Override public Iterator<Row> getRows(Session ses, SearchRow first, SearchRow last) { SqlSystemViewColumnCondition tableNameCond = conditionForColumn(TABLE_NAME, first, last); SqlSystemViewColumnCondition columnNameCond = conditionForColumn(COLUMN_NAME, first, last); Predicate<GridH2Table> tblFilter; Predicate<Column> colFilter; if (tableNameCond.isEquality()) { String tblName = tableNameCond.valueForEquality().getString(); tblFilter = tbl -> F.eq(tblName, tbl.getName()); } else tblFilter = tab -> true; if (columnNameCond.isEquality()) { String colName = columnNameCond.valueForEquality().getString(); colFilter = col -> F.eq(colName, col.getName()); } else colFilter = tab -> true; List<Row> res = new ArrayList<>(); for (GridH2Table tbl : schemaMgr.dataTables()) { if (!tblFilter.test(tbl)) continue; IndexColumn affCol = tbl.getExplicitAffinityKeyColumn(); for (int i = QueryUtils.DEFAULT_COLUMNS_COUNT; i < tbl.getColumns().length; ++i) { Column col = tbl.getColumns()[i]; if (!colFilter.test(col)) continue; Object[] data = new Object[] { col.getTable().getSchema().getName(), col.getTable().getName(), col.getName(), <START> col.getColumnId(), <END> DataType.getDataType(col.getType()).name, col.getType(), col.isNullable(), col.getDisplaySize(), col.getPrecision(), col.getScale(), affCol != null && F.eq(col.getColumnId(), affCol.column.getColumnId()), }; res.add(createRow(ses, data)); } } return res.iterator(); }</code><technical_language>internal column id, col.getColumnId() - QueryUtils.DEFAULT_COLUMNS_COUNT value</technical_language>

Target:
@Override public Iterator<Row> getRows(Session ses, SearchRow first, SearchRow last) { SqlSystemViewColumnCondition tableNameCond = conditionForColumn(TABLE_NAME, first, last); SqlSystemViewColumnCondition columnNameCond = conditionForColumn(COLUMN_NAME, first, last); Predicate<GridH2Table> tblFilter; Predicate<Column> colFilter; if (tableNameCond.isEquality()) { String tblName = tableNameCond.valueForEquality().getString(); tblFilter = tbl -> F.eq(tblName, tbl.getName()); } else tblFilter = tab -> true; if (columnNameCond.isEquality()) { String colName = columnNameCond.valueForEquality().getString(); colFilter = col -> F.eq(colName, col.getName()); } else colFilter = tab -> true; List<Row> res = new ArrayList<>(); for (GridH2Table tbl : schemaMgr.dataTables()) { if (!tblFilter.test(tbl)) continue; IndexColumn affCol = tbl.getExplicitAffinityKeyColumn(); for (int i = QueryUtils.DEFAULT_COLUMNS_COUNT; i < tbl.getColumns().length; ++i) { Column col = tbl.getColumns()[i]; if (!colFilter.test(col)) continue; Object[] data = new Object[] { tbl.getSchema().getName(), tbl.getName(), col.getName(), col.getColumnId() - QueryUtils.DEFAULT_COLUMNS_COUNT + 1, col.getDefaultExpression() != null ? toStringSafe(col.getDefaultExpression().getValue(ses)) : null, col.isNullable(), DataType.getDataType(col.getType()).name, characterLength(col), numericPrecision(col), numericScale(col), affCol != null && F.eq(col.getColumnId(), affCol.column.getColumnId()), }; res.add(createRow(ses, data)); } } return res.iterator(); }