auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void buildSysprepVmPayload(String strSysPrepContent) { byte[] binarySysPrep; try { binarySysPrep = strSysPrepContent.getBytes(UTF8_CHARSET_ENCODING); <START> } catch (UnsupportedEncodingException e) { <END> throw new RuntimeException("Unsupported charset", e); } createInfo.add(VdsProperties.sysprepInf, binarySysPrep); }</code><technical_language>throw more reasonable? Also, add a log here</technical_language>

Target:
protected void buildSysprepVmPayload(String strSysPrepContent) { byte[] binarySysPrep; try { binarySysPrep = strSysPrepContent.getBytes(UTF8_CHARSET_ENCODING); } catch (UnsupportedEncodingException e) { throw new RuntimeException("Unsupported charset while building VM sysprep", e); } createInfo.add(VdsProperties.sysprepInf, binarySysPrep); }
Source:
<code>private void deleteEmptyStagingDirectories(List<DeclaredIntentionToWrite> declaredIntentionsToWrite) { for (DeclaredIntentionToWrite declaredIntentionToWrite : declaredIntentionsToWrite) { <START> Path path = declaredIntentionToWrite.getRootPath(); <END> if (declaredIntentionToWrite.isTemporaryTable()) { deleteRecursivelyIfExists(declaredIntentionToWrite.getContext(), hdfsEnvironment, path); continue; } if (declaredIntentionToWrite.getMode() != WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY) { continue; } recursiveDeleteFilesAndLog(declaredIntentionToWrite.getContext(), path, ImmutableList.of(), true, "staging directory cleanup"); } }</code><technical_language>I if put this method not. temp table considered staging directories</technical_language>

Target:
private void deleteEmptyStagingDirectories(List<DeclaredIntentionToWrite> declaredIntentionsToWrite) { for (DeclaredIntentionToWrite declaredIntentionToWrite : declaredIntentionsToWrite) { if (declaredIntentionToWrite.getMode() != WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY) { continue; } Path path = declaredIntentionToWrite.getRootPath(); recursiveDeleteFilesAndLog(declaredIntentionToWrite.getContext(), path, ImmutableList.of(), true, "staging directory cleanup"); } }
Source:
<code>public void createIndexWhileClear() throws Exception { IntStream.range(0, 100).forEach(i -> cities.put(i, new City(i))); AsyncInvocation createIndex = server1.invokeAsync("create index", () -> { Cache cache = ClusterStartupRule.getCache(); QueryService queryService = cache.getQueryService(); Index cityZip = queryService.createIndex("cityZip", "c.zip", "/cities c"); assertThat(cityZip).isNotNull(); }); <START> cities.clear(); <END> createIndex.await(); invokeInEveryMember(() -> { verifyIndexesAfterClear(); }, server1, server2); QueryService queryService = clientCache.getQueryService(); Query query = queryService.newQuery("select * from /cities c where c.zip < " + (City.ZIP_START + 10)); assertThat(((SelectResults) query.execute()).size()).isEqualTo(0); IntStream.range(0, 10).forEach(i -> cities.put(i, new City(i))); assertThat(((SelectResults) query.execute()).size()).isEqualTo(10); }</code><technical_language>If idea is get clear index happening parallel, this guarantee that. is a IndexManager.testHook control index creation. more entries chances of occurring clear create-index in parallel</technical_language>

Target:
public void createIndexWhileClear() throws Exception { IntStream.range(0, 1000).forEach(i -> cities.put(i, new City(i))); AsyncInvocation createIndex = server1.invokeAsync("create index", () -> { Cache cache = ClusterStartupRule.getCache(); QueryService queryService = cache.getQueryService(); Index cityZip = queryService.createIndex("cityZip", "c.zip", "/cities c"); assertThat(cityZip).isNotNull(); }); for (int i = 0; i < 3; i++) { cities.clear(); } createIndex.await(); invokeInEveryMember(() -> { verifyIndexesAfterClear("cities", "cityId", "cityName"); }, server1, server2); QueryService queryService = clientCache.getQueryService(); Query query = queryService.newQuery("select * from /cities c where c.zip < " + (City.ZIP_START + 10)); assertThat(((SelectResults) query.execute()).size()).isEqualTo(0); IntStream.range(0, 10).forEach(i -> cities.put(i, new City(i))); assertThat(((SelectResults) query.execute()).size()).isEqualTo(10); }
Source:
<code>public String toString() { String node = formIndex == null || formIndex.getReference() == null ? "" : formIndex.getReference().toString(); int idx = node.lastIndexOf('['); if (idx > 0) { node = node.substring(0, idx); } <START> if (oldValue.equals(newValue)) { <END> oldValue = ""; newValue = ""; } String event; if (hasLocation() && isTrackingChangesEnabled) { event = String.format("%s,%s,%s,%s,%s,%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "", latitude, longitude, accuracy, oldValue, newValue); } else if (hasLocation()) { event = String.format("%s,%s,%s,%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "", latitude, longitude, accuracy); } else if (isTrackingChangesEnabled) { event = String.format("%s,%s,%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "", oldValue, newValue); } else { event = String.format("%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : ""); } return event; }</code><technical_language>Whoops, I this before! toString side effects. do this in setNewValue instead change name setNewValueOrClearIfUnchanged? a mouthful, recordValueChange saveValueChange</technical_language>

Target:
public String toString() { String node = formIndex == null || formIndex.getReference() == null ? "" : formIndex.getReference().toString(); if (auditEventType == AuditEvent.AuditEventType.QUESTION || auditEventType == AuditEvent.AuditEventType.GROUP) { int idx = node.lastIndexOf('['); if (idx > 0) { node = node.substring(0, idx); } } String event; if (hasLocation() && isTrackingChangesEnabled) { event = String.format("%s,%s,%s,%s,%s,%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "", latitude, longitude, accuracy, oldValue, newValue); } else if (hasLocation()) { event = String.format("%s,%s,%s,%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "", latitude, longitude, accuracy); } else if (isTrackingChangesEnabled) { event = String.format("%s,%s,%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : "", oldValue, newValue); } else { event = String.format("%s,%s,%s,%s", auditEventType.getValue(), node, start, end != 0 ? end : ""); } return event; }
Source:
<code>public void before() { BridgeUtils.setRequestContext(new RequestContext.Builder() .withCallerStudyId(TestConstants.TEST_STUDY).build()); <START> study = new DynamoStudy(); <END> study.setIdentifier(TestConstants.TEST_STUDY_IDENTIFIER); extId = ExternalIdentifier.create(TestConstants.TEST_STUDY, ID); extId.setSubstudyId(SUBSTUDY_ID); externalIdService = new ExternalIdService(); externalIdService.setExternalIdDao(externalIdDao); externalIdService.setSubstudyService(substudyService); }</code><technical_language>Minor: Study.create() instead of new DynamoStudy()</technical_language>

Target:
public void before() { BridgeUtils.setRequestContext(new RequestContext.Builder() .withCallerStudyId(TestConstants.TEST_STUDY).build()); study = Study.create(); study.setIdentifier(TestConstants.TEST_STUDY_IDENTIFIER); extId = ExternalIdentifier.create(TestConstants.TEST_STUDY, ID); extId.setSubstudyId(SUBSTUDY_ID); externalIdService = new ExternalIdService(); externalIdService.setExternalIdDao(externalIdDao); externalIdService.setSubstudyService(substudyService); }
Source:
<code>protected void migrateSessionPropertyToSecured(CoreSession session, MigrationContext migrationContext) { List<String> comments = getUnsecuredCommentIds(session); CommentManager commentManager = Framework.getService(CommentManager.class); processBatched(migrationContext, BATCH_SIZE, comments, comment -> migrateCommentsFromPropertyToSecured(session, commentManager, new IdRef(comment)), "Migrating comments from Property to Secured"); int totalOfComments = comments.size(); int nbeOfUnMigratedComments = getUnsecuredCommentIds(session).size(); if (nbeOfUnMigratedComments == 0) { session.query(GET_COMMENTS_FOLDERS_QUERY).forEach((folder -> session.removeDocument(folder.getRef()))); IdRef[] documentsToRemove = session.queryProjection(GET_COMMENTS_FOLDERS_QUERY, 0, 0) .stream() .map(m -> new IdRef((String) m.get(ECM_UUID))) .toArray(IdRef[]::new); session.removeDocuments(documentsToRemove); <START> reportProgress("Done Migration from Property to Secured", totalOfComments, totalOfComments); <END> } else { log.warn( "Some comments have not been migrated, see logs for more information. The folder containing these comments will be renamed to {}", UNMIGRATED_COMMENTS_FOLDER_NAME); session.query(GET_COMMENTS_FOLDERS_QUERY).forEach(docModel -> { session.move(docModel.getRef(), null, UNMIGRATED_COMMENTS_FOLDER_NAME); docModel.putContextData(DISABLE_NOTIFICATION_SERVICE, TRUE); session.saveDocument(docModel); }); session.save(); reportProgress("Done Migration from Property to Secured", totalOfComments - nbeOfUnMigratedComments, totalOfComments); } }</code><technical_language>this change</technical_language>

Target:
protected void migrateSessionPropertyToSecured(CoreSession session, MigrationContext migrationContext) { List<String> comments = getUnsecuredCommentIds(session); CommentManager commentManager = Framework.getService(CommentManager.class); processBatched(migrationContext, BATCH_SIZE, comments, comment -> migrateCommentsFromPropertyToSecured(session, commentManager, new IdRef(comment)), "Migrating comments from Property to Secured"); int totalOfComments = comments.size(); int nbeOfUnMigratedComments = getUnsecuredCommentIds(session).size(); if (nbeOfUnMigratedComments == 0) { session.query(GET_COMMENTS_FOLDERS_QUERY).forEach((folder -> session.removeDocument(folder.getRef()))); IdRef[] documentsToRemove = session.queryProjection(GET_COMMENTS_FOLDERS_QUERY, 0, 0) .stream() .map(m -> new IdRef((String) m.get(ECM_UUID))) .toArray(IdRef[]::new); session.removeDocuments(documentsToRemove); reportProgress("Done Migrating from Property to Secured", totalOfComments, totalOfComments); } else { log.warn( "Some comments have not been migrated, see logs for more information. The folder containing these comments will be renamed to {}", UNMIGRATED_COMMENTS_FOLDER_NAME); session.query(GET_COMMENTS_FOLDERS_QUERY).forEach(docModel -> { session.move(docModel.getRef(), null, UNMIGRATED_COMMENTS_FOLDER_NAME); docModel.putContextData(DISABLE_NOTIFICATION_SERVICE, TRUE); session.saveDocument(docModel); }); session.save(); reportProgress("Done Migrating from Property to Secured", totalOfComments - nbeOfUnMigratedComments, totalOfComments); } }
Source:
<code><START> public List<AntiCsrfToken> getTokens(String reqBody, String targetUrl) { <END> List<AntiCsrfToken> tokens = new ArrayList<>(); Set<String> values; synchronized (valueToToken) { values = Collections.unmodifiableSet(new HashSet<String>(valueToToken.keySet())); } for (String value : values) { if (reqBody.indexOf(value) >= 0) { AntiCsrfToken token = valueToToken.get(value).clone(); token.setTargetURL(targetUrl); tokens.add(token); } } return tokens; }</code><technical_language>I thinking more this, getTokens(HttpMessage) (with requestMessage) instead of making public. This allow method for JSON messages (and others, Content-Type) support is added</technical_language>

Target:
private List<AntiCsrfToken> getTokens(String reqBody, String targetUrl) { List<AntiCsrfToken> tokens = new ArrayList<>(); Set<String> values; synchronized (valueToToken) { values = Collections.unmodifiableSet(new HashSet<String>(valueToToken.keySet())); } for (String value : values) { if (reqBody.indexOf(value) >= 0) { AntiCsrfToken token = valueToToken.get(value).clone(); token.setTargetURL(targetUrl); tokens.add(token); } } return tokens; }
Source:
<code>private void copyTransientAttributes(Metacard updateMetacard, Metacard existingMetacard) { for (String transientAttributeKey : RegistryObjectMetacardType.TRANSIENT_ATTRIBUTES) { Attribute transientAttribute = updateMetacard.getAttribute(transientAttributeKey); if (transientAttribute == null) { transientAttribute = existingMetacard.getAttribute(transientAttributeKey); if (transientAttribute != null) { <START> updateMetacard.setAttribute(transientAttribute); <END> } } } }</code><technical_language>check attribute exist updateMetacard setting it</technical_language>

Target:
private void copyTransientAttributes(Metacard updateMetacard, Metacard existingMetacard) { RegistryObjectMetacardType.TRANSIENT_ATTRIBUTES .stream() .filter( key -> updateMetacard.getAttribute(key) == null && existingMetacard.getAttribute(key) != null) .forEach(key -> updateMetacard.setAttribute(existingMetacard.getAttribute(key))); }
Source:
<code>public void evaluate() throws Throwable { if (ServerJob.getCurrentSession() != null) { doEvaluateWrappingExceptions(); } else { ServerJob job = m_factory.runNow("JUnit Server Job Runner", new ITransactionRunnable() { @Override public IStatus run(IProgressMonitor monitor) throws ProcessingException { doEvaluateWrappingExceptions(); return Status.OK_STATUS; } }); <START> if (job.getResult() != null && !job.getResult().isOK()) { <END> fail(job.getResult().getMessage()); } } }</code><technical_language>executed? factory.runNow throws exception if result nok</technical_language>

Target:
public void evaluate() throws Throwable { if (ServerJob.getCurrentSession() != null) { doEvaluateWrappingExceptions(); } else { ServerJob job = m_factory.create("JUnit Server Job Runner", new ITransactionRunnable() { @Override public IStatus run(IProgressMonitor monitor) throws ProcessingException { doEvaluateWrappingExceptions(); return Status.OK_STATUS; } }); job.setSystem(true); job.runNow(new NullProgressMonitor()); if (job.getResult() != null && !job.getResult().isOK()) { fail(job.getResult().getMessage()); } } }
Source:
<code>protected void assertInvalidFunction(String projection, StandardErrorCode errorCode, String messagePattern) { try { evaluateInvalid(projection); fail("Expected to throw a PrestoException with message matching " + messagePattern); } catch (PrestoException e) { assertEquals(e.getErrorCode(), errorCode.toErrorCode()); <START> assertTrue(e.getMessage().equals(messagePattern) || e.getMessage().matches(messagePattern)); <END> } }</code><technical_language>nice rethrow some trace of e check fails catch (PrestoException e) { try { ... checcks ... } catch (Throwable failure) { failure.addSuppressed(e); throw e; }</technical_language>

Target:
protected void assertInvalidFunction(String projection, StandardErrorCode errorCode, String messagePattern) { functionAssertions.assertInvalidFunction(projection, errorCode, messagePattern); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } QueueItem other = (QueueItem) obj; <START> if (geocode == null) { <END> if (other.geocode != null) { return false; } } else if (!geocode.equals(other.geocode)) { return false; } return true; }</code><technical_language>"return StringUtils.equals(...,...)" instead of if-else cascade</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } QueueItem other = (QueueItem) obj; if ((geocode == null) && (other.geocode == null)) { return true; } if (geocode == null) { return false; } if (!geocode.equals(other.geocode)) { return false; } return true; }
Source:
<code>public void getPermissionsObjectWithoutChildrenTest() throws Exception { when(aclFactory.getPrincipalRoles(memberPid)).thenReturn(objPrincRoles); when(aclFactory.isMarkedForDeletion(memberPid)).thenReturn(false); when(aclFactory.getEmbargoUntil(memberPid)).thenReturn(testDate); when(aclFactory.getPatronAccess(memberPid)).thenReturn(PatronAccess.authenticated); when(repoObjLoader.getRepositoryObject(memberPid)).thenReturn(member); result = aclRetrievalService.getPermissions(agent, memberPid); <START> String resultJson = generateJson(result); <END> assertTrue(resultJson.contains("pid\":\"" + memberUuid)); assertTrue(resultJson.contains("markForDeletion\":false")); assertTrue(resultJson.contains("embargoed\":" + testDate.getTime())); assertTrue(resultJson.contains("patronAccess\":\"authenticated")); assertFalse(resultJson.contains("memberPermissions")); }</code><technical_language>Tests service need assume JSON is involved, controller needs aware of serialization format. suggest skipping this step asserting result map current approach assertions able detect nesting</technical_language>

Target:
public void getPermissionsObjectWithoutChildrenTest() throws Exception { when(repoObjLoader.getRepositoryObject(memberPid)).thenReturn(member); result = aclRetrievalService.getPermissions(agent, memberPid); assertEquals(memberUuid, result.get("pid")); assertEquals(false, result.get("markForDeletion")); assertEquals(testDate, result.get("embargo")); assertEquals(PatronAccess.authenticated, result.get("patronAccess")); assertFalse(result.containsKey("memberPermissions")); }
Source:
<code>private AnnotatedConstructor buildAnnotatedConstructorForMapper(Mapper mapper) { <START> List<AnnotationMapperReference> mapperReferencesForConstructor = new ArrayList<AnnotationMapperReference>(); <END> for ( MapperReference mapperReference : mapper.getReferencedMappers() ) { mapperReferencesForConstructor.add( (AnnotationMapperReference) mapperReference ); } List<Annotation> mapperReferenceAnnotations = getMapperReferenceAnnotations(); removeReferenceAnnotations( mapperReferencesForConstructor, mapperReferenceAnnotations ); return new AnnotatedConstructor( mapper.getName(), mapperReferencesForConstructor, mapperReferenceAnnotations, additionalPublicEmptyConstructor() ); }</code><technical_language>size of referenced mappers initial size of list</technical_language>

Target:
private AnnotatedConstructor buildAnnotatedConstructorForMapper(Mapper mapper) { List<AnnotationMapperReference> mapperReferencesForConstructor = new ArrayList<AnnotationMapperReference>( mapper.getReferencedMappers().size() ); for ( MapperReference mapperReference : mapper.getReferencedMappers() ) { mapperReferencesForConstructor.add( (AnnotationMapperReference) mapperReference ); } List<Annotation> mapperReferenceAnnotations = getMapperReferenceAnnotations(); removeDuplicateAnnotations( mapperReferencesForConstructor, mapperReferenceAnnotations ); return new AnnotatedConstructor( mapper.getName(), mapperReferencesForConstructor, mapperReferenceAnnotations, additionalPublicEmptyConstructor() ); }
Source:
<code>public FieldMetadata getField(String path) { if (path == null || path.isEmpty()) { throw new IllegalArgumentException("Field name can not be null nor empty."); } FieldMetadata foundField; if (path.indexOf('/') < 0) { if (path.indexOf('[') >= 0) { <START> path = path.substring(path.indexOf("[") + 1, path.indexOf("]")); <END> } foundField = fieldMetadata.get(path); if (foundField == null) { for (TypeMetadata superType : superTypes) { foundField = ((ComplexTypeMetadata) superType).getField(path); if (foundField != null) { break; } } } } else { foundField = _getField(this, path); } if (foundField == null) { throw new IllegalArgumentException("Type '" + getName() + "' does not own field '" + path + "'."); } return foundField; }</code><technical_language>StringUtils.substringsBetween(path, "[", "]")</technical_language>

Target:
public FieldMetadata getField(String path) { if (path == null || path.isEmpty()) { throw new IllegalArgumentException("Field name can not be null nor empty."); } FieldMetadata foundField; if (path.indexOf('/') < 0) { if (path.indexOf('[') >= 0) { path = StringUtils.substringsBetween(path, "[", "]")[0]; } foundField = fieldMetadata.get(path); if (foundField == null) { for (TypeMetadata superType : superTypes) { foundField = ((ComplexTypeMetadata) superType).getField(path); if (foundField != null) { break; } } } } else { foundField = _getField(this, path); } if (foundField == null) { throw new IllegalArgumentException("Type '" + getName() + "' does not own field '" + path + "'."); } return foundField; }
Source:
<code>private void taskComplete( RemoteTaskRunnerWorkItem taskRunnerWorkItem, ZkWorker zkWorker, TaskStatus taskStatus ) { Preconditions.checkNotNull(taskRunnerWorkItem, "taskRunnerWorkItem"); Preconditions.checkNotNull(taskStatus, "taskStatus"); if (zkWorker != null) { log.info( "Worker[%s] completed task[%s] with status[%s]", zkWorker.getWorker().getHost(), taskStatus.getId(), taskStatus.getStatusCode() ); zkWorker.setLastCompletedTaskTime(new DateTime()); } else { log.info("Workerless task[%s] completed with status[%s]", taskStatus.getId(), taskStatus.getStatusCode()); } completeTasks.put(taskStatus.getId(), taskRunnerWorkItem); runningTasks.remove(taskStatus.getId()); TaskRunnerUtils.notifyStatusChanged(listeners, taskStatus.getId(), taskStatus); <START> taskRunnerWorkItem.setResult(taskStatus); <END> }</code><technical_language>Please switch setResult -> notifyStatusChanged order consistent time do that. I this matters setResult is updates TaskStorage (through a callback) notifyStatusChanged is triggers another supervisor run. supervisor a getStatus want update happened</technical_language>

Target:
private void taskComplete( RemoteTaskRunnerWorkItem taskRunnerWorkItem, ZkWorker zkWorker, TaskStatus taskStatus ) { Preconditions.checkNotNull(taskRunnerWorkItem, "taskRunnerWorkItem"); Preconditions.checkNotNull(taskStatus, "taskStatus"); if (zkWorker != null) { log.info( "Worker[%s] completed task[%s] with status[%s]", zkWorker.getWorker().getHost(), taskStatus.getId(), taskStatus.getStatusCode() ); zkWorker.setLastCompletedTaskTime(new DateTime()); } else { log.info("Workerless task[%s] completed with status[%s]", taskStatus.getId(), taskStatus.getStatusCode()); } completeTasks.put(taskStatus.getId(), taskRunnerWorkItem); runningTasks.remove(taskStatus.getId()); taskRunnerWorkItem.setResult(taskStatus); TaskRunnerUtils.notifyStatusChanged(listeners, taskStatus.getId(), taskStatus); }
Source:
<code>public boolean accepts(final RuleExtension rule, final GraphConnectionContext context) { if (context.getTarget().isPresent()) { final Node<? extends View<?>, ? extends Edge> target = context.getTarget().get(); final View<?> content = target.getContent(); if (Objects.isNull(content)) { return false; } final Object definition = content.getDefinition(); <START> return definition.getClass().getName().equals(rule.getId()); <END> } return false; }</code><technical_language>please Objects.equals</technical_language>

Target:
public boolean accepts(final RuleExtension rule, final GraphConnectionContext context) { if (context.getTarget().isPresent()) { final Node<? extends View<?>, ? extends Edge> target = context.getTarget().get(); final View<?> content = target.getContent(); if (Objects.isNull(content)) { return false; } final Object definition = content.getDefinition(); return Objects.equals(definition.getClass().getName(), rule.getId()); } return false; }
Source:
<code>public boolean accept(Issue issue) { <START> if (issueShouldNotBeReported(issue, excludedLinesByRule())) { <END> return false; } return true; }</code><technical_language>simplified</technical_language>

Target:
public boolean accept(Issue issue) { return !issueShouldNotBeReported(issue, excludedLinesByRule()); }
Source:
<code>public static boolean isSystemBlacklisted(String databaseName, String tableName) { <START> return "mysql".equals(databaseName) && ("ha_health_check".equals(tableName) || "rds_heartbeat2".equals(tableName)); <END> }</code><technical_language>startsWith match <LINK_0></technical_language>

Target:
public static boolean isSystemBlacklisted(String databaseName, String tableName) { return "mysql".equals(databaseName) && ("ha_health_check".equals(tableName) || StringUtils.startsWith(tableName, "rds_heartbeat")); }
Source:
<code>public List<VmNumaNode> getVmNumaNodes(VM vm) { int onlineCpus = vm.getNumOfCpus(); int vcpus = FeatureSupported.supportedInConfig(ConfigValues.HotPlugCpuSupported, vm.getCompatibilityVersion(), vm.getClusterArch()) ? VmCpuCountHelper.calcMaxVCpu(vm, vm.getClusterCompatibilityVersion()) : onlineCpus; int offlineCpus = vcpus - onlineCpus; List<VmNumaNode> vmNumaNodes = vmNumaNodeDao.getAllVmNumaNodeByVmId(vm.getId()); if (!vmNumaNodes.isEmpty()) { int index = 0; for (VmNumaNode vmNode : vmNumaNodes) { index += vmNode.getCpuIds().size(); } if (onlineCpus != index) { offlineCpus = vcpus - index; } if (offlineCpus > 0) { Comparator<VmNumaNode> compareBySize = <START> Comparator.comparingInt((VmNumaNode o) <END> -> o.getCpuIds().size()); Collections.sort(vmNumaNodes, compareBySize); int numaCount = vmNumaNodes.size(); int start = index-1; for (VmNumaNode vmNode : vmNumaNodes) { index = start = start+1; if (numaCount <= 0) { break; } while (index < vcpus) { vmNode.getCpuIds().add(index); index += numaCount; } } } return vmNumaNodes; } if (offlineCpus > 0) { VmNumaNode vmNode = new VmNumaNode(); vmNode.setIndex(0); vmNode.setMemTotal(vm.getMemSizeMb()); for (int i = 0; i < vcpus; i++) { vmNode.getCpuIds().add(i); } return Collections.singletonList(vmNode); } return Collections.emptyList(); }</code><technical_language>This type definition is needed</technical_language>

Target:
public List<VmNumaNode> getVmNumaNodes(VM vm) { int onlineCpus = vm.getNumOfCpus(); int vcpus = FeatureSupported.supportedInConfig(ConfigValues.HotPlugCpuSupported, vm.getCompatibilityVersion(), vm.getClusterArch()) ? VmCpuCountHelper.calcMaxVCpu(vm, vm.getClusterCompatibilityVersion()) : onlineCpus; int offlineCpus = vcpus - onlineCpus; List<VmNumaNode> vmNumaNodes = vmNumaNodeDao.getAllVmNumaNodeByVmId(vm.getId()); if (!vmNumaNodes.isEmpty()) { int totalCpusPerNode = 0; for (VmNumaNode vmNode : vmNumaNodes) { totalCpusPerNode += vmNode.getCpuIds().size(); } if (onlineCpus != totalCpusPerNode) { offlineCpus = vcpus - totalCpusPerNode; } if (offlineCpus > 0) { Comparator<VmNumaNode> compareBySize = Comparator.comparingInt(o -> o.getCpuIds().size()); Collections.sort(vmNumaNodes, compareBySize); int numaCount = vmNumaNodes.size(); int start = totalCpusPerNode-1; for (VmNumaNode vmNode : vmNumaNodes) { int index = start = start+1; if (numaCount <= 0) { break; } while (index < vcpus) { vmNode.getCpuIds().add(index); index += numaCount; } } } return vmNumaNodes; } if (offlineCpus > 0) { VmNumaNode vmNode = new VmNumaNode(); vmNode.setIndex(0); vmNode.setMemTotal(vm.getMemSizeMb()); for (int i = 0; i < vcpus; i++) { vmNode.getCpuIds().add(i); } return Collections.singletonList(vmNode); } return Collections.emptyList(); }
Source:
<code>public void onClick(DialogInterface dialog, int which) { switch (which) { case DialogInterface.BUTTON_POSITIVE: <START> copyProjects(); <END> try { StorageOperations.deleteDir(EXTERNAL_STORAGE_ROOT_DIRECTORY); } catch (IOException e) { Log.e(TAG, e.getMessage()); } doNotShowDialogAgain(); break; case DialogInterface.BUTTON_NEUTRAL: copyProjects(); doNotShowDialogAgain(); break; } }</code><technical_language>if is IOexception other problem copying files folder deleted. some information for user if is a problem importing projects, deleted if import working</technical_language>

Target:
public void onClick(DialogInterface dialog, int which) { switch (which) { case DialogInterface.BUTTON_POSITIVE: CopyProjectsTask moveProjectsTask = new CopyProjectsTask(activity, true); moveProjectsTask.execute(); doNotShowDialogAgain(); break; case DialogInterface.BUTTON_NEUTRAL: CopyProjectsTask copyProjectsTask = new CopyProjectsTask(activity, false); copyProjectsTask.execute(); doNotShowDialogAgain(); break; } }
Source:
<code>public SecurityComponents createSecurityComponents() { BeanBuilder builder = new BeanBuilder(getClass().getClassLoader()); Binding binding = new Binding(); binding.setVariable("realm", this); InputStream i = getClass().getResourceAsStream("ActiveDirectory.groovy"); try { builder.parse(i, binding); } finally { IOUtils.closeQuietly(i); } WebApplicationContext context = builder.createApplicationContext(); findBean(AbstractActiveDirectoryAuthenticationProvider.class, context); final UserDetailsService uds = findBean(UserDetailsService.class, context); TokenBasedRememberMeServices2 rms = new TokenBasedRememberMeServices2() { public Authentication autoLogin(HttpServletRequest request, HttpServletResponse response) { try { return super.autoLogin(request, response); } catch (Exception e) { cancelCookie(request, response, "Failed to handle remember-me cookie: "+Functions.printThrowable(e)); return null; } } }; rms.setUserDetailsService(uds); <START> { <END> final Hudson instance = Hudson.getInstance(); if(instance!=null) rms.setKey(instance.getSecretKey()); else rms.setKey(null); } rms.setParameter("remember_me"); return new SecurityComponents( findBean(AuthenticationManager.class, context), uds, rms); }</code><technical_language>wrong formating</technical_language>

Target:
public SecurityComponents createSecurityComponents() { BeanBuilder builder = new BeanBuilder(getClass().getClassLoader()); Binding binding = new Binding(); binding.setVariable("realm", this); InputStream i = getClass().getResourceAsStream("ActiveDirectory.groovy"); try { builder.parse(i, binding); } finally { IOUtils.closeQuietly(i); } WebApplicationContext context = builder.createApplicationContext(); findBean(AbstractActiveDirectoryAuthenticationProvider.class, context); final UserDetailsService uds = findBean(UserDetailsService.class, context); TokenBasedRememberMeServices2 rms = new TokenBasedRememberMeServices2() { public Authentication autoLogin(HttpServletRequest request, HttpServletResponse response) { try { return super.autoLogin(request, response); } catch (Exception e) { cancelCookie(request, response, "Failed to handle remember-me cookie: "+Functions.printThrowable(e)); return null; } } }; rms.setUserDetailsService(uds); rms.setKey(Hudson.getInstance().getSecretKey()); rms.setParameter("remember_me"); return new SecurityComponents( findBean(AuthenticationManager.class, context), uds, rms); }
Source:
<code>public ByteStreamSplitValuesReaderForFloat() { <START> super(ByteStreamSplitValuesReaderForFloat.FLOAT_SIZE_IN_BYTES); <END> valueByteBuffer = new byte[FLOAT_SIZE_IN_BYTES]; }</code><technical_language>this is class, I "super(FLOAT_SIZE_IN_BYTES)" work;</technical_language>

Target:
public ByteStreamSplitValuesReaderForFloat() { super(Float.BYTES); valueByteBuffer = new byte[Float.BYTES]; }
Source:
<code>private List<SingularityTaskId> getMatchingTaskIds(SingularityRequest request, SingularityDeployKey deployKey) { <START> List<SingularityTaskId> activeTaskIdsFroRequest = leaderCache.getActiveTaskIdsForRequest(deployKey.getRequestId()); <END> if (request.isLongRunning()) { Set<SingularityTaskId> killedTaskIds = leaderCache.getKilledTasks().stream() .map(SingularityKilledTaskIdRecord::getTaskId) .collect(Collectors.toSet()); List<SingularityTaskId> matchingTaskIds = new ArrayList<>(); for (SingularityTaskId taskId : activeTaskIdsFroRequest) { if (!taskId.getDeployId().equals(deployKey.getDeployId())) { continue; } if (leaderCache.getCleanupTaskIds().contains(taskId)) { continue; } if (killedTaskIds.contains(taskId)) { continue; } matchingTaskIds.add(taskId); } return matchingTaskIds; } else { return new ArrayList<>(activeTaskIdsFroRequest); } }</code><technical_language>Minor typo</technical_language>

Target:
private List<SingularityTaskId> getMatchingTaskIds(SingularityRequest request, SingularityDeployKey deployKey) { List<SingularityTaskId> activeTaskIdsForRequest = leaderCache.getActiveTaskIdsForRequest(deployKey.getRequestId()); if (request.isLongRunning()) { Set<SingularityTaskId> killedTaskIds = leaderCache.getKilledTasks().stream() .map(SingularityKilledTaskIdRecord::getTaskId) .collect(Collectors.toSet()); List<SingularityTaskId> matchingTaskIds = new ArrayList<>(); for (SingularityTaskId taskId : activeTaskIdsForRequest) { if (!taskId.getDeployId().equals(deployKey.getDeployId())) { continue; } if (leaderCache.getCleanupTaskIds().contains(taskId)) { continue; } if (killedTaskIds.contains(taskId)) { continue; } matchingTaskIds.add(taskId); } return matchingTaskIds; } else { return new ArrayList<>(activeTaskIdsForRequest); } }
Source:
<code>public FileNavigationState() { selectedParent = new SimpleObjectProperty<>(); selectedFile = new SimpleObjectProperty<>(); favoriteFolders = FXCollections.observableList(new ArrayList<FileAdapter>()); <START> favoriteFolders.add(new LocalFile("/home/msonntag/work/software/sampleRDFSet/metadata")); <END> favoriteFolders.add(new LocalFile("/home/msonntag/work/software/sampleRDFSet/metadata/schemas")); navigationPath = FXCollections.observableList(new ArrayList<FileAdapter>()); }</code><technical_language>important things: - do absolute paths - / \ in paths Paths.get(...) instead File.separator java // replace "./foo/bar" Path p = Paths.get("foo", "bar") // String s = "foo" + File.separator + "bar"</technical_language>

Target:
public FileNavigationState() { selectedParent = new SimpleObjectProperty<>(); selectedFile = new SimpleObjectProperty<>(); favoriteFolders = FXCollections.observableList(new ArrayList<FileAdapter>()); navigationPath = FXCollections.observableList(new ArrayList<FileAdapter>()); }
Source:
<code><START> public final void setValue(byte[] value) { <END> if (value == null) throw new NullPointerException(); this.value = value; }</code><technical_language>class final</technical_language>

Target:
public void setValue(byte[] value) { if (value == null) throw new NullPointerException(); this.value = value; }
Source:
<code>public void testValidMessageFlow() throws UnsupportedEncodingException, XMLStreamException { InputStream xmlStream = this.getClass().getClassLoader().getResourceAsStream("org/activiti/engine/test/validation/validMessageProcess.bpmn20.xml"); XMLInputFactory xif = XMLInputFactory.newInstance(); InputStreamReader in = new InputStreamReader(xmlStream, "UTF-8"); XMLStreamReader xtr = xif.createXMLStreamReader(in); <START> BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr); <END> Assert.assertNotNull(bpmnModel); Assert.assertNotNull(bpmnModel); List<ValidationError> allErrors = processValidator.validate(bpmnModel); Assert.assertEquals(0, allErrors.size()); }</code><technical_language>block line 254 258 extracted in a method readModel(modelPath) reused in next test</technical_language>

Target:
public void testValidMessageFlow() throws Exception { BpmnModel bpmnModel = readModel( "org/activiti/engine/test/validation/validMessageProcess.bpmn20.xml"); Assert.assertNotNull(bpmnModel); assertThat(bpmnModel).isNotNull(); List<ValidationError> allErrors = processValidator.validate(bpmnModel); assertThat(allErrors).isEmpty(); }
Source:
<code>public SnapshotImpl updateSnapshot(SnapshotImpl update) throws SnapshotException { requireNonNull(update, "Required non-null snapshot"); requireNonNull(update.getId(), "Required non-null snapshot id"); try { return doUpdate(update); <START> } catch (RuntimeException x) { <END> throw new SnapshotException(x.getLocalizedMessage(), x); } }</code><technical_language>handle DuplicateKeyException</technical_language>

Target:
public SnapshotImpl updateSnapshot(SnapshotImpl update) throws NotFoundException, ConflictException, SnapshotException { requireNonNull(update, "Required non-null snapshot"); requireNonNull(update.getId(), "Required non-null snapshot id"); try { return doUpdate(update); } catch (DuplicateKeyException dkEx) { throw new ConflictException(format("Snapshot of machine '%s' in environment '%s' already exists", update.getMachineName(), update.getEnvName())); } catch (RuntimeException x) { throw new SnapshotException(x.getLocalizedMessage(), x); } }
Source:
<code>public Response downloadCustomProcessorFile (@PathParam("fileName") String fileName) { try { final InputStream inputStream = catalogService.getFileFromJarStorage(fileName); if (inputStream != null) { <START> StreamingOutput streamOutput = new StreamingOutput() { <END> @Override public void write(OutputStream os) throws IOException, WebApplicationException { try { ByteStreams.copy(inputStream, os); } finally { os.close(); } } }; return Response.ok(streamOutput).build(); } } catch (Exception ex) { LOG.debug(ex.getMessage(), ex); return WSUtils.respond(INTERNAL_SERVER_ERROR, EXCEPTION, ex.getMessage()); } return WSUtils.respond(NOT_FOUND, ENTITY_NOT_FOUND, fileName); }</code><technical_language>apply WSUtils.wrapWithStreamingOutput() here, too</technical_language>

Target:
public Response downloadCustomProcessorFile (@PathParam("fileName") String fileName) { try { final InputStream inputStream = catalogService.getFileFromJarStorage(fileName); if (inputStream != null) { StreamingOutput streamOutput = WSUtils.wrapWithStreamingOutput(inputStream); return Response.ok(streamOutput).build(); } } catch (Exception ex) { LOG.debug(ex.getMessage(), ex); return WSUtils.respond(INTERNAL_SERVER_ERROR, EXCEPTION, ex.getMessage()); } return WSUtils.respond(NOT_FOUND, ENTITY_NOT_FOUND, fileName); }
Source:
<code>public boolean addResourceWithWeight(String clusterName, IdealState idealState, ResourceConfig resourceConfig) { if (idealState == null) { throw new HelixException("IdealState is null!"); } if (resourceConfig == null) { throw new HelixException("ResourceConfig is null!"); } if (!validateWeightForResourceConfig(_configAccessor.getClusterConfig(clusterName), resourceConfig)) { <START> return false; <END> } _configAccessor .setResourceConfig(clusterName, resourceConfig.getResourceName(), resourceConfig); setResourceIdealState(clusterName, idealState.getResourceName(), idealState); rebalance(clusterName, idealState.getResourceName(), Integer.parseInt(idealState.getReplicas()), idealState.getResourceName(), idealState.getInstanceGroupTag()); return true; }</code><technical_language>throw Exceptions error information here</technical_language>

Target:
public boolean addResourceWithWeight(String clusterName, IdealState idealState, ResourceConfig resourceConfig) { if (clusterName == null || clusterName.isEmpty()) { throw new HelixException("Cluster name is null or empty!"); } if (idealState == null || !idealState.isValid()) { throw new HelixException("IdealState is null or invalid!"); } if (resourceConfig == null || !resourceConfig.isValid()) { throw new HelixException("ResourceConfig is null or invalid!"); } if (!idealState.getResourceName().equals(resourceConfig.getResourceName())) { throw new HelixException("Resource names in IdealState and ResourceConfig are different!"); } if (!validateWeightForResourceConfig(_configAccessor.getClusterConfig(clusterName), resourceConfig, idealState)) { throw new HelixException(String .format("Could not add resource %s with weight! Failed to validate the ResourceConfig!", idealState.getResourceName())); } _configAccessor .setResourceConfig(clusterName, resourceConfig.getResourceName(), resourceConfig); setResourceIdealState(clusterName, idealState.getResourceName(), idealState); rebalance(clusterName, idealState.getResourceName(), Integer.parseInt(idealState.getReplicas()), idealState.getResourceName(), idealState.getInstanceGroupTag()); return true; }
Source:
<code>protected String createPayload(Volume.Request.UpdatePayload payload) { dataCenterId = payload.dataCenterId(); volumeId = payload.id(); if (payload.name() != null) requestBuilder.put("name", payload.name()); if (payload.size() != null) requestBuilder.put("size", payload.size()); if (payload.bus() != null) requestBuilder.put("bus", payload.bus()); <START> return (new Gson()).toJson(requestBuilder); <END> }</code><technical_language>Json too</technical_language>

Target:
protected String createPayload(Volume.Request.UpdatePayload payload) { checkNotNull(payload.dataCenterId(), "dataCenterId"); checkNotNull(payload.id(), "volumeId"); dataCenterId = payload.dataCenterId(); volumeId = payload.id(); if (payload.name() != null) requestBuilder.put("name", payload.name()); if (payload.size() != null) requestBuilder.put("size", payload.size()); if (payload.bus() != null) requestBuilder.put("bus", payload.bus()); return jsonBinder.toJson(requestBuilder); }
Source:
<code>public static void init() { AssemblerUtils.init() ; AssemblerUtils.registerDataset(TextVocab.textDataset, new TextDatasetAssembler()) ; Assembler.general.implementWith(TextVocab.entityMap, new EntityDefinitionAssembler()) ; Assembler.general.implementWith(TextVocab.textIndexLucene, new TextIndexLuceneAssembler()) ; Assembler.general.implementWith(TextVocab.standardAnalyzer, new StandardAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.simpleAnalyzer, new SimpleAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.keywordAnalyzer, new KeywordAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.lowerCaseKeywordAnalyzer, new LowerCaseKeywordAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.localizedAnalyzer, new LocalizedAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.configurableAnalyzer, new ConfigurableAnalyzerAssembler()) ; <START> Assembler.general.implementWith(TextVocab.textIndexES, new TextIndexESAssembler()) ; <END> }</code><technical_language>minor style issue, please move this next TextIndexLuceneAssembler a lines up, similar</technical_language>

Target:
public static void init() { AssemblerUtils.init() ; AssemblerUtils.registerDataset(TextVocab.textDataset, new TextDatasetAssembler()) ; Assembler.general.implementWith(TextVocab.entityMap, new EntityDefinitionAssembler()) ; Assembler.general.implementWith(TextVocab.textIndexLucene, new TextIndexLuceneAssembler()) ; Assembler.general.implementWith(TextVocab.textIndexES, new TextIndexESAssembler()) ; Assembler.general.implementWith(TextVocab.standardAnalyzer, new StandardAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.simpleAnalyzer, new SimpleAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.keywordAnalyzer, new KeywordAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.lowerCaseKeywordAnalyzer, new LowerCaseKeywordAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.localizedAnalyzer, new LocalizedAnalyzerAssembler()) ; Assembler.general.implementWith(TextVocab.configurableAnalyzer, new ConfigurableAnalyzerAssembler()) ; }
Source:
<code>protected void executeCommand() { lockImage(); CinderDisk cinderDisk = getDisk(); cinderDisk.setDiskAlias(getParameters().getDiskAlias()); String volumeId = getNewVolumeCinderDisk(cinderDisk); cinderDisk.setId(Guid.createGuidFromString(volumeId)); cinderDisk.setImageId(Guid.createGuidFromString(volumeId)); <START> cinderDisk.setActive(true); <END> cinderDisk.setParentId(Guid.Empty); cinderDisk.setVmSnapshotId(getParameters().getVmSnapshotId()); cinderDisk.setImageStatus(ImageStatus.LOCKED); cinderDisk.setVolumeType(VolumeType.Sparse); addCinderDiskTemplateToDB(cinderDisk); getReturnValue().setActionReturnValue(cinderDisk.getId()); getParameters().setDestinationImageId(Guid.createGuidFromString(volumeId)); getParameters().setContainerId(Guid.createGuidFromString(volumeId)); persistCommand(getParameters().getParentCommand(), true); setSucceeded(true); }</code><technical_language>done disk is active</technical_language>

Target:
protected void executeCommand() { lockImage(); CinderDisk cinderDisk = getDisk(); cinderDisk.setDiskAlias(getParameters().getDiskAlias()); String volumeId = getNewVolumeCinderDisk(cinderDisk); cinderDisk.setId(Guid.createGuidFromString(volumeId)); cinderDisk.setImageId(Guid.createGuidFromString(volumeId)); cinderDisk.setImageStatus(ImageStatus.LOCKED); cinderDisk.setVolumeType(VolumeType.Sparse); if (!cinderDisk.getActive()) { cinderDisk.setActive(true); cinderDisk.setParentId(Guid.Empty); cinderDisk.setVmSnapshotId(getParameters().getVmSnapshotId()); } addCinderDiskTemplateToDB(cinderDisk); getReturnValue().setActionReturnValue(cinderDisk.getId()); getParameters().setDestinationImageId(Guid.createGuidFromString(volumeId)); getParameters().setContainerId(Guid.createGuidFromString(volumeId)); persistCommand(getParameters().getParentCommand(), true); setSucceeded(true); }
Source:
<code>public DbTaskRunner(DbRule rule, boolean isSender, RequestPacket requestPacket, String requested, Timestamp startTime) throws WaarpDatabaseException { <START> super(null); <END> this.session = null; this.rule = rule; if (startTime != null) { transfer = new Transfer(requested, rule.getIdRule(), requestPacket.getMode(), isSender, requestPacket.getFilename(), requestPacket.getFileInformation(), requestPacket.getBlocksize(), startTime); } else { transfer = new Transfer(requested, rule.getIdRule(), requestPacket.getMode(), isSender, requestPacket.getFilename(), requestPacket.getFileInformation(), requestPacket.getBlocksize()); } transfer.setRank(requestPacket.getRank()); transfer.setId(requestPacket.getSpecialId()); originalSize = requestPacket.getOriginalSize(); setOriginalSizeTransferMap(originalSize); transfer.setRequester(Configuration.configuration.getHostId(dbSession, requested)); this.rule = new DbRule(getRuleId()); if (requestPacket.getMode() != rule.getMode()) { if (RequestPacket.isMD5Mode(requestPacket.getMode())) { transfer.setTransferMode(RequestPacket.getModeMD5(rule.getMode())); } else { transfer.setTransferMode(rule.getMode()); } } checkThroughMode(); insert(); requestPacket.setSpecialId(transfer.getId()); }</code><technical_language>oups, remove "null" argument</technical_language>

Target:
public DbTaskRunner(DbRule rule, boolean isSender, RequestPacket requestPacket, String requested, Timestamp startTime) throws WaarpDatabaseException { super(); this.session = null; this.rule = rule; if (startTime != null) { transfer = new Transfer(requested, rule.getIdRule(), requestPacket.getMode(), isSender, requestPacket.getFilename(), requestPacket.getFileInformation(), requestPacket.getBlocksize(), startTime); } else { transfer = new Transfer(requested, rule.getIdRule(), requestPacket.getMode(), isSender, requestPacket.getFilename(), requestPacket.getFileInformation(), requestPacket.getBlocksize()); } transfer.setRank(requestPacket.getRank()); transfer.setId(requestPacket.getSpecialId()); originalSize = requestPacket.getOriginalSize(); setOriginalSizeTransferMap(originalSize); transfer.setRequester(Configuration.configuration.getHostId(dbSession, requested)); this.rule = new DbRule(getRuleId()); if (requestPacket.getMode() != rule.getMode()) { if (RequestPacket.isMD5Mode(requestPacket.getMode())) { transfer.setTransferMode(RequestPacket.getModeMD5(rule.getMode())); } else { transfer.setTransferMode(rule.getMode()); } } checkThroughMode(); insert(); requestPacket.setSpecialId(transfer.getId()); }
Source:
<code>private boolean isFatalException(Errors error) { return error == Errors.TRANSACTIONAL_ID_AUTHORIZATION_FAILED || error == Errors.INVALID_PRODUCER_EPOCH || error == Errors.UNSUPPORTED_FOR_MESSAGE_FORMAT || error == Errors.FENCED_INSTANCE_ID; <START> } <END></code><technical_language>I this a fatal error _for producer_. long abort transaction, abortable error. similar handling of GROUP_AUTHORIZATION_FAILED</technical_language>

Target:
private boolean isFatalException(Errors error) { return error == Errors.TRANSACTIONAL_ID_AUTHORIZATION_FAILED || error == Errors.INVALID_PRODUCER_EPOCH || error == Errors.UNSUPPORTED_FOR_MESSAGE_FORMAT; }
Source:
<code>public MesosNimbus() { <START> this._mesosStormScheduler = new StormSchedulerImpl(); <END> }</code><technical_language>rename variable _mesosStormScheduler _stormScheduler</technical_language>

Target:
public MesosNimbus() { this._stormScheduler = new StormSchedulerImpl(); }
Source:
<code>public void TestGameStarLogo_002_gameStarLogoNotPresentOnSmallResolution() { <START> String url = urlBuilder.getUrlForPath(wikiName, ""); <END> GlobalNavigationPageObject globalNavigation = new GlobalNavigationPageObject(driver); globalNavigation.getUrl(url); globalNavigation.resizeWindow(smallResolution); Assertion.assertFalse(globalNavigation.GameStarLinkDisplay(), "GameStar Logo shouldn't be visible"); }</code><technical_language>method getUrlForWiki (so need add empty string for article path)</technical_language>

Target:
public void TestGameStarLogo_002_gameStarLogoNotPresentOnSmallResolution() { HomePageObject homePage = new HomePageObject(driver); VenusGlobalNavPageObject globalNav = new VenusGlobalNavPageObject(driver); homePage.openWikiPage(urlBuilder.getUrlForWiki(deWikiName)); homePage.resizeWindow(HIDE_LOGO_RESOLUTION); Assertion.assertFalse(globalNav.isGameStarLogoDisplayed(), "GameStar Logo shouldn't be visible"); }