auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public FasteningElement parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { FasteningElement.Builder builder = FasteningElement.builder(); builder.setOriginId(parser.getAttributeValue("", FasteningElement.ATTR_ID)); if (ParserUtils.getBooleanAttribute(parser, FasteningElement.ATTR_CLEAR, false)) { builder.setClear(); } if (ParserUtils.getBooleanAttribute(parser, FasteningElement.ATTR_SHELL, false)) { builder.setShell(); } outerloop: while (true) { XmlPullParser.Event tag = parser.next(); switch (tag) { case START_ELEMENT: String name = parser.getName(); String namespace = parser.getNamespace(); if (MessageFasteningManager.NAMESPACE.equals(namespace) && ExternalElement.ELEMENT.equals(name)) { ExternalElement external = new ExternalElement( parser.getAttributeValue("", ExternalElement.ATTR_NAME), parser.getAttributeValue("", ExternalElement.ATTR_ELEMENT_NAMESPACE)); builder.addExternalPayload(external); continue; } ExtensionElement wrappedPayload = PacketParserUtils.parseExtensionElement(name, namespace, parser, xmlEnvironment); builder.addWrappedPayload(wrappedPayload); break; case END_ELEMENT: name = parser.getName(); namespace = parser.getNamespace(); <START> if (FasteningElement.ELEMENT.equals(name) && MessageFasteningManager.NAMESPACE.equals(namespace)) { <END> break outerloop; } break; default: break; } } return builder.build(); }</code><technical_language>Strictly speaking, is robust, break outerloop if is a fastening element a fastening element. I know, this is unlikely, correct idiom is break if depth equals initial depth, is argument parse method. In order avoid other patters in places potentially matters me, simply this pattern everywhere</technical_language>

Target:
public FasteningElement parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { FasteningElement.Builder builder = FasteningElement.builder(); builder.setOriginId(parser.getAttributeValue("", FasteningElement.ATTR_ID)); if (ParserUtils.getBooleanAttribute(parser, FasteningElement.ATTR_CLEAR, false)) { builder.setClear(); } if (ParserUtils.getBooleanAttribute(parser, FasteningElement.ATTR_SHELL, false)) { builder.setShell(); } outerloop: while (true) { XmlPullParser.Event tag = parser.next(); switch (tag) { case START_ELEMENT: String name = parser.getName(); String namespace = parser.getNamespace(); if (MessageFasteningManager.NAMESPACE.equals(namespace) && ExternalElement.ELEMENT.equals(name)) { ExternalElement external = new ExternalElement( parser.getAttributeValue("", ExternalElement.ATTR_NAME), parser.getAttributeValue("", ExternalElement.ATTR_ELEMENT_NAMESPACE)); builder.addExternalPayload(external); continue; } ExtensionElement wrappedPayload = PacketParserUtils.parseExtensionElement(name, namespace, parser, xmlEnvironment); builder.addWrappedPayload(wrappedPayload); break; case END_ELEMENT: if (parser.getDepth() == initialDepth) { break outerloop; } break; default: break; } } return builder.build(); }
Source:
<code>protected void migrateData(ReviewDb db, UpdateUI ui) throws OrmException, SQLException { final Statement stmt = ((JdbcSchema) db).getConnection().createStatement(); try { <START> final ResultSet rs = stmt.executeQuery( <END> "SELECT account_id, display_patch_sets_in_reverse_order, " + " display_person_name_in_review_category " + "FROM accounts"); try { final List<Account> accountsToUpdate = new LinkedList<Account>(); while (rs.next()) { final boolean reversePatchSetOrder = rs.getBoolean(2); final boolean showUsernameInReviewCategory = rs.getBoolean(3); if (reversePatchSetOrder || showUsernameInReviewCategory) { final Account.Id id = new Account.Id(rs.getInt(1)); final Account account = db.accounts().get(id); final AccountGeneralPreferences prefs = account.getGeneralPreferences(); prefs.setReversePatchSetOrder(reversePatchSetOrder); prefs.setShowUsernameInReviewCategory(showUsernameInReviewCategory); accountsToUpdate.add(account); } } if (!accountsToUpdate.isEmpty()) { db.accounts().update(accountsToUpdate); } } finally { rs.close(); } } finally { stmt.close(); } }</code><technical_language>Ironically, this is painful for open source servers. Basically other me. I rename a field pretty a whim, provided column ID stays same. here. :-)</technical_language>

Target:
protected void migrateData(ReviewDb db, UpdateUI ui) throws OrmException, SQLException { final Statement stmt = ((JdbcSchema) db).getConnection().createStatement(); try { stmt.executeUpdate("UPDATE accounts SET reverse_patch_set_order = 'Y' "+ "WHERE display_patch_sets_in_reverse_order = 'Y'"); stmt.executeUpdate("UPDATE accounts SET show_username_in_review_category = 'Y' " + "WHERE display_person_name_in_review_category = 'Y'"); } finally { stmt.close(); } }
Source:
<code>private void updateTissueMaterialDaoDependencies() { if (sampleService != null) sampleService.setTissueMaterialDao(tissueMaterialDao); <START> updateSamplePurposeDaoDependencies(); <END> }</code><technical_language>Wrong place. This done in setSamplePurposeDao method, originally</technical_language>

Target:
private void updateTissueMaterialDaoDependencies() { if (sampleService != null) sampleService.setTissueMaterialDao(tissueMaterialDao); }
Source:
<code>public Long getLastModified() { <START> String updateTs = DefaultGroovyMethods.asType(super.get("updateTs"), String.class); <END> return Strings.isNullOrEmpty(updateTs) ? null : Long.valueOf(updateTs); }</code><technical_language>this untypedUtils (or DefaultGroovyMethods anyways)</technical_language>

Target:
public Long getLastModified() { String updateTs = (String) super.get("updateTs"); return Strings.isNullOrEmpty(updateTs) ? null : Long.valueOf(updateTs); }
Source:
<code>public String generateNewMachineUniqueName() { Object context = setup.peek(CloudLocationConfig.CALLER_CONTEXT); Entity entity = null; if (context instanceof Entity) entity = (Entity) context; String template = this.setup.get(MACHINE_NAME_TEMPLATE); if (!template.startsWith("#ftl\n")) <START> template = "#ftl\n" + template; <END> String processed; if (entity == null) processed = TemplateProcessor.processTemplateContents(template, this.setup.get(EXTRA_SUBSTITUTIONS)); else processed = TemplateProcessor.processTemplateContents(template, (EntityInternal)entity, this.setup.get(EXTRA_SUBSTITUTIONS)); return sanitize(Strings.getFragmentBetween(processed, "#ftl\n", null)).toLowerCase(); }</code><technical_language>So, I miss this bit out</technical_language>

Target:
public String generateNewMachineUniqueName() { Object context = setup.peek(CloudLocationConfig.CALLER_CONTEXT); Entity entity = null; if (context instanceof Entity) { entity = (Entity) context; } String template = this.setup.get(MACHINE_NAME_TEMPLATE); String processed; if (entity == null) { processed = TemplateProcessor.processTemplateContents(template, this.setup.get(EXTRA_SUBSTITUTIONS)); } else { processed = TemplateProcessor.processTemplateContents(template, (EntityInternal)entity, this.setup.get(EXTRA_SUBSTITUTIONS)); } processed = Strings.removeFromStart(processed, "#ftl\n"); return sanitize(processed); }
Source:
<code>protected static void addLocatorSuffix(Map<String, List<String>> locatorSuffixesMap, String key, String... values) { <START> List<String> list = new ArrayList<>(Arrays.asList(values)); <END> locatorSuffixesMap.put(key, list); }</code><technical_language>Collections.addAll()</technical_language>

Target:
protected static void addLocatorSuffix(Map<String, List<String>> locatorSuffixesMap, String key, String... values) { List<String> list = new ArrayList<>(); Collections.addAll(list, values); locatorSuffixesMap.put(key, list); }
Source:
<code><START> private DiskImage createMetadaaDisk(Snapshot snapshot) { <END> List<Guid> guids = GuidUtils.getGuidListFromString(snapshot.getMemoryVolume()); DiskImage memoryDisk = MemoryUtils.createMetadataDisk(); memoryDisk.setId(guids.get(4)); memoryDisk.setImageId(guids.get(5)); memoryDisk.setStorageIds(new ArrayList<>(Collections.singletonList(guids.get(0)))); memoryDisk.setStoragePoolId(guids.get(1)); memoryDisk.setCreationDate(snapshot.getCreationDate()); return memoryDisk; }</code><technical_language>treatment here, operation saves 2 disks in SD</technical_language>

Target:
private DiskImage createMetadaaDisk(Snapshot snapshot) { List<Guid> guids = GuidUtils.getGuidListFromString(snapshot.getMemoryVolume()); StorageDomainStatic sd = isStorageDomainExists(snapshot, guids, guids.get(4), guids.get(5)); if (sd == null) return null; DiskImage memoryDisk = MemoryUtils.createMetadataDisk(); memoryDisk.setId(guids.get(4)); memoryDisk.setImageId(guids.get(5)); memoryDisk.setStorageIds(new ArrayList<>(Collections.singletonList(guids.get(0)))); memoryDisk.setStoragePoolId(guids.get(1)); memoryDisk.setCreationDate(snapshot.getCreationDate()); return memoryDisk; }
Source:
<code>private Map<String, String> createAdditionalEnvironmentMap( final File jobDirectory, final JobSpecification jobSpec ) { <START> final Map<String, String> envMap = Maps.newHashMap(); <END> envMap.put( JobConstants.GENIE_JOB_DIR_ENV_VAR, jobDirectory.toString() ); envMap.put( JobConstants.GENIE_APPLICATION_DIR_ENV_VAR, PathUtils.jobApplicationsDirectoryPath(jobDirectory).toString() ); envMap.put( JobConstants.GENIE_COMMAND_DIR_ENV_VAR, PathUtils.jobCommandDirectoryPath(jobDirectory, jobSpec.getCommand().getId()).toString() ); envMap.put( JobConstants.GENIE_CLUSTER_DIR_ENV_VAR, PathUtils.jobClusterDirectoryPath(jobDirectory, jobSpec.getCluster().getId()).toString() ); return Collections.unmodifiableMap(envMap); }</code><technical_language>ImmutableMaps.Builder<String, String> envMap = ImmutableMaps.builder() nicer wrapping map in collections unmodifiable interface</technical_language>

Target:
private Map<String, String> createAdditionalEnvironmentMap( final File jobDirectory, final JobSpecification jobSpec ) { final ImmutableMap.Builder<String, String> mapBuilder = new ImmutableMap.Builder<>(); mapBuilder.put( JobConstants.GENIE_JOB_DIR_ENV_VAR, jobDirectory.toString() ); mapBuilder.put( JobConstants.GENIE_APPLICATION_DIR_ENV_VAR, PathUtils.jobApplicationsDirectoryPath(jobDirectory).toString() ); mapBuilder.put( JobConstants.GENIE_COMMAND_DIR_ENV_VAR, PathUtils.jobCommandDirectoryPath(jobDirectory, jobSpec.getCommand().getId()).toString() ); mapBuilder.put( JobConstants.GENIE_CLUSTER_DIR_ENV_VAR, PathUtils.jobClusterDirectoryPath(jobDirectory, jobSpec.getCluster().getId()).toString() ); return mapBuilder.build(); }
Source:
<code>public static void main(final String[] args) { FormTrainingClient client = new FormTrainingClientBuilder() .credential(new AzureKeyCredential("{key}")) .endpoint("https://{endpoint}.cognitiveservices.azure.com/") .buildClient(); String targetResourceId = "target-resource-Id"; String targetResourceRegion = "target-resource-region"; <START> final String copyModelId = "copy-model-Id"; <END> final CopyAuthorization modelCopyAuthorization = client.getCopyAuthorization(targetResourceId, targetResourceRegion); SyncPoller<OperationResult, CustomFormModelInfo> copyPoller = client.beginCopyModel(copyModelId, modelCopyAuthorization); CustomFormModelInfo modelCopy = copyPoller.getFinalResult(); System.out.printf("Copied model has model Id: %s, model status: %s, was created on: %s," + " last updated on: %s.%n", modelCopy.getModelId(), modelCopy.getStatus(), modelCopy.getCreatedOn(), modelCopy.getLastUpdatedOn()); }</code><technical_language>is this final rest</technical_language>

Target:
public static void main(final String[] args) { FormTrainingClient sourceClient = new FormTrainingClientBuilder() .credential(new AzureKeyCredential("{key}")) .endpoint("https://{endpoint}.cognitiveservices.azure.com/") .buildClient(); FormTrainingClient targetClient = new FormTrainingClientBuilder() .credential(new AzureKeyCredential("{key}")) .endpoint("https://{endpoint}.cognitiveservices.azure.com/") .buildClient(); String targetResourceId = "target-resource-Id"; String targetResourceRegion = "target-resource-region"; CopyAuthorization modelCopyAuthorization = targetClient.getCopyAuthorization(targetResourceId, targetResourceRegion); String copyModelId = "copy-model-Id"; SyncPoller<OperationResult, CustomFormModelInfo> copyPoller = sourceClient.beginCopyModel(copyModelId, modelCopyAuthorization); copyPoller.waitForCompletion(); CustomFormModel copiedModel = targetClient.getCustomModel(modelCopyAuthorization.getModelId()); System.out.printf("Copied model has model Id: %s, model status: %s, was created on: %s," + " transfer completed on: %s.%n", copiedModel.getModelId(), copiedModel.getModelStatus(), copiedModel.getRequestedOn(), copiedModel.getCompletedOn()); }
Source:
<code>public CompletableFuture<SecurityToken> getToken(final String resource, final Duration timeout) { <START> final MSICredentials credentials = new MSICredentials(); <END> return CompletableFuture.supplyAsync(() -> { try { String rawToken = credentials.getToken(resource); return new JsonSecurityToken(rawToken, resource); } catch (IOException | ParseException e) { throw new CompletionException(e); } }); }</code><technical_language>credentials [](start = 26, length = 11) static</technical_language>

Target:
public CompletableFuture<SecurityToken> getToken(final String resource, final Duration timeout) { return CompletableFuture.supplyAsync(() -> { try { String rawToken = ManagedIdentityTokenProvider.credentials.getToken(ClientConstants.EVENTHUBS_AUDIENCE); return new JsonSecurityToken(rawToken, resource); } catch (IOException | ParseException e) { throw new CompletionException(e); } }); }
Source:
<code>public static String getValueAsString(TelemetryBis.Telemetry msg, String name) { for (TelemetryBis.TelemetryField field : msg.getDataGpbkvList()) { TelemetryBis.TelemetryField subField = findFieldWithName(field, name); if (subField != null) { return subField.getStringValue(); } } <START> return ""; <END> }</code><technical_language>return null instead of empty string here</technical_language>

Target:
public static String getValueAsString(TelemetryBis.Telemetry msg, String name) { if (Objects.isNull(msg) || Objects.isNull(name)) { return null; } for (TelemetryBis.TelemetryField field : msg.getDataGpbkvList()) { TelemetryBis.TelemetryField subField = findFieldWithName(field, name); if (subField != null) { return getStringValue(subField); } } return null; }
Source:
<code>public boolean isEligibleJob(final String timestamp, final String name) { final Date searchedTimestamp; if (timestamp == null || Long.valueOf(timestamp) < 0) { return true; } else { searchedTimestamp = new Date(Long.valueOf(timestamp)); } final String timestampString = name.substring(name.lastIndexOf("-") + 1, name.indexOf(".")); final Date jobDate = new Date(Long.valueOf(timestampString)); <START> if (jobDate.after(searchedTimestamp)) { <END> return true; } return false; }</code><technical_language>important all, return jobDate.after(searchedTimestamp) directly</technical_language>

Target:
public boolean isEligibleJob(final String timestamp, final String name) { final Date searchedTimestamp; if (timestamp == null || Long.valueOf(timestamp) < 0) { return true; } else { searchedTimestamp = new Date(Long.valueOf(timestamp)); } final String timestampString = name.substring(name.lastIndexOf("-") + 1, name.indexOf(".")); final Date jobDate = new Date(Long.valueOf(timestampString)); return jobDate.after(searchedTimestamp); }
Source:
<code>public static void replaceIcons(Class iconsClass, String iconsRootPath) { for (Field field : iconsClass.getDeclaredFields()) { if (Modifier.isStatic(field.getModifiers())) { try { Object value = field.get(null); Class byClass = value.getClass(); if (byClass.getName().endsWith("$ByClass")) { setFieldValue(value, "myCallerClass", IconReplacer.class); setFieldValue(value, "myWasComputed", Boolean.FALSE); setFieldValue(value, "myIcon", null); } else if (byClass.getName().endsWith("$CachedImageIcon")) { String p = patchUrlIfNeeded(value, iconsRootPath); Icon newIcon = IconLoader.getIcon(p); <START> setFinalStatic(field, newIcon); <END> } } catch (IllegalAccessException e) { } catch (Exception e) { e.printStackTrace(); } } } for (Class subClass : iconsClass.getDeclaredClasses()) { replaceIcons(subClass, iconsRootPath); } }</code><technical_language>A bit nit-picky, fix indentation give variable p a proper name</technical_language>

Target:
public static void replaceIcons(Class iconsClass, String iconsRootPath) { for (Field field : iconsClass.getDeclaredFields()) { if (Modifier.isStatic(field.getModifiers())) { try { Object value = field.get(null); Class byClass = value.getClass(); if (byClass.getName().endsWith("$ByClass")) { setFieldValue(value, "myCallerClass", IconReplacer.class); setFieldValue(value, "myWasComputed", Boolean.FALSE); setFieldValue(value, "myIcon", null); } else if (byClass.getName().endsWith("$CachedImageIcon")) { String newPath = patchUrlIfNeeded(value, iconsRootPath); if (newPath != null) { Icon newIcon = IconLoader.getIcon(newPath); setFinalStatic(field, newIcon); } } } catch (IllegalAccessException e) { } catch (Exception e) { } } } for (Class subClass : iconsClass.getDeclaredClasses()) { replaceIcons(subClass, iconsRootPath); } }
Source:
<code>private void refreshSpinner(String selectedPulse) { <START> mSpinner.setAdapter(mSpinnerAdapter); <END> Collections.sort(mPulseTargets); mPulseTargets.add(0, PulseFragment.GLOBAL); if (selectedPulse == null) { selectedPulse = mPulseTargets.get(0); } mSpinnerAdapter.clear(); mSpinnerAdapter.addAll(mPulseTargets); mSpinner.setSelection(mPulseTargets.indexOf(selectedPulse)); mViewPagerAdapter = new PulsePagerAdapter(this, getSupportFragmentManager()); mViewPagerAdapter.setSelectedPulseTarget(selectedPulse); mViewPager.setAdapter(mViewPagerAdapter); mTabLayout.setupWithViewPager(mViewPager); }</code><technical_language>This line needed reset time? out of scope for this method</technical_language>

Target:
private void refreshSpinner(String selectedPulse) { if (selectedPulse == null) { selectedPulse = mPulseTargets.get(0); } mSpinner.setSelection(mPulseTargets.indexOf(selectedPulse)); mViewPagerAdapter = new PulsePagerAdapter(this, getSupportFragmentManager()); mViewPagerAdapter.setSelectedPulseTarget(selectedPulse); mViewPager.setAdapter(mViewPagerAdapter); mTabLayout.setupWithViewPager(mViewPager); }
Source:
<code>public Cohort() { <START> members = new TreeSet<CohortMember>((o1, o2) -> o1.getPatientId().getId() - o2.getPatientId().getId()); <END> }</code><technical_language>do this, instead CohortMember implement Comparable</technical_language>

Target:
public Cohort() { members = new TreeSet<CohortMembership>(); }
Source:
<code>private SamplingDistribution(Operator child, SamplingType sampleType, Long randomSeed) { super(child); this.sampleType = sampleType; <START> this.randomSeed = randomSeed; <END> }</code><technical_language>I reasonable put operations expensive fail constructor, allow eliminate randomSeed instance variable avoid overridinginit(). a subjective call, though</technical_language>

Target:
private SamplingDistribution(Operator child, SamplingType sampleType, Long randomSeed) { super(child); this.sampleType = sampleType; rand = new Random(); if (randomSeed != null) { rand.setSeed(randomSeed); } }
Source:
<code>public static ISerializer getSerializer(Byte type) { if (type <= SYSTEM_SERIALIZERS_COUNT) { if (serializersMap.containsKey(type)) { return serializersMap.get(type); } } else { if (customSerializers.containsKey(type)) { return customSerializers.get(type); } } String message = String.format("Serializer with type code %s not found. " + "Please check custom serializers for this client.", type.intValue()); log.error(message); <START> throw new RuntimeException(message); <END> }</code><technical_language>a more meaningful exception</technical_language>

Target:
public static ISerializer getSerializer(Byte type) { if (type <= SYSTEM_SERIALIZERS_COUNT) { if (serializersMap.containsKey(type)) { return serializersMap.get(type); } } else if (customSerializers.containsKey(type)) { return customSerializers.get(type); } log.error("Serializer with type code not found. Please check custom serializers " + "for this client.", type.intValue()); throw new SerializerException(type); }
Source:
<code>private static RegionShortcut setRegionType() { <START> String regionType = System.getProperty(DEFAULT_REGION_SYS_PROP_NAME, "REPLICATE"); <END> RegionShortcut type; try { type = RegionShortcut.valueOf(regionType); } catch (Exception e) { type = RegionShortcut.PARTITION; } return type; }</code><technical_language>change REPLICATE region type default? PARTITION_REDUNDANT, perhaps</technical_language>

Target:
private static RegionShortcut setRegionType() { String regionType = System.getProperty(DEFAULT_REGION_SYS_PROP_NAME, "PARTITION"); RegionShortcut type; try { type = RegionShortcut.valueOf(regionType); } catch (Exception e) { type = RegionShortcut.PARTITION; } return type; }
Source:
<code><START> public SmsDetails getSmsDetails(final DlmsDeviceMessageMetadata messageMetadata, final SmsDetails smsDetailsRequest) <END> throws OsgpException, ProtocolAdapterException { final DlmsDevice device = this.domainHelperService.findDlmsDevice(messageMetadata); final GetSMSDetailsResponse response = this.smsClient.getSMSDetails(smsDetailsRequest.getSmsMsgId(), device.getIccId()); SmsDetails smsDetailsResponse = null; final List<SmsMessageType> smsMessagesTypes = response.getSmsMessages().getSmsMessage(); for (final SmsMessageType smsMessageType : smsMessagesTypes) { if (smsMessageType.getSmsMsgId() == smsDetailsRequest.getSmsMsgId().longValue()) { smsDetailsResponse = new SmsDetails(device.getDeviceIdentification(), smsMessageType.getSmsMsgId(), smsMessageType.getStatus(), smsMessageType.getSmsMsgAttemptStatus(), smsMessageType.getMsgType()); } } return smsDetailsResponse; }</code><technical_language>ProtocolAdapterException is thrown in method. removed</technical_language>

Target:
public SmsDetails getSmsDetails(final DlmsDeviceMessageMetadata messageMetadata, final SmsDetails smsDetailsRequest) throws OsgpException { final DlmsDevice device = this.domainHelperService.findDlmsDevice(messageMetadata); final GetSMSDetailsResponse response = this.smsClient.getSMSDetails(smsDetailsRequest.getSmsMsgId(), device.getIccId()); SmsDetails smsDetailsResponse = null; final List<SmsMessageType> smsMessagesTypes = response.getSmsMessages().getSmsMessage(); for (final SmsMessageType smsMessageType : smsMessagesTypes) { if (smsMessageType.getSmsMsgId() == smsDetailsRequest.getSmsMsgId().longValue()) { smsDetailsResponse = new SmsDetails(device.getDeviceIdentification(), smsMessageType.getSmsMsgId(), smsMessageType.getStatus(), smsMessageType.getSmsMsgAttemptStatus(), smsMessageType.getMsgType()); } } return smsDetailsResponse; }
Source:
<code>public void execute(Context context) throws SQLException { <START> if (context.prepareSelect("select count(uuid) from organizations") <END> .get(row -> row.getLong(1)) > 0) { String builtInQGUuid = context.prepareSelect("select uuid from quality_gates where is_built_in = ?") .setBoolean(1, true) .get(row -> row.getString(1)); if (builtInQGUuid == null) { throw new IllegalStateException("Unable to find the builtin quality gate"); } MassUpdate massUpdate = context.prepareMassUpdate(); massUpdate.select("select uuid from organizations o " + " where " + " (select count(oqg.uuid) from org_quality_gates oqg where oqg.quality_gate_uuid = ? and oqg.organization_uuid = o.uuid) = 0") .setString(1, builtInQGUuid); massUpdate.rowPluralName("organizations"); massUpdate.update("insert into org_quality_gates (uuid, quality_gate_uuid, organization_uuid) values(?, ?, ?)"); massUpdate.execute((row, update) -> { update.setString(1, uuidFactory.create()); update.setString(2, builtInQGUuid); update.setString(3, row.getString(1)); return true; }); } }</code><technical_language>Please reverse if condition</technical_language>

Target:
public void execute(Context context) throws SQLException { Long nbOfOrganizations = context.prepareSelect("select count(uuid) from organizations") .get(row -> row.getLong(1)); if (nbOfOrganizations == 0) { return; } List<String> builtInQGUuids = context.prepareSelect("select uuid from quality_gates where is_built_in = ?") .setBoolean(1, true) .list(row -> row.getString(1)); checkState(!builtInQGUuids.isEmpty(), "Unable to find the builtin quality gate"); checkState(builtInQGUuids.size() == 1, "There are too many built in quality gates, one and only one is expected"); MassUpdate massUpdate = context.prepareMassUpdate(); massUpdate.select("select uuid from organizations o " + " where " + " not exists (select 1 from org_quality_gates oqg where oqg.quality_gate_uuid = ? and oqg.organization_uuid = o.uuid)") .setString(1, builtInQGUuids.get(0)); massUpdate.rowPluralName("organizations"); massUpdate.update("insert into org_quality_gates (uuid, quality_gate_uuid, organization_uuid) values(?, ?, ?)"); massUpdate.execute((row, update) -> { update.setString(1, uuidFactory.create()); update.setString(2, builtInQGUuids.get(0)); update.setString(3, row.getString(1)); return true; }); }
Source:
<code>public void testRequestDisabledStore() throws Exception { Catalog catalog = getCatalog(); StoreInfo store = catalog.getStoreByName("cdf", DataStoreInfo.class); <START> store.setEnabled(false); <END> catalog.save(store); Document doc = getAsDOM( "wfs?service=WFS&version=1.0.0&request=GetFeature&typename=cdf:Fifteen"); XMLAssert.assertXpathEvaluatesTo("1", "count( XMLAssert.assertXpathEvaluatesTo("InvalidParameterValue", " doc); XMLAssert.assertXpathEvaluatesTo("typeName", " }</code><technical_language>store get re-enabled other tests pass anyways? Stroke of luck of tests run</technical_language>

Target:
public void testRequestDisabledStore() throws Exception { Catalog catalog = getCatalog(); StoreInfo store = catalog.getStoreByName("cdf", DataStoreInfo.class); try { store.setEnabled(false); catalog.save(store); Document doc = getAsDOM( "wfs?service=WFS&version=1.0.0&request=GetFeature&typename=cdf:Fifteen"); XMLAssert.assertXpathEvaluatesTo("1", "count( XMLAssert.assertXpathEvaluatesTo("InvalidParameterValue", " XMLAssert.assertXpathEvaluatesTo("typeName", " } finally { store.setEnabled(true); catalog.save(store); } }
Source:
<code>public int hashCode() <START> { <END> int result = super.hashCode(); result = 31 * result + (int) (bucketSpan ^ (bucketSpan >>> 32)); result = 31 * result + (int) (startOfBuckets ^ (startOfBuckets >>> 32)); result = 31 * result + (int) (expiryPoint ^ (expiryPoint >>> 32)); return result; }</code><technical_language>Investigate need hashCode for this class</technical_language>

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + (int) (bucketSpan ^ (bucketSpan >>> 32)); result = 31 * result + (int) (startOfBuckets ^ (startOfBuckets >>> 32)); result = 31 * result + (int) (endOfBuckets ^ (endOfBuckets >>> 32)); result = 31 * result + (int) (expiryPeriod ^ (expiryPeriod >>> 32)); result = 31 * result + (int) (expiryPoint ^ (expiryPoint >>> 32)); result = 31 * result + (int) (cleanupTimeInMillis ^ (cleanupTimeInMillis >>> 32)); return result; }
Source:
<code>private GroupedExecutionProperties processChildren(PlanNode node) { boolean anyUseful = false; OptionalInt totalLifespans = OptionalInt.empty(); ImmutableList.Builder<PlanNodeId> capableTableScanNodes = ImmutableList.builder(); for (PlanNode source : node.getSources()) { GroupedExecutionProperties properties = source.accept(this, null); if (!properties.isCurrentNodeCapable()) { return GroupedExecutionProperties.notCapable(); } anyUseful |= properties.isSubTreeUseful(); if (!totalLifespans.isPresent()) { totalLifespans = OptionalInt.of(properties.totalLifespans); } else { <START> checkState(totalLifespans.getAsInt() == properties.totalLifespans); <END> } capableTableScanNodes.addAll(properties.capableTableScanNodes); } return new GroupedExecutionProperties(true, anyUseful, capableTableScanNodes.build(), totalLifespans.getAsInt()); }</code><technical_language>ditto message</technical_language>

Target:
private GroupedExecutionProperties processChildren(PlanNode node) { boolean anyUseful = false; OptionalInt totalLifespans = OptionalInt.empty(); ImmutableList.Builder<PlanNodeId> capableTableScanNodes = ImmutableList.builder(); for (PlanNode source : node.getSources()) { GroupedExecutionProperties properties = source.accept(this, null); if (!properties.isCurrentNodeCapable()) { return GroupedExecutionProperties.notCapable(); } anyUseful |= properties.isSubTreeUseful(); if (!totalLifespans.isPresent()) { totalLifespans = OptionalInt.of(properties.totalLifespans); } else { checkState(totalLifespans.getAsInt() == properties.totalLifespans, format("Mismatched number of lifespans among children nodes. Expected: %s, actual: %s", totalLifespans.getAsInt(), properties.totalLifespans)); } capableTableScanNodes.addAll(properties.capableTableScanNodes); } return new GroupedExecutionProperties(true, anyUseful, capableTableScanNodes.build(), totalLifespans.getAsInt()); }
Source:
<code>protected int doWork() { IOUtil.assertFileIsReadable(INPUT); IOUtil.assertFileIsWritable(OUTPUT); final SamReader reader = SamReaderFactory.makeDefault().referenceSequence(REFERENCE_SEQUENCE).open(INPUT); if( !ASSUME_SORTED && reader.getFileHeader().getSortOrder() != SAMFileHeader.SortOrder.coordinate) { throw new SAMException("Input must be coordinate-sorted, or ASSUME_SORTED must be true."); } <START> if( ASSUME_SORTED && reader.getFileHeader().getSortOrder() != SAMFileHeader.SortOrder.coordinate) { <END> log.warn("File indicates sort-order " + reader.getFileHeader().getSortOrder() + " but ASSUME_SORTED is true, so continuing."); } reader.getFileHeader().setSortOrder(SAMFileHeader.SortOrder.coordinate); final SAMFileWriter writer = new SAMFileWriterFactory().makeSAMOrBAMWriter(reader.getFileHeader(), true, OUTPUT); writer.setProgressLogger( new ProgressLogger(log, (int) 1e7, "Wrote", "records")); final ReferenceSequenceFileWalker refSeq = new ReferenceSequenceFileWalker(REFERENCE_SEQUENCE); for (final SAMRecord rec : reader) { if (!rec.getReadUnmappedFlag()) { AbstractAlignmentMerger.fixNMandUQ(rec, refSeq, IS_BISULFITE_SEQUENCE); } writer.addAlignment(rec); } CloserUtil.close(reader); writer.close(); return 0; }</code><technical_language>Need spaces 'if' (and remove space parens)</technical_language>

Target:
protected int doWork() { IOUtil.assertFileIsReadable(INPUT); IOUtil.assertFileIsWritable(OUTPUT); final SamReader reader = SamReaderFactory.makeDefault().referenceSequence(REFERENCE_SEQUENCE).open(INPUT); if (!ASSUME_SORTED && reader.getFileHeader().getSortOrder() != SAMFileHeader.SortOrder.coordinate) { throw new SAMException("Input must be coordinate-sorted, or ASSUME_SORTED must be true."); } if (ASSUME_SORTED && reader.getFileHeader().getSortOrder() != SAMFileHeader.SortOrder.coordinate) { log.warn("File indicates sort-order " + reader.getFileHeader().getSortOrder() + " but ASSUME_SORTED is true, so continuing."); } final SAMFileWriter writer = new SAMFileWriterFactory().makeSAMOrBAMWriter(reader.getFileHeader(), true, OUTPUT); writer.setProgressLogger( new ProgressLogger(log, (int) 1e7, "Wrote", "records")); final ReferenceSequenceFileWalker refSeq = new ReferenceSequenceFileWalker(REFERENCE_SEQUENCE); for (final SAMRecord rec : reader) { if (!rec.getReadUnmappedFlag()) { AbstractAlignmentMerger.fixNMandUQ(rec, refSeq, IS_BISULFITE_SEQUENCE); } writer.addAlignment(rec); } CloserUtil.close(reader); writer.close(); return 0; }
Source:
<code>public void setPushRegistrationId(String registrationId) { if (MPConfig.DEBUG) Log.d(LOGTAG, "setting push registraiton id: " + registrationId); mPushPref.edit().putString("push_id", registrationId).commit(); List<String> ids = new LinkedList<String>(); ids.add(registrationId); <START> set("$android_devices", new JSONArray(ids)); <END> }</code><technical_language>do new JSONArray("{" + registrationID + "}")</technical_language>

Target:
public void setPushRegistrationId(String registrationId) { if (MPConfig.DEBUG) Log.d(LOGTAG, "setting push registration id: " + registrationId); if (this.distinct_id == null) { return; } mPushPref.edit().putString("push_id", registrationId).commit(); try { sExecutor.submit(new PeopleQueueTask("$union", new JSONObject().put("$android_devices", new JSONArray("[" + registrationId + "]")))); } catch (JSONException e) { Log.e(LOGTAG, "set push registration id error", e); } }
Source:
<code>private double updateCloudletsProcessing(final double currentTime) { double nextCloudletFinishTime = Double.MAX_VALUE; for (int i = 0; i < cloudletExecList.size(); i++) { final CloudletExecution cle = cloudletExecList.get(i); updateCloudletProcessingAndPacketsDispatch(cle, currentTime); <START> nextCloudletFinishTime = Math.min(nextCloudletFinishTime, cloudletEstimatedFinishTime(cle, currentTime)); <END> cle.getCloudlet().getVm().setFreePesNumber( cle.getCloudlet().getVm().getFreePesNumber() - cle.getCloudlet().getNumberOfPes()); } return nextCloudletFinishTime; }</code><technical_language>is issue here. this updateCloudletsProcessing is called multiple times, number of free PEs decreasing, if Cloudlet finished. implement this: java long usedPes = 0; for (int i = 0; i < cloudletExecList.size(); i++) { ... ... ... usedPes += cle.getCloudlet().getNumberOfPes(); } vm.setFreePesNumber(vm.getFreePesNumber()-usedPes);</technical_language>

Target:
private double updateCloudletsProcessing(final double currentTime) { double nextCloudletFinishTime = Double.MAX_VALUE; long usedPes = 0; for (int i = 0; i < cloudletExecList.size(); i++) { final CloudletExecution cle = cloudletExecList.get(i); updateCloudletProcessingAndPacketsDispatch(cle, currentTime); nextCloudletFinishTime = Math.min(nextCloudletFinishTime, cloudletEstimatedFinishTime(cle, currentTime)); usedPes += cle.getCloudlet().getNumberOfPes(); } ((VmSimple) vm).setFreePesNumber(vm.getFreePesNumber() - usedPes); return nextCloudletFinishTime; }
Source:
<code>public IntervalList getLociToGenotype(final Collection<Fingerprint> fingerprints) { final IntervalList intervals = new IntervalList(this.haplotypes.getHeader()); for (final Fingerprint fp : fingerprints) { for (final HaplotypeProbabilities genotype : fp.values()) { final HaplotypeBlock h = genotype.getHaplotype(); for (final Snp snp : h.getSnps()) { intervals.add(new Interval(snp.getChrom(), snp.getPos(), snp.getPos(), false, snp.getName())); } } } <START> return intervals.sorted().uniqued(); <END> }</code><technical_language>uniqued imply sorted</technical_language>

Target:
public IntervalList getLociToGenotype(final Collection<Fingerprint> fingerprints) { final IntervalList intervals = new IntervalList(this.haplotypes.getHeader()); for (final Fingerprint fp : fingerprints) { for (final HaplotypeProbabilities genotype : fp.values()) { final HaplotypeBlock h = genotype.getHaplotype(); for (final Snp snp : h.getSnps()) { intervals.add(new Interval(snp.getChrom(), snp.getPos(), snp.getPos(), false, snp.getName())); } } } return intervals.uniqued(); }
Source:
<code>public String[] getModules() { if ( module != null ) { return new String[] { module }; } if ( modules == null ) <START> { <END> List<String> gwtModules = DefaultGwtModuleReader.getGwtModules( getProject(), getLog() ); if ( gwtModules.size() > 0 ) { return gwtModules.toArray( new String[gwtModules.size()] ); } else { return new String[] { }; } } return modules; }</code><technical_language>Nice job</technical_language>

Target:
public String[] getModules() { if ( module != null ) { return new String[] { module }; } if ( modules == null ) { modules = convertToArray( new DefaultGwtModuleReader(getProject(), getLog(), classpathBuilder).getGwtModules()); } return modules; }
Source:
<code>public void removeFromUsersTag( @Auth final AccessToken accessToken, @PathParam("tag_name") final String tagName, @PathParam("user_id") final Long userId) { final List<String> ids = new ArrayList<>(); <START> ids.add(String.valueOf(userId)); <END> tagStore.remove(tagName, TagStoreDAODynamoDB.Type.USERS, ids); }</code><technical_language>this Lists.newArrayList(deviceId);</technical_language>

Target:
public void removeFromUsersTag( @Auth final AccessToken accessToken, @PathParam("tag_name") final String tagName, @PathParam("user_id") final Long userId) { final List<String> ids = Lists.newArrayList(); ids.add(String.valueOf(userId)); tagStore.remove(tagName, TagStoreDAODynamoDB.Type.USERS, ids); }
Source:
<code>protected void processMultiValuedEAttribute(EAttribute eAttribute, SIRIUS processedDescription, SIRIUS currentDescription, TransformationCache cache) { Object processedValue = processedDescription.eGet(eAttribute); Object currentValue = currentDescription.eGet(eAttribute); if (currentValue instanceof Iterable<?> && processedValue instanceof Iterable<?>) { List<Object> newValue = new ArrayList<>(); Iterable<?> currentIterable = (Iterable<?>) currentValue; Iterable<?> processedIterable = (Iterable<?>) processedValue; <START> for (Object object : currentIterable) { newValue.add(object); } for (Object object : processedIterable) { newValue.add(object); } <END> processedDescription.eSet(eAttribute, newValue); } }</code><technical_language>java8-isation [forEach][methodReference]</technical_language>

Target:
protected void processMultiValuedEAttribute(EAttribute eAttribute, SIRIUS processedDescription, SIRIUS currentDescription, TransformationCache cache) { Object processedValue = processedDescription.eGet(eAttribute); Object currentValue = currentDescription.eGet(eAttribute); if (currentValue instanceof Iterable<?> && processedValue instanceof Iterable<?>) { List<Object> newValue = new ArrayList<>(); Iterable<?> currentIterable = (Iterable<?>) currentValue; Iterable<?> processedIterable = (Iterable<?>) processedValue; currentIterable.forEach(newValue::add); processedIterable.forEach(newValue::add); processedDescription.eSet(eAttribute, newValue); } }
Source:
<code>public long getQueryCount() { <START> return 0; <END> }</code><technical_language>throw UnsupportedOperationException for methods? I prevent users falsely assuming is support for it</technical_language>

Target:
public long getQueryCount() { throw new UnsupportedOperationException("Queries on replicated maps are not supported."); }
Source:
<code>TargetNotToolchainException(ToolchainTypeInfo toolchainType, Label resolvedTargetLabel) { super( String.format( "toolchain type %s resolved to target %s, but that target does not provide" <START> + " ToolchainInfo", <END> toolchainType.typeLabel(), resolvedTargetLabel)); }</code><technical_language>Nit: ToolchainInfo.SKYLARK_NAME</technical_language>

Target:
TargetNotToolchainException(ToolchainTypeInfo toolchainType, Label resolvedTargetLabel) { super( String.format( "toolchain type %s resolved to target %s, but that target does not provide " + ToolchainInfo.SKYLARK_NAME, toolchainType.typeLabel(), resolvedTargetLabel)); }
Source:
<code>public void onPropertyAdd( KernelStatement state, NodeItem node, DefinedProperty after ) throws EntityNotFoundException { Iterator<NewIndexDescriptor> indexes = getIndexesForProperty( state, after.propertyKeyId() ); nodeIndexMatcher.onMatchingSchema( state, indexes, node, after.propertyKeyId(), index -> { OrderedPropertyValues values = getOrderedPropertyValues( state, node, after, index.schema().getPropertyIds() ); <START> if ( values != null ) <END> { values.validate(); state.txState().indexDoUpdateEntry( index.schema(), node.id(), null, values ); } }); }</code><technical_language>This check leads expect getOrderedPropertyValues return null if node properties required index, check exist in getOrderedPropertyValues method</technical_language>

Target:
public void onPropertyAdd( KernelStatement state, NodeItem node, DefinedProperty after ) throws EntityNotFoundException { Iterator<NewIndexDescriptor> indexes = getIndexesInvolvingProperty( state, after.propertyKeyId() ); nodeIndexMatcher.onMatchingSchema( state, indexes, node, after.propertyKeyId(), index -> { Validators.INDEX_VALUE_VALIDATOR.validate( after.value() ); OrderedPropertyValues values = getOrderedPropertyValues( state, node, after, index.schema().getPropertyIds() ); state.txState().indexDoUpdateEntry( index.schema(), node.id(), null, values ); }); }
Source:
<code>private void extractFromSource(SearchHit hit) { Map<String, Object> map = hit.getSource(); for (Map.Entry<String, Object> entry : map.entrySet()) { <START> String jsonPath = entry.getKey().toString(); <END> Object entryValue = entry.getValue(); setFieldIfExists(jsonPath, entryValue); } }</code><technical_language>toString(); is redundant here</technical_language>

Target:
private void extractFromSource(SearchHit hit) { Map<String, Object> map = hit.getSourceAsMap(); for (Map.Entry<String, Object> entry : map.entrySet()) { String jsonPath = entry.getKey(); Object entryValue = entry.getValue(); setFieldIfExists(jsonPath, entryValue); } }
Source:
<code>private String stream2String(InputStream in) { try { ByteArrayOutputStream result = new ByteArrayOutputStream(); byte[] buffer = new byte[4096]; int length; <START> while ((length = in.read(buffer)) != -1) { <END> result.write(buffer, 0, length); } return result.toString(StandardCharsets.UTF_8.name()); } catch (IOException e) { throw new UncheckedIOException(e); } }</code><technical_language>Configuration files small. this stream sufficiently large warrant this bufferred reading approach, simply reading stream in? eventually reading stream memory anyway. readFully similar</technical_language>

Target:
private String stream2String(InputStream in) { try { ByteArrayOutputStream result = new ByteArrayOutputStream(); byte[] buffer = new byte[4096]; int length; while ((length = in.read(buffer)) != -1) { result.write(buffer, 0, length); } return result.toString(UTF_8.name()); } catch (IOException e) { throw new UncheckedIOException(e); } }
Source:
<code>public <T> Enumerable<T> enumerable(Meta.StatementHandle handle, CalcitePrepare.CalciteSignature<T> signature, List<TypedValue> parameterValues0) throws SQLException { Map<String, Object> map = new LinkedHashMap<>(); AvaticaStatement statement = lookupStatement(handle); final List<TypedValue> parameterValues1 = <START> TROJAN.getParameterValues(statement); <END> final List<TypedValue> parameterValues; if (parameterValues0 == null || parameterValues0.isEmpty()) { parameterValues = parameterValues1; } else { parameterValues = parameterValues0; } if (MetaImpl.checkParameterValueHasNull(parameterValues)) { throw new SQLException("exception while executing query: unbound parameter"); } for (Ord<TypedValue> o : Ord.zip(parameterValues)) { map.put("?" + o.i, o.e.toLocal()); } map.putAll(signature.internalParameters); final AtomicBoolean cancelFlag; try { cancelFlag = getCancelFlag(handle); } catch (NoSuchStatementException e) { throw new RuntimeException(e); } map.put(DataContext.Variable.CANCEL_FLAG.camelName, cancelFlag); int queryTimeout = statement.getQueryTimeout(); if (queryTimeout > 0 && queryTimeout < Integer.MAX_VALUE / 1000) { map.put(DataContext.Variable.TIMEOUT.camelName, queryTimeout * 1000L); } final DataContext dataContext = createDataContext(map, signature.rootSchema); return signature.enumerable(dataContext); }</code><technical_language>This method executed parameterValues0 elements, it</technical_language>

Target:
public <T> Enumerable<T> enumerable(Meta.StatementHandle handle, CalcitePrepare.CalciteSignature<T> signature, List<TypedValue> parameterValues0) throws SQLException { Map<String, Object> map = new LinkedHashMap<>(); AvaticaStatement statement = lookupStatement(handle); final List<TypedValue> parameterValues; if (parameterValues0 == null || parameterValues0.isEmpty()) { parameterValues = TROJAN.getParameterValues(statement); } else { parameterValues = parameterValues0; } if (MetaImpl.checkParameterValueHasNull(parameterValues)) { throw new SQLException("exception while executing query: unbound parameter"); } for (Ord<TypedValue> o : Ord.zip(parameterValues)) { map.put("?" + o.i, o.e.toLocal()); } map.putAll(signature.internalParameters); final AtomicBoolean cancelFlag; try { cancelFlag = getCancelFlag(handle); } catch (NoSuchStatementException e) { throw new RuntimeException(e); } map.put(DataContext.Variable.CANCEL_FLAG.camelName, cancelFlag); int queryTimeout = statement.getQueryTimeout(); if (queryTimeout > 0 && queryTimeout < Integer.MAX_VALUE / 1000) { map.put(DataContext.Variable.TIMEOUT.camelName, queryTimeout * 1000L); } final DataContext dataContext = createDataContext(map, signature.rootSchema); return signature.enumerable(dataContext); }
Source:
<code>private void handleMessage(Message message) { String messageId = message.getMessageId(); String messagePayload = unmarshallMessageBody(message.getBody()); Map<String, String> stringifiedMessageAttributes = message.getMessageAttributes().entrySet().stream() .collect(Collectors.toMap(Map.Entry::getKey, e -> String.valueOf(e.getValue()))); log.debug("Received Amazon sqs message: with payload: {}\n and attributes: {}", messageId, messagePayload, stringifiedMessageAttributes); <START> MessageDescription description = MessageDescription.builder() <END> .subscriptionName(subscriptionName()) .messagePayload(messagePayload) .messageAttributes(stringifiedMessageAttributes) .pubsubSystem(pubsubSystem) .ackDeadlineMillis(5 * TimeUnit.SECONDS.toMillis(10)) .retentionDeadlineMillis(TimeUnit.DAYS.toMillis(7)) .build(); AmazonMessageAcknowledger acknowledger = new AmazonMessageAcknowledger(amazonSQS, queueId, message); if (subscription.getMessageFormat() != AmazonPubsubProperties.MessageFormat.NONE) { description.setArtifacts(parseArtifacts(description.getMessagePayload(), messageId)); } pubsubMessageHandler.handleMessage(description, acknowledger, identity.getIdentity(), messageId); }</code><technical_language>worry if exception arises handleMessage()? Right other messages in batch skipped</technical_language>

Target:
private void handleMessage(Message message) { try { String messageId = message.getMessageId(); String messagePayload = unmarshallMessageBody(message.getBody()); Map<String, String> stringifiedMessageAttributes = message.getMessageAttributes().entrySet().stream() .collect(Collectors.toMap(Map.Entry::getKey, e -> String.valueOf(e.getValue()))); log.debug("Received Amazon sqs message: with payload: and attributes: {}", messageId, messagePayload, stringifiedMessageAttributes); MessageDescription description = MessageDescription.builder() .subscriptionName(subscriptionName()) .messagePayload(messagePayload) .messageAttributes(stringifiedMessageAttributes) .pubsubSystem(pubsubSystem) .ackDeadlineMillis(TimeUnit.SECONDS.toMillis(50)) .retentionDeadlineMillis(TimeUnit.DAYS.toMillis(7)) .build(); AmazonMessageAcknowledger acknowledger = new AmazonMessageAcknowledger(amazonSQS, queueId, message, registry, getName()); if (subscription.getMessageFormat() != AmazonPubsubProperties.MessageFormat.NONE) { description.setArtifacts(parseArtifacts(description.getMessagePayload(), messageId)); } pubsubMessageHandler.handleMessage(description, acknowledger, identity.getIdentity(), messageId); } catch (Exception e) { log.error("Message from queue failed to be handled", message, queueId); } }
Source:
<code>public Location(Extent extent, Vector3d position) { <START> this.extent = checkNotNull(extent); <END> this.position = checkNotNull(position); this.blockPosition = position.floor().toInt(); }</code><technical_language>Consistency</technical_language>

Target:
public Location(Extent extent, Vector3d position) { this.extent = checkNotNull(extent, "extent"); this.position = checkNotNull(position, "position"); this.blockPosition = position.floor().toInt(); }
Source:
<code>public Mono<Boolean> exists() { <START> try { return existsWithResponse().flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } <END> }</code><technical_language>need try catch overload called this</technical_language>

Target:
public Mono<Boolean> exists() { return existsWithResponse().flatMap(FluxUtil::toMono); }