auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean encode(InputStream data, OutputStream os) { byte[] buffer = ByteArrayPool.get().getBytes(); try { int read; while ((read = data.read(buffer)) != -1) { os.write(buffer, 0, read); } return true; } catch (IOException e) { if (Log.isLoggable(TAG, Log.ERROR)) { <START> Log.v(TAG, "Failed to encode data onto the OutputStream", e); <END> } return false; } finally { ByteArrayPool.get().releaseBytes(buffer); } }</code><technical_language>Log.e match isLoggable tag. technically error Log.DEBUG Log.D ok, I a strong opinion</technical_language>

Target:
public boolean encode(InputStream data, OutputStream os) { byte[] buffer = ByteArrayPool.get().getBytes(); try { int read; while ((read = data.read(buffer)) != -1) { os.write(buffer, 0, read); } return true; } catch (IOException e) { if (Log.isLoggable(TAG, Log.WARN)) { Log.w(TAG, "Failed to encode data onto the OutputStream", e); } return false; } finally { ByteArrayPool.get().releaseBytes(buffer); } }
Source:
<code><START> public void refresh(){ <END> ArrayList<Date> dateList = new ArrayList<>(); Calendar populator = (Calendar) myCal.clone(); int totalDays = populator.getActualMaximum(Calendar.DAY_OF_MONTH); populator.set(Calendar.DAY_OF_MONTH, 1); int monthStartWeekDay = populator.get(Calendar.DAY_OF_WEEK) - 1; totalDays += monthStartWeekDay; populator.add(Calendar.DAY_OF_MONTH, -monthStartWeekDay); while(dateList.size() < totalDays){ dateList.add(populator.getTime()); populator.add(Calendar.DAY_OF_MONTH, 1); } int remainingDays = (8-populator.get(Calendar.DAY_OF_WEEK))%7; for(int i = 0; i < remainingDays; i ++){ dateList.add(populator.getTime()); populator.add(Calendar.DAY_OF_MONTH, 1); } myYear.setText(String.valueOf(myCal.get(Calendar.YEAR))); myMonth.setText(myCal.getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.getDefault())); myGrid.setAdapter(new CalendarAdapter(getContext(), dateList)); }</code><technical_language>split this well-named helper methods</technical_language>

Target:
public void refresh(){ ArrayList<Date> dateList = new ArrayList<>(); Calendar populator = (Calendar) calendar.clone(); int totalDays = getNumDaysInMonth(populator); populateListOfDates(dateList, populator, totalDays); yearSpinner.setSelection(calendar.get(Calendar.YEAR)-GregorianDateWidget.MINYEAR); monthSpinner.setSelection(calendar.get(Calendar.MONTH)); calendarGrid.setAdapter(new CalendarAdapter(getContext(), dateList)); }
Source:
<code>protected void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { Preconditions.checkNotNull(emitExpressions); Schema inputSchema = Objects.requireNonNull(getChild().getSchema()); ImmutableList.Builder<GenericEvaluator> evalBuilder = ImmutableList.builder(); final ExpressionOperatorParameter parameters = new ExpressionOperatorParameter(inputSchema, getNodeID()); for (Expression expr : emitExpressions) { GenericEvaluator evaluator; if (expr.isConstant()) { evaluator = new ConstantEvaluator(expr, parameters); } else { evaluator = new GenericEvaluator(expr, parameters); } if (evaluator.needsCompiling()) { evaluator.compile(); } Preconditions.checkArgument(!evaluator.needsState()); evalBuilder.add(evaluator); } <START> emitEvaluators = evalBuilder.build(); <END> outputBuffer = new TupleBatchBuffer(getSchema()); }</code><technical_language>I call setEmitEvaluators() instead</technical_language>

Target:
protected void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { Preconditions.checkNotNull(emitExpressions); Schema inputSchema = Objects.requireNonNull(getChild().getSchema()); List<GenericEvaluator> evals = new ArrayList<>(); final ExpressionOperatorParameter parameters = new ExpressionOperatorParameter(inputSchema, getNodeID()); for (Expression expr : emitExpressions) { GenericEvaluator evaluator; if (expr.isConstant()) { evaluator = new ConstantEvaluator(expr, parameters); } else { evaluator = new GenericEvaluator(expr, parameters); } if (evaluator.needsCompiling()) { evaluator.compile(); } Preconditions.checkArgument(!evaluator.needsState()); evals.add(evaluator); } setEmitEvaluators(evals); outputBuffer = new TupleBatchBuffer(getSchema()); }
Source:
<code>private ToolSection findParentSection(Collection<EObject> selection) { if(selection.size()<=1){ return null; } ToolSection toolsection = null; for (EObject tool : selection) { if (!(tool instanceof AbstractToolDescription) || !(tool.eContainer() instanceof ToolSection)) { <START> return null; <END> } if(toolsection==null){ toolsection = (ToolSection) tool.eContainer(); } if (toolsection!= tool.eContainer()) { return null; } } return toolsection; }</code><technical_language>regroup elements parent is a tool section (a group group extension). methods/services : . filter selection: AbstractToolDescription ? . selected elements try retrieve a potential parent toolsection : iterates element get parent section (could eventually eContainer eContainer hierarchy find a section). services moved abstract super class (with generics ?)</technical_language>

Target:
private ToolSection findParentSection(Collection<EObject> selection) { for (EObject tool : selection) { if ((tool.eContainer() instanceof ToolSection)) { return (ToolSection) tool.eContainer(); } } return null; }
Source:
<code>public int getNumOfLanguages() { List<WebElement> languagesList = driver.findElements(languageSelector); return languagesList.size(); <START> } <END></code><technical_language>add empty line</technical_language>

Target:
public int getNumOfLanguages() { List<WebElement> languagesList = driver.findElements(languageSelectorBy); return languagesList.size(); }
Source:
<code>protected boolean drawArrow(TimeGraphColorScheme colors, ITimeEvent event, Rectangle rect, GC gc) { int colorIdx = fTimeGraphProvider.getStateTableIndex(event); <START> if (colorIdx < 0 && colorIdx != ITimeGraphPresentationProvider.TRANSPARENT) { <END> return false; } boolean visible = ((rect.height == 0) && (rect.width == 0)) ? false : true; if (visible) { if (colorIdx == ITimeGraphPresentationProvider.TRANSPARENT) { return false; } Color stateColor = null; if (colorIdx < fEventColorMap.length) { stateColor = fEventColorMap[colorIdx]; } else { stateColor = Display.getDefault().getSystemColor(SWT.COLOR_BLACK); } gc.setForeground(stateColor); gc.setBackground(stateColor); gc.drawLine(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height); drawArrowHead(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height, gc); } fTimeGraphProvider.postDrawEvent(event, rect, gc); return visible; }</code><technical_language>this transparent stuff is for handling drawing of states end pixel. I treat < 0 non-drawable arrows</technical_language>

Target:
protected boolean drawArrow(TimeGraphColorScheme colors, ITimeEvent event, Rectangle rect, GC gc) { int colorIdx = fTimeGraphProvider.getStateTableIndex(event); if (colorIdx < 0) { return false; } boolean visible = ((rect.height == 0) && (rect.width == 0)) ? false : true; if (visible) { if (colorIdx == ITimeGraphPresentationProvider.TRANSPARENT) { return false; } Color stateColor = null; if (colorIdx < fEventColorMap.length) { stateColor = fEventColorMap[colorIdx]; } else { stateColor = Display.getDefault().getSystemColor(SWT.COLOR_BLACK); } gc.setForeground(stateColor); gc.setBackground(stateColor); gc.drawLine(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height); drawArrowHead(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height, gc); } fTimeGraphProvider.postDrawEvent(event, rect, gc); return visible; }
Source:
<code>public EventHubDisasterRecoveryPairingImpl withNewPrimaryNamespace( Creatable<EventHubNamespace> namespaceCreatable) { this.addDependency(namespaceCreatable); if (namespaceCreatable instanceof EventHubNamespaceImpl) { EventHubNamespaceImpl namespace = ((EventHubNamespaceImpl) namespaceCreatable); <START> this.ancestor = new Ancestors().new OneAncestor(namespace.resourceGroupName(), namespaceCreatable.name()); <END> } return this; }</code><technical_language>I throws exception else, due need properties in request</technical_language>

Target:
public EventHubDisasterRecoveryPairingImpl withNewPrimaryNamespace( Creatable<EventHubNamespace> namespaceCreatable) { this.addDependency(namespaceCreatable); if (namespaceCreatable instanceof EventHubNamespaceImpl) { EventHubNamespaceImpl namespace = ((EventHubNamespaceImpl) namespaceCreatable); this.ancestor = new Ancestors().new OneAncestor(namespace.resourceGroupName(), namespaceCreatable.name()); } else { logger.logExceptionAsError(new IllegalArgumentException("The namespaceCreatable is invalid.")); } return this; }
Source:
<code>public String render(T size) { if (size == null || size.longValue() == 0) { <START> return "NA"; END> } long sizeInGB = -1; switch (unit) { case BYTE: sizeInGB = (long) (size.longValue() / Math.pow(1024, 3)); break; case GIGABYTE: sizeInGB = size.longValue(); break; } return sizeInGB >= 1 ? sizeInGB + " GB" : "< 1 GB"; }</code><technical_language>N/A. - this localized</technical_language>

Target:
public String render(T size) { if (size == null || size.longValue() == 0) { return CONSTANTS.unAvailablePropertyLabel(); } long sizeInGB = -1; switch (unit) { case BYTE: sizeInGB = (long) (size.longValue() / Math.pow(1024, 3)); break; case GIGABYTE: sizeInGB = size.longValue(); break; } return sizeInGB >= 1 ? sizeInGB + " GB" : "< 1 GB"; }
Source:
<code>private void createTimer(Rule rule, TimerTrigger trigger) throws SchedulerException { synchronized (rule) { <START> <END> } String cronExpression = trigger.getCron(); if (trigger.getTime() != null) { if (trigger.getTime().equals("noon")) { cronExpression = "0 0 12 * * ?"; } else if (trigger.getTime().equals("midnight")) { cronExpression = "0 0 0 * * ?"; } else { logger.warn("Unrecognized time expression '{}' in rule '{}'", trigger.getTime(), rule.getName()); return; } } String jobIdentity = getJobIdentityString(rule, trigger); try { JobDetail job = newJob(ExecuteRuleJob.class) .usingJobData(ExecuteRuleJob.JOB_DATA_RULEMODEL, rule.eResource().getURI().path()) .usingJobData(ExecuteRuleJob.JOB_DATA_RULENAME, rule.getName()).withIdentity(jobIdentity).build(); Trigger quartzTrigger = newTrigger().withSchedule(CronScheduleBuilder.cronSchedule(cronExpression)).build(); scheduler.scheduleJob(job, Collections.singleton(quartzTrigger), true); logger.debug("Scheduled rule '{}' with cron expression '{}'", rule.getName(), cronExpression); } catch (RuntimeException e) { throw new SchedulerException(e.getMessage()); } }</code><technical_language>is reason of this empty synchronized block</technical_language>

Target:
private void createTimer(Rule rule, TimerTrigger trigger) throws SchedulerException { String cronExpression = trigger.getCron(); if (trigger.getTime() != null) { if (trigger.getTime().equals("noon")) { cronExpression = "0 0 12 * * ?"; } else if (trigger.getTime().equals("midnight")) { cronExpression = "0 0 0 * * ?"; } else { logger.warn("Unrecognized time expression '{}' in rule '{}'", trigger.getTime(), rule.getName()); return; } } String jobIdentity = getJobIdentityString(rule, trigger); try { JobDetail job = newJob(ExecuteRuleJob.class) .usingJobData(ExecuteRuleJob.JOB_DATA_RULEMODEL, rule.eResource().getURI().path()) .usingJobData(ExecuteRuleJob.JOB_DATA_RULENAME, rule.getName()).withIdentity(jobIdentity).build(); Trigger quartzTrigger = newTrigger().withSchedule(CronScheduleBuilder.cronSchedule(cronExpression)).build(); scheduler.scheduleJob(job, Collections.singleton(quartzTrigger), true); logger.debug("Scheduled rule '{}' with cron expression '{}'", rule.getName(), cronExpression); } catch (RuntimeException e) { throw new SchedulerException(e.getMessage()); } }
Source:
<code>public GrantedAuthority[] getAuthorities() { String[] roles = this.roles; if(roles == null){ return new GrantedAuthority[]{SecurityRealm.AUTHENTICATED_AUTHORITY}; } String authenticatedRole = SecurityRealm.AUTHENTICATED_AUTHORITY.getAuthority(); <START> List<GrantedAuthority> grantedAuthorities = new ArrayList<>(); <END> for (int i = 0; i < roles.length; i++){ if(!authenticatedRole.equals(roles[i])){ grantedAuthorities.add(new GrantedAuthorityImpl(roles[i])); } } return grantedAuthorities.toArray(new GrantedAuthority[grantedAuthorities.size()]); }</code><technical_language>Initialize roles.length</technical_language>

Target:
public GrantedAuthority[] getAuthorities() { String[] roles = this.roles; if(roles == null){ return new GrantedAuthority[]{SecurityRealm.AUTHENTICATED_AUTHORITY}; } String authenticatedRole = SecurityRealm.AUTHENTICATED_AUTHORITY.getAuthority(); List<GrantedAuthority> grantedAuthorities = new ArrayList<>(roles.length + 1); grantedAuthorities.add(new GrantedAuthorityImpl(authenticatedRole)); for (int i = 0; i < roles.length; i++){ if(!authenticatedRole.equals(roles[i])){ grantedAuthorities.add(new GrantedAuthorityImpl(roles[i])); } } return grantedAuthorities.toArray(new GrantedAuthority[grantedAuthorities.size()]); }
Source:
<code>private String[] getFactoryClassNamePackageName(Resource resource) { String sourcePath = resource.getSourcePath(); String fileName = sourcePath.substring(sourcePath.lastIndexOf('/') + 1); fileName = fileName.replace(".pmml", ""); <START> String packageName = fileName.toLowerCase(); <END> String factoryClassName = getSanitizedClassName(fileName + "Factory"); return new String[]{factoryClassName, packageName}; }</code><technical_language>I preserve cases. reduces possibility of name clashes. In case I package sanitizer utils coherent rest of code</technical_language>

Target:
private String[] getFactoryClassNamePackageName(Resource resource) { String sourcePath = resource.getSourcePath(); String fileName = sourcePath.substring(sourcePath.lastIndexOf('/') + 1); fileName = fileName.replace(".pmml", ""); String packageName = getSanitizedPackageName(fileName); String factoryClassName = getSanitizedClassName(fileName + "Factory"); return new String[]{factoryClassName, packageName}; }
Source:
<code>public ElideResponse get(String path, MultivaluedMap<String, String> queryParams, User opaqueUser, String apiVersion) { return handleRequest(true, opaqueUser, dataStore::beginReadTransaction, (tx, user) -> { JsonApiDocument jsonApiDoc = new JsonApiDocument(); RequestScope requestScope = new RequestScope(path, apiVersion, jsonApiDoc, tx, user, queryParams, elideSettings); requestScope.setEntityProjection(new EntityProjectionMaker(elideSettings.getDictionary(), requestScope).parsePath(path)); BaseVisitor visitor = new GetVisitor(requestScope); Optional<MultivaluedMap<String, String>> queryParamsOptional = requestScope.getQueryParams(); <START> String apiQuery; <END> if (!queryParamsOptional.isPresent()) { apiQuery = path; } else { apiQuery = path + '?'; Iterator<String> it = queryParams.keySet().iterator(); while (it.hasNext()) { String key = (String) it.next(); List<String> value = queryParams.get(key); for (String v : value) { apiQuery += key + "=" + v; } if (it.hasNext()) { apiQuery += '&'; } } } if (requestScope.getElideSettings() != null) { QueryLogger ql = requestScope.getElideSettings().getQueryLogger(); if (opaqueUser == null) { ql.acceptQuery(UUID.fromString(requestScope.getRequestId()), null, requestScope.getHeaders(), requestScope.getApiVersion(), apiQuery); } else { ql.acceptQuery(UUID.fromString(requestScope.getRequestId()), opaqueUser.getPrincipal(), requestScope.getHeaders(), requestScope.getApiVersion(), apiQuery); } } return visit(path, requestScope, visitor); }); }</code><technical_language>change QueryLogger interface accept query params a separate paramter reconstruct path</technical_language>

Target:
public ElideResponse get(String path, MultivaluedMap<String, String> queryParams, User opaqueUser, String apiVersion) { return handleRequest(true, opaqueUser, dataStore::beginReadTransaction, (tx, user) -> { JsonApiDocument jsonApiDoc = new JsonApiDocument(); RequestScope requestScope = new RequestScope(path, apiVersion, jsonApiDoc, tx, user, queryParams, elideSettings); requestScope.setEntityProjection(new EntityProjectionMaker(elideSettings.getDictionary(), requestScope).parsePath(path)); BaseVisitor visitor = new GetVisitor(requestScope); elideAcceptQuery(requestScope, opaqueUser, requestScope.getQueryParams(), path); return visit(path, requestScope, visitor); }); }
Source:
<code>public IndexTask( @JsonProperty("id") String id, @JsonProperty("resource") TaskResource taskResource, @JsonProperty("spec") IndexIngestionSpec ingestionSchema, @JacksonInject ObjectMapper jsonMapper ) { super( makeId(id, ingestionSchema), <START> String.format("index_%s", makeDataSource(ingestionSchema)), <END> taskResource == null ? new TaskResource(makeId(id, ingestionSchema), 1) : taskResource, makeDataSource(ingestionSchema), makeInterval(ingestionSchema) ); this.ingestionSchema = ingestionSchema; this.jsonMapper = jsonMapper; }</code><technical_language>If groupId is specified, this is simply ID prior convention. is a constructor need added AbstractFixedIntervalTask account for this combination of parameters. modify this ID groupID in absence of explicit groupId</technical_language>

Target:
public IndexTask( @JsonProperty("id") String id, @JsonProperty("resource") TaskResource taskResource, @JsonProperty("spec") IndexIngestionSpec ingestionSchema, @JacksonInject ObjectMapper jsonMapper ) { super( makeId(id, ingestionSchema), taskResource, makeDataSource(ingestionSchema), makeInterval(ingestionSchema) ); this.ingestionSchema = ingestionSchema; this.jsonMapper = jsonMapper; }
Source:
<code>private void insertAnnotations(final File file) throws IOException { Timer timer = Timer.getAndStart(); <START> Sequence reference = this.graph.getSources().iterator().next() <END> .getSources().iterator().next(); annotations = ResistanceAnnotationMapper.mapAnnotations(graph, ResistanceAnnotationParser.parseAnnotations(file), reference); timer.stopAndLog("Inserting annotations"); changed = true; repaintPosition(tileController, root, wrapper.hvalueProperty() .doubleValue()); }</code><technical_language>Obtaining reference sequence needs a dedicated method</technical_language>

Target:
private void insertAnnotations(final File file) throws IOException { Timer timer = Timer.getAndStart(); Sequence reference = this.graph.getSources().iterator().next() .getSources().iterator().next(); annotations = ResistanceAnnotationMapper.mapAnnotations(graph, ResistanceAnnotationParser.parseAnnotations(file), reference); timer.stopAndLog("Inserting annotations"); forceRepaintPosition = true; repaintPosition(root, wrapper.hvalueProperty() .doubleValue()); }
Source:
<code>public Object2IntMap<String> getLaneLimits(int totalLimit) { Object2IntMap<String> onlyLow = new Object2IntArrayMap<>(1); <START> onlyLow.put(LOW, Ints.checkedCast(Math.round(totalLimit * ((double) maxLowPercent / 100)))); <END> return onlyLow; }</code><technical_language>Behavior is a bit docs, is rounded up. this allows a lane limit of zero total limit, is a bit inconsistent disallowing maxLowPercent 0 100 percent</technical_language>

Target:
public Object2IntMap<String> getLaneLimits(int totalLimit) { Object2IntMap<String> onlyLow = new Object2IntArrayMap<>(1); onlyLow.put(LOW, Ints.checkedCast((long) Math.ceil(totalLimit * ((double) maxLowPercent / 100)))); return onlyLow; }
Source:
<code>private synchronized void forget( BoltServerAddress address ) { readers.remove( address ); writers.remove( address ); <START> routers.remove( address ); <END> connections.purge( address ); }</code><technical_language>@thobe If cluster told fellows, keen forget them? If job, send of queue. _just_ in handy later. cluster update a full view some time in future, right</technical_language>

Target:
private synchronized void forget( BoltServerAddress address ) { readers.remove( address ); writers.remove( address ); connections.purge( address ); }
Source:
<code><START> protected VDSParametersBase getRevertVDSParameters() { <END> DeleteImageGroupVDSCommandParameters parameters = new DeleteImageGroupVDSCommandParameters(); parameters.setStoragePoolId(getEnclosingCommand().getParameters().getStoragePoolId()); parameters.setStorageDomainId(getEnclosingCommand().getParameters().getStorageDomainId()); parameters.setImageGroupId(getEnclosingCommand().getParameters().getImageGroupID()); return parameters; }</code><technical_language>perform revert RemoveImageCommand in revertTask() - image removed completely in case (also DB) i benefit additional logic in RemoveImage</technical_language>

Target:
protected VDSParametersBase getRevertVDSParameters() { return null; }
Source:
<code>private void updateCurrentPropertiesPresenter(String elementId, LayoutElementWithProperties layoutElement) { LayoutElementPropertiesPresenter presenter = presenterMap.get(elementId); if (presenter == null) { <START> propertiesPresenter = beanManager.lookupBean(LayoutElementPropertiesPresenter.class).newInstance(); <END> propertiesPresenter.edit(layoutElement); presenterMap.put(elementId, propertiesPresenter); } else if (presenter != propertiesPresenter) { propertiesPresenter.getLayoutElement().setSelected(false); propertiesPresenter = presenter; } }</code><technical_language>change this ManagedInstance instead</technical_language>

Target:
private void updateCurrentPropertiesPresenter(String elementId, LayoutElementWithProperties layoutElement) { LayoutElementPropertiesPresenter presenter = presenterMap.get(elementId); if (presenter == null) { propertiesPresenter = layoutElementPropertiesPresenterInstance.get(); propertiesPresenter.edit(layoutElement); presenterMap.put(elementId, propertiesPresenter); } else if (presenter != propertiesPresenter) { propertiesPresenter.getLayoutElement().setSelected(false); propertiesPresenter = presenter; } }
Source:
<code>public ExecutionResult execute(Item item) { ProcessType processType = getProcessType(item); if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) { return ExecutionResult.NOTHING_TO_DO; } try { IComponentFilter filter = new NameComponentFilter("tFileInputDelimited"); ModifyComponentsAction.searchAndModify(item, processType, filter, Arrays.<IComponentConversion> asList(new IComponentConversion() { @Override public void transform(NodeType node) { EList metadatasList = node.getMetadata(); if(metadatasList == null || metadatasList.size() < 1) { return; } MetadataType metadataType = (MetadataType)metadatasList.get(0); boolean hasDynamic = false; for (Object columnObject : metadataType.getColumn()) { ColumnType columnType = (ColumnType) columnObject; if(columnType.getType().equals("id_Dynamic")) { hasDynamic = true; } } if(!hasDynamic) { return; } ElementParameterType limit = ComponentUtilities.getNodeProperty(node, "LIMIT"); <START> Integer intLimitValue = Integer.parseInt(limit.getValue()); <END> if(intLimitValue > 0) { intLimitValue--; limit.setValue(String.valueOf(intLimitValue)); } } })); return ExecutionResult.SUCCESS_NO_ALERT; } catch (Exception e) { ExceptionHandler.process(e); return ExecutionResult.FAILURE; } }</code><technical_language>I this migration work empty/context/globalMap/... kinds of value. add "-1" parameter value. like: If customer fill context.lilimit, migrate context.lilimit-1</technical_language>

Target:
public ExecutionResult execute(Item item) { ProcessType processType = getProcessType(item); if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) { return ExecutionResult.NOTHING_TO_DO; } try { IComponentFilter filter = new NameComponentFilter("tFileInputDelimited"); ModifyComponentsAction.searchAndModify(item, processType, filter, Arrays.<IComponentConversion> asList(new IComponentConversion() { @Override public void transform(NodeType node) { EList metadatasList = node.getMetadata(); if(metadatasList == null || metadatasList.size() < 1) { return; } MetadataType metadataType = (MetadataType)metadatasList.get(0); boolean hasDynamic = false; for (Object columnObject : metadataType.getColumn()) { ColumnType columnType = (ColumnType) columnObject; if(columnType.getType().equals("id_Dynamic")) { hasDynamic = true; } } if(!hasDynamic) { return; } ElementParameterType limit = ComponentUtilities.getNodeProperty(node, "LIMIT"); try { Integer intLimitValue = Integer.parseInt(limit.getValue()); if(intLimitValue > 0) { intLimitValue--; limit.setValue(String.valueOf(intLimitValue)); } } catch(NumberFormatException e) { String sLimit = limit.getValue(); limit.setValue(sLimit + "-1"); } } })); return ExecutionResult.SUCCESS_NO_ALERT; } catch (Exception e) { ExceptionHandler.process(e); return ExecutionResult.FAILURE; } }
Source:
<code>AsyncQosIoExceptionHandler( ScheduledExecutorService scheduledExecutorService, ExecutorService executorService, <START> BackoffStrategy backoffStrategy) { <END> this.scheduledExecutorService = MoreExecutors.listeningDecorator(scheduledExecutorService); this.executorService = MoreExecutors.listeningDecorator(executorService); this.backoffStrategy = backoffStrategy; }</code><technical_language>preconditions check executor services</technical_language>

Target:
AsyncQosIoExceptionHandler( ScheduledExecutorService scheduledExecutorService, ExecutorService executorService, BackoffStrategy backoffStrategy) { Preconditions.checkArgument(scheduledExecutorService != executorService, "Almost certainly you want these to be different - need fixed pool vs cached."); this.scheduledExecutorService = MoreExecutors.listeningDecorator(scheduledExecutorService); this.executorService = MoreExecutors.listeningDecorator(executorService); this.backoffStrategy = backoffStrategy; }
Source:
<code>protected void unregisterSender() { SplitFileInserterSender s; synchronized(this) { s = sender; } <START> if(s != null) <END> s.unregister(context, parent.getPriorityClass()); }</code><technical_language>Space</technical_language>

Target:
protected void unregisterSender() { sender.unregister(context, parent.getPriorityClass()); }
Source:
<code>public void loadGlobalProxy() { ContentResolver res = mContext.getContentResolver(); String host = Settings.Global.getString(res, GLOBAL_HTTP_PROXY_HOST); int port = Settings.Global.getInt(res, GLOBAL_HTTP_PROXY_PORT, 0); String exclList = Settings.Global.getString(res, GLOBAL_HTTP_PROXY_EXCLUSION_LIST); String pacFileUrl = Settings.Global.getString(res, GLOBAL_HTTP_PROXY_PAC); if (!TextUtils.isEmpty(host) || !TextUtils.isEmpty(pacFileUrl)) { ProxyInfo proxyProperties; if (!TextUtils.isEmpty(pacFileUrl)) { proxyProperties = new ProxyInfo(pacFileUrl); } else { proxyProperties = new ProxyInfo(host, port, exclList); } if (!proxyProperties.isValid()) { if (DBG) Slog.d(TAG, "Invalid proxy properties, ignoring: " + proxyProperties); return; } synchronized (mProxyLock) { mGlobalProxy = proxyProperties; <START> mPacManager.setCurrentProxyScriptUrl(mGlobalProxy); <END> } } loadDeprecatedGlobalHttpProxy(); }</code><technical_language>I tell, this code is run ConnectivityService#systemReady(), is a blocking call SystemServer part of system startup. suggests time spent impact system boot time. measured this impact in way? Additionally, I systemReady call execute concurrently ConnectivityService handler thread, call this method, via, for example, sendProxyBroadcast. Is safe call this method concurrently? If need post this handler thread add more synchronization. Also: is guaranteed system components PAC manager needs initialized this point? Finally: is PAC proxy needed? Is NetworkAgent is registered? If so, I guarantee proxy loaded time, if this method is called in systemReady. This is setCurrentProxyScriptUrl block, calls Context#bindService a callback, is asynchronous operation. If operation takes a long time - boot, can, ActivityManager is starting - , PAC proxy initialization complete proxy is needed</technical_language>

Target:
public void loadGlobalProxy() { ContentResolver res = mContext.getContentResolver(); String host = Settings.Global.getString(res, GLOBAL_HTTP_PROXY_HOST); int port = Settings.Global.getInt(res, GLOBAL_HTTP_PROXY_PORT, 0); String exclList = Settings.Global.getString(res, GLOBAL_HTTP_PROXY_EXCLUSION_LIST); String pacFileUrl = Settings.Global.getString(res, GLOBAL_HTTP_PROXY_PAC); if (!TextUtils.isEmpty(host) || !TextUtils.isEmpty(pacFileUrl)) { ProxyInfo proxyProperties; if (!TextUtils.isEmpty(pacFileUrl)) { proxyProperties = new ProxyInfo(pacFileUrl); } else { proxyProperties = new ProxyInfo(host, port, exclList); } if (!proxyProperties.isValid()) { if (DBG) Slog.d(TAG, "Invalid proxy properties, ignoring: " + proxyProperties); return; } synchronized (mProxyLock) { mGlobalProxy = proxyProperties; } if (!TextUtils.isEmpty(pacFileUrl)) { mConnectivityServiceHandler.post( () -> mPacManager.setCurrentProxyScriptUrl(proxyProperties)); } } loadDeprecatedGlobalHttpProxy(); }
Source:
<code>public String[] getStepDescriptions() { if (isEnabled(CleanUpConstants.REMOVE_REDUNDANT_MODIFIERS)) { <START> return new String[] {}; } return new String[0]; <END> }</code><technical_language>this suspicious, returns empty array times</technical_language>

Target:
public String[] getStepDescriptions() { if (isEnabled(CleanUpConstants.REMOVE_REDUNDANT_MODIFIERS)) { return new String[] { MultiFixMessages.RedundantModifiersCleanup_description }; } return new String[0]; }
Source:
<code>public void openFile(File file) { <START> if (file != null && file.exists() && !file.isDirectory()) { <END> String content = FileService.readFromFile(file.getAbsolutePath()); etc.setEditorContent(content); etc.setCurrentFile(file); etc.setModified(false); } }</code><technical_language>[nit] file.isFile() instead of file.exists() && !file.isDirectory()</technical_language>

Target:
public void openFile(File file) { if (file != null && file.isFile()) { String content = FileService.readFromFile(file.getAbsolutePath()); etc.setEditorContent(content); etc.setCurrentFile(file); etc.setModified(false); etc.setPreviewDisplayed(false); } }
Source:
<code>public void handleSetDeviceLifecycleStatusByChannelResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType result, final OsgpException osgpException, final SetDeviceLifecycleStatusByChannelResponseDto responseDto) { LOGGER.info("handleSetDeviceLifecycleStatusByChannelResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); this.setDeviceLifecycleStatusByChannel(responseDto); final String gatewayDeviceIdentification = deviceMessageMetadata.getDeviceIdentification(); final SetDeviceLifecycleStatusByChannelResponseData responseData = this.managementMapper.map(responseDto, SetDeviceLifecycleStatusByChannelResponseData.class); this.webServiceResponseMessageSender.send( <START> ResponseMessage.newResponseMessageBuilder() <END> .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(gatewayDeviceIdentification).withResult(result) .withOsgpException(osgpException).withDataObject(responseData) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(), deviceMessageMetadata.getMessageType()); }</code><technical_language>missed :) Please this a variable well</technical_language>

Target:
public void handleSetDeviceLifecycleStatusByChannelResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType result, final OsgpException osgpException, final SetDeviceLifecycleStatusByChannelResponseDto responseDto) { LOGGER.info("handleSetDeviceLifecycleStatusByChannelResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); this.setDeviceLifecycleStatusByChannel(responseDto); final String gatewayDeviceIdentification = deviceMessageMetadata.getDeviceIdentification(); final SetDeviceLifecycleStatusByChannelResponseData responseData = this.managementMapper.map(responseDto, SetDeviceLifecycleStatusByChannelResponseData.class); ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(gatewayDeviceIdentification).withResult(result) .withOsgpException(osgpException).withDataObject(responseData) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(); this.webServiceResponseMessageSender.send( responseMessage, deviceMessageMetadata.getMessageType()); }
Source:
<code>protected void cleanup(Context hadoopContext) throws IOException, InterruptedException { <START> checkState(mTableContext != null); <END> mTableContext.close(); mTableContext = null; super.cleanup(hadoopContext); }</code><technical_language>If for some reason setup() throws exception mTableContext get initialized, parent class's cleanup() invoked. I mTableContext != null a precondition of this method. IOUtils.closeQuietly() call super.cleanup(hadoopContext) is invoked</technical_language>

Target:
protected void cleanup(Context hadoopContext) throws IOException, InterruptedException { Preconditions.checkState(mTableContext != null); mTableContext.close(); mTableContext = null; super.cleanup(hadoopContext); }
Source:
<code><START> public Executor getExecutor() { <END> if (executor == null) { executor = new PublishExecutor(); } return executor; }</code><technical_language>Is this thread safe</technical_language>

Target:
public Executor getExecutor() { if (executor == null) { executor = new AuthExecutor(); } return executor; }
Source:
<code>boolean snapshotCleanupSwitch(final boolean on, final boolean synchronous) throws IOException; boolean isSnapshotCleanupEnabled() throws IOException; <START> default List<OnlineLogRecord> getSlowLogResponses(final Set<ServerName> serverNames, <END> final LogQueryFilter logQueryFilter) throws IOException { logQueryFilter.setServerNames(serverNames); List<LogEntry> logEntries = getLogEntries(logQueryFilter, 10); return logEntries.stream().map(logEntry -> (OnlineLogRecord) logEntry) .collect(Collectors.toList()); }</code><technical_language>'limit' parameter here. Improvement track changes making generic API? Add a method leave this for compat</technical_language>

Target:
boolean snapshotCleanupSwitch(final boolean on, final boolean synchronous) throws IOException; boolean isSnapshotCleanupEnabled() throws IOException; @Deprecated default List<OnlineLogRecord> getSlowLogResponses(final Set<ServerName> serverNames, final LogQueryFilter logQueryFilter) throws IOException { String logType; if (LogQueryFilter.Type.LARGE_LOG.equals(logQueryFilter.getType())) { logType = "LARGE_LOG"; } else { logType = "SLOW_LOG"; } Map<String, Object> filterParams = new HashMap<>(); filterParams.put("regionName", logQueryFilter.getRegionName()); filterParams.put("clientAddress", logQueryFilter.getClientAddress()); filterParams.put("tableName", logQueryFilter.getTableName()); filterParams.put("userName", logQueryFilter.getUserName()); filterParams.put("filterByOperator", logQueryFilter.getFilterByOperator().toString()); List<LogEntry> logEntries = getLogEntries(serverNames, logType, ServerType.REGION_SERVER, logQueryFilter.getLimit(), filterParams); return logEntries.stream().map(logEntry -> (OnlineLogRecord) logEntry) .collect(Collectors.toList()); }
Source:
<code>private static Collection<String> getClassLoaderUrls(ApplicationContext context) { List<String> urls = new LinkedList<String>(); for (ApplicationContext c = context; c != null; c = c.getParent()) { for (ClassLoader l = c.getClassLoader(); l != null; l = l.getParent()) { if (l instanceof URLClassLoader) { for (URL u : ((URLClassLoader)l).getURLs()) { urls.add(u.toString()); } } else { <START> System.err.println("*** Couldn't get classloader URLs for classloader " + l + ", not an instance of URLClassLoader"); <END> } } } return urls; }</code><technical_language>If this is error, throw</technical_language>

Target:
private static Collection<String> getClassLoaderUrls(ApplicationContext context) { List<String> urls = new LinkedList<String>(); for (ApplicationContext c = context; c != null; c = c.getParent()) { for (ClassLoader l = c.getClassLoader(); l != null; l = l.getParent()) { if (l instanceof URLClassLoader) { for (URL u : ((URLClassLoader)l).getURLs()) { urls.add(u.toString()); } } else { throw new RuntimeException("Couldn't get URLs for classloader " + l + ", not an instance of URLClassLoader. (This shouldn't happen.)"); } } } return urls; }
Source:
<code>public void end(Context ctx) throws Exception { if (objectsToUpdate != null && handlesToDelete != null) { boolean pushCommit = false; for (DSpaceObject iu : objectsToUpdate) { String hdl = iu.getHandle(); if (hdl != null && !handlesToDelete.contains(hdl)) { try { indexer.indexContent(ctx, iu, true); pushCommit = true; log.debug("Indexed " + Constants.typeText[iu.getType()] + ", id=" + String.valueOf(iu.getID()) + ", handle=" + hdl); } catch (Exception e) { log.error("Failed while indexing object: ", e); } } } for (String hdl : handlesToDelete) { try { indexer.unIndexContent(ctx, hdl, false); pushCommit = true; if (log.isDebugEnabled()) { log.debug("UN-Indexed Item, handle=" + hdl); } } catch (Exception e) { log.error("Failed while UN-indexing object: " + hdl, e); } } <START> if(pushCommit) { <END> indexer.commit(doCommit); } } objectsToUpdate = null; handlesToDelete = null; }</code><technical_language>option provide is enable/disable soft commit for indexer consumer. is reason offer hardcommit option for consumer</technical_language>

Target:
public void end(Context ctx) throws Exception { if (objectsToUpdate != null && handlesToDelete != null) { boolean pushCommit = false; for (DSpaceObject iu : objectsToUpdate) { String hdl = iu.getHandle(); if (hdl != null && !handlesToDelete.contains(hdl)) { try { indexer.indexContent(ctx, iu, true); pushCommit = true; log.debug("Indexed " + Constants.typeText[iu.getType()] + ", id=" + String.valueOf(iu.getID()) + ", handle=" + hdl); } catch (Exception e) { log.error("Failed while indexing object: ", e); } } } for (String hdl : handlesToDelete) { try { indexer.unIndexContent(ctx, hdl, false); pushCommit = true; if (log.isDebugEnabled()) { log.debug("UN-Indexed Item, handle=" + hdl); } } catch (Exception e) { log.error("Failed while UN-indexing object: " + hdl, e); } } if(pushCommit) { indexer.commit(softCommit); } } objectsToUpdate = null; handlesToDelete = null; }
Source:
<code>private void installLdapConnectionPool(String connectionPoolId) { BundleContext bundleContext = getContext(); if (bundleContext != null) { try { Collection<ServiceReference<GenericObjectPool>> serviceReferences = bundleContext.getServiceReferences( GenericObjectPool.class, String.format("(id=%s)", connectionPoolId)); ServiceReference<GenericObjectPool> serviceReference = serviceReferences .stream() .findFirst() .orElseThrow( () -> new IllegalStateException( "No LDAPConnectionPool service found with id:" + connectionPoolId)); ldapConnectionPool = bundleContext.getService(serviceReference); } catch (InvalidSyntaxException | IllegalStateException e) { <START> LOGGER.info("Unable to get LDAP Connection pool. LDAP log in will not be possible.", e); <END> } } }</code><technical_language>this a pretty severe issue. this logged warn error</technical_language>

Target:
private void installLdapConnectionPool(String connectionPoolId) { BundleContext bundleContext = getContext(); if (bundleContext != null) { try { Collection<ServiceReference<GenericObjectPool>> serviceReferences = bundleContext.getServiceReferences( GenericObjectPool.class, String.format("(id=%s)", connectionPoolId)); ServiceReference<GenericObjectPool> serviceReference = serviceReferences .stream() .findFirst() .orElseThrow( () -> new IllegalStateException( "No LDAPConnectionPool service found with id:" + connectionPoolId)); ldapConnectionPool = bundleContext.getService(serviceReference); } catch (InvalidSyntaxException | IllegalStateException e) { LOGGER.error("Unable to get LDAP Connection pool. LDAP log in will not be possible.", e); } } }
Source:
<code>public Object run(Object object) throws Exception { String[] args = Platform.getCommandLineArgs(); String timeoutParameter = getParameterValue(args, "-timeout"); if (timeoutParameter != null) { DumpStackTracesTimer.startStackDumpTimeoutTimer(timeoutParameter); } <START> return Integer.valueOf(OsgiSurefireBooter.run(args)); <END> }</code><technical_language>timeout check implmented in OsgiSurefireBooter (or a parent) instead? allow easier reuse</technical_language>

Target:
public Object run(Object object) throws Exception { String[] args = Platform.getCommandLineArgs(); return Integer.valueOf(OsgiSurefireBooter.run(args)); }
Source:
<code>public void testRTrimSetScanKey() throws Exception { String query = "SELECT inst FROM ptsdb WHERE rtrim(inst) = 'abc'"; List<Object> binds = Collections.emptyList(); Scan scan = new Scan(); compileQuery(query, binds, scan); assertTrue(Bytes.compareTo(Bytes.toBytes("abc"), scan.getStartRow()) == 0); <START> assertTrue(Bytes.compareTo(Bytes.toBytes("abc\1"), scan.getStopRow()) == 0); <END> assertTrue(scan.getFilter() != null); }</code><technical_language>Please update pull in. pull in tests fail</technical_language>

Target:
public void testRTrimSetScanKey() throws Exception { String query = "SELECT inst FROM ptsdb WHERE rtrim(inst) = 'abc'"; List<Object> binds = Collections.emptyList(); Scan scan = new Scan(); compileQuery(query, binds, scan); assertTrue(Bytes.compareTo(Bytes.toBytes("abc"), scan.getStartRow()) == 0); assertTrue(Bytes.compareTo(Bytes.toBytes("abd"), scan.getStopRow()) == 0); assertTrue(scan.getFilter() != null); }
Source:
<code>protected void onMessageReceived(WorkspaceStatusEvent statusEvent) { final String workspaceId = statusEvent.getWorkspaceId(); switch (statusEvent.getEventType()) { case STARTING: onWorkspaceStarting(workspaceId); break; case RUNNING: onWorkspaceStarted(workspaceId); break; case ERROR: notificationManager.notify(locale.workspaceStartFailed(), FAIL, FLOAT_MODE); loader.setError(LoaderPresenter.Phase.STARTING_WORKSPACE_RUNTIME); final String workspaceName = workspace.getConfig().getName(); final String error = statusEvent.getError(); workspaceServiceClient.getWorkspaces(SKIP_COUNT, MAX_COUNT).then(showErrorDialog(workspaceName, error)); eventBus.fireEvent(new WorkspaceStoppedEvent(workspace)); break; case STOPPING: loader.show(LoaderPresenter.Phase.STOPPING_WORKSPACE); break; case STOPPED: loader.setSuccess(LoaderPresenter.Phase.STOPPING_WORKSPACE); <START> try { <END> eventBus.fireEvent(new WorkspaceStoppedEvent(workspace)); } catch (Exception e) { Log.error(WorkspaceEventsHandler.class, e.getMessage(), e); } startWorkspaceNotification.show(statusEvent.getWorkspaceId()); break; case SNAPSHOT_CREATING: loader.show(LoaderPresenter.Phase.CREATING_WORKSPACE_SNAPSHOT); break; case SNAPSHOT_CREATED: loader.setSuccess(LoaderPresenter.Phase.CREATING_WORKSPACE_SNAPSHOT); snapshotCreator.successfullyCreated(); break; case SNAPSHOT_CREATION_ERROR: loader.setError(LoaderPresenter.Phase.CREATING_WORKSPACE_SNAPSHOT); snapshotCreator.creationError("Snapshot creation error: " + statusEvent.getError()); break; } }</code><technical_language>need try ..catch block here</technical_language>

Target:
protected void onMessageReceived(WorkspaceStatusEvent statusEvent) { final String workspaceId = statusEvent.getWorkspaceId(); switch (statusEvent.getEventType()) { case STARTING: onWorkspaceStarting(workspaceId); break; case RUNNING: onWorkspaceStarted(workspaceId); break; case ERROR: notificationManager.notify(locale.workspaceStartFailed(), FAIL, FLOAT_MODE); loader.setError(LoaderPresenter.Phase.STARTING_WORKSPACE_RUNTIME); final String workspaceName = workspace.getConfig().getName(); final String error = statusEvent.getError(); workspaceServiceClient.getWorkspaces(SKIP_COUNT, MAX_COUNT).then(showErrorDialog(workspaceName, error)); eventBus.fireEvent(new WorkspaceStoppedEvent(workspace)); break; case STOPPING: loader.show(LoaderPresenter.Phase.STOPPING_WORKSPACE); break; case STOPPED: loader.setSuccess(LoaderPresenter.Phase.STOPPING_WORKSPACE); startWorkspaceNotification.show(statusEvent.getWorkspaceId()); eventBus.fireEvent(new WorkspaceStoppedEvent(workspace)); break; case SNAPSHOT_CREATING: loader.show(LoaderPresenter.Phase.CREATING_WORKSPACE_SNAPSHOT); break; case SNAPSHOT_CREATED: loader.setSuccess(LoaderPresenter.Phase.CREATING_WORKSPACE_SNAPSHOT); snapshotCreator.successfullyCreated(); break; case SNAPSHOT_CREATION_ERROR: loader.setError(LoaderPresenter.Phase.CREATING_WORKSPACE_SNAPSHOT); snapshotCreator.creationError("Snapshot creation error: " + statusEvent.getError()); break; } }
Source:
<code>protected void verifyCreateConditions( boolean global ) { try { verify( runtimeManager, times( 1 ) ).deployDataSource( dataSourceDef, DeploymentOptions.create() ); } catch ( Exception e ) { <START> } <END> NewDataSourceEvent expectedEvent; if ( global ) { expectedEvent = new NewDataSourceEvent( dataSourceDef, SESSION_ID, IDENTITY ); } else { expectedEvent = new NewDataSourceEvent( dataSourceDef, project, SESSION_ID, IDENTITY ); } verify( newDataSourceEvent, times( 1 ) ).fire( expectedEvent ); }</code><technical_language>Do want fail test in event of exception? runtimeManager.deployDayaSource(...) _could_ called - pass assertion, generate error silently ignored</technical_language>

Target:
protected void verifyCreateConditions( boolean global ) { try { verify( runtimeManager, times( 1 ) ).deployDataSource( dataSourceDef, DeploymentOptions.create() ); } catch ( Exception e ) { fail( e.getMessage() ); } NewDataSourceEvent expectedEvent; if ( global ) { expectedEvent = new NewDataSourceEvent( dataSourceDef, SESSION_ID, IDENTITY ); } else { expectedEvent = new NewDataSourceEvent( dataSourceDef, project, SESSION_ID, IDENTITY ); } verify( newDataSourceEvent, times( 1 ) ).fire( expectedEvent ); }
Source:
<code>public static String getTenantDomain(HttpServletRequest request) { String requestURI = request.getRequestURI(); String domain = MultitenantConstants.SUPER_TENANT_DOMAIN_NAME; if (requestURI != null) { if (!requestURI.contains("/t/")) { HttpSession session = request.getSession(false); if (session != null && session.getAttribute(MultitenantConstants.TENANT_DOMAIN) != null) { domain = (String) session.getAttribute(MultitenantConstants.TENANT_DOMAIN); } } else { String temp = requestURI.substring(requestURI.indexOf("/t/") + 3); if (temp.indexOf('/') != -1) { temp = temp.substring(0, temp.indexOf('/')); domain = temp; } } return domain; } else{ return domain; } <START> <END> }</code><technical_language>Redundant lines</technical_language>

Target:
public static String getTenantDomain(HttpServletRequest request) { String requestURI = request.getRequestURI(); String domain = MultitenantConstants.SUPER_TENANT_DOMAIN_NAME; if (requestURI == null) { return domain; } if (!requestURI.contains("/t/")) { HttpSession session = request.getSession(false); if (session != null && session.getAttribute(MultitenantConstants.TENANT_DOMAIN) != null) { domain = (String) session.getAttribute(MultitenantConstants.TENANT_DOMAIN); } } else { String temp = requestURI.substring(requestURI.indexOf("/t/") + 3); if (temp.indexOf('/') != -1) { temp = temp.substring(0, temp.indexOf('/')); domain = temp; } } return domain; }
Source:
<code>public void getRenderables (Array<Renderable> renderables, Pool<Renderable> pool) { <START> Renderable r = pool.obtain(); <END> r.worldTransform.idt(); r.meshPart.mesh = mesh; r.meshPart.offset = 0; r.meshPart.size = mesh.getNumIndices(); r.meshPart.primitiveType = GL20.GL_LINES; r.material = material; r.bones = null; r.userData = null; renderables.add(r); }</code><technical_language>this class Renderable create in constructor pool (or extend it, fits scope of usecase)</technical_language>

Target:
public void getRenderables (Array<Renderable> renderables, Pool<Renderable> pool) { renderables.add(renderable); }