auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void addVirtioScsiController(VmBase vm) { <START> boolean hasIoThreads = vm.getNumOfIoThreads() > 1; <END> int scsiControllers = hasIoThreads ? vm.getNumOfIoThreads() : 1; for (int i = 0; i < scsiControllers; i++) { Map<String, Object> specParams = new HashMap<>(); if (hasIoThreads) { specParams.put(VdsProperties.DRIVER, i); } VmDevice device = addManagedDevice( new VmDeviceId(Guid.newGuid(), vm.getId()), VmDeviceGeneralType.CONTROLLER, VmDeviceType.VIRTIOSCSI, specParams, true, false); } }</code><technical_language>I say: boolean hasIoThreads = FeatureSupported.virtioScsiIoThread(vm.getCompatibilityVersion()) && vm.getNumOfIoThreads() > 0</technical_language>

Target:
public void addVirtioScsiController(VmBase vm) { boolean hasIoThreads = vm.getNumOfIoThreads() > 0; int scsiControllers = hasIoThreads ? vm.getNumOfIoThreads() : 1; for (int i = 0; i < scsiControllers; i++) { Map<String, Object> specParams = new HashMap<>(); if (hasIoThreads) { specParams.put(VdsProperties.DRIVER, i); } VmDevice device = addManagedDevice( new VmDeviceId(Guid.newGuid(), vm.getId()), VmDeviceGeneralType.CONTROLLER, VmDeviceType.VIRTIOSCSI, specParams, true, false); } }
Source:
<code><START> long computeProductOfSeries(final int startIndex, final int seriesLength) { <END> long result = 1; final int endIndex = startIndex + seriesLength - 1; for (int characterIndex = startIndex; characterIndex <= endIndex; characterIndex++) { result = result * Character.getNumericValue(stringToSearch.charAt(characterIndex)); } return result; }</code><technical_language>I private methods stay private. Do agree? :slightly_smiling_face:</technical_language>

Target:
private long computeProductOfSeries(final int startIndex, final int seriesLength) { long result = 1; final int endIndex = startIndex + seriesLength - 1; for (int characterIndex = startIndex; characterIndex <= endIndex; characterIndex++) { result = result * Character.getNumericValue(stringToSearch.charAt(characterIndex)); } return result; }
Source:
<code>private void cleanOldExecutionLogs(long millis) { long beforeDeleteLogsTimestamp = System.currentTimeMillis(); try { int count = executorLoader.removeExecutionLogsByTime(millis); logger.info("Cleaned up " + count + " log entries."); } catch (ExecutorManagerException e) { logger.error("log clean up failed."); <START> e.printStackTrace(); <END> } logger.info("Log cleaning up cost " + (System.currentTimeMillis() - beforeDeleteLogsTimestamp)/1000 + " seconds."); }</code><technical_language>Log stack trace logger</technical_language>

Target:
private void cleanOldExecutionLogs(long millis) { long beforeDeleteLogsTimestamp = System.currentTimeMillis(); try { int count = executorLoader.removeExecutionLogsByTime(millis); logger.info("Cleaned up " + count + " log entries."); } catch (ExecutorManagerException e) { logger.error("log clean up failed. ", e); } logger.info("log clean up time: " + (System.currentTimeMillis() - beforeDeleteLogsTimestamp)/1000 + " seconds."); }
Source:
<code>protected Warning createWarning(final Matcher matcher) { String filename = matcher.group(1); int lineNumber = getLineNumber(matcher.group(2)); int column = getLineNumber(matcher.group(3)); String type = matcher.group(4); String category = matcher.group(6); String message = matcher.group(5); Priority priority; if (type.contains("error")) { <START> priority = Priority.HIGH; <END> } else { priority = Priority.NORMAL; } Warning warning; if (category == null) { warning = createWarning(filename, lineNumber, message, priority); } else { warning = createWarning(filename, lineNumber, category, message, priority); } warning.setColumnPosition(column); return warning; }</code><technical_language>is a warning in log branch</technical_language>

Target:
protected Warning createWarning(final Matcher matcher) { String filename = matcher.group(1); int lineNumber = getLineNumber(matcher.group(2)); int column = getLineNumber(matcher.group(3)); String type = matcher.group(4); String message = matcher.group(5); String category = matcher.group(6); Priority priority; if (type.contains("error")) { priority = Priority.HIGH; } else { priority = Priority.NORMAL; } Warning warning = createWarning(filename, lineNumber, category, message, priority); warning.setColumnPosition(column); return warning; }
Source:
<code>private OpenFoodAPIClient(String apiUrl) { if (Build.VERSION.SDK_INT == 24) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) .tlsVersions(TlsVersion.TLS_1_2) .cipherSuites(CipherSuite.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256) .build(); builder.connectionSpecs(Collections.singletonList(spec)); <START> httpClient = builder.build(); <END> } apiService = new Retrofit.Builder() .baseUrl(apiUrl) .client(httpClient) .addConverterFactory(jacksonConverterFactory) .build() .create(OpenFoodAPIService.class); }</code><technical_language>@sachincool; afraid this overwrite timeout settings. more OkHttpClient instantations in code (AppModule.java OpenFoodAPIServiceTest.java advantage of this fix). other features fail (for example: get categories fails a TLS handshake error) if approach, define a helper function provide a base OkHttpClient.Builder object. idea: public static OkHttpClient.Builder HttpClientBuilder() { OkHttpClient.Builder builder = new OkHttpClient.Builder() .connectTimeout(5000, TimeUnit.MILLISECONDS) .readTimeout(30000, TimeUnit.MILLISECONDS) .writeTimeout(30000, TimeUnit.MILLISECONDS); if (Build.VERSION.SDK_INT == 24) { ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) .tlsVersions(TlsVersion.TLS_1_2) .cipherSuites(CipherSuite.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256) .build(); builder.connectionSpecs(Collections.singletonList(spec)); } return builder; } sense</technical_language>

Target:
private OpenFoodAPIClient(String apiUrl) { apiService = new Retrofit.Builder() .baseUrl(apiUrl) .client(httpClient) .addConverterFactory(jacksonConverterFactory) .build() .create(OpenFoodAPIService.class); }
Source:
<code>MantaMultipartUploadPart uploadPart(final JobsMultipartUpload upload, final int partNumber, final HttpEntity entity, final HttpContext context) throws IOException { Validate.notNull(upload, "Multipart upload object must not be null"); Validate.notNull(entity, "Upload entity must not be null"); final String path = multipartPath(upload.getId(), partNumber); final HttpPut put = httpHelper.getRequestFactory().put(path); put.setEntity(entity); final int expectedStatusCode = HttpStatus.SC_NO_CONTENT; <START> try (CloseableHttpResponse response = httpHelper.getConnectionContext().getHttpClient().execute(put, context)) { <END> StatusLine statusLine = response.getStatusLine(); final MantaObjectResponse objectResponse = new MantaObjectResponse(path, new MantaHttpHeaders(response.getAllHeaders())); if (statusLine.getStatusCode() != expectedStatusCode) { String errorMessage = "Manta server responded with an unexpected response code"; MantaClientHttpResponseException mchre = new MantaClientHttpResponseException(put, response, path); MantaMultipartException e = new MantaMultipartException(errorMessage, mchre); HttpHelper.annotateContextedException(e, put, response); throw e; } return new MantaMultipartUploadPart(objectResponse); } }</code><technical_language>This is a long chain of linked objects. break out context client variable</technical_language>

Target:
MantaMultipartUploadPart uploadPart(final JobsMultipartUpload upload, final int partNumber, final HttpEntity entity, final HttpContext context) throws IOException { Validate.notNull(upload, "Multipart upload object must not be null"); Validate.notNull(entity, "Upload entity must not be null"); final String path = multipartPath(upload.getId(), partNumber); final HttpPut put = httpHelper.getRequestFactory().put(path); put.setEntity(entity); final int expectedStatusCode = HttpStatus.SC_NO_CONTENT; final CloseableHttpClient httpClient = httpHelper.getConnectionContext().getHttpClient(); try (CloseableHttpResponse response = httpClient.execute(put, context)) { StatusLine statusLine = response.getStatusLine(); final MantaObjectResponse objectResponse = new MantaObjectResponse(path, new MantaHttpHeaders(response.getAllHeaders())); if (statusLine.getStatusCode() != expectedStatusCode) { String errorMessage = "Manta server responded with an unexpected response code"; MantaClientHttpResponseException mchre = new MantaClientHttpResponseException(put, response, path); MantaMultipartException e = new MantaMultipartException(errorMessage, mchre); HttpHelper.annotateContextedException(e, put, response); throw e; } return new MantaMultipartUploadPart(objectResponse); } }
Source:
<code>public void preCommit() { if (deletionPlan.isRejected()) { throw new ConflictException(deletionPlan.toString()); } else if (!deletionPlan.isEmpty()) { final Set<String> deletedIds = deletionPlan.getDeletedItems() .stream() .filter(Component.class::isInstance) .map(Component.class::cast) .map(Component::getId) .collect(Collectors.toSet()); if (!deletedIds.isEmpty()) { deletionPlan.markForDeletion(getReferringRefSetMembers(deletedIds)); } delete(); deletionPlan = new SnomedDeletionPlan(); } if (isUniquenessCheckEnabled()) { List<CDOIDAndVersion> newObjects = transaction.getChangeSetData().getNewObjects(); ComponentIdUniquenessValidator uniquenessEnforcer = new ComponentIdUniquenessValidator(this); for (CDOIDAndVersion newCdoIdAndVersion : newObjects) { CDOObject newObject = transaction.getObject(newCdoIdAndVersion.getID()); if (newObject instanceof Component) { Component newComponent = (Component) newObject; uniquenessEnforcer.validateAndReplaceComponentId(newComponent); } } } <START> new EffectiveTimeRestorer(getBranch()).restoreEffectiveTimes(transaction.getChangeSetData().getChangedObjects().stream() <END> .map(cdoKey -> transaction.getObject(cdoKey.getID()))::iterator); }</code><technical_language>instantiate restorer in constructor pass branch method</technical_language>

Target:
public void preCommit() { if (deletionPlan.isRejected()) { throw new ConflictException(deletionPlan.toString()); } else if (!deletionPlan.isEmpty()) { final Set<String> deletedIds = deletionPlan.getDeletedItems() .stream() .filter(Component.class::isInstance) .map(Component.class::cast) .map(Component::getId) .collect(Collectors.toSet()); if (!deletedIds.isEmpty()) { deletionPlan.markForDeletion(getReferringRefSetMembers(deletedIds)); } delete(); deletionPlan = new SnomedDeletionPlan(); } if (isUniquenessCheckEnabled()) { List<CDOIDAndVersion> newObjects = transaction.getChangeSetData().getNewObjects(); ComponentIdUniquenessValidator uniquenessEnforcer = new ComponentIdUniquenessValidator(this); for (CDOIDAndVersion newCdoIdAndVersion : newObjects) { CDOObject newObject = transaction.getObject(newCdoIdAndVersion.getID()); if (newObject instanceof Component) { Component newComponent = (Component) newObject; uniquenessEnforcer.validateAndReplaceComponentId(newComponent); } } } effectiveTimeRestorer.restoreEffectiveTimes(transaction.getChangeSetData().getChangedObjects().stream().map(cdoKey -> transaction.getObject(cdoKey.getID()))::iterator, getBranch()); }
Source:
<code>protected Long nullUnsafeScalar(OffsetTime value) { <START> return value.atDate( LocalDate.of( 1970, Month.JANUARY, 1 ) ).toInstant().toEpochMilli(); <END> }</code><technical_language>LocalDate.of( 1970, Month.JANUARY, 1 ) a constant</technical_language>

Target:
protected Long nullUnsafeScalar(OffsetTime value) { return value.atDate( EPOCH_DATE ).toInstant().toEpochMilli(); }
Source:
<code>public void schemaDoesNotExistOnCreate() { <START> when(schemaService.getUploadSchema(any(), eq("guid"))).thenThrow(new EntityNotFoundException(AppConfig.class)); <END> AppConfig appConfig = AppConfig.create(); appConfig.setStudyId("studyId"); SchemaReference schemaRef = new SchemaReference("guid", 3); appConfig.getSchemaReferences().add(schemaRef); assertValidatorMessage(newValidator, appConfig, "schemaReferences[0]", "does not refer to an upload schema"); }</code><technical_language>Is worth eq("whatever") instead of any() passing args correctly? (Here in other tests.) This is more important for verifying survey guid createdOn passed correctly</technical_language>

Target:
public void schemaDoesNotExistOnCreate() { when(schemaService.getUploadSchemaByIdAndRev(TEST_STUDY, "guid", 3)) .thenThrow(new EntityNotFoundException(AppConfig.class)); appConfig.getSchemaReferences().add(RESOLVED_SCHEMA_REF); assertValidatorMessage(newValidator, appConfig, "schemaReferences[0]", "does not refer to an upload schema"); }
Source:
<code>public void successfulDeletePermanently() { List<SchedulePlan> plans = createSchedulePlanListWithSurveyReference(false); Activity oldActivity = getActivityList(plans).get(0); Activity activity = new Activity.Builder().withActivity(oldActivity) .withSurvey("Survey", "otherGuid", SURVEY_CREATED_ON).build(); getActivityList(plans).set(0, activity); Survey survey = createSurvey(); when(mockSurveyDao.getSurvey(any(), eq(false))).thenReturn(survey); <START> <END> service.deleteSurveyPermanently(TEST_STUDY, survey); verify(mockSharedModuleMetadataService).queryAllMetadata(eq(false), eq(false), queryCaptor.capture(), paramsCaptor.capture(), eq(null), eq(true)); String queryStr = queryCaptor.getValue(); assertEquals("surveyGuid=:surveyGuid AND surveyCreatedOn=:surveyCreatedOn", queryStr); assertEquals(survey.getGuid(), paramsCaptor.getValue().get("surveyGuid")); assertEquals(survey.getCreatedOn(), paramsCaptor.getValue().get("surveyCreatedOn")); verify(mockSurveyDao).deleteSurveyPermanently(keysCaptor.capture()); assertEquals(survey, keysCaptor.getValue()); }</code><technical_language>I this is a bug in test. call getSchedulePlans() includeDeleted=true, mock includeDeleted=false. (Here other places in this class.)</technical_language>

Target:
public void successfulDeletePermanently() { List<SchedulePlan> plans = createSchedulePlanListWithSurveyReference(false); Activity oldActivity = getActivityList(plans).get(0); Activity activity = new Activity.Builder().withActivity(oldActivity) .withSurvey("Survey", "otherGuid", SURVEY_CREATED_ON).build(); getActivityList(plans).set(0, activity); doReturn(plans).when(mockSchedulePlanService).getSchedulePlans(ClientInfo.UNKNOWN_CLIENT, TEST_STUDY, true); Survey survey = createSurvey(); when(mockSurveyDao.getSurvey(any(), eq(false))).thenReturn(survey); service.deleteSurveyPermanently(TEST_STUDY, survey); verify(mockSharedModuleMetadataService).queryAllMetadata(eq(false), eq(false), queryCaptor.capture(), paramsCaptor.capture(), eq(null), eq(true)); String queryStr = queryCaptor.getValue(); assertEquals("surveyGuid=:surveyGuid AND surveyCreatedOn=:surveyCreatedOn", queryStr); assertEquals(survey.getGuid(), paramsCaptor.getValue().get("surveyGuid")); assertEquals(survey.getCreatedOn(), paramsCaptor.getValue().get("surveyCreatedOn")); verify(mockSurveyDao).deleteSurveyPermanently(keysCaptor.capture()); assertEquals(survey, keysCaptor.getValue()); }
Source:
<code>public TopNMapFn( TopNQuery query, TopNAlgorithm topNAlgorithm ) { this.query = query; this.topNAlgorithm = topNAlgorithm; this.dimension = query.getDimensionSpec().getDimension(); <START> this.extractionFn = TopNQueryEngine.canApplyExtractionInPost(query) ? null : query.getDimensionSpec().getExtractionFn(); <END> }</code><technical_language>a rewrite strategy, glance, this weird me. Is a hold required, is necessary for some reason</technical_language>

Target:
public TopNMapFn( TopNQuery query, TopNAlgorithm topNAlgorithm ) { this.query = query; this.topNAlgorithm = topNAlgorithm; }
Source:
<code><START> @Override public <END> ReflogEntry getReverseEntry(int number) throws IOException { lock.lock(); try { LogCursor cursor = reftable.seekLog(refname); while (true) { if (!cursor.next() || number < 0) { return null; } if (number == 0) { return cursor.getReflogEntry(); } number--; } } finally { lock.unlock(); } }</code><technical_language>@Override a line own, in getReverseEntries() below</technical_language>

Target:
public ReflogEntry getReverseEntry(int number) throws IOException { lock.lock(); try { LogCursor cursor = reftable.seekLog(refname); while (true) { if (!cursor.next() || number < 0) { return null; } if (number == 0) { return cursor.getReflogEntry(); } number--; } } finally { lock.unlock(); } }
Source:
<code>public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws Exception { Branch branch = variableMap.getBranch("Branch"); <START> AttributeType attributeType = variableMap.getAttributeType("Attribute Type"); <END> String input = variableMap.getString(ARTIFACT_IDS_WIDGET_NAME); ArrayList<String> inputArtIds = new ArrayList<String>(Arrays.asList(input.split("[,\\s]+"))); SkynetTransaction transaction = TransactionManager.createTransaction(branch, "BLAM: Delete invalid attribute type"); for (String id : inputArtIds) { Artifact art = ArtifactQuery.getArtifactFromId(id, branch); if (!art.isAttributeTypeValid(attributeType)) { List<Attribute<?>> attrs = art.getAttributes(false); for (Attribute<?> attr : attrs) { if (attr.isOfType(attributeType)) { attr.delete(); log(String.format("Artifact [%s] attribute type [%s] deleted: [%s]\n", art.toStringWithId(), attributeType.toString(), attr.toString())); } } art.persist(transaction); } else { log(String.format("Artifact [%s] attribute type [%s] is not invalid\n", art.toStringWithId(), attributeType.toString())); } } transaction.execute(); }</code><technical_language>multiple attributeTypes selected? I of AttributeTypeMultiSelect in xml ui definition</technical_language>

Target:
public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws OseeCoreException { Branch branch = variableMap.getBranch("Branch"); List<AttributeType> attributeTypes = variableMap.getAttributeTypes("Attribute Type"); String input = variableMap.getString(ARTIFACT_IDS_WIDGET_NAME); Conditions.checkNotNullOrEmpty(input, ARTIFACT_IDS_WIDGET_NAME); List<String> inputArtIds = Arrays.asList(input.split("[,\\s]+")); SkynetTransaction transaction = TransactionManager.createTransaction(branch, "BLAM: Delete invalid attribute type"); List<Artifact> arts = ArtifactQuery.getArtifactListFromIds(inputArtIds, branch); for (AttributeType attrType : attributeTypes) { deleteInvalidAttributeType(arts, attrType, transaction); } transaction.execute(); }
Source:
<code>public void bind(InatorContext context, Map<String, Object> instanceData) { @SuppressWarnings("unchecked") List<String> ports = (List<String>)CollectionUtils.toList(instanceData.get(InstanceConstants.FIELD_PORTS)); boolean changed = false; int port = Integer.parseInt(portNum); for (int i = 0 ; i < ports.size() ; i++) { try { PortSpec spec = new PortSpec(ports.get(i)); if (spec.getPublicPort() == null && spec.getPrivatePort() == port) { Object owner = getOwner(getDeploymentUnit(context)); Account account = getAccount(owner); Account clusterAccount = svc.clusterDao.getOwnerAcccountForCluster(account.getClusterId()); <START> PooledResource resource = svc.lockManager.lock(new PortUnitLock(clusterAccount, this), () -> { <END> return svc.poolManager.allocateOneResource(clusterAccount, owner, new PooledResourceOptions() .withSubOwner(getSubOwner()) .withQualifier(ResourcePoolConstants.ENVIRONMENT_PORT)); }); if (resource == null) { throw new ResourceExhaustionException("Not enough environment ports"); } spec.setPublicPort(Integer.parseInt(resource.getName())); ports.set(i, spec.toSpec()); changed = true; break; } } catch (ClientVisibleException e) { } } if (changed) { instanceData.put(InstanceConstants.FIELD_PORTS, ports); } }</code><technical_language>need load clusterAccount, clusterId lock key. This avoid another DB call this point</technical_language>

Target:
public void bind(InatorContext context, Map<String, Object> instanceData) { @SuppressWarnings("unchecked") List<String> ports = (List<String>)CollectionUtils.toList(instanceData.get(InstanceConstants.FIELD_PORTS)); boolean changed = false; int port = Integer.parseInt(portNum); Map<Long, Account> clusterAccounts = new HashMap<>(); Map<Long, Account> accounts = new HashMap<>(); for (int i = 0 ; i < ports.size() ; i++) { try { PortSpec spec = new PortSpec(ports.get(i)); if (spec.getPublicPort() == null && spec.getPrivatePort() == port) { Object owner = getOwner(getDeploymentUnit(context)); Account account = getAccount(accounts, owner); Account clusterAccount = getClusterAccount(account, clusterAccounts, account.getClusterId()); PooledResource resource = svc.lockManager.lock(new PortUnitLock(account.getClusterId(), this), () -> { return svc.poolManager.allocateOneResource(clusterAccount, owner, new PooledResourceOptions() .withSubOwner(getSubOwner()) .withQualifier(ResourcePoolConstants.ENVIRONMENT_PORT)); }); if (resource == null) { throw new ResourceExhaustionException("Not enough environment ports"); } spec.setPublicPort(Integer.parseInt(resource.getName())); ports.set(i, spec.toSpec()); changed = true; break; } } catch (ClientVisibleException e) { } } if (changed) { instanceData.put(InstanceConstants.FIELD_PORTS, ports); } }
Source:
<code>public void addResolutionListener(IQualifiedTypeResolutionListener resolutionListener) { for (int i = 0; i < this.resolutionListeners.length; i++){ if (this.resolutionListeners[i].equals(resolutionListener)) return; } int length = this.resolutionListeners.length; System.arraycopy(this.resolutionListeners, 0, this.resolutionListeners = new IQualifiedTypeResolutionListener[length + 1], 0, length); <START> this.resolutionListeners[this.resolutionListeners.length - 1] = resolutionListener; <END> }</code><technical_language>this.resolutionListeners[length] = resolutionListener sufficed</technical_language>

Target:
public void addResolutionListener(IQualifiedTypeResolutionListener resolutionListener) { for (int i = 0; i < this.resolutionListeners.length; i++){ if (this.resolutionListeners[i].equals(resolutionListener)) return; } int length = this.resolutionListeners.length; System.arraycopy(this.resolutionListeners, 0, this.resolutionListeners = new IQualifiedTypeResolutionListener[length + 1], 0, length); this.resolutionListeners[length] = resolutionListener; }
Source:
<code>public EncryptionHttpHelper(final MantaConnectionContext connectionContext, final ConfigContext config) { <START> this(connectionContext, null, config); <END> }</code><technical_language>non-deprecated constructor call out deprecated constructor. Create a new constructor deprecated code path</technical_language>

Target:
public EncryptionHttpHelper(final MantaConnectionContext connectionContext, final ConfigContext config) { super(connectionContext, config); this.encryptionKeyId = ObjectUtils.firstNonNull( config.getEncryptionKeyId(), "unknown-key"); this.permitUnencryptedDownloads = ObjectUtils.firstNonNull( config.permitUnencryptedDownloads(), DefaultsConfigContext.DEFAULT_PERMIT_UNENCRYPTED_DOWNLOADS ); this.encryptionAuthenticationMode = ObjectUtils.firstNonNull( config.getEncryptionAuthenticationMode(), EncryptionAuthenticationMode.DEFAULT_MODE); this.cipherDetails = ObjectUtils.firstNonNull( SupportedCiphersLookupMap.INSTANCE.getWithCaseInsensitiveKey( config.getEncryptionAlgorithm()), DefaultsConfigContext.DEFAULT_CIPHER); if (config.getEncryptionPrivateKeyPath() != null) { Path keyPath = Paths.get(config.getEncryptionPrivateKeyPath()); try { secretKey = SecretKeyUtils.loadKeyFromPath(keyPath, this.cipherDetails); } catch (IOException e) { String msg = String.format("Unable to load secret key from file: %s", keyPath); throw new UncheckedIOException(msg, e); } } else if (config.getEncryptionPrivateKeyBytes() != null) { secretKey = SecretKeyUtils.loadKey(config.getEncryptionPrivateKeyBytes(), cipherDetails); } else { throw new MantaClientEncryptionException( "Either private encryption key path or bytes must be specified"); } }
Source:
<code><START> private String prettyPrintJobs(String... jobs) { <END> String result = ""; for (String job : jobs) { int index = job.lastIndexOf('.'); result += job.substring(index + 1) + ", "; } return result.replaceAll(", $", ""); }</code><technical_language>do StringUtils instead? java List<String> jobNames = new ArrayList<String>(); for (String job : jobs) { jobNames.add(StringUtils.substringAfterLast(job, ".")); } return StringUtils.join(jobNames,", ");</technical_language>

Target:
private String prettyPrintJobs(String... jobs) { List<String> jobNames = new ArrayList<String>(); for (String job : jobs) { jobNames.add(StringUtils.substringAfterLast(job, ".")); } return StringUtils.join(jobNames, ", "); }
Source:
<code>private AbstractExpression parseRankValueExpression(VoltXMLElement exprNode) { List<AbstractExpression> partitionbyExprs = new ArrayList<AbstractExpression>(); List<AbstractExpression> orderbyExprs = new ArrayList<AbstractExpression>(); List<SortDirectionType> orderbyDirs = new ArrayList<SortDirectionType>(); boolean areAllDecending = false; boolean isPercentRank = Boolean.valueOf(exprNode.attributes.get("isPercentRank")); for (VoltXMLElement ele : exprNode.children) { if (ele.name.equals("partitionbyList")) { for(int i = 0; i < ele.children.size(); i++) { VoltXMLElement childNode = ele.children.get(i); AbstractExpression expr = parseExpressionNode(childNode); partitionbyExprs.add(expr); } } else if (ele.name.equals("orderbyList")) { for(int i = 0; i < ele.children.size(); i++) { VoltXMLElement childNode = ele.children.get(i); boolean isDecending = Boolean.valueOf(childNode.attributes.get("decending")); if (i == 0) { areAllDecending = isDecending; } else if (areAllDecending != isDecending) { <START> throw new PlanningErrorException("invalid RANK order by expression without consistent " <END> + "ascending order or decending order"); } AbstractExpression expr = parseExpressionNode(childNode.children.get(0)); orderbyExprs.add(expr); orderbyDirs.add(isDecending ? SortDirectionType.DESC : SortDirectionType.ASC); } } else { throw new PlanningErrorException("invalid RANK expression found: " + ele.name); } } WindowedExpression rankExpr = new WindowedExpression(ExpressionType.AGGREGATE_WINDOWED_RANK, partitionbyExprs, orderbyExprs, orderbyDirs, m_db, areAllDecending, isPercentRank); return rankExpr; }</code><technical_language>do OB expressions need ascending descending</technical_language>

Target:
private AbstractExpression parseRankValueExpression(VoltXMLElement exprNode) { List<AbstractExpression> partitionbyExprs = new ArrayList<AbstractExpression>(); List<AbstractExpression> orderbyExprs = new ArrayList<AbstractExpression>(); List<SortDirectionType> orderbyDirs = new ArrayList<SortDirectionType>(); boolean areAllDecending = false; boolean isPercentRank = Boolean.valueOf(exprNode.attributes.get("isPercentRank")); for (VoltXMLElement ele : exprNode.children) { if (ele.name.equals("partitionbyList")) { for (int i = 0; i < ele.children.size(); i++) { VoltXMLElement childNode = ele.children.get(i); AbstractExpression expr = parseExpressionNode(childNode); partitionbyExprs.add(expr); } } else if (ele.name.equals("orderbyList")) { for (int i = 0; i < ele.children.size(); i++) { VoltXMLElement childNode = ele.children.get(i); SortDirectionType sortDir = Boolean.valueOf(childNode.attributes.get("decending")) ? SortDirectionType.DESC : SortDirectionType.ASC; AbstractExpression expr = parseExpressionNode(childNode.children.get(0)); orderbyExprs.add(expr); orderbyDirs.add(sortDir); } } else { throw new PlanningErrorException("invalid RANK expression found: " + ele.name); } } WindowedExpression rankExpr = new WindowedExpression(ExpressionType.AGGREGATE_WINDOWED_RANK, partitionbyExprs, orderbyExprs, orderbyDirs, m_db, areAllDecending, isPercentRank); return rankExpr; }
Source:
<code>public synchronized void connect() throws ConnectionException { try { final S7PlcOptions currentOptions = this.options.get(); if (this.state.options != currentOptions) { logger.info("configuration changed, disconnecting..."); disconnect(); this.state = createClientState(currentOptions); <START> logger.info("configuration changed, disconnecting...done"); <END> } if (!this.state.client.Connected) { logger.debug("Connecting to S7 PLC..."); this.state.client.SetConnectionType(S7.OP); int code = this.state.client.ConnectTo(currentOptions.getIp(), currentOptions.getRack(), currentOptions.getSlot()); if (code != 0) { throw new ConnectionException("Failed to connect to PLC, ConnectTo() failed with code: " + code); } if (currentOptions.shouldAuthenticate()) { authenticate(this.state); } logger.debug("Connecting to S7 PLC... Done"); } } catch (Exception e) { throw new ConnectionException("Connection failed, unexpected exception", e); } }</code><technical_language>Consistency Check: ... Done instead of ...done</technical_language>

Target:
public synchronized void connect() throws ConnectionException { try { final S7PlcOptions currentOptions = this.options.get(); if (this.state.options != currentOptions) { logger.info("configuration changed, disconnecting..."); disconnect(); this.state = createClientState(currentOptions); logger.info("configuration changed, disconnecting...Done"); } if (!this.state.client.Connected) { logger.debug("Connecting to S7 PLC..."); this.state.client.SetConnectionType(S7.OP); int code = this.state.client.ConnectTo(currentOptions.getIp(), currentOptions.getRack(), currentOptions.getSlot()); if (code != 0) { throw new ConnectionException("Failed to connect to PLC, ConnectTo() failed with code: " + code); } if (currentOptions.shouldAuthenticate()) { authenticate(this.state); } logger.debug("Connecting to S7 PLC... Done"); } } catch (Exception e) { throw new ConnectionException("Connection failed, unexpected exception", e); } }
Source:
<code>public String getProfileBanner1500x500URL() { <START> return profileBannerImageUrl != null ? profileBannerImageUrl + "1500x500" : null; <END> }</code><technical_language>missing "/"</technical_language>

Target:
public String getProfileBanner1500x500URL() { return profileBannerImageUrl != null ? profileBannerImageUrl + "/1500x500" : null; }
Source:
<code>public Aggregator factorize(ColumnSelectorFactory metricFactory) { ColumnValueSelector selector = metricFactory.makeColumnValueSelector(fieldName); <START> return new SketchAggregator(selector, size); <END> }</code><technical_language>null checks removed, in new world is guaranteed for absent columns get a non-null selector return nulls/zeros getXXX() methods ? I adjusted SketchAggregator lazily create union perf impacts there</technical_language>

Target:
public Aggregator factorize(ColumnSelectorFactory metricFactory) { BaseObjectColumnValueSelector selector = metricFactory.makeColumnValueSelector(fieldName); return new SketchAggregator(selector, size); }
Source:
<code>protected TargetFeature[] resolveFeatures(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException { File dir = getDirectory(); if (!dir.isDirectory()) { throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.DirectoryBundleContainer_1, dir.toString()))); } File site = getFeatureSite(dir); File[] files = site.listFiles(); <START> SubMonitor localMonitor = SubMonitor.convert(monitor, Messages.DirectoryBundleContainer_0, files.length); <END> List<TargetFeature> features = new ArrayList<>(files.length); for (int i = 0; i < files.length; i++) { if (localMonitor.isCanceled()) { return new TargetFeature[0]; } try { TargetFeature rf = new TargetFeature(files[i]); features.add(rf); } catch (CoreException e) { } localMonitor.worked(1); } localMonitor.done(); return features.toArray(new TargetFeature[features.size()]); }</code><technical_language>SubMonitor.split allows remove isCanceled check, this automatically</technical_language>

Target:
protected TargetFeature[] resolveFeatures(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException { File dir = getDirectory(); if (!dir.isDirectory()) { throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.DirectoryBundleContainer_1, dir.toString()))); } File site = getFeatureSite(dir); File[] files = site.listFiles(); SubMonitor localMonitor = SubMonitor.convert(monitor, Messages.DirectoryBundleContainer_0, files.length); List<TargetFeature> features = new ArrayList<>(files.length); for (File file : files) { try { TargetFeature rf = new TargetFeature(file); features.add(rf); } catch (CoreException e) { } localMonitor.step(1); } return features.toArray(new TargetFeature[features.size()]); }
Source:
<code>public LuceneSearchQuery<H> build() { LoadingContext<?, ?> loadingContext = loadingContextBuilder.build(); BooleanQuery.Builder luceneQueryBuilder = new BooleanQuery.Builder(); luceneQueryBuilder.add( luceneQuery, Occur.MUST ); luceneQueryBuilder.add( LuceneQueries.mainDocumentQuery(), Occur.FILTER ); Sort luceneSort = null; if ( sortFields != null && !sortFields.isEmpty() ) { luceneSort = new Sort( sortFields.toArray( new SortField[0] ) ); } Query definitiveLuceneQuery = searchContext.decorateLuceneQuery( luceneQueryBuilder.build(), sessionContext.getTenantIdentifier() ); if ( nestedFieldSorts != null ) { for ( LuceneFieldComparatorSource nestedField : nestedFieldSorts ) { nestedField.setOriginalParentQuery( definitiveLuceneQuery ); } } LuceneSearchQueryRequestContext requestContext = new LuceneSearchQueryRequestContext( sessionContext, loadingContext, definitiveLuceneQuery, luceneSort ); TimeoutManagerImpl timeoutManager = new TimeoutManagerImpl( definitiveLuceneQuery.toString() ); if ( timeout != null && timeUnit != null ) { <START> timeoutManager.setTimeout( timeout, timeUnit ); <END> timeoutManager.raiseExceptionOnTimeout(); } LuceneSearcherImpl<H> searcher = new LuceneSearcherImpl<>( requestContext, storedFieldVisitor, rootProjection, aggregations == null ? Collections.emptyMap() : aggregations, timeoutManager ); return new LuceneSearchQueryImpl<>( queryOrchestrator, workFactory, searchContext, sessionContext, loadingContext, routingKeys, timeoutManager, definitiveLuceneQuery, luceneSort, searcher ); }</code><technical_language>pass query instead, call toString if end throwing exception? calling toString is neutral, performance-wise</technical_language>

Target:
public LuceneSearchQuery<H> build() { LoadingContext<?, ?> loadingContext = loadingContextBuilder.build(); BooleanQuery.Builder luceneQueryBuilder = new BooleanQuery.Builder(); luceneQueryBuilder.add( luceneQuery, Occur.MUST ); luceneQueryBuilder.add( LuceneQueries.mainDocumentQuery(), Occur.FILTER ); Sort luceneSort = null; if ( sortFields != null && !sortFields.isEmpty() ) { luceneSort = new Sort( sortFields.toArray( new SortField[0] ) ); } Query definitiveLuceneQuery = searchContext.decorateLuceneQuery( luceneQueryBuilder.build(), sessionContext.getTenantIdentifier() ); if ( nestedFieldSorts != null ) { for ( LuceneFieldComparatorSource nestedField : nestedFieldSorts ) { nestedField.setOriginalParentQuery( definitiveLuceneQuery ); } } LuceneSearchQueryRequestContext requestContext = new LuceneSearchQueryRequestContext( sessionContext, loadingContext, definitiveLuceneQuery, luceneSort ); TimeoutManager timeoutManager = searchContext.createTimeoutManager( definitiveLuceneQuery, timeout, timeUnit, exceptionOnTimeout ); LuceneSearcherImpl<H> searcher = new LuceneSearcherImpl<>( requestContext, storedFieldVisitor, rootProjection, aggregations == null ? Collections.emptyMap() : aggregations, timeoutManager ); return new LuceneSearchQueryImpl<>( queryOrchestrator, workFactory, searchContext, sessionContext, loadingContext, routingKeys, timeoutManager, definitiveLuceneQuery, luceneSort, searcher ); }
Source:
<code>@Override public Object getValueAt(int rowIndex, int columnIndex) { ExclusionItem item = rows.get(rowIndex); if (columnIndex == 0) { <START> return StringUtils.capitalize(item.type().name().toLowerCase()); <END> } return item.item(); }</code><technical_language>![MAJOR](<LINK_1> 'Severity: MAJOR') Define locale in this String operation. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
@Override public Object getValueAt(int rowIndex, int columnIndex) { ExclusionItem item = rows.get(rowIndex); if (columnIndex == 0) { return StringUtils.capitalize(item.type().name().toLowerCase(Locale.US)); } return item.item(); }
Source:
<code>public void reset() { <START> if (snackbar != null) { <END> snackbar.dismiss(); snackbar = null; } }</code><technical_language>if (null) { return }</technical_language>

Target:
public void reset() { if (snackbar == null) { return; } snackbar.dismiss(); snackbar = null; }
Source:
<code>static void showRemoteMessages(String pkt) { PrintWriter writer = new PrintWriter(System.err); while (0 < pkt.length()) { final int lf = pkt.indexOf('\n'); final int cr = pkt.indexOf('\r'); final int s; if (0 <= lf && 0 <= cr) s = Math.min(lf, cr); else if (0 <= lf) s = lf; else if (0 <= cr) s = cr; else { writer.format(CLIText.get().remoteMessage, pkt); writer.println(); break; } if (pkt.charAt(s) == '\r') <START> writer.format(CLIText.get().remoteMessage, pkt.substring(0, s) + "\r"); <END> else { writer.format(CLIText.get().remoteMessage, pkt.substring(0, s)); writer.println(); } pkt = pkt.substring(s + 1); } writer.flush(); }</code><technical_language>"\r" part of format string, argument injected it. inject wrong position</technical_language>

Target:
static void showRemoteMessages(String pkt) { PrintWriter writer = new PrintWriter(System.err); while (0 < pkt.length()) { final int lf = pkt.indexOf('\n'); final int cr = pkt.indexOf('\r'); final int s; if (0 <= lf && 0 <= cr) s = Math.min(lf, cr); else if (0 <= lf) s = lf; else if (0 <= cr) s = cr; else { writer.format(CLIText.get().remoteMessage, pkt); writer.println(); break; } if (pkt.charAt(s) == '\r') { writer.format(CLIText.get().remoteMessage, pkt.substring(0, s)); writer.print('\r'); } else { writer.format(CLIText.get().remoteMessage, pkt.substring(0, s)); writer.println(); } pkt = pkt.substring(s + 1); } writer.flush(); }
Source:
<code>private synchronized void tryReleaseWorkers() { if (blockedWorkerIds.size() == numWorkersToSync) { LOG.log(Level.INFO, "{0} workers are blocked. Sending response messages to awake them", numWorkersToSync); <START> <END> transitState(globalStateMachine); if (globalStateMachine.getCurrentState().equals(STATE_RUN)) { initLatch.countDown(); } for (final String workerId : blockedWorkerIds) { sendResponseMessage(workerId, EMPTY_DATA); } blockedWorkerIds.clear(); } }</code><technical_language>Do need this additional line</technical_language>

Target:
private synchronized void tryReleaseWorkers() { if (blockedWorkerIds.size() == numWorkersToSync) { LOG.log(Level.INFO, "Send response messages to wake up {0} workers that have been blocked", numWorkersToSync); transitState(globalStateMachine); if (globalStateMachine.getCurrentState().equals(STATE_RUN)) { initLatch.countDown(); } else if (globalStateMachine.getCurrentState().equals(STATE_CLEANUP)) { try { allowCleanupLatch.await(); } catch (final InterruptedException e) { LOG.log(Level.WARNING, "Interrupted while waiting for the optimization to be done", e); } } for (final String workerId : blockedWorkerIds) { sendResponseMessage(workerId, EMPTY_DATA); } blockedWorkerIds.clear(); } }
Source:
<code>public static String formatDateTime(OffsetDateTime dt) { <START> return DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssxxx").format(dt); <END> }</code><technical_language>a constant, understand more easily is this format</technical_language>

Target:
public static String formatDateTime(OffsetDateTime dt) { return DateTimeFormatter.ofPattern(ISO_DATE_TIME_FORMAT).format(dt); }
Source:
<code>protected Long getBranchUuidFromTxId(int tx) { <START> QueryFactory queryFactory = orcsApi.getQueryFactory(getContext()); <END> TransactionQuery txQuery = queryFactory.transactionQuery(); Long branchId = txQuery.andTxId(tx).getResults().getExactlyOne().getBranchId(); return branchId; }</code><technical_language>reason this simply call getQueryFactory()</technical_language>

Target:
protected Long getBranchUuidFromTxId(int tx) { TransactionQuery txQuery = getQueryFactory().transactionQuery(); Long branchId = txQuery.andTxId(tx).getResults().getExactlyOne().getBranchId(); return branchId; }
Source:
<code>public void setEntries(IRuntimeClasspathEntry[] entries) { model.removeAll(); IRuntimeClasspathEntry entry; for (IRuntimeClasspathEntry <START> entrie : <END> entries) { entry = entrie; switch (entry.getClasspathProperty()) { case IRuntimeClasspathEntry.USER_CLASSES: model.addEntry(ClasspathModel.USER, entry); break; default: model.addEntry(ClasspathModel.BOOTSTRAP, entry); break; } } refresh(); }</code><technical_language>rename entry</technical_language>

Target:
public void setEntries(IRuntimeClasspathEntry[] entries) { model.removeAll(); for (IRuntimeClasspathEntry entry : entries) { switch (entry.getClasspathProperty()) { case IRuntimeClasspathEntry.USER_CLASSES: model.addEntry(ClasspathModel.USER, entry); break; default: model.addEntry(ClasspathModel.BOOTSTRAP, entry); break; } } refresh(); }
Source:
<code>private boolean canBeSafelyDeleted(Path path, Instant threshold) { try { return Files.getLastModifiedTime(path).toInstant().isBefore(threshold); } catch (IOException e) { <START> LOG.warn("Unable to access lastModifiedTime of and thus cannot be 100% sure that it can be deleted", path, e); <END> return false; } }</code><technical_language>* non-externalized log message * log message mention file deletion skipped * is method warn(String, Object arg, Throwable)</technical_language>

Target:
private boolean canBeSafelyDeleted(Path path, Instant threshold) { try { return Files.getLastModifiedTime(path).toInstant().isBefore(threshold); } catch (IOException e) { LOG.warn(MessageFormat.format( JGitText.get().cannotAccessLastModifiedForSafeDeletion, path), e); return false; } }
Source:
<code>protected void replaceInHistory( final ContributionAnnotation oldAnnotation, final ContributionAnnotation newAnnotation) { for (List<ContributionAnnotation> entry : queue) { <START> for (final ListIterator<ContributionAnnotation> annotationsLit = entry.listIterator(); <END> annotationsLit.hasNext(); ) { final ContributionAnnotation annotation = annotationsLit.next(); if (annotation.equals(oldAnnotation)) { annotationsLit.remove(); assert oldAnnotation.getSource().equals(newAnnotation.getSource()); annotationsLit.add(newAnnotation); return; } } } log.warn( "could not find annotation " + oldAnnotation + " in the current history for user: " + oldAnnotation.getSource()); }</code><technical_language>suggestion for (final ListIterator<ContributionAnnotation> annotationList = entry.listIterator();</technical_language>

Target:
void replaceInHistory( final ContributionAnnotation oldAnnotation, final ContributionAnnotation newAnnotation) { for (final List<ContributionAnnotation> entry : queue) { for (final ListIterator<ContributionAnnotation> annotationsListIt = entry.listIterator(); annotationsListIt.hasNext(); ) { final ContributionAnnotation annotation = annotationsListIt.next(); if (annotation.equals(oldAnnotation)) { annotationsListIt.remove(); assert oldAnnotation.getSource().equals(newAnnotation.getSource()); annotationsListIt.add(newAnnotation); return; } } } log.warn( "could not find annotation " + oldAnnotation + " in the current history for user: " + oldAnnotation.getSource()); }
Source:
<code>public void start() { log.infof("Starting Hawkular Metrics Group Trigger Manager, distributed=%s", distributed); mgtExecutor = new ScheduledThreadPoolExecutor(THREAD_POOL_SIZE); refresh(); if (null == definitionsListener) { log.info("Registering Trigger UPDATE/REMOVE listener"); definitionsListener = new DefinitionsListener() { @Override <START> public void onChange(Set<DefinitionsEvent> event) { <END> if (coordinator) { log.warnf("Refreshing due to change event %s", event); refresh(); } } }; definitions.registerListener(definitionsListener, DefinitionsEvent.Type.TRIGGER_CONDITION_CHANGE, DefinitionsEvent.Type.TRIGGER_REMOVE); } }</code><technical_language>I some point metrics alerter needs move DistributedEvent instead DefinitionsEvent. is fine maintain singleton behaviour features get maturity, introduce more variables in potential debugging issues. leaving a note here</technical_language>

Target:
public void start() { log.infof("Starting Hawkular Metrics Group Trigger Manager, distributed=%s", distributed); mgtExecutor = new ScheduledThreadPoolExecutor(THREAD_POOL_SIZE); refresh(); if (null == definitionsListener) { log.info("Registering Trigger UPDATE/REMOVE listener"); definitionsListener = new DefinitionsListener() { @Override public void onChange(Set<DefinitionsEvent> event) { if (coordinator) { log.debugf("Refreshing due to change event %s", event); refresh(); } } }; definitions.registerListener(definitionsListener, DefinitionsEvent.Type.TRIGGER_CONDITION_CHANGE, DefinitionsEvent.Type.TRIGGER_REMOVE); } }
Source:
<code>public void render(DriveableType type) { super.render(type); renderPart(leftBackWheelModel); renderPart(rightBackWheelModel); renderPart(leftFrontWheelModel); renderPart(rightFrontWheelModel); renderPart(rightTrackModel); renderPart(leftTrackModel); renderPart(rightTrackWheelModels); renderPart(leftTrackWheelModels); renderPart(bodyDoorCloseModel); renderPart(trailerModel); renderPart(turretModel); renderPart(barrelModel); renderPart(drillHeadModel); for(ModelRendererTurbo[] mods : ammoModel) renderPart(mods); <START> for(ModelRendererTurbo[] latm : leftAnimTrackModel) <END> renderPart(latm); for(ModelRendererTurbo[] ratm : rightAnimTrackModel) renderPart(ratm); renderPart(rightAnimTrackModel1); renderPart(leftAnimTrackModel1); renderPart(rightAnimTrackModel2); renderPart(leftAnimTrackModel2); renderPart(rightAnimTrackModel3); renderPart(leftAnimTrackModel3); renderPart(steeringWheelModel); }</code><technical_language>in driveable creation box, renders tracks once? Surely want frame</technical_language>

Target:
public void render(DriveableType type) { super.render(type); renderPart(leftBackWheelModel); renderPart(rightBackWheelModel); renderPart(leftFrontWheelModel); renderPart(rightFrontWheelModel); renderPart(rightTrackModel); renderPart(leftTrackModel); renderPart(rightTrackWheelModels); renderPart(leftTrackWheelModels); renderPart(bodyDoorCloseModel); renderPart(trailerModel); renderPart(turretModel); renderPart(barrelModel); renderPart(drillHeadModel); for(ModelRendererTurbo[] mods : ammoModel) renderPart(mods); for(ModelRendererTurbo[] latm : leftAnimTrackModel) renderPart(latm); for(ModelRendererTurbo[] ratm : rightAnimTrackModel) renderPart(ratm); renderPart(steeringWheelModel); }
Source:
<code>private void loadPlugins() { Collection<File> pluginJars; try { pluginJars = getPluginFiles(); } catch (IOException e) { log.error("Cannot scan Gerrit plugins directory looking for jar files", e); return; } for (File jarFile : pluginJars) { Plugin plugin; try { plugin = loadPlugin(jarFile); pluginCache.put(plugin.name, plugin); } catch (IOException e) { <START> log.error("Cannot access Plugin jar " + jarFile, e); <END> } catch (ClassNotFoundException e) { log.error("Cannot load Plugin class module from " + jarFile, e); } } }</code><technical_language>plugin deserves a proper noun in error message</technical_language>

Target:
private void loadPlugins() { Collection<File> pluginJars; try { pluginJars = getPluginFiles(); } catch (IOException e) { log.error("Cannot scan Gerrit plugins directory looking for jar files", e); return; } for (File jarFile : pluginJars) { Plugin plugin; try { plugin = loadPlugin(jarFile); pluginCache.put(plugin.name, plugin); } catch (IOException e) { log.error("Cannot access plugin jar " + jarFile, e); } catch (ClassNotFoundException e) { log.error("Cannot load plugin class module from " + jarFile, e); } } }