auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void map(IndexedRecord input, ProcessContext context) throws IOException { python.set("inputJSON", new PyString(input.toString())); python.exec("input = json.loads(inputJSON)"); python.exec("output = json.loads(\"{}\")"); python.exec(properties.pythonCode.getValue()); python.exec("outputJSON = json.dumps(output)"); PyObject output = python.get("outputJSON"); <START> JsonSchemaInferrer jsonSchemaInferrer = new JsonSchemaInferrer(new ObjectMapper()); <END> Schema jsonSchema = jsonSchemaInferrer.inferSchema(output.toString()); JsonGenericRecordConverter jsonGenericRecordConverter = new JsonGenericRecordConverter(jsonSchema); GenericRecord outputRecord = jsonGenericRecordConverter.convertToAvro(output.toString()); context.output(outputRecord); }</code><technical_language>line 108-110 a heavy processing. a cache mechanism jsonGenericRecordConverter</technical_language>

Target:
private void map(IndexedRecord input, ProcessContext context) throws IOException { python.set("inputJSON", new PyString(input.toString())); python.exec("input = json.loads(inputJSON)"); python.exec("output = json.loads(\"{}\")"); python.exec(properties.pythonCode.getValue()); python.exec("outputJSON = json.dumps(output)"); PyObject output = python.get("outputJSON"); if (jsonGenericRecordConverter == null) { JsonSchemaInferrer jsonSchemaInferrer = new JsonSchemaInferrer(new ObjectMapper()); Schema jsonSchema = jsonSchemaInferrer.inferSchema(output.toString()); jsonGenericRecordConverter = new JsonGenericRecordConverter(jsonSchema); } GenericRecord outputRecord = jsonGenericRecordConverter.convertToAvro(output.toString()); context.output(outputRecord); }
Source:
<code>private boolean canSortByIndex() { boolean canSortByIndex = false; if (orderings != null && selectors.size() == 1) { IndexPlan plan = selectors.get(0).getExecutionPlan().getIndexPlan(); if (plan != null) { List<OrderEntry> list = plan.getSortOrder(); if (list != null && list.size() == orderings.length) { canSortByIndex = true; for (int i = 0; i < list.size(); i++) { OrderEntry e = list.get(i); OrderingImpl o = orderings[i]; DynamicOperandImpl op = o.getOperand(); if (!(op instanceof PropertyValueImpl)) { <START> break; <END> } String pn = ((PropertyValueImpl) op).getPropertyName(); if (!pn.equals(e.getPropertyName())) { canSortByIndex = false; break; } if (o.isDescending() != (e.getOrder() == Order.DESCENDING)) { canSortByIndex = false; break; } } } } } return canSortByIndex; }</code><technical_language>I breaking is incorrect, in case of "order a, b" index sorts property a. Also, if "order a desc", index sorts ascending</technical_language>

Target:
private boolean canSortByIndex() { boolean canSortByIndex = false; if (orderings != null && selectors.size() == 1) { IndexPlan plan = selectors.get(0).getExecutionPlan().getIndexPlan(); if (plan != null) { List<OrderEntry> list = plan.getSortOrder(); if (list != null && list.size() == orderings.length) { canSortByIndex = true; for (int i = 0; i < list.size(); i++) { OrderEntry e = list.get(i); OrderingImpl o = orderings[i]; DynamicOperandImpl op = o.getOperand(); String pn = op.getOrderEntryPropertyName(selectors.get(0)); if (pn == null || !pn.equals(e.getPropertyName())) { canSortByIndex = false; break; } if (o.isDescending() != (e.getOrder() == Order.DESCENDING)) { canSortByIndex = false; break; } } } } } return canSortByIndex; }
Source:
<code>private void validateStatic(FrameworkMember<?> member, List<Throwable> errors) { if (fStaticMembers && !member.isStatic()) { addError(errors, member, "must be static."); } if (!fStaticMembers && member.isStatic()) { <START> addError(errors, member, "must not be static, use @ClassRule to make this possible"); <END> } }</code><technical_language>this wording: "must static annotated @ClassRule."</technical_language>

Target:
private void validateStatic(FrameworkMember<?> member, List<Throwable> errors) { if (fStaticMembers && !member.isStatic()) { addError(errors, member, "must be static."); } if (!fStaticMembers && member.isStatic()) { addError(errors, member, "must not be static or it has to be annotated with @ClassRule."); } }
Source:
<code>protected boolean canDetect(JsonPointer pointer) { return pointer != null && pointer.toString().matches("/components/links/(\\w+)/operationId"); <START> } <END></code><technical_language>This regex works a link is defined in components, defined in a response: yaml /2.0/repositories/{username}/{slug}: get: operationId: getRepository responses: '200': description: repository links: repositoryPullRequests: operationId: getRepository In case, navigation work</technical_language>

Target:
protected boolean canDetect(JsonPointer pointer) { return pointer != null && pointer.toString().matches(".*/links/(\\w+)/operationId"); }
Source:
<code>public void testNotHyperlinkExternal() { assertMarkup("<p>this [x] is not a link</p>", "this [x] is not a link"); assertMarkup("<p>Use another style [Human]</p>", "Use another style [Human]"); <START> } <END></code><technical_language>add a protocol is supported</technical_language>

Target:
public void testNotHyperlinkExternal() { assertMarkup("<p>this [x] is not a link</p>", "this [x] is not a link"); assertMarkup("<p>Use another style [Human]</p>", "Use another style [Human]"); assertMarkup("<p>[test1://eclipse.org/] is not a link</p>", "[test1://eclipse.org/] is not a link"); assertMarkup("<p>No link [test:me]</p>", "No link [test:me]"); }
Source:
<code>public int hashCode() { return Objects.hash( account, plan, uuid, unitAmountInCents, currency, quantity, activatedAt, canceledAt, <START> expiresAt, <END> currentPeriodStartedAt, currentPeriodEndsAt, trialStartedAt, trialEndsAt, addOns, pendingSubscription, startsAt, collectionMethod, netTerms, poNumber ); }</code><technical_language>Odd state left out? re-introduce it</technical_language>

Target:
public int hashCode() { return Objects.hashCode( account, plan, uuid, state, unitAmountInCents, currency, quantity, activatedAt, canceledAt, expiresAt, currentPeriodStartedAt, currentPeriodEndsAt, trialStartedAt, trialEndsAt, addOns, pendingSubscription, startsAt, collectionMethod, netTerms, poNumber ); }
Source:
<code>public void run() { final URL elasticsearchUrl = corePlugin.getElasticsearchUrl(); if (elasticsearchUrl == null) { return; } httpClient.send(HttpRequestBuilder.<Void>forUrl(elasticsearchUrl + "/_cluster/health") .method("GET") .successHandler(new HttpClient.ResponseHandler<Void>() { @Override public Void handleResponse(HttpRequest<?> httpRequest, InputStream inputStream, Integer statusCode, IOException e) throws IOException { JsonNode clusterHealthResponse = JsonUtils.getMapper().readTree(inputStream); String statusValue = clusterHealthResponse.has("status") ? clusterHealthResponse.get("status").asText() : "red"; boolean isNowAvailable = statusValue.equals("green") || statusValue.equals("yellow"); if (isNowAvailable) { if (!isElasticsearchAvailable()) { logger.info("Elasticsearch is available again."); } elasticsearchAvailable.set(true); <START> for (ElasticsearchAvailableObserver elasticsearchAvailableObserver : elasticsearchAvailableObservers) { <END> elasticsearchAvailableObserver.onElasticsearchAvailable(); } } return null; } }) .errorHandler(new HttpClient.ResponseHandler<Void>() { @Override public Void handleResponse(HttpRequest<?> httpRequest, InputStream is, Integer statusCode, IOException e) throws IOException { if (isElasticsearchAvailable()) { logger.warn("Elasticsearch is not available. " + "Stagemonitor won't try to send documents to Elasticsearch until it is available again."); } elasticsearchAvailable.set(false); return null; } }) .build()); }</code><technical_language>elasticsearchAvailabilityObservers</technical_language>

Target:
public void run() { final URL elasticsearchUrl = corePlugin.getElasticsearchUrl(); if (elasticsearchUrl == null) { return; } httpClient.send(HttpRequestBuilder.<Void>forUrl(elasticsearchUrl + "/_cluster/health") .method("GET") .successHandler(new HttpClient.ResponseHandler<Void>() { @Override public Void handleResponse(HttpRequest<?> httpRequest, InputStream inputStream, Integer statusCode, IOException e) throws IOException { JsonNode clusterHealthResponse = JsonUtils.getMapper().readTree(inputStream); String statusValue = clusterHealthResponse.has("status") ? clusterHealthResponse.get("status").asText() : "red"; boolean isNowAvailable = statusValue.equals("green") || statusValue.equals("yellow"); if (isNowAvailable) { if (!isElasticsearchAvailable()) { logger.info("Elasticsearch is available again."); } for (ElasticsearchAvailabilityObserver elasticsearchAvailabilityObserver : elasticsearchAvailabilityObservers) { elasticsearchAvailabilityObserver.onElasticsearchAvailable(corePlugin.getElasticsearchClient()); } elasticsearchAvailable.set(true); } return null; } }) .errorHandler(new HttpClient.ResponseHandler<Void>() { @Override public Void handleResponse(HttpRequest<?> httpRequest, InputStream is, Integer statusCode, IOException e) throws IOException { if (isElasticsearchAvailable()) { logger.warn("Elasticsearch is not available. " + "Stagemonitor won't try to send documents to Elasticsearch until it is available again."); } elasticsearchAvailable.set(false); return null; } }) .build()); }
Source:
<code>public void testInsert() throws Exception { <START> execute("CREATE TABLE tpch.test_insert (x bigint, y varchar, t_ts timestamp)"); <END> assertUpdate("INSERT INTO test_insert VALUES (123, 'test', date_parse('1970-12-01 00:00:01','%Y-%m-%d %H:%i:%s'))", 1); assertUpdate("INSERT INTO test_insert VALUES (123, 'test', date_parse('2030-01-01 23:59:59','%Y-%m-%d %H:%i:%s'))", 1); MaterializedResult actual = computeActual("SELECT * FROM test_insert"); MaterializedResult expected = MaterializedResult.resultBuilder(getSession(), BIGINT, VARCHAR, TIMESTAMP) .row((long) 123, "test", Timestamp.valueOf("1970-12-01 00:00:01")) .row((long) 123, "test", Timestamp.valueOf("2030-01-01 23:59:59")) .build(); assertEquals(actual, expected); assertUpdate("DROP TABLE test_insert"); }</code><technical_language>of tests exercises CTAS #7747 mentions CTAS</technical_language>

Target:
public void testInsert() throws Exception { execute("CREATE TABLE tpch.test_insert (c_bigint bigint, c_varchar varchar, c_timestamp timestamp)"); assertUpdate("INSERT INTO test_insert VALUES (123, 'test', date_parse('1970-12-01 00:00:01','%Y-%m-%d %H:%i:%s'))", 1); assertUpdate("INSERT INTO test_insert VALUES (123, 'test', date_parse('2030-01-01 23:59:59','%Y-%m-%d %H:%i:%s'))", 1); MaterializedResult actual = computeActual("SELECT * FROM test_insert"); MaterializedResult expected = MaterializedResult.resultBuilder(getSession(), BIGINT, VARCHAR, TIMESTAMP) .row((long) 123, "test", Timestamp.valueOf("1970-12-01 00:00:01")) .row((long) 123, "test", Timestamp.valueOf("2030-01-01 23:59:59")) .build(); assertEquals(actual, expected); assertUpdate("DROP TABLE test_insert"); }
Source:
<code>public void handle(Context withinContext) throws Exception { LOG.info("Processing#{} ALTER_TABLE message : {}", fromEventId(), eventMessageAsJSON); Table qlMdTableBefore = new Table(before); if (!Utils .shouldReplicate(withinContext.replicationSpec, qlMdTableBefore, true, withinContext.hiveConf)) { return; } if (withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES)) { if (!AcidUtils.isTransactionalTable(before) && AcidUtils.isTransactionalTable(after)) { LOG.info("The table " + after.getTableName() + " is converted to ACID table." + <START> " It will be replicated with bootstrap load as REPL_BOOTSTRAP_ACID_TABLES is set to true."); <END> return; } } if (Scenario.ALTER == scenario) { withinContext.replicationSpec.setIsMetadataOnly(true); Table qlMdTableAfter = new Table(after); Path metaDataPath = new Path(withinContext.eventRoot, EximUtil.METADATA_NAME); if (withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY)) { qlMdTableAfter.setStatsStateLikeNewTable(); } EximUtil.createExportDump( metaDataPath.getFileSystem(withinContext.hiveConf), metaDataPath, qlMdTableAfter, null, withinContext.replicationSpec, withinContext.hiveConf); } DumpMetaData dmd = withinContext.createDmd(this); dmd.setPayload(eventMessageAsJSON); dmd.write(); }</code><technical_language>hive.repl.bootstrap.acid.tables instead of REPL_BOOTSTRAP_ACID_TABLES</technical_language>

Target:
public void handle(Context withinContext) throws Exception { LOG.info("Processing#{} ALTER_TABLE message : {}", fromEventId(), eventMessageAsJSON); Table qlMdTableBefore = new Table(before); if (!Utils .shouldReplicate(withinContext.replicationSpec, qlMdTableBefore, true, withinContext.hiveConf)) { return; } if (withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES)) { if (!AcidUtils.isTransactionalTable(before) && AcidUtils.isTransactionalTable(after)) { LOG.info("The table " + after.getTableName() + " is converted to ACID table." + " It will be replicated with bootstrap load as hive.repl.bootstrap.acid.tables is set to true."); return; } } if (Scenario.ALTER == scenario) { withinContext.replicationSpec.setIsMetadataOnly(true); Table qlMdTableAfter = new Table(after); Path metaDataPath = new Path(withinContext.eventRoot, EximUtil.METADATA_NAME); if (withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY)) { qlMdTableAfter.setStatsStateLikeNewTable(); } EximUtil.createExportDump( metaDataPath.getFileSystem(withinContext.hiveConf), metaDataPath, qlMdTableAfter, null, withinContext.replicationSpec, withinContext.hiveConf); } DumpMetaData dmd = withinContext.createDmd(this); dmd.setPayload(eventMessageAsJSON); dmd.write(); }
Source:
<code>public void testCreateAndManageUser_StartInBackground_MaxRunningUsers() throws Exception { if (!mHasCreateAndManageUserFeature || <START> !canTestMaxRunningUsers()) { <END> return; } int maxRunningUsers = getDevice().getMaxNumberOfRunningUsersSupported(); for (int i = 0; i < maxRunningUsers - 1; i++) { executeDeviceTestMethod(".CreateAndManageUserTest", "testCreateAndManageUser_StartInBackground"); } executeDeviceTestMethod(".CreateAndManageUserTest", "testCreateAndManageUser_StartInBackground_MaxRunningUsers"); }</code><technical_language>explicitly put this instead of separate method, "canTestMaxRunningUsers" suggest condition is name: || (getMaxNumberOfRunningUsersSupported() >= getMaxNumberOfUsersSupported())</technical_language>

Target:
public void testCreateAndManageUser_StartInBackground_MaxRunningUsers() throws Exception { if (!mHasCreateAndManageUserFeature || getMaxNumberOfRunningUsersSupported() >= getMaxNumberOfUsersSupported()) { return; } int maxRunningUsers = getDevice().getMaxNumberOfRunningUsersSupported(); for (int i = 0; i < maxRunningUsers - 1; i++) { executeDeviceTestMethod(".CreateAndManageUserTest", "testCreateAndManageUser_StartInBackground"); } executeDeviceTestMethod(".CreateAndManageUserTest", "testCreateAndManageUser_StartInBackground_MaxRunningUsers"); }
Source:
<code>public TestMediaWikiApiImageFetchingStrategy(Map<String, String> serverContent) { <START> Preconditions.checkNotNull(serverContent, <END> "Please specify some server content for images used during the tests. See: TestMediaWikiApiImageFetchingStrategy#serverContent"); this.serverContent = ImmutableMap.copyOf(serverContent); }</code><technical_language>static import</technical_language>

Target:
public TestMediaWikiApiImageFetchingStrategy(Map<String, String> serverContent) { checkNotNull(serverContent, "Please specify some server content for images used during the tests. See: TestMediaWikiApiImageFetchingStrategy#serverContent"); this.serverContent = ImmutableMap.copyOf(serverContent); }
Source:
<code>private boolean isNetmaskInSync() { return ObjectUtils.objectsEqual(iface.getSubnet(), <START> isPrimaryAddressExist() ? networkDataCenterIpConfigurationDefinition.getPrimaryAddress().getNetmask() <END> : null); }</code><technical_language>extract method for primary address lines shorter</technical_language>

Target:
private boolean isNetmaskInSync() { return ObjectUtils.objectsEqual(iface.getSubnet(), isPrimaryAddressExist() ? getPrimaryAddress().getNetmask() : null); }
Source:
<code>EntityWriter<Object> licenseWriter() throws IOException { return new LicenseWriter( <START> new License(IOUtils.toString(licenseText.getInputStream())) <END> ); }</code><technical_language>want CharSet, <LINK_0></technical_language>

Target:
EntityWriter<Object> licenseWriter() throws IOException { return new LicenseWriter( new License(IOUtils.toString(licenseText.getInputStream(), "UTF-8")) ); }
Source:
<code>public Object foundLiteral(ImapResponse response, FixedLengthInputStream literal) throws IOException { if (response.getTag() == null && ImapResponseParser.equalsIgnoreCase(response.get(1), "FETCH")) { String contentTransferEncoding = mPart .getHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING)[0]; String contentType = mPart .getHeader(MimeHeader.HEADER_CONTENT_TYPE)[0]; <START> if(attachmentProgressCallback != null) <END> return MimeUtility.createBody(literal, contentTransferEncoding, contentType, attachmentProgressCallback); return MimeUtility.createBody(literal, contentTransferEncoding, contentType, null); } return null; }</code><technical_language>Code style: Missing spaces curly braces</technical_language>

Target:
public Object foundLiteral(ImapResponse response, FixedLengthInputStream literal) throws IOException { if (response.getTag() == null && ImapResponseParser.equalsIgnoreCase(response.get(1), "FETCH")) { String contentTransferEncoding = mPart .getHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING)[0]; String contentType = mPart .getHeader(MimeHeader.HEADER_CONTENT_TYPE)[0]; if (attachmentProgressCallback != null) { return MimeUtility.createBody(literal, contentTransferEncoding, contentType, attachmentProgressCallback); } return MimeUtility.createBody(literal, contentTransferEncoding, contentType, null); } return null; }
Source:
<code><START> private List<GoogleCloudStorageItemInfo> getGoogleCloudStorageItemInfos( <END> String bucketName, String objectNamePrefix, ListObjectOptions listOptions, List<String> listedPrefixes, List<StorageObject> listedObjects) { List<GoogleCloudStorageItemInfo> objectInfos = new ArrayList<>( (storageOptions.isInferImplicitDirectoriesEnabled() ? listedPrefixes.size() + 1 : 0) + listedObjects.size()); if (storageOptions.isInferImplicitDirectoriesEnabled() && listOptions.isIncludePrefix() && listOptions.getDelimiter() != null && (!listedPrefixes.isEmpty() || !listedObjects.isEmpty()) && (listedObjects.isEmpty() || !listedObjects.get(0).getName().equals(objectNamePrefix))) { objectInfos.add(createInferredDirectory(new StorageResourceId(bucketName, objectNamePrefix))); } for (StorageObject obj : listedObjects) { objectInfos.add(createItemInfoForStorageObject(obj)); } handlePrefixes(bucketName, listedPrefixes, objectInfos); objectInfos.sort(Comparator.comparing(GoogleCloudStorageItemInfo::getObjectName)); return objectInfos; }</code><technical_language>this method reused in listObjectNames method above? I find core logic pretty similar</technical_language>

Target:
private List<GoogleCloudStorageItemInfo> getGoogleCloudStorageItemInfos( String bucketName, String objectNamePrefix, ListObjectOptions listOptions, List<String> listedPrefixes, List<StorageObject> listedObjects) { List<GoogleCloudStorageItemInfo> objectInfos = new ArrayList<>( (storageOptions.isInferImplicitDirectoriesEnabled() ? listedPrefixes.size() + 1 : 0) + listedObjects.size()); if (storageOptions.isInferImplicitDirectoriesEnabled() && listOptions.isIncludePrefix() && objectNamePrefix != null && listOptions.getDelimiter() != null && (!listedPrefixes.isEmpty() || !listedObjects.isEmpty()) && (listedObjects.isEmpty() || !listedObjects.get(0).getName().equals(objectNamePrefix))) { objectInfos.add(createInferredDirectory(new StorageResourceId(bucketName, objectNamePrefix))); } for (StorageObject obj : listedObjects) { objectInfos.add(createItemInfoForStorageObject(obj)); } handlePrefixes(bucketName, listedPrefixes, objectInfos); objectInfos.sort(Comparator.comparing(GoogleCloudStorageItemInfo::getObjectName)); return objectInfos; }
Source:
<code>public InvertedDisappearancePriorityConflictResolver(int defaultPriority) { super(defaultPriority); <START> Preconditions.checkArgument(defaultPriority != 0, "Default priority 0 is disallowed"); <END> }</code><technical_language>I thought explicitly prohibit this setting</technical_language>

Target:
public InvertedDisappearancePriorityConflictResolver(int defaultPriority) { super(defaultPriority); if (defaultPriority == 0 && logger.getLevel().isGreaterOrEqual(Level.WARN)) { logger.warn(ZERO_PRIORITY_MESSAGE); } }
Source:
<code>public void setUp() { params.put("CallSid", "CA1234567890ABCDE"); params.put("Caller", "+14158675309"); params.put("Digits", "1234"); params.put("From", "+14158675309"); params.put("To", "+18005551212"); <START> signature = "RSOYDt4T1cUTdK1PDd93/VVr8B8="; <END> }</code><technical_language>move this signature is declared, changes</technical_language>

Target:
public void setUp() { params.put("Digits", "1234"); params.put("CallSid", "CA1234567890ABCDE"); params.put("To", "+18005551212"); params.put("Caller", "+14158675309"); params.put("From", "+14158675309"); }
Source:
<code>private void testVariousErrors(String dcWherePutHappened) throws Exception { ArrayList<MockServer> mockServers = new ArrayList<>(mockServerLayout.getMockServers()); ArrayList<ServerErrorCode> serverErrors = new ArrayList<>(Arrays.asList(ServerErrorCode.values())); serverErrors.remove(ServerErrorCode.Blob_Deleted); <START> serverErrors.remove(ServerErrorCode.Blob_Expired); <END> boolean goodServerMarked = false; for (MockServer mockServer : mockServers) { if (!goodServerMarked && mockServer.getDataCenter().equals(dcWherePutHappened)) { mockServer.setServerErrorForAllRequests(ServerErrorCode.No_Error); goodServerMarked = true; } else { mockServer.setServerErrorForAllRequests(serverErrors.get(random.nextInt(serverErrors.size()))); } } getAndAssertSuccess(); }</code><technical_language>guess need remove No_Error</technical_language>

Target:
private void testVariousErrors(String dcWherePutHappened) throws Exception { ArrayList<MockServer> mockServers = new ArrayList<>(mockServerLayout.getMockServers()); ArrayList<ServerErrorCode> serverErrors = new ArrayList<>(Arrays.asList(ServerErrorCode.values())); serverErrors.remove(ServerErrorCode.Blob_Deleted); serverErrors.remove(ServerErrorCode.Blob_Expired); serverErrors.remove(ServerErrorCode.No_Error); boolean goodServerMarked = false; for (MockServer mockServer : mockServers) { if (!goodServerMarked && mockServer.getDataCenter().equals(dcWherePutHappened)) { mockServer.setServerErrorForAllRequests(ServerErrorCode.No_Error); goodServerMarked = true; } else { mockServer.setServerErrorForAllRequests(serverErrors.get(random.nextInt(serverErrors.size()))); } } getAndAssertSuccess(); }
Source:
<code>public void testTranslateFormtWithNull() { FORMAT format = null; String result = translator.translateFormat(format); <START> assertEquals(FORMAT.DATE_TIME.getJSONValue(), result); <END> }</code><technical_language>this fail</technical_language>

Target:
public void testTranslateFormtWithNull() { FORMAT format = null; String result = translator.translateFormat(format); assertNull(result); }
Source:
<code><START> public void probabilityZeroAlwaysGoesToOldService() { <END> IntStream.range(0, 100) .forEach($ -> selectingService.getFreshTimestamp()); verify(oldService, times(100)).getFreshTimestamp(); }</code><technical_language>nit: set probability start of test assume default/look initialised version</technical_language>

Target:
public void probabilityZeroAlwaysGoesToOldService() { probability.set(0.0); IntStream.range(0, 100) .forEach($ -> selectingService.getFreshTimestamp()); verify(oldService, times(100)).getFreshTimestamp(); }
Source:
<code>protected Object doWork() { if (normalBamFile == null && tumorBamFile == null) { throw new UserException.CommandLineException("At least one of normal and tumor BAM files must be provided. Stopping."); } if (normalBamFile != null && normalHetOutputFile == null) { throw new UserException.CommandLineException("If the normal BAM file is provided, the normal Het output file must also be provided. Stopping."); } if (tumorBamFile != null && tumorHetOutputFile == null) { throw new UserException.CommandLineException("If the tumor BAM file is provided, the tumor Het output file must also be provided. Stopping."); } <START> HetCoverageJobType jobType = HetCoverageJobType.NONE; <END> if (normalBamFile != null && tumorBamFile != null) { jobType = HetCoverageJobType.MATCHED_NORMAL_TUMOR; logger.info("MATCHED_NORMAL_TUMOR mode selected."); } if (normalBamFile != null && tumorBamFile == null) { jobType = HetCoverageJobType.NORMAL_ONLY; logger.info("NORMAL_ONLY mode selected."); } if (normalBamFile == null && tumorBamFile != null) { jobType = HetCoverageJobType.TUMOR_ONLY; logger.info("TUMOR_ONLY mode selected."); } switch (jobType) { case NORMAL_ONLY: runNormalOnly(); break; case TUMOR_ONLY: runTumorOnly(); break; case MATCHED_NORMAL_TUMOR: runMatchedNormalTumor(); break; case NONE: throw new GATKException.ShouldNeverReachHereException("The job type is not properly determined from" + " the arguments. This should not happen."); default: throw new GATKException.ShouldNeverReachHereException("The job type is not properly determined from" + " the arguments. This should not happen."); } return "SUCCESS"; }</code><technical_language>final please</technical_language>

Target:
protected Object doWork() { if (normalBamFile == null && tumorBamFile == null) { throw new UserException.BadArgumentValue(String.format("You must provide at least one normal (argument %s)" + " or tumor (argument %s) alignment file.", ExomeStandardArgumentDefinitions.NORMAL_BAM_FILE_LONG_NAME, ExomeStandardArgumentDefinitions.TUMOR_BAM_FILE_LONG_NAME)); } if (normalBamFile != null && normalHetOutputFile == null) { throw new UserException.CommandLineException(String.format("If the normal BAM file is provided, the normal" + " Het pulldown output file (argument %s) must also be provided.", ExomeStandardArgumentDefinitions.NORMAL_ALLELIC_COUNTS_FILE_LONG_NAME)); } if (tumorBamFile != null && tumorHetOutputFile == null) { throw new UserException.CommandLineException(String.format("If the tumor BAM file is provided, the tumor" + " Het pulldown output file (argument %s) must also be provided.", ExomeStandardArgumentDefinitions.TUMOR_ALLELIC_COUNTS_FILE_LONG_NAME)); } if (normalBamFile != null && tumorBamFile != null) { logger.info("MATCHED_NORMAL_TUMOR mode selected."); runMatchedNormalTumor(); } else if (normalBamFile != null) { logger.info("NORMAL_ONLY mode selected."); runNormalOnly(); } else { logger.info("TUMOR_ONLY mode selected."); runTumorOnly(); } return "SUCCESS"; }
Source:
<code>List<AttributeTypeInfo> attributes() throws IOException; FeatureType getFeatureType() throws IOException; String getCqlFilter(); void setCqlFilter(String cqlFilterString); FeatureSource<? extends FeatureType, ? extends Feature> getFeatureSource( ProgressListener listener, Hints hints) throws IOException; boolean isCircularArcPresent(); void setCircularArcPresent(boolean arcsPresent); <START> default boolean getEncodeCoordinatesMeasures() { <END> return true; }</code><technical_language>"isEncodeCoordinateMeasures" "isCoordinateMeasureEncoded"</technical_language>

Target:
List<AttributeTypeInfo> attributes() throws IOException; FeatureType getFeatureType() throws IOException; String getCqlFilter(); void setCqlFilter(String cqlFilterString); FeatureSource<? extends FeatureType, ? extends Feature> getFeatureSource( ProgressListener listener, Hints hints) throws IOException; boolean isCircularArcPresent(); void setCircularArcPresent(boolean arcsPresent); default boolean getEncodeMeasures() { return false; }
Source:
<code>public Set<ExplainedQueryString> findQueriesFromExplanation( Map<String, String> originalQueryInMap, Explanation explanation) { Set<ExplainedQueryString> matchedQueryStrings = new LinkedHashSet<>(); Set<String> matchedQueryTerms = explainServiceHelper.findMatchedWords(explanation); for (String matchedQueryTerm : matchedQueryTerms) { Map<String, Double> matchedQueryRule = explainServiceHelper.findMatchQueries(matchedQueryTerm, originalQueryInMap); Optional<Entry<String, Double>> optionalEntry = matchedQueryRule.entrySet().stream().max(Comparator.comparingDouble(Entry::getValue)); <START> if (optionalEntry.isPresent()) { <END> Entry<String, Double> entry = optionalEntry.get(); matchedQueryStrings.add( ExplainedQueryString.create( matchedQueryTerm, entry.getKey(), originalQueryInMap.get(entry.getKey()), entry.getValue())); } } return matchedQueryStrings; }</code><technical_language>else throw exception</technical_language>

Target:
public Set<ExplainedQueryString> findQueriesFromExplanation( Map<String, String> originalQueryInMap, Explanation explanation) { Set<ExplainedQueryString> matchedQueryStrings = new LinkedHashSet<>(); Set<String> matchedQueryTerms = explainServiceHelper.findMatchedWords(explanation); for (String matchedQueryTerm : matchedQueryTerms) { Map<String, Double> matchedQueryRule = explainServiceHelper.findMatchQueries(matchedQueryTerm, originalQueryInMap); Entry<String, Double> entry = matchedQueryRule .entrySet() .stream() .max(Comparator.comparingDouble(Entry::getValue)) .orElseThrow( () -> new IllegalStateException( "matchedQueryRule.entrySet() shouldn't return an empty Set")); matchedQueryStrings.add( ExplainedQueryString.create( matchedQueryTerm, entry.getKey(), originalQueryInMap.get(entry.getKey()), entry.getValue())); } return matchedQueryStrings; }
Source:
<code>public void tearDown() throws Exception { mServiceHandler.chan.disconnect(); mServiceHandler.stop(); if (mManager != null) { mManager.disconnect(); <START> } <END> }</code><technical_language>Do need wait for handler threads process outstanding messages</technical_language>

Target:
public void tearDown() throws Exception { waitForIdleHandler(mServiceHandler, mTimeoutMs); mServiceHandler.chan.disconnect(); mServiceHandler.stop(); if (mManager != null) { mManager.disconnect(); } }
Source:
<code>private boolean restore( SolrClient client, String collection, String backupLocation, String backupName) throws IOException, SolrServerException { if (canRestore(client, collection)) { CollectionAdminRequest.Restore restore = CollectionAdminRequest.AsyncCollectionAdminRequest.restoreCollection( collection, backupName) .setLocation(backupLocation); String syncReqId = restore.processAsync(client); <START> while (true) { <END> CollectionAdminRequest.RequestStatusResponse requestStatusResponse = CollectionAdminRequest.requestStatus(syncReqId).process(client); RequestStatusState requestStatus = requestStatusResponse.getRequestStatus(); if (requestStatus == RequestStatusState.COMPLETED) { LOGGER.debug("Restore status: {}", requestStatus); return true; } else if (requestStatus == RequestStatusState.FAILED || requestStatus == RequestStatusState.NOT_FOUND) { LOGGER.debug("Restore status: {}", requestStatus); printErrorMessage("Restore failed. "); printResponseErrorMessages(requestStatusResponse); return false; } try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } else { LOGGER.warn("Unable to restore collection {}", collection); return false; } }</code><technical_language>In case RequestStatusState is RUNNING SUBMITTED, is a potential for infinite loop here</technical_language>

Target:
private boolean restore( SolrClient client, String collection, String backupLocation, String backupName) throws IOException, InterruptedException, SolrServerException { if (!canRestore(client, collection)) { LOGGER.warn("Unable to restore collection {}", collection); return false; } CollectionAdminRequest.Restore restore = CollectionAdminRequest.AsyncCollectionAdminRequest.restoreCollection(collection, backupName) .setLocation(backupLocation); String syncReqId = restore.processAsync(client); boolean restoreComplete = false; while (true) { CollectionAdminRequest.RequestStatusResponse requestStatusResponse = CollectionAdminRequest.requestStatus(syncReqId).process(client); RequestStatusState requestStatus = requestStatusResponse.getRequestStatus(); if (requestStatus == RequestStatusState.COMPLETED) { LOGGER.debug("Restore status: {}", requestStatus); restoreComplete = true; break; } else if (requestStatus == RequestStatusState.FAILED || requestStatus == RequestStatusState.NOT_FOUND) { LOGGER.debug("Restore status: {}", requestStatus); printErrorMessage("Restore failed. "); printResponseErrorMessages(requestStatusResponse); break; } TimeUnit.SECONDS.sleep(1); } return restoreComplete; }
Source:
<code>private void checkWriteAccess(ISCTFileSystemAccess access, String outputConfiguration, String folderName) { URI uri = access.getURI("", outputConfiguration); if (uri.isFile()) { File file = new File(uri.path()); if (!file.canWrite()) { <START> logger.log(String.format("Can not generated files to read-only folder '%s'. ", folderName)); <END> } } }</code><technical_language>generated -> generate</technical_language>

Target:
private void checkWriteAccess(ISCTFileSystemAccess access, String outputConfiguration, String folderName) { URI uri = access.getURI("", outputConfiguration); if (uri.isFile()) { File file = new File(uri.path()); if (!file.canWrite()) { logger.log(String.format("Can not generate files to read-only folder '%s'. ", folderName)); } } }
Source:
<code>protected IStatus buildStatistics() { try { fStatistics = (fResource == null ? null : new TmfStateStatistics(this) ); } catch (TmfTraceException e) { <START> return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage()); <END> } return Status.OK_STATUS; }</code><technical_language>other constructor pass exception: public Status(int severity, String pluginId, String message, Throwable exception) do in LTTngKernelTrace</technical_language>

Target:
protected IStatus buildStatistics() { try { fStatistics = (fResource == null ? null : new TmfStateStatistics(this) ); } catch (TmfTraceException e) { return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e); } return Status.OK_STATUS; }
Source:
<code>private void assertFilterDocumentProjectFunction(Function<Tuple2<String, AffMatchDocumentProject>, Boolean> function, Float confidenceLevelThreshold) throws Exception { assertTrue(function.call( <START> new Tuple2<String, AffMatchDocumentProject>(projectId, new AffMatchDocumentProject(documentId, projectId, 0.6f)))); <END> float confidenceLevel = 0.4f; boolean result = function.call( new Tuple2<String, AffMatchDocumentProject>(projectId, new AffMatchDocumentProject(documentId, projectId, confidenceLevel))); if (confidenceLevelThreshold == null || confidenceLevelThreshold <= confidenceLevel) { assertTrue(result); } else { assertFalse(result); } }</code><technical_language>Well, if passed confidenceLevel greater 0.6f? argument this function confidenceLevelThreshold!=null?confidenceLevelThreshold+ 0.1f:0.1f instead of 0.6f</technical_language>

Target:
private void assertFilterDocumentProjectFunction(Function<Tuple2<String, AffMatchDocumentProject>, Boolean> function, Float confidenceLevelThreshold) throws Exception { if (confidenceLevelThreshold != null) { float greaterConfidenceLevel = confidenceLevelThreshold+0.1f; assertTrue(function.call(new Tuple2<String, AffMatchDocumentProject>(projectId, new AffMatchDocumentProject(documentId, projectId, greaterConfidenceLevel)))); float smallerConfidenceLevel = confidenceLevelThreshold-0.1f; assertFalse(function.call(new Tuple2<String, AffMatchDocumentProject>(projectId, new AffMatchDocumentProject(documentId, projectId, smallerConfidenceLevel)))); } else { assertTrue(function.call(new Tuple2<String, AffMatchDocumentProject>(projectId, new AffMatchDocumentProject(documentId, projectId, 0.0001f)))); } }
Source:
<code>public KeyStore loadKeyStore() throws IOException, GeneralSecurityException { <START> KeyStore ks = KeyStore.getInstance("JKS"); <END> InputStream inputStream = new FileInputStream(new File(keyStorePath)); ks.load(inputStream, passwordStringToCharArray(keyStorePassword)); return ks; }</code><technical_language>declare global final variable for "JKS" refer in code</technical_language>

Target:
public KeyStore loadKeyStore() throws IOException, GeneralSecurityException { KeyStore ks = KeyStore.getInstance(JKS_KEY_STORE_TYPE); InputStream inputStream = null; try { inputStream = new FileInputStream(new File(keyStorePath)); ks.load(inputStream, passwordStringToCharArray(keyStorePassword)); return ks; } finally { forceClose(inputStream); } }
Source:
<code>public Iterator iterator() { return new Iterator() { final Iterator innerIterator = new StepIterator(ObjectRange.this, 1); @Override <START> public boolean hasNext() { <END> return innerIterator.hasNext(); } @Override public Object next() { return innerIterator.next(); } @Override public void remove() { innerIterator.remove(); } }; }</code><technical_language>innerIterator is thread-safe, meaning if threads access next() in parallel, get junk. synchronizing wrapper, thread a time interator, other threads blocked in wrapper thread is done. way, this method returns a thread-safe iterator</technical_language>

Target:
public Iterator<Comparable> iterator() { return new Iterator<Comparable>() { private final Iterator<Comparable> delegate = new LazySteppingIterator(ObjectRange.this, 1); @Override public synchronized boolean hasNext() { return delegate.hasNext(); } @Override public synchronized Comparable next() { return delegate.next(); } @Override public synchronized void remove() { delegate.remove(); } }; }
Source:
<code>public void testAllChildrenNoMatchExpectTrue() { fFilter.setNot(true); <START> assertTrue(fFilter.matches(fEvent)); <END> }</code><technical_language>testNoChild... filter children</technical_language>

Target:
public void testAllChildrenNoMatchExpectTrue() { fFilter.setNot(true); ITmfFilterTreeNode child = fFilterNode.clone(); assertEquals("addChild()", 0, fFilterNode.addChild(child)); assertFalse(fFilter.matches(fEvent)); }
Source:
<code>public void testIntersect() { StatisticRange zeroToTen = range(0, 10, 10); <START> StatisticRange zeroToTwenty = range(5, 15, 60); <END> assertEquals(zeroToTen.intersect(zeroToTwenty), range(5, 10, 10)); }</code><technical_language>this misnamed</technical_language>

Target:
public void testIntersect() { StatisticRange zeroToTen = range(0, 10, 10); StatisticRange fiveToFifteen = range(5, 15, 60); assertEquals(zeroToTen.intersect(fiveToFifteen), range(5, 10, 10)); }
Source:
<code>private void addGlusterBricksFeature(Features features) { Feature feature = new Feature(); feature.setName("Gluster Bricks management"); <START> feature.setDescription("Ability to delete gluster bricks with data migration using the actions migrate and commit. Action migrate in combination with stop migrates the data and brick can be reused further."); <END> features.getFeature().add(feature); }</code><technical_language>Update this message, user 'commit'; internal implementation</technical_language>

Target:
private void addGlusterBricksFeature(Features features) { Feature feature = new Feature(); feature.setName("Gluster Bricks management"); feature.setDescription("Ability to delete gluster bricks with data migration using the actions migrate and DELETE. Action migrate in combination with stopmigrate, migrates the data and brick can be reused further."); features.getFeature().add(feature); }
Source:
<code>public void updateCapabilities(GutenbergPropsBuilder gutenbergPropsBuilder) { if (getActivity() != null) { <START> GutenbergProps gutenbergProps = gutenbergPropsBuilder.build(getActivity(), mHtmlModeEnabled); <END> mWPAndroidGlueCode.updateCapabilities(gutenbergProps); } }</code><technical_language>extract getActivity() out a variable insure hit scenario call line 217 object, getActivity() call line 218 returns null. final Activity activity = getActivity(); if (activity !=null) { GutenbergProps gutenbergProps = gutenbergPropsBuilder.build(activity, mHtmlModeEnabled); ... }</technical_language>

Target:
public void updateCapabilities(GutenbergPropsBuilder gutenbergPropsBuilder) { final Activity activity = getActivity(); if (activity != null) { GutenbergProps gutenbergProps = gutenbergPropsBuilder.build(activity, mHtmlModeEnabled); mWPAndroidGlueCode.updateCapabilities(gutenbergProps); } }
Source:
<code>void init() { ch.closeFuture().addListener(f -> addListenerExecutor.submit(() -> { log.debug("Channel disconnected, removing event sender listener for id: " + Util.printArray(listenerId)); <START> cache.removeListenerAsync(this); <END> unblockCommands(); })); }</code><technical_language>understanding of this is removeListenerAsync execute ClusterExecutor .. sense for this called form addListenerExecutor async? do like: java ch.closeFuture().addListener(f -> { log.debug("Channel disconnected, removing event sender listener for id: " + Util.printArray(listenerId)); cache.removeListenerAsync(this).thenRun(this::unblockCommands); }); cache.removeListenerAsync(this);</technical_language>

Target:
void init() { ch.closeFuture().addListener(f -> { log.debug("Channel disconnected, removing event sender listener for id: " + Util.printArray(listenerId)); cache.removeListenerAsync(this) .whenComplete((ignore, t) -> unblockCommands()); }); }
Source:
<code>private <K extends Exception> void handleExceptionInternal( RetryableCassandraRequest<?, K> req, InetSocketAddress host, Exception ex) throws K { if (isRetriableException(ex) || isRetriableWithBackoffException(ex) || isFastFailoverException(ex)) { if (req.getNumberOfAttempts() >= maxTriesTotal.get()) { if (ex instanceof TTransportException && ex.getCause() != null && (ex.getCause().getClass() == SocketException.class)) { log.error(CONNECTION_FAILURE_MSG, req.getNumberOfAttempts(), ex); String errorMsg = MessageFormatter.format(CONNECTION_FAILURE_MSG, req.getNumberOfAttempts()).getMessage(); throw (K) new TTransportException(((TTransportException) ex).getType(), errorMsg, ex); } else { log.error("Tried to connect to cassandra times.", SafeArg.of("numTries", req.getNumberOfAttempts()), ex); throw (K) ex; } } else { if (req.getNumberOfAttempts() > 1) { <START> log.warn("Error occurred talking to cassandra. Attempt of {}. Exception message was: : {}", <END> SafeArg.of("numTries", req.getNumberOfAttempts()), SafeArg.of("maxTotalTries", maxTriesTotal), SafeArg.of("exceptionClass", ex.getClass().getTypeName()), UnsafeArg.of("exceptionMessage", ex.getMessage())); } else { log.warn("Error occurred talking to cassandra. Attempt of {}.", SafeArg.of("numTries", req.getNumberOfAttempts()), SafeArg.of("maxTotalTries", maxTriesTotal), ex); } if (isConnectionException(ex) && req.getNumberOfAttempts() >= maxTriesSameHost.get()) { blacklist.add(host); } } } else { throw (K) ex; } }</code><technical_language>bumped INFO in #2776; replicate here. get merge conflicts try put this develop</technical_language>

Target:
private <K extends Exception> void handleExceptionInternal( RetryableCassandraRequest<?, K> req, InetSocketAddress host, Exception ex) throws K { if (isRetriableException(ex) || isRetriableWithBackoffException(ex) || isFastFailoverException(ex)) { if (req.getNumberOfAttempts() >= maxTriesTotal.get()) { if (ex instanceof TTransportException && ex.getCause() != null && (ex.getCause().getClass() == SocketException.class)) { log.error(CONNECTION_FAILURE_MSG, req.getNumberOfAttempts(), ex); String errorMsg = MessageFormatter.format(CONNECTION_FAILURE_MSG, req.getNumberOfAttempts()).getMessage(); throw (K) new TTransportException(((TTransportException) ex).getType(), errorMsg, ex); } else { log.error("Tried to connect to cassandra times.", SafeArg.of("numTries", req.getNumberOfAttempts()), ex); throw (K) ex; } } else { if (req.getNumberOfAttempts() > 1) { log.info("Error occurred talking to cassandra. Attempt of {}. Exception message was: : {}", SafeArg.of("numTries", req.getNumberOfAttempts()), SafeArg.of("maxTotalTries", maxTriesTotal), SafeArg.of("exceptionClass", ex.getClass().getTypeName()), UnsafeArg.of("exceptionMessage", ex.getMessage())); } else { log.info("Error occurred talking to cassandra. Attempt of {}.", SafeArg.of("numTries", req.getNumberOfAttempts()), SafeArg.of("maxTotalTries", maxTriesTotal), ex); } if (isConnectionException(ex) && req.getNumberOfAttempts() >= maxTriesSameHost.get()) { blacklist.add(host); } } } else { throw (K) ex; } }
Source:
<code><START> public int hashCode() { <END> final int prime = 31; int result = super.hashCode(); result = prime * result + ((this.channel == null) ? 0 : this.channel.hashCode()); result = prime * result + ((this.supplier == null) ? 0 : this.supplier.hashCode()); return result; }</code><technical_language>java.util.Objects</technical_language>

Target:
public int hashCode() { return super.hashCode() + Objects.hash(this.supplier, this.channel); }
Source:
<code>public void setUpload(String upload) { if (upload != null && (upload.length() == 0 || "false".equals(upload))) upload = null; if (!Objects.equals(upload, _auxinf != null ? _auxinf.upload : null)) { initAuxInfo().upload = upload; if (upload != null) { Matcher matcher = Pattern.compile("maxsize=([^,]+)").matcher(upload); if (matcher.find()) { try { Integer maxsz = Integer.parseInt(matcher.group(1)); setAttribute(org.zkoss.zk.ui.impl.Attributes.UPLOAD_MAX_SIZE, maxsz); } catch (NumberFormatException e) { throw new UiException("The upload max size should be a positive integer."); } } <START> if (Pattern.compile("(?:^|,)\\s*native\\s*(?:$|,)").matcher(upload).find()) { <END> setAttribute(org.zkoss.zk.ui.impl.Attributes.UPLOAD_NATIVE, true); } else { removeAttribute(org.zkoss.zk.ui.impl.Attributes.UPLOAD_NATIVE); } } smartUpdate("upload", getRealUpload()); } }</code><technical_language>general regex? split "," get a map</technical_language>

Target:
public void setUpload(String upload) { if (upload != null && (upload.length() == 0 || "false".equals(upload))) upload = null; if (!Objects.equals(upload, _auxinf != null ? _auxinf.upload : null)) { initAuxInfo().upload = upload; Uploads.parseUpload(this, upload); smartUpdate("upload", Uploads.getRealUpload(this, getUpload())); } }
Source:
<code>public void start() { _daemonThreadExecutorService.scheduleAtFixedRate(() -> { try { if (!_runningTasks.isEmpty()) { _logger.info("Checking status of running kafka connector tasks."); <START> synchronized (_runningTasks) { <END> _runningTasks.keySet().forEach(this::restartIfNotRunning); } } else { _logger.warn("connector received no datastreams tasks yet."); } } catch (Exception e) { _logger.warn("Failed to check status of kafka connector tasks.", e); } }, _config.getDaemonThreadIntervalSeconds(), _config.getDaemonThreadIntervalSeconds(), TimeUnit.SECONDS); }</code><technical_language>this is place _runningTasks is accessed synchronized. needed ConcurrentHashMap already? add synchronized onAssignmentChange createKafkaConnectorTask too</technical_language>

Target:
public void start() { _daemonThreadExecutorService.scheduleAtFixedRate(() -> { try { if (!_runningTasks.isEmpty()) { _logger.info("Checking status of running kafka connector tasks."); _runningTasks.keySet().forEach(this::restartIfNotRunning); } else { _logger.warn("connector received no datastreams tasks yet."); } } catch (Exception e) { _logger.warn("Failed to check status of kafka connector tasks.", e); } }, _config.getDaemonThreadIntervalSeconds(), _config.getDaemonThreadIntervalSeconds(), TimeUnit.SECONDS); }
Source:
<code>private void purgeOldPackageBits(){ <START> ContentManagerLocal cm = LookupUtil.getContentManager(); <END> cm.removeHistoryDeploymentsBits(); }</code><technical_language>Rest of class this lookup in DataPurgeJob instantiation, this for clarity</technical_language>

Target:
private void purgeOldPackageBits(){ long timeStart = System.currentTimeMillis(); LOG.info("Package bits purge starting at " + new Date(timeStart)); contentManager.removeHistoryDeploymentsBits(); long duration = System.currentTimeMillis() - timeStart; LOG.info("Purged old package bits completed in [" + duration + "]ms"); }
Source:
<code><START> public void add(final Byte value, final int inc) { <END> MutableInt counter = countMap.get(value & 0xFF); if (counter == null) { counter = new MutableInt(); countMap.put(value & 0xFF, counter); } counter.value += inc; }</code><technical_language>please rewrite this in terms of add(value& 0xFF, inc)</technical_language>

Target:
public void add(final Byte value, final int inc) { add(value& 0xFF, inc); }