auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void markExpiredCommandsAsFailure() { Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, (-1) * Config.<Integer>getValue(ConfigValues.CoCoCommandLifeInMinutes)); long maxTime = cal.getTime().getTime(); for (Entry<Guid, CommandContainer> entry : cmdCallbackMap.entrySet()) { List<Guid> childCmdIds = coco.getChildCommandIds(entry.getKey()); if (childCmdIds.isEmpty()) { markExpiredCommandAsFailure(entry.getKey(), maxTime); } else { <START> for (Guid childId : childCmdIds) { <END> markExpiredCommandAsFailure(childId, maxTime); } } } }</code><technical_language>if child commands, needed mark parent command failure well, of child commands marked failures</technical_language>

Target:
private void markExpiredCommandsAsFailure() { for (Entry<Guid, CommandContainer> entry : cmdCallbackMap.entrySet()) { List<Guid> childCmdIds = coco.getChildCommandIds(entry.getKey()); if (childCmdIds.isEmpty()) { markExpiredCommandAsFailure(entry.getKey()); } else { for (Guid childId : childCmdIds) { markExpiredCommandAsFailure(childId); } } } }
Source:
<code>void checkSegmentsAndSubmitTasks() { synchronized (taskLock) { for (Map.Entry<Interval, HadoopIndexTask> entry : runningTasks.entrySet()) { <START> if (!taskStorage.getStatus(entry.getValue().getId()).get().isRunnable()) { <END> runningTasks.remove(entry.getKey()); runningVersion.remove(entry.getKey()); } } if (runningTasks.size() == maxTaskCount) { return; } Pair<SortedMap<Interval, String>, Map<Interval, List<DataSegment>>> toBuildInterval = checkSegments(); SortedMap<Interval, String> sortedToBuildVersion = toBuildInterval.lhs; Map<Interval, List<DataSegment>> baseSegments = toBuildInterval.rhs; missInterval = sortedToBuildVersion.keySet(); submitTasks(sortedToBuildVersion, baseSegments); } }</code><technical_language>taskStorage.getStatus(entry.getValue().getId()) return Optional.absent()</technical_language>

Target:
void checkSegmentsAndSubmitTasks() { synchronized (taskLock) { for (Map.Entry<Interval, HadoopIndexTask> entry : runningTasks.entrySet()) { Optional<TaskStatus> taskStatus = taskStorage.getStatus(entry.getValue().getId()); if (!taskStatus.isPresent() || !taskStatus.get().isRunnable()) { runningTasks.remove(entry.getKey()); runningVersion.remove(entry.getKey()); } } if (runningTasks.size() == maxTaskCount) { return; } Pair<SortedMap<Interval, String>, Map<Interval, List<DataSegment>>> toBuildIntervalAndBaseSegments = checkSegments(); SortedMap<Interval, String> sortedToBuildVersion = toBuildIntervalAndBaseSegments.lhs; Map<Interval, List<DataSegment>> baseSegments = toBuildIntervalAndBaseSegments.rhs; missInterval = sortedToBuildVersion.keySet(); submitTasks(sortedToBuildVersion, baseSegments); } }
Source:
<code>protected void notify(URL url, NotifyListener listener, List<URL> urls) { if (url == null) { throw new IllegalArgumentException("notify url == null"); } if (listener == null) { throw new IllegalArgumentException("notify listener == null"); } if ((urls == null || urls.isEmpty()) && !Constants.ANY_VALUE.equals(url.getServiceInterface())) { logger.warn("Ignore empty notify urls for subscribe url " + url); return; } <START> if (urls == null) { <END> logger.warn("Ignore empty notify urls for subscribe url " + url); return; } if (logger.isInfoEnabled()) { logger.info("Notify urls for subscribe url " + url + ", urls: " + urls); } Map<String, List<URL>> result = new HashMap<>(); for (URL u : urls) { if (UrlUtils.isMatch(url, u)) { String category = u.getParameter(Constants.CATEGORY_KEY, Constants.DEFAULT_CATEGORY); List<URL> categoryList = result.computeIfAbsent(category, k -> new ArrayList<>()); categoryList.add(u); } } if (result.size() == 0) { return; } Map<String, List<URL>> categoryNotified = notified.computeIfAbsent(url, u -> new ConcurrentHashMap<>()); for (Map.Entry<String, List<URL>> entry : result.entrySet()) { String category = entry.getKey(); List<URL> categoryList = entry.getValue(); categoryNotified.put(category, categoryList); saveProperties(url); listener.notify(categoryList); } }</code><technical_language>Order wise I place this if(urls == null) if ((urls == null || urls.isEmpty()) , more harmony in login layouting. replace code if ((urls == null || urls.isEmpty()) && !Constants.ANY_VALUE.equals(url.getServiceInterface())) if (urls.isEmpty() && !Constants.ANY_VALUE.equals(url.getServiceInterface())) Do feel logic bit clearer</technical_language>

Target:
protected void notify(URL url, NotifyListener listener, List<URL> urls) { if (url == null) { throw new IllegalArgumentException("notify url == null"); } if (listener == null) { throw new IllegalArgumentException("notify listener == null"); } if (urls == null) { logger.warn("Ignore empty notify urls for subscribe url " + url); return; } if (urls.isEmpty() && !Constants.ANY_VALUE.equals(url.getServiceInterface())) { logger.warn("Ignore empty notify urls for subscribe url " + url); return; } if (logger.isInfoEnabled()) { logger.info("Notify urls for subscribe url " + url + ", urls: " + urls); } Map<String, List<URL>> result = new HashMap<>(); for (URL u : urls) { if (UrlUtils.isMatch(url, u)) { String category = u.getParameter(Constants.CATEGORY_KEY, Constants.DEFAULT_CATEGORY); List<URL> categoryList = result.computeIfAbsent(category, k -> new ArrayList<>()); categoryList.add(u); } } if (result.size() == 0) { return; } Map<String, List<URL>> categoryNotified = notified.computeIfAbsent(url, u -> new ConcurrentHashMap<>()); for (Map.Entry<String, List<URL>> entry : result.entrySet()) { String category = entry.getKey(); List<URL> categoryList = entry.getValue(); categoryNotified.put(category, categoryList); saveProperties(url); listener.notify(categoryList); } }
Source:
<code>private void clearAsyncTasksWithOutVdsmId() { for (Guid asyncTaskId : getReturnValue().getTaskPlaceHolderIdList()) { AsyncTasks task = getAsyncTaskDao().get(asyncTaskId); <START> if (NGuid.Empty.equals(task.getVdsmTaskId())) { <END> AsyncTaskManager.failTaskWithoutVdsmId(task); } } }</code><technical_language>Guid.isNullOrEmpty</technical_language>

Target:
private void clearAsyncTasksWithOutVdsmId() { for (Guid asyncTaskId : getReturnValue().getTaskPlaceHolderIdList()) { AsyncTasks task = getAsyncTaskDao().get(asyncTaskId); if (Guid.isNullOrEmpty(task.getVdsmTaskId())) { AsyncTaskManager.failTaskWithoutVdsmId(task); } } }
Source:
<code>public long getItemId(int position) { Person person = getItem(position); if (person == null) { return -1; } <START> return person.getPersonID(); <END> }</code><technical_language>person's ID is different, list optimized returning true for hasStableIds(), ex: @Override public boolean hasStableIds() { return true; } Explanation [here](<LINK_0></technical_language>

Target:
public long getItemId(int position) { Person person = getPerson(position); if (person == null) { return -1; } return person.getPersonID(); }
Source:
<code>public String getExpression(RexNode node, RelDataType inputRowType, RelDataType outputRowType) { final RexProgramBuilder programBuilder = new RexProgramBuilder(inputRowType, rexBuilder); programBuilder.addProject(node, null); final RexProgram program = programBuilder.getProgram(); final BlockBuilder builder = new BlockBuilder(); <START> final JavaTypeFactoryImpl javaTypeFactory = new JavaTypeFactoryImpl(rexBuilder.getTypeFactory().getTypeSystem()); <END> final RexToLixTranslator.InputGetter inputGetter = new RexToLixTranslator.InputGetterImpl(ImmutableList .of(Pair.<Expression, PhysType>of(Expressions.variable(Object[].class, "inputValues"), PhysTypeImpl.of(javaTypeFactory, inputRowType, JavaRowFormat.ARRAY, false)))); final Function1<String, RexToLixTranslator.InputGetter> correlates = new Function1<String, RexToLixTranslator.InputGetter>() { public RexToLixTranslator.InputGetter apply(String a0) { throw new UnsupportedOperationException(); } }; final List<Expression> list = RexToLixTranslator.translateProjects(program, javaTypeFactory, builder, PhysTypeImpl.of(javaTypeFactory, outputRowType, JavaRowFormat.ARRAY, false), null, inputGetter, correlates); for (int i = 0; i < list.size(); i++) { Statement statement = Expressions.statement(list.get(i)); builder.add(statement); } return finalizeExpression(builder.toBlock(), inputRowType); }</code><technical_language>re-use existing type factory? (Type factories canonize common types, mixing is recommended.)</technical_language>

Target:
public String getExpression(RexNode node, RelDataType inputRowType, RelDataType outputRowType) { final RexProgramBuilder programBuilder = new RexProgramBuilder(inputRowType, rexBuilder); programBuilder.addProject(node, null); final RexProgram program = programBuilder.getProgram(); final BlockBuilder builder = new BlockBuilder(); final JavaTypeFactory javaTypeFactory = (JavaTypeFactory)rexBuilder.getTypeFactory(); final RexToLixTranslator.InputGetter inputGetter = new RexToLixTranslator.InputGetterImpl(ImmutableList .of(Pair.<Expression, PhysType>of(Expressions.variable(Object[].class, "inputValues"), PhysTypeImpl.of(javaTypeFactory, inputRowType, JavaRowFormat.ARRAY, false)))); final Function1<String, RexToLixTranslator.InputGetter> correlates = new Function1<String, RexToLixTranslator.InputGetter>() { public RexToLixTranslator.InputGetter apply(String a0) { throw new UnsupportedOperationException(); } }; final List<Expression> list = RexToLixTranslator.translateProjects(program, javaTypeFactory, builder, PhysTypeImpl.of(javaTypeFactory, outputRowType, JavaRowFormat.ARRAY, false), null, inputGetter, correlates); for (int i = 0; i < list.size(); i++) { Statement statement = Expressions.statement(list.get(i)); builder.add(statement); } return finalizeExpression(builder.toBlock(), inputRowType); }
Source:
<code>AbstractAbstractFileNode(T abstractFile) { super(abstractFile); String ext = abstractFile.getNameExtension(); if (StringUtils.isNotBlank(ext)) { ext = "." + ext; if (FileTypeExtensions.getArchiveExtensions().contains(ext)) { IngestManager.getInstance().addIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl); } } try { this.content.getUniquePath(); } catch (TskCoreException ex) { logger.log(Level.SEVERE, String.format("Failed attempt to cache the " + "unique path of the abstract file instance. Name: %s (objID=%d)", this.content.getName(), this.content.getId()), ex); } <START> if (TextTranslationService.getInstance().hasProvider() && UserPreferences.displayTranslatedFileNames()) { <END> backgroundTasksPool.submit(new TranslationTask( new WeakReference<>(this), weakPcl)); } Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl); }</code><technical_language>a translation change here</technical_language>

Target:
AbstractAbstractFileNode(T abstractFile) { super(abstractFile); String ext = abstractFile.getNameExtension(); if (StringUtils.isNotBlank(ext)) { ext = "." + ext; if (FileTypeExtensions.getArchiveExtensions().contains(ext)) { IngestManager.getInstance().addIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl); } } try { this.content.getUniquePath(); } catch (TskCoreException ex) { logger.log(Level.SEVERE, String.format("Failed attempt to cache the " + "unique path of the abstract file instance. Name: %s (objID=%d)", this.content.getName(), this.content.getId()), ex); } if (UserPreferences.displayTranslatedFileNames()) { backgroundTasksPool.submit(new TranslationTask( new WeakReference<>(this), weakPcl)); } Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl); }
Source:
<code>public boolean replaces(@Nullable LookupExtractorFactory other) { if (other != null) { <START> NamespaceLookupExtractorFactory that = (NamespaceLookupExtractorFactory) other; <END> return !extractionNamespace.equals(that.extractionNamespace); } return true; }</code><technical_language>needs class check</technical_language>

Target:
public boolean replaces(@Nullable LookupExtractorFactory other) { if (other != null && other instanceof NamespaceLookupExtractorFactory) { NamespaceLookupExtractorFactory that = (NamespaceLookupExtractorFactory) other; return !extractionNamespace.equals(that.extractionNamespace); } return true; }
Source:
<code>public void checkCreatorLabel(Attribution attribution, List<Agent> agents, Map<String, List<String>> creatorMap) { Map<String, List<String>> finalMap = new HashMap<>(); <START> if(!creatorMap.isEmpty() && !agents.isEmpty()) { for (Map.Entry<String, List<String>> creator : creatorMap.entrySet()) { List<String> creatorValues = new ArrayList<>(); for (String value : creator.getValue()) { if (EuropeanaUriUtils.isUri(value)) { for (Agent agent : agents) { if (StringUtils.equals(value, agent.getAbout())) { creatorValues.addAll(getCreatorFromAgent(agent)); } <END> } } else { creatorValues.add(value); } } ComparatorUtils.removeDuplicates(creatorValues); finalMap.put(creator.getKey(), creatorValues); } } attribution.setCreator(concatLangawareMap(finalMap)); }</code><technical_language>This code is 6 levels deep. refactored submethods</technical_language>

Target:
public void checkCreatorLabel(Attribution attribution, List<Agent> agents, Map<String, List<String>> creatorMap) { Map<String, List<String>> finalMap = new HashMap<>(); if (! creatorMap.isEmpty() && ! agents.isEmpty()) { for (Map.Entry<String, List<String>> creator : creatorMap.entrySet()) { List<String> creatorValues = new ArrayList<>(); for (String value : creator.getValue()) { getCreatorLabel(agents, value, creatorValues); } ComparatorUtils.removeDuplicates(creatorValues); finalMap.put(creator.getKey(), creatorValues); } } attribution.setCreator(concatLangawareMap(finalMap)); }
Source:
<code>void closeOnFailure() { try ( Closer<RuntimeException> closer = new Closer<>() ) { closer.push( IdentifierMappingImplementor::close, identifierMapping ); closer.push( RoutingKeyProvider::close, routingKeyProvider ); <START> closer.push( BeanHolder::close, providedIdentifierBridgeHolder ); <END> } }</code><technical_language>I need this, identifierMapping.close() (above) effectively close bridge, (impossible?) a failure occurs assignment of providedIdentifierBridgeHolder assignment of identifierMapping. So, clarify: remove providedIdentifierBridgeHolder a local variable instead, remove this line</technical_language>

Target:
void closeOnFailure() { try ( Closer<RuntimeException> closer = new Closer<>() ) { closer.push( IdentifierMappingImplementor::close, identifierMapping ); closer.push( RoutingKeyProvider::close, routingKeyProvider ); } }
Source:
<code>public IIrsServer getIrsProxy() { if (getmIrsProxy() == null) { storage_pool storagePool = DbFacade.getInstance().getStoragePoolDao().get(_storagePoolId); if (storagePool.getstatus() != StoragePoolStatus.Uninitialized) { String host = TransactionSupport.executeInScope(TransactionScopeOption.Suppress, new TransactionMethod<String>() { @Override public String runInTransaction() { return gethostFromVds(); } }); if (host != null) { <START> String clusterVersion = Config.DefaultConfigurationVersion; <END> if (mCurrentVdsId != null) { VDS vds = DbFacade.getInstance().getVdsDao().get(mCurrentVdsId); if (vds != null) { clusterVersion = vds.getvds_group_compatibility_version().getValue(); } } int clientTimeOut = Config.<Integer> GetValue(ConfigValues.vdsTimeout, clusterVersion) * 1000; int connectionTimeOut = Config.<Integer>GetValue(ConfigValues.vdsConnectionTimeout, clusterVersion) * 1000; int clientRetries = Config.<Integer> GetValue(ConfigValues.vdsRetries, clusterVersion); Pair<IrsServerConnector, HttpClient> returnValue = XmlRpcUtils.getConnection(host, getmIrsPort(), clientTimeOut, connectionTimeOut, clientRetries, IrsServerConnector.class, Config.<Boolean> GetValue(ConfigValues.UseSecureConnectionWithServers)); privatemIrsProxy = new IrsServerWrapper(returnValue.getFirst(), returnValue.getSecond()); Class[] inputTypes = new Class[] { storage_pool.class, boolean.class }; Object[] inputParams = new Object[] { storagePool, _isSpmStartCalled }; SchedulerUtilQuartzImpl.getInstance().scheduleAOneTimeJob(this, "StorageEventOnTimer", inputTypes, inputParams, 0, TimeUnit.MILLISECONDS); } } } return getmIrsProxy(); }</code><technical_language>storage-pool competability version instead of some default, i choice</technical_language>

Target:
public IIrsServer getIrsProxy() { if (getmIrsProxy() == null) { final storage_pool storagePool = DbFacade.getInstance().getStoragePoolDao().get(_storagePoolId); if (storagePool.getstatus() != StoragePoolStatus.Uninitialized) { String host = TransactionSupport.executeInScope(TransactionScopeOption.Suppress, new TransactionMethod<String>() { @Override public String runInTransaction() { return gethostFromVds(); } }); if (host != null) { int clientTimeOut = Config.<Integer> GetValue(ConfigValues.vdsTimeout) * 1000; int connectionTimeOut = Config.<Integer>GetValue(ConfigValues.vdsConnectionTimeout) * 1000; int clientRetries = Config.<Integer> GetValue(ConfigValues.vdsRetries); Pair<IrsServerConnector, HttpClient> returnValue = XmlRpcUtils.getConnection(host, getmIrsPort(), clientTimeOut, connectionTimeOut, clientRetries, IrsServerConnector.class, Config.<Boolean> GetValue(ConfigValues.UseSecureConnectionWithServers)); privatemIrsProxy = new IrsServerWrapper(returnValue.getFirst(), returnValue.getSecond()); runStoragePoolUpEvent(storagePool); } } } return getmIrsProxy(); }
Source:
<code>public void shouldReturnSessionIdWhenSendCommandAndGetResponseIsCalled() { Response response = chromiumApi.sendCommandAndGetResponse("", ImmutableMap.of()); <START> assertEquals(sessionId.toString(), response.getSessionId()); <END> }</code><technical_language>assertJ please</technical_language>

Target:
public void shouldReturnSessionIdWhenSendCommandAndGetResponseIsCalled() { Response response = chromiumApi.sendCommandAndGetResponse("", ImmutableMap.of()); assertThat(sessionId.toString()).isEqualTo(response.getSessionId()); }
Source:
<code>private GoogleAuthenticatorKey generateKey() throws TOTPException { KeyRepresentation encoding = KeyRepresentation.BASE32; try { <START> if ("Base64".equals(TOTPUtil.getEncodingMethod())) { <END> encoding = KeyRepresentation.BASE64; } } catch (IdentityApplicationManagementException e) { throw new TOTPException("Error when reading the encoding method for tenant",e); } GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder gacb = new GoogleAuthenticatorConfig .GoogleAuthenticatorConfigBuilder() .setKeyRepresentation(encoding); GoogleAuthenticator googleAuthenticator = new GoogleAuthenticator(gacb.build()); GoogleAuthenticatorKey key = googleAuthenticator.createCredentials(); return key; }</code><technical_language>constants for types of String literals</technical_language>

Target:
private GoogleAuthenticatorKey generateKey() throws TOTPException { KeyRepresentation encoding = KeyRepresentation.BASE32; try { if (Constants.BASE64.equals(TOTPUtil.getEncodingMethod())) { encoding = KeyRepresentation.BASE64; } } catch (IdentityApplicationManagementException e) { throw new TOTPException("Error when reading the encoding method for tenant",e); } GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder gacb = new GoogleAuthenticatorConfig .GoogleAuthenticatorConfigBuilder() .setKeyRepresentation(encoding); GoogleAuthenticator googleAuthenticator = new GoogleAuthenticator(gacb.build()); GoogleAuthenticatorKey key = googleAuthenticator.createCredentials(); return key; }
Source:
<code>public String getParameterJsonWithUrlEncoded() { try { <START> List<String> placeholders = parsePlaceHolders(getCommand()); <END> assurePlaceholdersAreBound(placeholders, params); String jsonParameterObject = createJsonObject(params); String urlEncodedJsonParameterObject = encode(jsonParameterObject); return urlEncodedJsonParameterObject; } catch (IOException e) { throw new RuntimeException("Couldn't create parameter JSON object", e); } }</code><technical_language>parsePlaceHolders is create a list for assurePlaceholdersAreBound. please move parsePlaceHolders called assurePlaceholdersAreBound</technical_language>

Target:
public String getParameterJsonWithUrlEncoded() { try { String jsonParameterObject = createJsonObject(params); String urlEncodedJsonParameterObject = encode(jsonParameterObject); return urlEncodedJsonParameterObject; } catch (IOException e) { throw new InfluxDBIOException(e); } }
Source:
<code><START> private <T> boolean compareValues(final T v1, final T v2, final String label) { <END> boolean eq = Objects.equals(v1, v2); if (eq) { return true; } else { reportDifference(v1, v2, label); return false; } }</code><technical_language>static. methods static</technical_language>

Target:
private static <T> boolean compareValues(final T v1, final T v2, final String label) { boolean eq = Objects.equals(v1, v2); if (eq) { return true; } else { reportDifference(v1, v2, label); return false; } }
Source:
<code>public boolean setValue(Object value) throws OseeCoreException { <START> ByteBuffer toSet = null; <END> if (value != null && value instanceof String) { try { toSet = ByteBuffer.wrap(((String) value).getBytes("UTF-8")); } catch (UnsupportedEncodingException ex) { OseeCoreException.wrapAndThrow(ex); } } return setValue(toSet); }</code><technical_language>If allowing Object in, other types handled throw UnSupportedArgument exception</technical_language>

Target:
public boolean setValue(Object value) throws OseeCoreException { ByteBuffer toSet = null; if (value != null && value instanceof String) { try { toSet = ByteBuffer.wrap(((String) value).getBytes("UTF-8")); } catch (UnsupportedEncodingException ex) { OseeCoreException.wrapAndThrow(ex); } } else if (value != null) { OseeCoreException.wrapAndThrow(new UnsupportedEncodingException( String.format("Unsupported type [%s]", value.getClass().toGenericString()))); } return setValue(toSet); }
Source:
<code>private SiriusServerSectionDto convertSection(Session session, SectionDescription sectionDescription) { String sectionIdentifier = sectionDescription.getName(); DAnalysis self = <START> ((DAnalysisSessionImpl) session).getAnalyses().get(0); <END> Map<String, Object> variables = new HashMap<>(); variables.put(SELF, self); IEvaluationResult result = new SiriusBackendInterpreter(session).evaluateExpression(variables, sectionDescription.getTitleExpression()); String sectionName = result.asString(); List<SiriusServerActivityDto> activities = sectionDescription.getActivities().stream() .map(activityDescription -> this.convertActivity(session, activityDescription)) .collect(Collectors.toList()); return new SiriusServerSectionDto(sectionIdentifier, sectionName, activities); }</code><technical_language>DAnalysisSession.allAnalyses</technical_language>

Target:
private SiriusServerSectionDto convertSection(Session session, SectionDescription sectionDescription) { String sectionIdentifier = sectionDescription.getName(); DAnalysis self = ((DAnalysisSessionImpl) session).allAnalyses().stream().findFirst().orElse(null); Map<String, Object> variables = new HashMap<>(); variables.put(SELF, self); IEvaluationResult result = new SiriusBackendInterpreter(session).evaluateExpression(variables, sectionDescription.getTitleExpression()); String sectionName = result.asString(); List<SiriusServerActivityDto> activities = sectionDescription.getActivities().stream() .map(activityDescription -> this.convertActivity(session, activityDescription)) .collect(Collectors.toList()); return new SiriusServerSectionDto(sectionIdentifier, sectionName, activities); }
Source:
<code>public void testAddColLabelOutOfRangeThrowsException() { int columnIndex = 5; try { pivotTable.addColLabel(columnIndex); } catch(IndexOutOfBoundsException e) { <START> return; <END> } fail(); }</code><technical_language>return in middle of a method is coding standards move fail try block? fail("expected exception thrown")</technical_language>

Target:
public void testAddColLabelOutOfRangeThrowsException() { int columnIndex = 5; try { pivotTable.addColLabel(columnIndex); fail("expected IndexOutOfBoundsException for column: " + columnIndex); } catch(IndexOutOfBoundsException e) { } }
Source:
<code>private void adaptQualifiedNameToNamespaceLevel(IASTFunctionDefinition new_definition, List<ICPPASTNamespaceDefinition> namespaces) { if (new_definition.getDeclarator().getName() instanceof ICPPASTQualifiedName && !namespaces.isEmpty()) { ICPPNodeFactory nodeFactory = ASTNodeFactoryFactory.getDefaultCPPNodeFactory(); ICPPASTQualifiedName qname = (ICPPASTQualifiedName) new_definition.getDeclarator().getName(); ICPPASTName lastNameCopy = nodeFactory.newName(qname.getLastName().toCharArray()); ICPPASTQualifiedName qname_new = nodeFactory.newQualifiedName(lastNameCopy); boolean start = false; ICPPASTNameSpecifier[] qualifiers = qname.getQualifier(); for (int i = 0; i < qualifiers.length; i++) { String qualifierName = qualifiers[i].toString(); if (i < namespaces.size() && qualifierName.equals(namespaces.get(i).getName().toString())) { start = true; } else if <START> (start) <END> qname_new.addNameSpecifier(qualifiers[i]); } if (start) { new_definition.getDeclarator().setName(qname_new); } } }</code><technical_language>if-else statements braces branches</technical_language>

Target:
private void adaptQualifiedNameToNamespaceLevel(IASTFunctionDefinition new_definition, List<ICPPASTNamespaceDefinition> namespaces) { if (new_definition.getDeclarator().getName() instanceof ICPPASTQualifiedName && !namespaces.isEmpty()) { ICPPNodeFactory nodeFactory = ASTNodeFactoryFactory.getDefaultCPPNodeFactory(); ICPPASTQualifiedName qname = (ICPPASTQualifiedName) new_definition.getDeclarator().getName(); ICPPASTName lastNameCopy = nodeFactory.newName(qname.getLastName().toCharArray()); ICPPASTQualifiedName qname_new = nodeFactory.newQualifiedName(lastNameCopy); boolean start = false; ICPPASTNameSpecifier[] qualifiers = qname.getQualifier(); for (int i = 0; i < qualifiers.length; i++) { String qualifierName = qualifiers[i].toString(); if (i < namespaces.size() && qualifierName.equals(namespaces.get(i).getName().toString())) { start = true; } else if (start) { qname_new.addNameSpecifier(qualifiers[i]); } } if (start) { new_definition.getDeclarator().setName(qname_new); } } }
Source:
<code>public JacksonSerializerHelper() { numberTypes = new HashSet<>(); numberTypes.add(Long.class.getCanonicalName()); numberTypes.add(Float.class.getCanonicalName()); <START> numberTypes.add(Double.class.getCanonicalName()); <END> }</code><technical_language>this a static list</technical_language>

Target:
public JacksonSerializerHelper() { }
Source:
<code>public static Set<String> listDeploymentNames(OperationContext context, PathAddress deploymentRootAddress, Set<Pattern> patterns) { Set<String> deploymentNames = new HashSet<>(); Resource deploymentRootResource = context.readResourceFromRoot(deploymentRootAddress); if (deploymentRootResource.hasChildren(DEPLOYMENT)) { for (Resource.ResourceEntry deploymentResource : deploymentRootResource.getChildren(DEPLOYMENT)) { if (isAcceptableDeployment(deploymentResource.getModel(), patterns)) { deploymentNames.add(deploymentResource.getName()); <START> } else if (deploymentResource.hasChildren(SUBDEPLOYMENT)) { <END> for (Resource.ResourceEntry subdeploymentResource : deploymentResource.getChildren(SUBDEPLOYMENT)) { if (isAcceptableDeployment(subdeploymentResource.getModel(), patterns)) { deploymentNames.add(deploymentResource.getName()); } } } } } return deploymentNames; }</code><technical_language>L132 test work correctly HC? is SUBDEPLOYMENT child HC</technical_language>

Target:
private static Set<String> listDeploymentNames(OperationContext context, PathAddress deploymentRootAddress, Set<Pattern> patterns) { Set<String> deploymentNames = new HashSet<>(); Resource deploymentRootResource = context.readResourceFromRoot(deploymentRootAddress); if (deploymentRootResource.hasChildren(DEPLOYMENT)) { for (Resource.ResourceEntry deploymentResource : deploymentRootResource.getChildren(DEPLOYMENT)) { if (isAcceptableDeployment(deploymentResource.getModel(), patterns)) { deploymentNames.add(deploymentResource.getName()); } else if (deploymentResource.hasChildren(SUBDEPLOYMENT)) { for (Resource.ResourceEntry subdeploymentResource : deploymentResource.getChildren(SUBDEPLOYMENT)) { if (isAcceptableDeployment(subdeploymentResource.getModel(), patterns)) { deploymentNames.add(deploymentResource.getName()); } } } } } return deploymentNames; }
Source:
<code>private static Thread asyncProcessStream(final InputStream input, final StringBuilder out) { Thread thread = new Thread() { @Override public void run() { try { out.append(inputstreamToString(input)); } finally { try { input.close(); } catch (IOException e) { <START> e.printStackTrace(); <END> } } } }; thread.setDaemon(true); thread.start(); return thread; }</code><technical_language>please Log.SEVERE instead of printing stdout</technical_language>

Target:
private static Thread asyncProcessStream(final InputStream input, final StringBuilder out) { Thread thread = new Thread() { @Override public void run() { try { out.append(inputstreamToString(input)); } finally { try { input.close(); } catch (IOException e) { LOG.log(Level.WARNING, "Failed to close the input stream", e); } } } }; thread.setDaemon(true); thread.start(); return thread; }
Source:
<code>public Function<Result<TimeseriesResultValue>, Result<TimeseriesResultValue>> makePostComputeManipulatorFn( TimeseriesQuery query, MetricManipulationFn fn ) { boolean shouldFinalize = MetricManipulatorFns.finalizing().equals(fn); <START> return makeComputeManipulatorFn(query, fn, shouldFinalize); <END> }</code><technical_language>equals check is brittle, I do a check a query context key. alternatively, do groupBy does, mergeResults modify query remove post-aggregators. Then, downstream of mergeResults outermost node (typically broker) ignore post-aggregators. done overriding doRun in ResultMergeQueryRunner</technical_language>

Target:
public Function<Result<TimeseriesResultValue>, Result<TimeseriesResultValue>> makePostComputeManipulatorFn( TimeseriesQuery query, MetricManipulationFn fn ) { return makeComputeManipulatorFn(query, fn, true); }
Source:
<code>public Response send(final Request req, final String home, final String method, final Collection<Entry<String, String>> headers, final byte[] content) throws IOException { Response response = null; int attempts = 0; do { try { TimeUnit.SECONDS.sleep(1 * attempts); } catch (final InterruptedException ex) { throw new IOException(ex); } response = this.origin.send(req, home, method, headers, content); attempts += 1; } while ( <START> response.status() >= 300 && response.status() <= 399 <END> && attempts < this.max ); return response; }</code><technical_language>constants HttpURLConnection</technical_language>

Target:
public Response send(final Request req, final String home, final String method, final Collection<Entry<String, String>> headers, final byte[] content) throws IOException { Response response = null; int attempts = 0; do { try { TimeUnit.SECONDS.sleep(1 * attempts); } catch (final InterruptedException ex) { throw new IOException(ex); } response = this.origin.send(req, home, method, headers, content); attempts += 1; } while ( response.status() >= HttpURLConnection.HTTP_MULT_CHOICE && response.status() <= HttpURLConnection.HTTP_USE_PROXY && attempts < this.max ); return response; }
Source:
<code>boolean disableCompactionForBlobStore(PartitionId id) { <START> BlobStore store = (BlobStore) getStore(id); <END> return store != null && compactionManager.disableCompactionForBlobStore(store); }</code><technical_language>getStore() method returns null store is in running state. This is you, do want this method return disabling successful store.isStarted() is false</technical_language>

Target:
boolean disableCompactionForBlobStore(PartitionId id) { BlobStore store = stores.get(id); return store != null && compactionManager.disableCompactionForBlobStore(store); }
Source:
<code>public void testGetCarbonConfiguration() throws Exception { String backupRepoLocation = System.getProperty(Constants.CARBON_REPOSITORY); System.setProperty(Constants.CARBON_REPOSITORY, getTestResourceFile("xsd").getAbsolutePath()); CarbonConfiguration carbonConfiguration = xmlBasedConfigProvider.getCarbonConfiguration(); Assert.assertEquals(carbonConfiguration.getId(), "carbon-kernel"); Assert.assertEquals(carbonConfiguration.getName(), "WSO2 Carbon Kernel"); <START> Assert.assertEquals(carbonConfiguration.getVersion(), "5.0.0-SNAPSHOT"); <END> Assert.assertEquals(carbonConfiguration.getPortsConfig().getOffset(), 0); DeploymentConfig deploymentConfig = carbonConfiguration.getDeploymentConfig(); Assert.assertEquals(deploymentConfig.getUpdateInterval(), 15); Assert.assertEquals(deploymentConfig.getRepositoryLocation(), "test-repo-location"); Assert.assertEquals(deploymentConfig.getMode(), DeploymentModeEnum.scheduled); if (backupRepoLocation != null) { System.setProperty(Constants.CARBON_REPOSITORY, backupRepoLocation); } else { System.clearProperty(Constants.CARBON_REPOSITORY); } }</code><technical_language>this change versions</technical_language>

Target:
public void testGetCarbonConfiguration() throws Exception { String backupRepoLocation = System.getProperty(Constants.CARBON_REPOSITORY); System.setProperty(Constants.CARBON_REPOSITORY, getTestResourceFile("xsd").getAbsolutePath()); CarbonConfiguration carbonConfiguration = xmlBasedConfigProvider.getCarbonConfiguration(); Assert.assertEquals(carbonConfiguration.getId(), "carbon-kernel"); Assert.assertEquals(carbonConfiguration.getName(), "WSO2 Carbon Kernel"); Assert.assertEquals(carbonConfiguration.getVersion(), "1.2.3"); Assert.assertEquals(carbonConfiguration.getPortsConfig().getOffset(), 0); DeploymentConfig deploymentConfig = carbonConfiguration.getDeploymentConfig(); Assert.assertEquals(deploymentConfig.getUpdateInterval(), 15); Assert.assertEquals(deploymentConfig.getRepositoryLocation(), "test-repo-location"); Assert.assertEquals(deploymentConfig.getMode(), DeploymentModeEnum.scheduled); if (backupRepoLocation != null) { System.setProperty(Constants.CARBON_REPOSITORY, backupRepoLocation); } else { System.clearProperty(Constants.CARBON_REPOSITORY); } }
Source:
<code>public final void skipIfCantResolve(Method method, Object[] params) { String accession = null; if (params.length > 0) { Object firstParam = params[0]; if (firstParam instanceof String) { accession = (String)firstParam; } else if (firstParam instanceof SRAAccession) { accession = firstParam.toString(); } } if (accession != null && <START> accession.matches(SRAAccession.REMOTE_ACCESSION_PATTERN) && !canResolveNetworkAccession) { <END> throw new SkipException("Skipping network SRA Test because cannot resolve SRA accession."); } }</code><technical_language>longer asking connect for accession, remove condition, if puts in a non-matching accession a new test, fail</technical_language>

Target:
public final void skipIfCantResolve(Method method, Object[] params) { String accession = null; if (params.length > 0) { Object firstParam = params[0]; if (firstParam instanceof String) { accession = (String)firstParam; } else if (firstParam instanceof SRAAccession) { accession = firstParam.toString(); } } if (accession != null && accession.matches(SRAAccession.REMOTE_ACCESSION_PATTERN) && !canResolveNetworkAccession) { throw new SkipException("Skipping network SRA Test because cannot resolve remote SRA accession '" + checkAccession + "'."); } }
Source:
<code>public AuthzDecisionStatement createAuthzDecisionStatement(final String resource, final String decisionTxt, final String action, final Evidence evidence) { final AuthDecisionStatementBean authzBean = new AuthDecisionStatementBean(); final ActionBean actionBean = new ActionBean(); <START> actionBean.setActionNamespace("urn:oasis:names:tc:SAML:1.0:action:rwedc"); <END> actionBean.setContents(action); authzBean.setActions(Collections.singletonList(actionBean)); authzBean.setResource(resource); authzBean.setDecision(AuthDecisionStatementBean.Decision.valueOf(decisionTxt.toUpperCase())); authzBean.setEvidence(evidence); return SAML2ComponentBuilder.createAuthorizationDecisionStatement(Collections.singletonList(authzBean)).get(0); }</code><technical_language>Consider put constant variable</technical_language>

Target:
public AuthzDecisionStatement createAuthzDecisionStatement(final String resource, final String decisionTxt, final String action, final Evidence evidence) { final AuthDecisionStatementBean authzBean = new AuthDecisionStatementBean(); final ActionBean actionBean = new ActionBean(); actionBean.setActionNamespace(NhincConstants.ACTION_NAMESPACE_STRING); actionBean.setContents(action); authzBean.setActions(Collections.singletonList(actionBean)); authzBean.setResource(resource); authzBean.setDecision(AuthDecisionStatementBean.Decision.valueOf(decisionTxt.toUpperCase())); authzBean.setEvidence(evidence); return SAML2ComponentBuilder.createAuthorizationDecisionStatement(Collections.singletonList(authzBean)).get(0); }
Source:
<code>public Throwable initCause(Throwable cause) { <START> if (cause == null) { <END> throw new NullPointerException(); } if (cause == this) { throw new IllegalArgumentException("cannot add to self"); } if (cause instanceof MultiCacheException) { for (Throwable t2 : ((MultiCacheException)cause).getThrowables()) { throwables.add(t2); } } else { throwables.add(0, cause); } return this; }</code><technical_language>this addThrowable(Throwable t)</technical_language>

Target:
public Throwable initCause(Throwable cause) { throw new UnsupportedOperationException(); }
Source:
<code>public void testSimulatePackfileReplacement() throws Exception { File f1 = createFile("file"); File f2 = createFile("fool"); waitNextSec(f1); FileTime timestamp = Files.getLastModifiedTime(f1.toPath()); <START> FileSnapshot save = FileSnapshot.save(f1); <END> Files.move(f2.toPath(), f1.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE); Files.setLastModifiedTime(f1.toPath(), timestamp); assertTrue(save.isModified(f1)); }</code><technical_language>If want inode check is active, wait 2*<FS tick> FileSnapshot? 10% rule in timestamp comparison hit anyway... (waitNextSec updates last-modified time of f1, timestamp save.lastRead close)</technical_language>

Target:
public void testSimulatePackfileReplacement() throws Exception { File f1 = createFile("file"); File f2 = createFile("fool"); waitNextSec(f1); waitNextSec(f1); FileTime timestamp = Files.getLastModifiedTime(f1.toPath()); FileSnapshot save = FileSnapshot.save(f1); Files.move(f2.toPath(), f1.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE); Files.setLastModifiedTime(f1.toPath(), timestamp); assertTrue(save.isModified(f1)); }
Source:
<code>public final NotInBitmapFilter clone() { <START> return this; <END> }</code><technical_language>UnsupportedOperationException</technical_language>

Target:
public final NotInBitmapFilter clone() { throw new UnsupportedOperationException(); }
Source:
<code>public static ClientConfig createConfig() { ClientConfig clientConfig = new ClientConfig(); clientConfig.property(ClientProperties.ASYNC_THREADPOOL_SIZE, 10); clientConfig.property(ClientProperties.CONNECT_TIMEOUT, 50000); <START> clientConfig.property(ClientProperties.READ_TIMEOUT, 200000); <END> return clientConfig; }</code><technical_language>~1 minute & ~3 minutes respectively</technical_language>

Target:
static ClientConfig createConfig() { ClientConfig clientConfig = new ClientConfig(); clientConfig.property(ClientProperties.ASYNC_THREADPOOL_SIZE, 10); clientConfig.property(ClientProperties.CONNECT_TIMEOUT, 5000); clientConfig.property(ClientProperties.READ_TIMEOUT, 20000); return clientConfig; }
Source:
<code>protected Boolean isValidId(String id) { <START> return !id.contains("N") && !id.contains("-") && !id.contains("undefined") && id.split(":")[1].matches(".*\\d+.*"); <END> }</code><technical_language>id.split(":")[1] a problem if id :. add condition id.contains(":")</technical_language>

Target:
protected Boolean isValidId(String id) { return !id.contains("N") && !id.contains("-") && !id.contains("undefined") && id.contains(":") && id.split(":")[1].matches(".*\\d+.*"); }
Source:
<code>public void doStopJobExecution() throws Exception { String jobName = generateJobName(); executeJobCreate(jobName, JOB_WITH_STEP_EXECUTIONS); checkForJobInList(jobName, JOB_WITH_STEP_EXECUTIONS, true); triggerJobWithDelay(jobName, "5"); Thread.sleep(5000); String executionId = getJobExecutionId(jobName); <START> System.out.println("ExecutionId: " + executionId); <END> String executionStatus = getJobExecutionStatus(jobName); System.out.println("ExecutionStatus: " + executionStatus); long timeout = System.currentTimeMillis() + 10000; while ((executionStatus.equals("STARTING") || executionStatus.equals("STARTED")) && System.currentTimeMillis() < timeout) { executionStatus = getJobExecutionStatus(jobName); executionId = getJobExecutionId(jobName); } executeCommand("job execution stop " + executionId); Thread.sleep(3000); Table table; int n = 0; do { table = (Table) executeCommand("job execution list").getResult(); for (TableRow tr : table.getRows()) { if (tr.getValue(1).equals(executionId)) { executionStatus = tr.getValue(5); break; } } if (!"STOPPED".equals(executionStatus)) { Thread.sleep(100); } } while (!"STOPPED".equals(executionStatus) && n++ < 100); assertEquals("STOPPED", executionStatus); }</code><technical_language>a logger instead of System.out.println</technical_language>

Target:
public void doStopJobExecution() throws Exception { String jobName = generateJobName(); executeJobCreate(jobName, JOB_WITH_STEP_EXECUTIONS); checkForJobInList(jobName, JOB_WITH_STEP_EXECUTIONS, true); triggerJobWithDelay(jobName, "5"); Thread.sleep(5000); String executionId = getJobExecutionId(jobName); String executionStatus = getJobExecutionStatus(jobName); long timeout = System.currentTimeMillis() + 10000; while ((executionStatus.equals("STARTING") || executionStatus.equals("STARTED")) && System.currentTimeMillis() < timeout) { executionStatus = getJobExecutionStatus(jobName); executionId = getJobExecutionId(jobName); } executeCommand("job execution stop " + executionId); Thread.sleep(3000); Table table; int n = 0; do { table = (Table) executeCommand("job execution list").getResult(); for (TableRow tr : table.getRows()) { if (tr.getValue(1).equals(executionId)) { executionStatus = tr.getValue(5); break; } } if (!"STOPPED".equals(executionStatus)) { Thread.sleep(100); } } while (!"STOPPED".equals(executionStatus) && n++ < 100); assertEquals("STOPPED", executionStatus); }
Source:
<code>public Saveable[] getSaveables() { Saveable[] saveables = super.getSaveables(); <START> if (saveables == null || saveables.length == 0) { <END> ISaveablePart saveablePart = getSite().getPage().getActiveEditor(); if (saveablePart instanceof ISaveablesSource) { return ((ISaveablesSource) saveablePart).getSaveables(); } } return saveables; }</code><technical_language>I check getNavigatorContentService().getSaveablesService().hasSaveablesProvider(). if CNF form of saveable mechanism in, fail editor, otherwise, fully CNF implementation. INavigatorSaveablesService.hasSaveablesProvider() added API</technical_language>

Target:
public Saveable[] getSaveables() { if (!hasSaveablesProvider()) { ISaveablePart saveablePart = getSite().getPage().getActiveEditor(); if (saveablePart instanceof ISaveablesSource) { return ((ISaveablesSource) saveablePart).getSaveables(); } } return super.getSaveables(); }
Source:
<code>public Mono<Void> uploadFromFile(String uploadFilePath) { AsynchronousFileChannel channel = channelSetup(uploadFilePath); return Flux.fromIterable(sliceFile(uploadFilePath)) <START> .flatMap(chunk -> upload(FluxUtil.readFile(channel, chunk.start(), chunk.end() - chunk.start() + 1), chunk.end() - chunk.start() + 1, chunk.start()) <END> .timeout(Duration.ofSeconds(DOWNLOAD_UPLOAD_CHUNK_TIMEOUT)) .retry(3, throwable -> throwable instanceof IOException || throwable instanceof TimeoutException)) .then() .doOnTerminate(() -> channelCleanUp(channel)); }</code><technical_language>need change, but, a good idea start keeping in mind 120 max length</technical_language>

Target:
public Mono<Void> uploadFromFile(String uploadFilePath) { return Mono.using(() -> channelSetup(uploadFilePath, StandardOpenOption.READ), channel -> Flux.fromIterable(sliceFile(uploadFilePath)).flatMap(chunk -> upload(FluxUtil.readFile(channel, chunk.start(), chunk.end() - chunk.start() + 1), chunk.end() - chunk.start() + 1, chunk.start()) .timeout(Duration.ofSeconds(DOWNLOAD_UPLOAD_CHUNK_TIMEOUT)) .retry(3, throwable -> throwable instanceof IOException || throwable instanceof TimeoutException)) .then(), this::channelCleanUp); }
Source:
<code>public void testPatternSubscribe() { MockSubscriber mockSubscriber = new MockSubscriber(); Runnable runnable = () -> { subscriber.psubscribe(mockSubscriber, "sal*s"); }; Thread subscriberThread = new Thread(runnable); subscriberThread.start(); waitFor(() -> mockSubscriber.getSubscribedChannels() == 1); String message = "hello-" + System.currentTimeMillis(); Long result = publisher.publish("salutations", message); assertThat(result).isEqualTo(1); assertThat(mockSubscriber.getReceivedMessages()).isEmpty(); <START> GeodeAwaitility.await().until(() -> mockSubscriber.getReceivedPMessages().size() != 0); <END> assertThat(mockSubscriber.getReceivedPMessages()).containsExactly(message); mockSubscriber.punsubscribe("sal*s"); waitFor(() -> mockSubscriber.getSubscribedChannels() == 0); waitFor(() -> !subscriberThread.isAlive()); }</code><technical_language>instead of size() != 0 !isEmpty() is a bit</technical_language>

Target:
public void testPatternSubscribe() { MockSubscriber mockSubscriber = new MockSubscriber(); Runnable runnable = () -> { subscriber.psubscribe(mockSubscriber, "sal*s"); }; Thread subscriberThread = new Thread(runnable); subscriberThread.start(); waitFor(() -> mockSubscriber.getSubscribedChannels() == 1); String message = "hello-" + System.currentTimeMillis(); Long result = publisher.publish("salutations", message); assertThat(result).isEqualTo(1); assertThat(mockSubscriber.getReceivedMessages()).isEmpty(); GeodeAwaitility.await().until(() -> !mockSubscriber.getReceivedPMessages().isEmpty()); assertThat(mockSubscriber.getReceivedPMessages()).containsExactly(message); mockSubscriber.punsubscribe("sal*s"); waitFor(() -> mockSubscriber.getSubscribedChannels() == 0); waitFor(() -> !subscriberThread.isAlive()); }
Source:
<code>public void setup(TestContext context) throws Exception { this.context = context; if (writePercentage < 0) { throw new IllegalArgumentException("Write percentage can't be smaller than 0"); } if (writePercentage > 100) { throw new IllegalArgumentException("Write percentage can't be larger than 100"); } targetInstance = context.getTargetInstance(); TestUtils.warmupPartitions(log, targetInstance); totalCounter = targetInstance.getAtomicLong(context.getTestId() + ":TotalCounter"); counters = new IAtomicLong[countersLength]; for (int k = 0; k < counters.length; k++) { <START> String key; <END> if(preventLocalCalls){ key = StringUtils.generateNotKeyOwnedBy(8, targetInstance); }else{ key = StringUtils.makeString(8); } counters[k] = targetInstance.getAtomicLong(key); } }</code><technical_language>is need for this; generateKey takes care of this</technical_language>

Target:
public void setup(TestContext context) throws Exception { this.context = context; if (writePercentage < 0) { throw new IllegalArgumentException("Write percentage can't be smaller than 0"); } if (writePercentage > 100) { throw new IllegalArgumentException("Write percentage can't be larger than 100"); } targetInstance = context.getTargetInstance(); TestUtils.warmupPartitions(log, targetInstance); totalCounter = targetInstance.getAtomicLong(context.getTestId() + ":TotalCounter"); counters = new IAtomicLong[countersLength]; for (int k = 0; k < counters.length; k++) { String key = StringUtils.generateKey(8, preventLocalCalls, targetInstance); counters[k] = targetInstance.getAtomicLong(key); } }
Source:
<code>protected void addHints(Set<Hints.Key> hints) { hints.add(Hints.GEOMETRY_SIMPLIFICATION); hints.add(Hints.GEOMETRY_GENERALIZATION); <START> hints.add(Hints.REMOVE_BUFFER_PIXEL); <END> }</code><technical_language>advertise existing Hints.GEOMETRY_CLIP, StreamingRenderer instantiates clipping collection needed</technical_language>

Target:
protected void addHints(Set<Hints.Key> hints) { hints.add(Hints.GEOMETRY_SIMPLIFICATION); hints.add(Hints.GEOMETRY_GENERALIZATION); hints.add(Hints.GEOMETRY_CLIP); }