auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void processPresign( Response response, AuthnRequest authnRequest, List<String> spMetadata, Set<Binding> supportedBindings) { final DateTime notOnOrAfter = DateTime.now().plusMinutes(30); String acsUrl = getAssertionConsumerServiceURL(authnRequest, spMetadata, supportedBindings); for (Assertion assertion : response.getAssertions()) { <START> assertion <END> .getSubject() .getSubjectConfirmations() .forEach(sc -> setConfirmationData(sc, notOnOrAfter, acsUrl)); } }</code><technical_language>Wondering if this need configurable</technical_language>

Target:
public void processPresign( Response response, AuthnRequest authnRequest, List<String> spMetadata, Set<Binding> supportedBindings) { String inResponseTo = response.getInResponseTo(); String acsUrl = getAssertionConsumerServiceURL(authnRequest, spMetadata, supportedBindings); for (Assertion assertion : response.getAssertions()) { DateTime notOnOrAfter = assertion.getConditions().getNotOnOrAfter(); assertion .getSubject() .getSubjectConfirmations() .forEach(sc -> setConfirmationData(sc, notOnOrAfter, acsUrl, inResponseTo)); } addAudiences(authnRequest, response, spMetadata, supportedBindings); }
Source:
<code>private JCQueue createQueue(String name, int batchSize, int queueSize) { <START> return new JCQueue(name, null, queueSize, 0, batchSize, waitStrategy, "test", "test", Collections.singletonList(1000), 1000, new StormMetricRegistry()); <END> }</code><technical_language>is name instead of null</technical_language>

Target:
private JCQueue createQueue(String name, int batchSize, int queueSize) { return new JCQueue(name, name, queueSize, 0, batchSize, waitStrategy, "test", "test", Collections.singletonList(1000), 1000, new StormMetricRegistry()); }
Source:
<code>public void close() { Set<RequestMetadata> requestMetadataToRelease = new HashSet<>(); if (pendingRequests != null) { requestMetadataToRelease.addAll(pendingRequests); } if (connectionIdToRequestInFlight != null) { requestMetadataToRelease.addAll(connectionIdToRequestInFlight.values()); } if (pendingConnectionsToAssociatedRequests != null) { requestMetadataToRelease.addAll(pendingConnectionsToAssociatedRequests.values()); } <START> requestMetadataToRelease.stream().forEach(requestMetadata -> requestMetadata.requestInfo.getRequest().release()); <END> logger.trace("Closing the SocketNetworkClient"); selector.close(); closed = true; }</code><technical_language>nit: requestMetadataToRelease.forEach</technical_language>

Target:
public void close() { Set<RequestMetadata> requestMetadataToRelease = new HashSet<>(); if (pendingRequests != null) { requestMetadataToRelease.addAll(pendingRequests); } if (connectionIdToRequestInFlight != null) { requestMetadataToRelease.addAll(connectionIdToRequestInFlight.values()); } if (pendingConnectionsToAssociatedRequests != null) { requestMetadataToRelease.addAll(pendingConnectionsToAssociatedRequests.values()); } requestMetadataToRelease.forEach(requestMetadata -> requestMetadata.requestInfo.getRequest().release()); logger.trace("Closing the SocketNetworkClient"); selector.close(); closed = true; }
Source:
<code>public boolean isEmpty() { <START> return this.itemType == ItemTypes.AIR || this.count <= 0; <END> }</code><technical_language>specifically allowing air itemstacks created now? is a validate ItemStack is empty (hint, fields in this class)</technical_language>

Target:
public boolean isEmpty() { return this.privateStack.isEmpty(); }
Source:
<code>protected void executeVmCommand() { VmHandler.warnMemorySizeLegal(getParameters().getVm().getStaticData(), getEffectiveCompatibilityVersion()); ArrayList<String> errorMessages = new ArrayList<>(); if (!canAddVm(errorMessages, destStorages.values())) { log.error("Failed to add VM. The reasons are: {}", <START> StringUtils.join(errorMessages, <END> ',')); return; } TransactionSupport.executeInNewTransaction(() -> { addVmStatic(); addVmDynamic(); addVmNetwork(); addVmNumaNodes(); addVmStatistics(); addActiveSnapshot(); addVmPermission(); addVmInit(); addVmRngDevice(); getCompensationContext().stateChanged(); return null; }); if (addVmImages()) { TransactionSupport.executeInNewTransaction(() -> { copyVmDevices(); addDiskPermissions(); addVmPayload(); updateSmartCardDevices(); addVmWatchdog(); addGraphicsDevice(); setActionReturnValue(getVm().getId()); setSucceeded(true); return null; }); } if (getParameters().getPoolId() != null) { addVmToPool(); } }</code><technical_language>replacing String#join</technical_language>

Target:
protected void executeVmCommand() { VmHandler.warnMemorySizeLegal(getParameters().getVm().getStaticData(), getEffectiveCompatibilityVersion()); List<String> errorMessages = new ArrayList<>(); if (!canAddVm(errorMessages, destStorages.values())) { log.error("Failed to add VM. The reasons are: {}", String.join(",", errorMessages)); return; } TransactionSupport.executeInNewTransaction(() -> { addVmStatic(); addVmDynamic(); addVmNetwork(); addVmNumaNodes(); addVmStatistics(); addActiveSnapshot(); addVmPermission(); addVmInit(); addVmRngDevice(); getCompensationContext().stateChanged(); return null; }); if (addVmImages()) { TransactionSupport.executeInNewTransaction(() -> { copyVmDevices(); addDiskPermissions(); addVmPayload(); updateSmartCardDevices(); addVmWatchdog(); addGraphicsDevice(); setActionReturnValue(getVm().getId()); setSucceeded(true); return null; }); } if (getParameters().getPoolId() != null) { addVmToPool(); } }
Source:
<code><START> private void onEndOfStream(MessageCollector collector, TaskCoordinator coordinator) { <END> if (inputStreams.stream().allMatch(input -> eosStates.isEndOfStream(input))) { handleEndOfStream(collector, coordinator); this.registeredOperators.forEach(op -> op.onEndOfStream(collector, coordinator)); } }</code><technical_language>do remove final declarative here? I thought reason Xinyu marked this final is operator override this, is system-controlled behavior</technical_language>

Target:
private final void onEndOfStream(MessageCollector collector, TaskCoordinator coordinator) { if (inputStreams.stream().allMatch(input -> eosStates.isEndOfStream(input))) { handleEndOfStream(collector, coordinator); this.registeredOperators.forEach(op -> op.onEndOfStream(collector, coordinator)); } }
Source:
<code>public void canConstructFromString() throws UnsupportedEncodingException { final String test = "Hello こんにちは Привет"; final Utf8String str = new Utf8String(test); <START> MatcherAssert.assertThat(str.asString(), Matchers.equalTo(test)); <END> MatcherAssert.assertThat( str.asBytes(), Matchers.equalTo(test.getBytes(Utf8StringTest.ENCODING)) ); }</code><technical_language>@Iprogrammerr Please IsEquals hamcrest in assertions</technical_language>

Target:
public void canConstructFromString() throws UnsupportedEncodingException { final String test = "Hello こんにちは Привет"; final Utf8String str = new Utf8String(test); MatcherAssert.assertThat(str.asString(), new IsEqual<>(test)); MatcherAssert.assertThat( str.asBytes(), new IsEqual<>(test.getBytes(Utf8StringTest.ENCODING)) ); }
Source:
<code>private static String[] getTypes(ICompareInput input) { ITypedElement ancestor= input.getAncestor(); ITypedElement left= input.getLeft(); ITypedElement right= input.getRight(); <START> ArrayList<String> tmp= new ArrayList<String>(); <END> if (ancestor != null) { String type= ancestor.getType(); if (type != null) tmp.add(normalizeCase(type)); } if (left != null) { String type= left.getType(); if (type != null) tmp.add(normalizeCase(type)); } if (right != null) { String type= right.getType(); if (type != null) tmp.add(normalizeCase(type)); } return tmp.toArray(new String[tmp.size()]); }</code><technical_language>new AraryList<></technical_language>

Target:
private static String[] getTypes(ICompareInput input) { ITypedElement ancestor= input.getAncestor(); ITypedElement left= input.getLeft(); ITypedElement right= input.getRight(); ArrayList<String> tmp= new ArrayList<>(); if (ancestor != null) { String type= ancestor.getType(); if (type != null) tmp.add(normalizeCase(type)); } if (left != null) { String type= left.getType(); if (type != null) tmp.add(normalizeCase(type)); } if (right != null) { String type= right.getType(); if (type != null) tmp.add(normalizeCase(type)); } return tmp.toArray(new String[tmp.size()]); }
Source:
<code>private Attribute getNamedAttribute(String name) { Attribute result = null; InvokableMBeanAttributeInfo i = atts.get(name); if (i == null && name.length() > 0) { char firstChar = name.charAt(0); if (Character.isUpperCase(firstChar)) { char[] nameChars = name.toCharArray(); nameChars[0] = Character.toLowerCase(firstChar); <START> name = new String(nameChars); <END> i = atts.get(name); } } if (i != null) { try { result = new Attribute(name, i.invoke(null)); if (trace) log.tracef("Attribute %s has r=%b,w=%b,is=%b and value %s", name, i.getMBeanAttributeInfo().isReadable(), i.getMBeanAttributeInfo().isWritable(), i.getMBeanAttributeInfo().isIs(), result.getValue()); } catch (Exception e) { log.debugf(e, "Exception while reading value of attribute %s", name); } } else { log.queriedAttributeNotFound(name); } return result; }</code><technical_language>I preferred name = firstChar + name.substring(1)</technical_language>

Target:
private Attribute getNamedAttribute(String name) { Attribute result = null; InvokableMBeanAttributeInfo i = atts.get(name); if (i == null && name.length() > 0) { char firstChar = name.charAt(0); if (Character.isUpperCase(firstChar)) { name = Character.toLowerCase(firstChar) + name.substring(1); i = atts.get(name); } } if (i != null) { try { result = new Attribute(name, i.invoke(null)); if (trace) log.tracef("Attribute %s has r=%b,w=%b,is=%b and value %s", name, i.getMBeanAttributeInfo().isReadable(), i.getMBeanAttributeInfo().isWritable(), i.getMBeanAttributeInfo().isIs(), result.getValue()); } catch (Exception e) { log.debugf(e, "Exception while reading value of attribute %s", name); } } else { log.queriedAttributeNotFound(name); } return result; }
Source:
<code>public void shouldIterateOverCreatedParts() throws Exception { TemporalIndexCache<String, Exception> cache = new TemporalIndexCache<>( new StringFactory() ); <START> cache.dateTime(); <END> cache.dateTimeZoned(); assertEquals( Iterables.count( cache ), 2 ); }</code><technical_language>This test exhaustive. point of this commit ensure part of iteration, right</technical_language>

Target:
public void shouldIterateOverCreatedParts() throws Exception { TemporalIndexCache<String, Exception> cache = new TemporalIndexCache<>( new StringFactory() ); assertEquals( Iterables.count( cache ), 0 ); cache.localDateTime(); cache.zonedTime(); assertThat( cache, containsInAnyOrder( "LocalDateTime", "ZonedTime" ) ); cache.date(); cache.localTime(); cache.localDateTime(); cache.zonedTime(); cache.zonedDateTime(); cache.duration(); assertThat( cache, containsInAnyOrder( "Date", "LocalDateTime", "ZonedDateTime", "LocalTime", "ZonedTime", "Duration" ) ); }
Source:
<code><START> Tuple2<T, Q> dequeue() { <END> if (isEmpty()) { throw new NoSuchElementException("dequeue of empty " + getClass().getSimpleName()); } else { return Tuple.of(head(), tail()); } }</code><technical_language>needs public</technical_language>

Target:
public Tuple2<T, Q> dequeue() { if (isEmpty()) { throw new NoSuchElementException("dequeue of empty " + getClass().getSimpleName()); } else { return Tuple.of(head(), tail()); } }
Source:
<code>default List<String> getClaimAsStringList(String claim) { if (!containsClaim(claim)) { return null; } Object claimValue = getClaims().get(claim); <START> List<String> convertedValue = ObjectConverters.listStringConverter().convert(claimValue); <END> if (convertedValue == null) { throw new IllegalArgumentException("Unable to convert claim '" + claim + "' of type '" + claimValue.getClass() + "' to List."); } return convertedValue; }</code><technical_language>I Optional is a bit more readable in situations these: java return Optional.ofNullable(ObjectConverters.listStringConverter().convert(claimValue)) .orElseThrow(() -> new IllegalArgumentException..</technical_language>

Target:
default List<String> getClaimAsStringList(String claim) { if (!containsClaim(claim)) { return null; } final TypeDescriptor sourceDescriptor = TypeDescriptor.valueOf(Object.class); final TypeDescriptor targetDescriptor = TypeDescriptor.collection( List.class, TypeDescriptor.valueOf(String.class)); Object claimValue = getClaims().get(claim); List<String> convertedValue = (List<String>) ClaimConversionService.getSharedInstance().convert( claimValue, sourceDescriptor, targetDescriptor); if (convertedValue == null) { throw new IllegalArgumentException("Unable to convert claim '" + claim + "' of type '" + claimValue.getClass() + "' to List."); } return convertedValue; }
Source:
<code>if (Boolean.getBoolean("io.reactivesocket.fragmentation.enable")) { int mtu = Integer.getInteger("io.reactivesocket.fragmentation.mtu", 1024); <START> if (Plugins.DUPLEX_CONNECTION_INTERCEPTOR == null) { <END> Plugins.DUPLEX_CONNECTION_INTERCEPTOR = (type, connection) -> { if (type == Plugins.DuplexConnectionInterceptor.Type.SOURCE) { return new FragmentionDuplexConnection(connection, mtu); } else { return connection; } }; } else { Plugins.DuplexConnectionInterceptor original = Plugins.DUPLEX_CONNECTION_INTERCEPTOR; Plugins.DUPLEX_CONNECTION_INTERCEPTOR = (type, connection) -> { if (type == Plugins.DuplexConnectionInterceptor.Type.SOURCE) { return original.apply(type, new FragmentionDuplexConnection(connection, mtu)); } else { return original.apply(type, connection); } }; } }</code><technical_language>is reasoning system property plugin mechanism? this driven individual applications wiring connections fit? this expressed non-statically a helper wraps a DuplexConnection defaults</technical_language>

Target:
if (Boolean.getBoolean("io.reactivesocket.fragmentation.enable")) { int mtu = Integer.getInteger("io.reactivesocket.fragmentation.mtu", 1024); if (Plugins.DUPLEX_CONNECTION_INTERCEPTOR == null) { Plugins.DUPLEX_CONNECTION_INTERCEPTOR = (type, connection) -> { if (type == Plugins.DuplexConnectionInterceptor.Type.SOURCE) { return new FragmentationDuplexConnection(connection, mtu); } else { return connection; } }; } else { Plugins.DuplexConnectionInterceptor original = Plugins.DUPLEX_CONNECTION_INTERCEPTOR; Plugins.DUPLEX_CONNECTION_INTERCEPTOR = (type, connection) -> { if (type == Plugins.DuplexConnectionInterceptor.Type.SOURCE) { return original.apply(type, new FragmentationDuplexConnection(connection, mtu)); } else { return original.apply(type, connection); } }; } }
Source:
<code>private void executePrecode(Connection connection) throws SQLException { String precode = getProperty(ZEPPELIN_JDBC_PRECODE_KEY); <START> if (StringUtils.isNotEmpty(precode)) { <END> logger.info("Run SQL precode '{}'", precode); try (Statement statement = connection.createStatement()) { statement.execute(precode); if (!connection.getAutoCommit()) { connection.commit(); } } } }</code><technical_language>if (StringUtils.isNotBlank(precode)) { precode = StringUtils.trim(precode); ...</technical_language>

Target:
private void executePrecode(Connection connection) throws SQLException { String precode = getProperty(ZEPPELIN_JDBC_PRECODE_KEY); if (StringUtils.isNotBlank(precode)) { precode = StringUtils.trim(precode); logger.info("Run SQL precode '{}'", precode); try (Statement statement = connection.createStatement()) { statement.execute(precode); if (!connection.getAutoCommit()) { connection.commit(); } } } }
Source:
<code>public String toString() { <START> return "OptimizedEvaluator{" + <END> "id='" + id + '\'' + ", dataAllocated=" + dataAllocated + ", dataRequested=" + dataRequested + ", dstTransferSteps=" + dstTransferSteps + '}'; }</code><technical_language>StringBuilder</technical_language>

Target:
public String toString() { final StringBuilder sb = new StringBuilder("OptimizedEvaluator{"); sb.append("id='").append(id).append('\''); sb.append(", dataType='").append(dataType).append('\''); sb.append(", dstTransferSteps=").append(dstTransferSteps); sb.append(", dataAllocated=").append(dataAllocated); sb.append(", dataRequested=").append(dataRequested); sb.append('}'); return sb.toString(); }
Source:
<code><START> public EndPoint mockEndpointSelection(Type vmType, State volumeState, SecondaryStorageVmVO ... ssvmVOs) { <END> VolumeInfo volume = mock(VolumeInfo.class); VirtualMachine vm = mock(VirtualMachine.class); Long zoneId = 1l; when(vm.getType()).thenReturn(vmType); when(vm.getState()).thenReturn(volumeState); when(volume.getAttachedVM()).thenReturn(vm); when(volume.getDataCenterId()).thenReturn(zoneId); List<SecondaryStorageVmVO> ssvmList = new ArrayList<>(); if (ssvmVOs != null) { for (SecondaryStorageVmVO ssvm : ssvmVOs) { ssvmList.add(ssvm); } } when(_ssvmDao.listByZoneId(eq(SecondaryStorageVm.Role.templateProcessor), eq(zoneId))) .thenReturn(ssvmList); PowerMockito.mockStatic(ComponentContext.class); when(ComponentContext.inject(DummyEndpoint.class)).thenReturn(dummyEndpoint); doReturn(selectMethodEndpoint).when(selector).select(any(DataObject.class)); return selector.select(volume, StorageAction.DELETEVOLUME); }</code><technical_language>This method private. I miss something? Thanks</technical_language>

Target:
private EndPoint mockEndpointSelection(Type vmType, State volumeState, SecondaryStorageVmVO ... ssvmVOs) { VolumeInfo volume = mock(VolumeInfo.class); VirtualMachine vm = mock(VirtualMachine.class); Long zoneId = 1l; when(vm.getType()).thenReturn(vmType); when(vm.getState()).thenReturn(volumeState); when(volume.getAttachedVM()).thenReturn(vm); when(volume.getDataCenterId()).thenReturn(zoneId); List<SecondaryStorageVmVO> ssvmList = new ArrayList<>(); if (ssvmVOs != null) { for (SecondaryStorageVmVO ssvm : ssvmVOs) { ssvmList.add(ssvm); } } when(_ssvmDao.listByZoneId(eq(SecondaryStorageVm.Role.templateProcessor), eq(zoneId))) .thenReturn(ssvmList); PowerMockito.mockStatic(ComponentContext.class); when(ComponentContext.inject(DummyEndpoint.class)).thenReturn(dummyEndpoint); doReturn(selectMethodEndpoint).when(selector).select(any(DataObject.class)); return selector.select(volume, StorageAction.DELETEVOLUME); }
Source:
<code>public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException { MCLivingEntity e = Static.getLivingEntity(args[0], t); boolean glide = Static.getBoolean(args[1]); if (e.isOnGround()) { <START> throw new CREException("The specified entity cannot glide right now", t); <END> } e.setGliding(glide); return CVoid.VOID; }</code><technical_language>If do this, mentioned in docs. Do need check if grounded? I tell, revert gliding immediately</technical_language>

Target:
public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException { MCLivingEntity e = Static.getLivingEntity(args[0], t); boolean glide = Static.getBoolean(args[1]); e.setGliding(glide); return CVoid.VOID; }
Source:
<code>public void handle(GlowSession session, AdvancementTabMessage message) { if (message.getAction() == AdvancementTabMessage.ACTION_CLOSE) { <START> GlowServer.logger.log(Level.SEVERE, "Received AdvancementTabHandler (close)"); <END> } else { GlowServer.logger.log(Level.SEVERE, "Received AdvancementTabHandler (open:" + message.getTabId() + ")"); } }</code><technical_language>Level.DEBUG/Level.INFO perhaps</technical_language>

Target:
public void handle(GlowSession session, AdvancementTabMessage message) { if (message.getAction() == AdvancementTabMessage.ACTION_CLOSE) { GlowServer.logger.log(Level.FINE, "Received AdvancementTabHandler (close)"); } else { GlowServer.logger.log(Level.FINE, "Received AdvancementTabHandler (open:" + message.getTabId() + ")"); } }
Source:
<code>public IFUComponent(final String prefix, final double radius, final Boolean isIfu2) { super(ITCConstants.LIB + "/" + Gmos.INSTR_DIR + "/" + prefix + "ifu_trans" + Instrument.DATA_SUFFIX); Log.fine("Calculating IFU elements to sum within " + radius + " arcsec of center (IFU2 = " + isIfu2 + ")"); IFUApertures = new ApertureComposite(); IFUOffsets = new ArrayList<>(); int numY = 25; int numX = 20; if (isIfu2) numX = 40; int Nelements = 0; for (int i = 0; i < numX; i++) { double x = (i - (numX/2.)) * ((Math.sqrt(3)/2.)*IFU_DIAMETER + IFU_SPACING); for (int j = 0; j < numY; j++) { <START> double y = (2*j - (numY - Math.abs(i)%2 + 1)) * (IFU_DIAMETER/2. + IFU_SPACING); <END> double r = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); if (r < radius) { IFUApertures.addAperture(new HexagonalAperture(x, y, IFU_DIAMETER)); IFUOffsets.add(r); Nelements++; } } } Log.fine("-> will sum " + Nelements + " IFU elements"); }</code><technical_language>A nitpicky point, purge code of 2. for doubles find them, instead change 2.0 for clarity. Otherwise, this fine me. criticism I of is calculating Math.sqrt(3)/2.0 in a loop is a bit redundant, change, calculate prior loop. IFU_DIAMETER/2.0. serious issues, though</technical_language>

Target:
public IFUComponent(final String prefix, final double radius, final Boolean isIfu2) { super(ITCConstants.LIB + "/" + Gmos.INSTR_DIR + "/" + prefix + "ifu_trans" + Instrument.DATA_SUFFIX); Log.fine("Calculating IFU elements to sum within " + radius + " arcsec of center (IFU2 = " + isIfu2 + ")"); IFUApertures = new ApertureComposite(); IFUOffsets = new ArrayList<>(); int numY = 25; int numX = 20; if (isIfu2) numX = 40; int Nelements = 0; double distX = (Math.sqrt(3)/2.0)*IFU_DIAMETER + IFU_SPACING; double distY = (IFU_DIAMETER + IFU_SPACING)/2.0; for (int i = 0; i < numX; i++) { double x = (i - (numX/2.0)) * distX; for (int j = 0; j < numY; j++) { double y = (2*j - (numY - Math.abs(i)%2 + 1)) * distY; double r = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); if (r < radius) { IFUApertures.addAperture(new HexagonalAperture(x, y, IFU_DIAMETER)); IFUOffsets.add(r); Nelements++; } } } Log.fine("-> will sum " + Nelements + " IFU elements"); }
Source:
<code>public MetadataValue getMinimum(Context context, int metadataFieldId) throws SQLException { String queryString; if(DatabaseUtils.getDbType().equals(DatabaseUtils.DBMS_ORACLE)){ queryString = "SELECT m FROM MetadataValue m JOIN FETCH m.metadataField WHERE m.metadataField.id = :metadata_field_id ORDER BY DBMS_LOB.substr(text_value , 4000 , 1)"; <START> }else{ <END> queryString = "SELECT m FROM MetadataValue m JOIN FETCH m.metadataField WHERE m.metadataField.id = :metadata_field_id ORDER BY text_value"; } Query query = createQuery(context, queryString); query.setParameter("metadata_field_id", metadataFieldId); query.setMaxResults(1); return (MetadataValue) query.uniqueResult(); }</code><technical_language>switch Hibernate in DSpace 6, longer recommend (old) model of separate queries database type (with if statement surrounding them). Syntaxes for database types is Hibernate handle for us. So, if default query work database types, need find a Hibernate query will</technical_language>

Target:
public MetadataValue getMinimum(Context context, int metadataFieldId) throws SQLException { String queryString; if(context.getDbType().equals(DatabaseUtils.DBMS_ORACLE)){ queryString = "SELECT m FROM MetadataValue m JOIN FETCH m.metadataField WHERE m.metadataField.id = :metadata_field_id ORDER BY DBMS_LOB.substr(text_value , 4000 , 1)"; }else{ queryString = "SELECT m FROM MetadataValue m JOIN FETCH m.metadataField WHERE m.metadataField.id = :metadata_field_id ORDER BY text_value"; } Query query = createQuery(context, queryString); query.setParameter("metadata_field_id", metadataFieldId); query.setMaxResults(1); return (MetadataValue) query.uniqueResult(); }
Source:
<code>public PhysicalOperation visitProject(ProjectNode node, LocalExecutionPlanContext context) { PlanNode sourceNode; Optional<Expression> filterExpression = Optional.empty(); Optional<Expression> filterExpressionWithoutTupleDomain = Optional.empty(); if (node.getSource() instanceof FilterNode) { FilterNode filterNode = (FilterNode) node.getSource(); sourceNode = filterNode.getSource(); filterExpression = Optional.of(filterNode.getPredicate()); Expression temp = filterNode.getPredicateWithoutTupleDomain(); <START> if (temp != null && !temp.equals(TRUE_LITERAL)) { <END> filterExpressionWithoutTupleDomain = Optional.of(temp); } } else { sourceNode = node.getSource(); } List<Symbol> outputSymbols = node.getOutputSymbols(); return visitScanFilterAndProject(context, node.getId(), sourceNode, filterExpression, filterExpressionWithoutTupleDomain, node.getAssignments(), outputSymbols); }</code><technical_language>@yingsu00 Ying, explain temp null now</technical_language>

Target:
public PhysicalOperation visitProject(ProjectNode node, LocalExecutionPlanContext context) { PlanNode sourceNode; Optional<Expression> filterExpression = Optional.empty(); Optional<Expression> filterExpressionWithoutTupleDomain = Optional.empty(); if (node.getSource() instanceof FilterNode) { FilterNode filterNode = (FilterNode) node.getSource(); sourceNode = filterNode.getSource(); filterExpression = Optional.of(filterNode.getPredicate()); Expression temp = filterNode.getPredicateWithoutTupleDomain(); if (!TRUE_LITERAL.equals(temp)) { filterExpressionWithoutTupleDomain = Optional.ofNullable(temp); } } else { sourceNode = node.getSource(); } List<Symbol> outputSymbols = node.getOutputSymbols(); return visitScanFilterAndProject(context, node.getId(), sourceNode, filterExpression, filterExpressionWithoutTupleDomain, node.getAssignments(), outputSymbols); }
Source:
<code>public String joinCategory() { <START> logger.debug("joinCategory"); <END> getFileDescriptions(); fetchMetadataEdit(); return super.joinCategory(); }</code><technical_language>Add some context location id here</technical_language>

Target:
public String joinCategory() { logger.debug("JoinCategory in multiple resource action for id {}", this.getResourceId()); getFileDescriptions(); fetchMetadataEdit(); return super.joinCategory(); }
Source:
<code>private void updateLabelList() { AsyncDataProvider.getInstance().getLabelList(new AsyncQuery<>(allLabels -> { boolean isExistingVmBehavior = getBehavior() instanceof ExistingVmModelBehavior; if (isExistingVmBehavior) { Guid vmId = ((ExistingVmModelBehavior) getBehavior()).getVm().getId(); AsyncDataProvider.getInstance().getLabelListByEntityId(new AsyncQuery<>(vmLabelsList -> { labelList.setItems(allLabels); labelList.setSelectedItems(vmLabelsList); }), vmId); } else { labelList.setItems(allLabels); <START> labelList.setSelectedItems(new ArrayList<>()); <END> } })); }</code><technical_language>I Collections.EMPTY_LIST here</technical_language>

Target:
private void updateLabelList() { AsyncDataProvider.getInstance().getLabelList(new AsyncQuery<>(allLabels -> { boolean isExistingVmBehavior = getBehavior() instanceof ExistingVmModelBehavior; if (isExistingVmBehavior) { Guid vmId = ((ExistingVmModelBehavior) getBehavior()).getVm().getId(); AsyncDataProvider.getInstance().getLabelListByEntityId(new AsyncQuery<>(vmLabelsList -> { labelList.setItems(allLabels); labelList.setSelectedItems(vmLabelsList); }), vmId); } else { labelList.setItems(allLabels); labelList.setSelectedItems(Collections.EMPTY_LIST); } })); }
Source:
<code>private void noSubmitWholeTopicAssertions(Map<String, ActionInfo> actions) { ActionInfo info = actions.get("submit"); <START> assertThat(info.enabled).isEqualTo(true); <END> assertThat(info.label).isEqualTo("Submit"); assertThat(info.method).isEqualTo("POST"); assertThat(info.title).isEqualTo("Submit patch set 1 into master"); }</code><technical_language>isTrue()</technical_language>

Target:
private void noSubmitWholeTopicAssertions(Map<String, ActionInfo> actions) { ActionInfo info = actions.get("submit"); assertThat(info.enabled).isTrue(); assertThat(info.label).isEqualTo("Submit"); assertThat(info.method).isEqualTo("POST"); assertThat(info.title).isEqualTo("Submit patch set 1 into master"); }
Source:
<code>public String convertTasksToWorkflow(String tasks) { currentTasks = tasks; PrimeFaces.current().executeScript("PF('confirmWorkflowPopup').show();"); <START> return this.stayOnCurrentPage; <END> }</code><technical_language>return null here, I suggest change function return type void remove return statement entirely</technical_language>

Target:
public void convertTasksToWorkflow(String tasks) { currentTasks = tasks; PrimeFaces.current().executeScript("PF('confirmWorkflowPopup').show();"); }
Source:
<code>private void populateSelectedCategories() { List<View> viewsToRemove = new ArrayList<View>(); for (int i = 0; i < mSectionCategories.getChildCount(); i++) { View v = mSectionCategories.getChildAt(i); if (v == null) return; Object tag = v.getTag(); if (tag != null && tag.getClass() == String.class && (((String) tag).startsWith(CATEGORY_PREFIX_TAG) || tag.equals("select-category"))) { viewsToRemove.add(v); } } for (View viewToRemove : viewsToRemove) { mSectionCategories.removeView(viewToRemove); } viewsToRemove.clear(); LayoutInflater layoutInflater = getActivity().getLayoutInflater(); if (mCategories != null) { <START> AppCompatButton buttonCategory = (AppCompatButton) layoutInflater.inflate(R.layout.category_button, null); <END> for (String categoryName : mCategories) { if (categoryName != null && buttonCategory != null) { buttonCategory.setText(Html.fromHtml(categoryName)); buttonCategory.setTag(CATEGORY_PREFIX_TAG + categoryName); buttonCategory.setOnClickListener(this); mSectionCategories.addView(buttonCategory); } } } Button selectCategory = (Button) layoutInflater.inflate(R.layout.category_select_button, null); if (selectCategory != null) { selectCategory.setOnClickListener(this); mSectionCategories.addView(selectCategory); } }</code><technical_language>This needs moved for loop app crashes more categories</technical_language>

Target:
private void populateSelectedCategories() { List<View> viewsToRemove = new ArrayList<View>(); for (int i = 0; i < mSectionCategories.getChildCount(); i++) { View v = mSectionCategories.getChildAt(i); if (v == null) return; Object tag = v.getTag(); if (tag != null && tag.getClass() == String.class && (((String) tag).startsWith(CATEGORY_PREFIX_TAG) || tag.equals("select-category"))) { viewsToRemove.add(v); } } for (View viewToRemove : viewsToRemove) { mSectionCategories.removeView(viewToRemove); } viewsToRemove.clear(); LayoutInflater layoutInflater = getActivity().getLayoutInflater(); if (mCategories != null) { for (String categoryName : mCategories) { AppCompatButton buttonCategory = (AppCompatButton) layoutInflater.inflate(R.layout.category_button, null); if (categoryName != null && buttonCategory != null) { buttonCategory.setText(Html.fromHtml(categoryName)); buttonCategory.setTag(CATEGORY_PREFIX_TAG + categoryName); buttonCategory.setOnClickListener(this); mSectionCategories.addView(buttonCategory); } } } Button selectCategory = (Button) layoutInflater.inflate(R.layout.category_select_button, null); if (selectCategory != null) { selectCategory.setOnClickListener(this); mSectionCategories.addView(selectCategory); } }
Source:
<code>public void modelExec(Runnable runnable, boolean block) { <START> service.modelExec(runnable, block); <END> }</code><technical_language>servie is longer set contruction time. for this undefined? If so, service variable checked</technical_language>

Target:
public void modelExec(Runnable runnable, boolean block) { if (service != null) { service.modelExec(runnable, block); } else { throw new RuntimeException("Internal Error: Connector must supply a service for execution."); } }
Source:
<code>public void testPassword() { String upper = "ABC"; String numbers = "123"; String symbols = "!£$"; <START> String id1 = Identifiers.makeRandomPassword(4, upper, numbers, symbols, Identifiers.PASSWORD_VALID_CHARS); <END> Assert.assertTrue(upper.contains(id1.substring(0,1))); Assert.assertTrue(numbers.contains(id1.substring(1,2))); Assert.assertTrue(symbols.contains(id1.substring(2,3))); }</code><technical_language>inspecting code in a position easily reconstruct passwords. makeRandomPassword method simply randomly reorder result, test check for containment position</technical_language>

Target:
public void testPassword() { String upper = "ABC"; String numbers = "123"; String symbols = "!£$"; String password = Identifiers.makeRandomPassword(4, upper, numbers, symbols, Identifiers.PASSWORD_VALID_CHARS); Assert.assertTrue(password.matches(".*[" + upper + "].*")); Assert.assertTrue(password.matches(".*[" + numbers + "].*")); Assert.assertTrue(password.matches(".*[" + symbols + "].*")); }
Source:
<code>private void compact( ByteBuffer writeBuffer ) throws IOException { if ( prePosition == stackPosition ) { return; } long writePosition = stackPosition; long readPosition = prePosition; int nBytes; do { writeBuffer.clear(); channel.position( readPosition ); nBytes = channel.read( writeBuffer ); if ( nBytes > 0 ) { readPosition += nBytes; writeBuffer.flip(); channel.position( writePosition ); channel.writeAll( writeBuffer ); writePosition += nBytes; } } while ( nBytes > 0 ); channel.truncate( writePosition ); <START> } <END></code><technical_language>works for cases write position is higher read position</technical_language>

Target:
private void compact( ByteBuffer writeBuffer ) throws IOException { assert stackPosition <= initialPosition; if ( initialPosition == stackPosition ) { return; } long writePosition = stackPosition; long readPosition = initialPosition; int nBytes; do { writeBuffer.clear(); channel.position( readPosition ); nBytes = channel.read( writeBuffer ); if ( nBytes > 0 ) { readPosition += nBytes; writeBuffer.flip(); channel.position( writePosition ); channel.writeAll( writeBuffer ); writePosition += nBytes; } } while ( nBytes > 0 ); channel.truncate( writePosition ); }
Source:
<code>public List<ActionItemNoteDetailDto> getActionNotesToBeRequeued() { return getJdbcTemplate().execute((ConnectionCallback<List<ActionItemNoteDetailDto>>) con -> { PreparedStatement selectStatement = null; ResultSet queryResultSet = null; List<ActionItemNoteDetailDto> notes = new ArrayList<ActionItemNoteDetailDto>(); try { final Collection<String> docTypeIds = findNonRequeueableDocumentTypes(); final Collection<String> roleIds = findRequeueableRoleIds(); String selectStatementSql = buildActionNoteQuery(docTypeIds.size(), roleIds.size()); selectStatement = con.prepareStatement(selectStatementSql); addDocumentIdAndRoleIdsToSelectStatement(selectStatement, docTypeIds, roleIds); queryResultSet = selectStatement.executeQuery(); while (queryResultSet.next()) { String principleId = queryResultSet.getString(1); String docHeaderId = queryResultSet.getString(2); String actionNote = queryResultSet.getString(3); Timestamp noteTimeStamp = queryResultSet.getTimestamp(4, Calendar.getInstance()); <START> String origianlActionItemId = queryResultSet.getString(5); <END> notes.add(new ActionItemNoteDetailDto(principleId, docHeaderId, actionNote, origianlActionItemId, noteTimeStamp)); } queryResultSet.close(); } finally { processQueryFinally(selectStatement, queryResultSet); } return notes; }); }</code><technical_language>Minor typo in variable name; changed "origianlActionItemId" "originalActionItemId"</technical_language>

Target:
public List<ActionItemNoteDetailDto> getActionNotesToBeRequeued() { return getJdbcTemplate().execute((ConnectionCallback<List<ActionItemNoteDetailDto>>) con -> { PreparedStatement selectStatement = null; ResultSet queryResultSet = null; List<ActionItemNoteDetailDto> notes = new ArrayList<ActionItemNoteDetailDto>(); try { final Collection<String> docTypeIds = findNonRequeueableDocumentTypes(); final Collection<String> roleIds = findRequeueableRoleIds(); String selectStatementSql = buildActionNoteQuery(docTypeIds.size(), roleIds.size()); selectStatement = con.prepareStatement(selectStatementSql); addDocumentIdAndRoleIdsToSelectStatement(selectStatement, docTypeIds, roleIds); queryResultSet = selectStatement.executeQuery(); while (queryResultSet.next()) { String principalId = queryResultSet.getString(1); String docHeaderId = queryResultSet.getString(2); String actionNote = queryResultSet.getString(3); Timestamp noteTimeStamp = queryResultSet.getTimestamp(4, Calendar.getInstance()); String originalActionItemId = queryResultSet.getString(5); notes.add(new ActionItemNoteDetailDto(principalId, docHeaderId, actionNote, originalActionItemId, noteTimeStamp)); } queryResultSet.close(); } finally { processQueryFinally(selectStatement, queryResultSet); } return notes; }); }
Source:
<code>public IBuildPlan parseJob(HudsonModelJob job) throws HudsonException { IBuildPlan plan = createBuildPlan(); String jobUrl = job.getUrl(); if (jobUrl != null && this.hudsonUrlUtil.isNestedJob(jobUrl)) { plan.setId(jobUrl); plan.setName(this.hudsonUrlUtil.getDisplayName(jobUrl)); } else { plan.setId(job.getName()); <START> plan.setName(job.getName()); <END> } plan.setDescription(job.getDescription()); plan.setUrl(job.getUrl()); updateStateAndStatus(job, plan); updateHealth(job, plan); if (job.getLastBuild() != null) { IBuild build = createBuild(); build.setId(job.getLastBuild().getNumber() + ""); build.setLabel(job.getLastBuild().getNumber() + ""); build.setBuildNumber(job.getLastBuild().getNumber()); build.setUrl(job.getLastBuild().getUrl()); plan.setLastBuild(build); } parseJobActions(plan.getParameterDefinitions(), job.getAction()); return plan; }</code><technical_language>this output of util method. client server behaviour consistent in case change behaviour of util later</technical_language>

Target:
public IBuildPlan parseJob(HudsonModelJob job) throws HudsonException { IBuildPlan plan = createBuildPlan(); String jobUrl = job.getUrl(); if (this.hudsonUrlUtil.isNestedJob(jobUrl)) { plan.setId(jobUrl); } else { plan.setId(job.getName()); } plan.setName(this.hudsonUrlUtil.getDisplayName(jobUrl)); plan.setDescription(job.getDescription()); plan.setUrl(job.getUrl()); updateStateAndStatus(job, plan); updateHealth(job, plan); if (job.getLastBuild() != null) { IBuild build = createBuild(); build.setId(job.getLastBuild().getNumber() + ""); build.setLabel(job.getLastBuild().getNumber() + ""); build.setBuildNumber(job.getLastBuild().getNumber()); build.setUrl(job.getLastBuild().getUrl()); plan.setLastBuild(build); } parseJobActions(plan.getParameterDefinitions(), job.getAction()); return plan; }
Source:
<code>private void updateQosChangeability() { <START> getQosModel().setIsChangable(getQosOverridden().getEntity() && (!getIsToSync().getIsChangable() || getIsToSync().getEntity())); <END> }</code><technical_language>I check getQosOverridden().getIsChangeable() instead of (!getIsToSync().getIsChangable() || getIsToSync().getEntity()) wish..</technical_language>

Target:
private void updateQosChangeability() { getQosModel().setIsChangable(getQosOverridden().getEntity() && getQosOverridden().getIsChangable()); }
Source:
<code>public void check() { Preconditions.checkState(slowLockLogTriggerMillis() >= 0, "Slow lock log trigger threshold must be nonnegative, but found %s", slowLockLogTriggerMillis()); <START> Preconditions.checkState( <END> !internalAuthSecret().isPresent() || internalAuthSecret().get().length() >= MIN_SECRET_LENGTH, "Internal auth secret must have at least %s characters.", MIN_SECRET_LENGTH); }</code><technical_language>add this check TimelockServiceAuthClient.token()</technical_language>

Target:
public void check() { Preconditions.checkState(slowLockLogTriggerMillis() >= 0, "Slow lock log trigger threshold must be nonnegative, but found %s", slowLockLogTriggerMillis()); }
Source:
<code>public void testFourLetterWordsAllDisabledByDefault() throws Exception { stopServer(); FourLetterCommands.resetWhiteList(); System.setProperty("zookeeper.4lw.commands.whitelist", "stat"); startServer(); verifyAllCommandsFail(); TestableZooKeeper zk = createClient(); <START> String sid = getHexSessionId(zk.getSessionId()); <END> verifyAllCommandsFail(); zk.getData("/", true, null); verifyAllCommandsFail(); zk.close(); verifyFuzzyMatch("stat", "Outstanding"); verifyAllCommandsFail(); }</code><technical_language>sid is</technical_language>

Target:
public void testFourLetterWordsAllDisabledByDefault() throws Exception { stopServer(); FourLetterCommands.resetWhiteList(); System.setProperty("zookeeper.4lw.commands.whitelist", "stat"); startServer(); verifyAllCommandsFail(); TestableZooKeeper zk = createClient(); verifyAllCommandsFail(); zk.getData("/", true, null); verifyAllCommandsFail(); zk.close(); verifyFuzzyMatch("stat", "Outstanding"); verifyAllCommandsFail(); }
Source:
<code>public MemoryManager(float ratio, long minAllocation) { checkRatio(ratio); memoryPoolRatio = ratio; minMemoryAllocation = minAllocation; totalMemoryPool = Math.round(ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax () * ratio); <START> LOG.info(String.format("Allocated total memory pool is: %,d", totalMemoryPool)); <END> }</code><technical_language>want this show in case memory manager do special (scale == 1). add noise for user writer</technical_language>

Target:
public MemoryManager(float ratio, long minAllocation) { checkRatio(ratio); memoryPoolRatio = ratio; minMemoryAllocation = minAllocation; totalMemoryPool = Math.round(ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax () * ratio); LOG.debug(String.format("Allocated total memory pool is: %,d", totalMemoryPool)); }
Source:
<code>private static Set<String> getNoAutoImportFunctionSignaturesFromTuple(@Nullable ErlangTupleExpression tupleExpression) { Set<String> result = ContainerUtil.newHashSet(); if (tupleExpression == null || tupleExpression.getExpressionList().size() != 2) return result; ErlangExpression first = tupleExpression.getExpressionList().get(0); ErlangExpression second = tupleExpression.getExpressionList().get(1); if (!(first instanceof ErlangMaxExpression) || !"no_auto_import".equals(StringUtil.unquoteString(first.getText())) || !(second instanceof ErlangListExpression)) return result; for (ErlangExpression fun : ((ErlangListExpression)second).getExpressionList()) { List<String> name = ContainerUtil.newArrayList(); <START> for (PsiElement e : PsiTreeUtil.getChildrenOfTypeAsList(fun, PsiElement.class)) { <END> if (!(e instanceof PsiWhiteSpace) && !(e instanceof PsiComment)) { name.add(StringUtil.unquoteString(e.getText())); } } result.add(StringUtil.join(name, "")); } return result; }</code><technical_language>fun.getChildren</technical_language>

Target:
private static Set<String> getNoAutoImportFunctionSignaturesFromTuple(@Nullable ErlangTupleExpression tupleExpression) { final Set<String> result = ContainerUtil.newHashSet(); if (tupleExpression == null || tupleExpression.getExpressionList().size() != 2) return result; ErlangExpression first = ContainerUtil.getFirstItem(tupleExpression.getExpressionList()); ErlangExpression second = ContainerUtil.getLastItem(tupleExpression.getExpressionList()); if (!(first instanceof ErlangMaxExpression) || !(second instanceof ErlangListExpression) || !"no_auto_import".equals(ErlangPsiImplUtil.getAtomName((ErlangMaxExpression) first))) return result; second.accept(new PsiRecursiveElementWalkingVisitor() { @Override public void visitElement(PsiElement element) { if (element instanceof ErlangAtomWithArityExpression) { result.add(ErlangPsiImplUtil.createFunctionPresentation((ErlangAtomWithArityExpression) element)); } else { super.visitElement(element); } } }); return result; }
Source:
<code><START> public void queueWithSecondaryIndexCheck() { <END> CorfuQueue<String> corfuQueue = new CorfuQueue<>(getDefaultRuntime(), "test", Serializers.JAVA, CorfuTable.IndexRegistry.empty()); CorfuRecordId idC = corfuQueue.enqueue("c"); CorfuRecordId idB = corfuQueue.enqueue("b"); CorfuRecordId idA = corfuQueue.enqueue("a"); List<CorfuQueueRecord<String>> records = corfuQueue.entryList(); assertThat(records.size()).isEqualTo(3); }</code><technical_language>write more tests cover more border cases if exist</technical_language>

Target:
public void queueWithSecondaryIndexCheck() { CorfuQueue<String> corfuQueue = new CorfuQueue<>(getDefaultRuntime(), "test", Serializers.JAVA, CorfuTable.IndexRegistry.empty()); CorfuRecordId idC = corfuQueue.enqueue("c"); CorfuRecordId idB = corfuQueue.enqueue("b"); CorfuRecordId idA = corfuQueue.enqueue("a"); final int expected = 3; List<CorfuQueueRecord<String>> records = corfuQueue.entryList(); assertThat(records.size()).isEqualTo(expected); }
Source:
<code>public TitleMatchingContainerScorer(double exactTitleMatchScore) { <START> this.scorer = new ContentTitleScorer<>( <END> NAME, Functions.<String>identity(), Score.valueOf(exactTitleMatchScore), Score.ONE ); }</code><technical_language>suggestion this(Score.valueOf(exactTitleMatchScore), Score.ONE);</technical_language>

Target:
public TitleMatchingContainerScorer(double exactTitleMatchScore) { this(Score.valueOf(exactTitleMatchScore), Score.ONE); }
Source:
<code>public static String fromIssueStatus(Issue.Status status) { switch (status) { case CLOSED: <START> return "6"; <END> case NEW: return "1"; default: return "1"; } }</code><technical_language>a map (this is extended I guess)</technical_language>

Target:
public static String fromIssueStatus(Issue.Status status) { if (statusMap == null) { initMap(); } return statusMap.get(status); }
Source:
<code>public void runInternal() throws HiveSQLException { setState(OperationState.PENDING); boolean runAsync = shouldRunAsync(); final boolean asyncPrepare = runAsync && HiveConf.getBoolVar(queryState.getConf(), HiveConf.ConfVars.HIVE_SERVER2_ASYNC_EXEC_ASYNC_COMPILE); if (!asyncPrepare) { prepare(queryState); <START> getParentSession().updateQueryId(this, queryState.getQueryId()); <END> } if (!runAsync) { runQuery(); } else { Runnable work = new BackgroundWork(getCurrentUGI(), parentSession.getSessionHive(), SessionState.get(), asyncPrepare); try { Future<?> backgroundHandle = getParentSession().submitBackgroundOperation(work); setBackgroundHandle(backgroundHandle); } catch (RejectedExecutionException rejected) { setState(OperationState.ERROR); throw new HiveSQLException("The background threadpool cannot accept" + " new task for execution, please retry the operation", rejected); } } }</code><technical_language>Need update query Id incase of async prepare case in BackgroundWork.run method</technical_language>

Target:
public void runInternal() throws HiveSQLException { setState(OperationState.PENDING); boolean runAsync = shouldRunAsync(); final boolean asyncPrepare = runAsync && HiveConf.getBoolVar(queryState.getConf(), HiveConf.ConfVars.HIVE_SERVER2_ASYNC_EXEC_ASYNC_COMPILE); if (!asyncPrepare) { prepare(queryState); } if (!runAsync) { runQuery(); } else { Runnable work = new BackgroundWork(getCurrentUGI(), parentSession.getSessionHive(), SessionState.get(), asyncPrepare); try { Future<?> backgroundHandle = getParentSession().submitBackgroundOperation(work); setBackgroundHandle(backgroundHandle); } catch (RejectedExecutionException rejected) { setState(OperationState.ERROR); throw new HiveSQLException("The background threadpool cannot accept" + " new task for execution, please retry the operation", rejected); } } }
Source:
<code>public void setListProperty(final String key, final List<String> values) { if (values == null) { setProperty(key, null); } else if (values.isEmpty()) { setProperty(key, ""); } else { final StringBuilder builder = new StringBuilder(); <START> for (String value : values) { <END> builder.append(value + ", "); } builder.setLength(builder.length() - 2); setProperty(key, builder.toString()); } }</code><technical_language>Add final keyword</technical_language>

Target:
public void setListProperty(final String key, final List<String> values) { if (values == null) { setProperty(key, null); } else if (values.isEmpty()) { setProperty(key, ""); } else { final StringBuilder builder = new StringBuilder(); for (final String value : values) { builder.append(value + ", "); } builder.setLength(builder.length() - 2); setProperty(key, builder.toString()); } }