auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public FSHLog(final FileSystem fs, final Path rootDir, final String logDir, final String archiveDir, final Configuration conf, final List<WALActionsListener> listeners, final boolean failIfWALExists, final String prefix, final String suffix) throws IOException { super(fs, rootDir, logDir, archiveDir, conf, listeners, failIfWALExists, prefix, suffix); this.minTolerableReplication = conf.getInt("hbase.regionserver.hlog.tolerable.lowreplication", CommonFSUtils.getDefaultReplication(fs, this.walDir)); this.lowReplicationRollLimit = conf.getInt("hbase.regionserver.hlog.lowreplication.rolllimit", 5); this.closeErrorsTolerated = conf.getInt("hbase.regionserver.logroll.errors.tolerated", 2); String hostingThreadName = Thread.currentThread().getName(); this.disruptor = new Disruptor<>(RingBufferTruck::new, getPreallocatedEventCount(), Threads.newDaemonThreadFactory(hostingThreadName + ".append"), ProducerType.MULTI, new BlockingWaitStrategy()); this.disruptor.getRingBuffer().next(); int maxHandlersCount = conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT, 200); this.ringBufferEventHandler = new RingBufferEventHandler( <START> conf.getInt("hbase.regionserver.hlog.syncer.count", defaultSyncerCount), maxHandlersCount); <END> this.disruptor.setDefaultExceptionHandler(new RingBufferExceptionHandler()); this.disruptor.handleEventsWith(new RingBufferEventHandler[] { this.ringBufferEventHandler }); this.disruptor.start(); }</code><technical_language>I patch get wrong idea. inching point is maxHandlersCount hbase.regionserver.hlog.syncer.count</technical_language>

Target:
public FSHLog(final FileSystem fs, final Path rootDir, final String logDir, final String archiveDir, final Configuration conf, final List<WALActionsListener> listeners, final boolean failIfWALExists, final String prefix, final String suffix) throws IOException { super(fs, rootDir, logDir, archiveDir, conf, listeners, failIfWALExists, prefix, suffix); this.minTolerableReplication = conf.getInt(TOLERABLE_LOW_REPLICATION, CommonFSUtils.getDefaultReplication(fs, this.walDir)); this.lowReplicationRollLimit = conf.getInt(LOW_REPLICATION_ROLL_LIMIT, DEFAULT_LOW_REPLICATION_ROLL_LIMIT); this.closeErrorsTolerated = conf.getInt(ROLL_ERRORS_TOLERATED, DEFAULT_ROLL_ERRORS_TOLERATED); String hostingThreadName = Thread.currentThread().getName(); this.disruptor = new Disruptor<>(RingBufferTruck::new, getPreallocatedEventCount(), Threads.newDaemonThreadFactory(hostingThreadName + ".append"), ProducerType.MULTI, new BlockingWaitStrategy()); this.disruptor.getRingBuffer().next(); int syncerCount = conf.getInt(SYNCER_COUNT, DEFAULT_SYNCER_COUNT); int maxBatchCount = conf.getInt(MAX_BATCH_COUNT, conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT, DEFAULT_MAX_BATCH_COUNT)); this.ringBufferEventHandler = new RingBufferEventHandler(syncerCount, maxBatchCount); this.disruptor.setDefaultExceptionHandler(new RingBufferExceptionHandler()); this.disruptor.handleEventsWith(new RingBufferEventHandler[] { this.ringBufferEventHandler }); this.disruptor.start(); }
Source:
<code>private Object inputOnBlur(final Event event) { final FocusEvent focusEvent = (FocusEvent) event; if (!Objects.equals(focusEvent.relatedTarget, view.getElement()) && !isChildrenOfView((Element) focusEvent.relatedTarget)) { HiddenHelper.hide(view.getElement()); if (!Objects.isNull(previousCallback)) { previousCallback.onInvoke(event); } } refreshDateInPopup(); <START> return null; <END> }</code><technical_language>returns null result is I change signature: private void inputOnBlur(final Event event) {</technical_language>

Target:
private Object inputOnBlur(final Event event) { final FocusEvent focusEvent = (FocusEvent) event; onBlur(focusEvent, view.getElement()); refreshDateInPopup(); return this; }
Source:
<code>int countActiveUsers() { <START> final int activeUsersCount = this.personService.getActivePersons().size(); <END> LOG.debug("active users count is {}", activeUsersCount); return activeUsersCount; }</code><technical_language>personRepository.count()</technical_language>

Target:
int countActiveUsers() { final int activeUsersCount = this.personService.numberOfActivePersons(); LOG.debug("active users count is {}", activeUsersCount); return activeUsersCount; }
Source:
<code>public void writeTo(JsonGenerator generator, ILoggingEvent event) throws IOException { IThrowableProxy throwableProxy = event.getThrowableProxy(); if (throwableProxy != null && throwableProxy instanceof ThrowableProxy) { if (throwableProxy.getStackTraceElementProxyArray().length > 0) { StackTraceElement stackTraceElement = throwableProxy.getStackTraceElementProxyArray()[0].getStackTraceElement(); generator.writeObjectFieldStart(getFieldName()); <START> JsonWritingUtils.writeStringField(generator, FIELD_CLASS_NAME, stackTraceElement.getClassName()); JsonWritingUtils.writeStringField(generator, FIELD_METHOD_NAME, stackTraceElement.getMethodName()); <END> generator.writeEndObject(); } } }</code><technical_language>Please field names configurable. want shorten json output class/method something</technical_language>

Target:
public void writeTo(JsonGenerator generator, ILoggingEvent event) throws IOException { IThrowableProxy throwableProxy = event.getThrowableProxy(); if (throwableProxy != null && throwableProxy instanceof ThrowableProxy) { if (throwableProxy.getStackTraceElementProxyArray().length > 0) { StackTraceElement stackTraceElement = throwableProxy.getStackTraceElementProxyArray()[0].getStackTraceElement(); generator.writeObjectFieldStart(getFieldName()); JsonWritingUtils.writeStringField(generator, fieldClassName, stackTraceElement.getClassName()); JsonWritingUtils.writeStringField(generator, fieldMethodName, stackTraceElement.getMethodName()); generator.writeEndObject(); } } }
Source:
<code>public Response updateLastViewed(@Scope(OAuthScope.APP_STATS) final AccessToken accessToken, @Valid final AppStats appStats) { if (appStats.insightsLastViewed.isPresent()) { final DateTime insightsLastViewed = appStats.insightsLastViewed.get(); appStatsDAO.putInsightsLastViewed(accessToken.accountId, insightsLastViewed); } if (appStats.questionsLastViewed.isPresent()) { final DateTime questionsLastViewed = appStats.questionsLastViewed.get(); appStatsDAO.putQuestionsLastViewed(accessToken.accountId, questionsLastViewed); } if (appStats.questionsLastViewed.isPresent() || appStats.insightsLastViewed.isPresent()) { return Response.status(Response.Status.ACCEPTED).build(); <START> } else { <END> return Response.status(Response.Status.NOT_MODIFIED).build(); } }</code><technical_language>else needed</technical_language>

Target:
public Response updateLastViewed(@Scope(OAuthScope.APP_STATS) final AccessToken accessToken, @Valid final AppStats appStats) { if (appStats.insightsLastViewed.isPresent()) { final DateTime insightsLastViewed = appStats.insightsLastViewed.get(); appStatsDAO.putInsightsLastViewed(accessToken.accountId, insightsLastViewed); } if (appStats.questionsLastViewed.isPresent()) { final DateTime questionsLastViewed = appStats.questionsLastViewed.get(); appStatsDAO.putQuestionsLastViewed(accessToken.accountId, questionsLastViewed); } if (appStats.questionsLastViewed.isPresent() || appStats.insightsLastViewed.isPresent()) { return Response.status(Response.Status.ACCEPTED).build(); } return Response.status(Response.Status.NOT_MODIFIED).build(); }
Source:
<code>public void writeEntityToNBT(NBTTagCompound nbt) { super.writeEntityToNBT(nbt); if (saveHome && hasHome()) { int[] h = {(int) home.minX, (int) home.minY, (int) home.minZ, (int) home.maxX, (int) home.maxY, (int) home.maxZ}; nbt.setIntArray("home", h); if (moveTowardsRestrictionAdded && moveTowardsRestrictionPrio > -1) { nbt.setInteger("homeMovePrio", moveTowardsRestrictionPrio); } } <START> if (entityActionHandler != null) { <END> if (entityActionHandler.getFlag() && entityActionHandler.getAction() != null) { nbt.setInteger("activeAction", EntityActionManager.idByActions.get(entityActionHandler.getAction())); } } }</code><technical_language>for load process: actionHandler.writeToNBT()</technical_language>

Target:
public void writeEntityToNBT(NBTTagCompound nbt) { super.writeEntityToNBT(nbt); if (saveHome && hasHome()) { int[] h = { (int) home.minX, (int) home.minY, (int) home.minZ, (int) home.maxX, (int) home.maxY, (int) home.maxZ }; nbt.setIntArray("home", h); if (moveTowardsRestrictionAdded && moveTowardsRestrictionPrio > -1) { nbt.setInteger("homeMovePrio", moveTowardsRestrictionPrio); } } if (entityActionHandler != null) { entityActionHandler.writeToNBT(nbt); } }
Source:
<code><START> public List<String> getValidationErrors() { <END> List<String> errors = super.getValidationErrors(); if( tenantId == null ) { errors.add( "'" + getMetricName() + "': No tenantId is provided for the metric." ); } return errors; }</code><technical_language>add @Override annotation here</technical_language>

Target:
public List<String> getValidationErrors() { List<String> errors = super.getValidationErrors(); if( StringUtils.isBlank( tenantId ) ) { errors.add( "'" + getMetricName() + "': No tenantId is provided for the metric." ); } return errors; }
Source:
<code>byte[] serializeRecord(IN record, Long timestamp) { if (dos == null) { dos = new DataOutputSerializer(16); } try { if (timestamp == null) { dos.writeInt(TAG_REC_WITHOUT_TIMESTAMP); } else { dos.writeInt(TAG_REC_WITH_TIMESTAMP); dos.writeLong(timestamp); } serializer.serialize(record, dos); } catch (IOException e) { throw new RuntimeException("Unable to serialize record", e); } <START> byte[] ret = dos.getCopyOfBuffer(); <END> dos.clear(); return ret; }</code><technical_language>writeByte suffice</technical_language>

Target:
byte[] serializeRecord(IN record, Long timestamp) { if (dos == null) { dos = new DataOutputSerializer(16); } try { dos.write(KAFKA_SHUFFLE_VERSION); if (timestamp == null) { dos.write(TAG_REC_WITHOUT_TIMESTAMP); } else { dos.write(TAG_REC_WITH_TIMESTAMP); dos.writeLong(timestamp); } serializer.serialize(record, dos); } catch (IOException e) { throw new RuntimeException("Unable to serialize record", e); } byte[] ret = dos.getCopyOfBuffer(); dos.clear(); return ret; }
Source:
<code>public String getTSnePlotMetadata( @PathVariable String experimentAccession) { <START> JsonObject plotData = experimentPageContentService.getTsnePlotData(experimentAccession); <END> return plotData.getAsJsonArray("metadata").size() == 0 ? GSON.toJson(new JsonArray()) : GSON.toJson(plotData.getAsJsonArray("metadata")); }</code><technical_language>experimentPageContentService is specifically designed pass right data experiment page jsp. If rewriting t-sne plot React component rely endpoints only, refactor backend. Especially calling a method is returning a lot more need, end manipulating JSON objects. Try move logic ExperimentPageContentService need it, deal Java objects possible. Turning JSON step controller does. Also, if some logic is longer required for React component, hesitate remove it</technical_language>

Target:
public String getTSnePlotMetadata( @PathVariable String experimentAccession) { JsonArray plotData = experimentPageContentService.getTsnePlotMetaData(experimentAccession); if(plotData.size() == 0) { return null; } else { return GSON.toJson(plotData); } }
Source:
<code><START> public boolean joinSession(Session session, int slotId) { <END> JSONArray dataArray = new JSONArray(); dataArray.put(slotId); dataArray.put("VIEWER"); dataArray.put(""); dataArray.put("Tygron-API-Agent"); dataArray.put(""); JSONObject data = apiConnection.callPostEventObject( "services/event/IOServicesEventType/JOIN_SESSION/", dataArray); session.setClientToken(data.getString("sessionClientToken")); session.setServerToken(data.getString("serverToken")); return true; }</code><technical_language>Delete slotId argument session.getSessionId() instead</technical_language>

Target:
public boolean joinSession(Session session, int slotId) { JSONArray dataArray = new JSONArray(); dataArray.put(slotId); dataArray.put("VIEWER"); dataArray.put(""); dataArray.put("Tygron-API-Agent"); dataArray.put(""); JSONObject data = apiConnection.callPostEventObject( "services/event/IOServicesEventType/JOIN_SESSION/", dataArray); session.setClientToken(data.getJSONObject("client").getString("clientToken")); session.setServerToken(data.getString("serverToken")); return true; }
Source:
<code><START> public Class<?> describedClass() { <END> return cls; }</code><technical_language>BinaryUtils#resolveClass instead of making this method public</technical_language>

Target:
Class<?> describedClass() { return cls; }
Source:
<code>protected boolean mergeRecursive(int callDepth, RevCommit h1, RevCommit h2, List<RevCommit> commonAncestors) throws IOException { boolean clean = false; List<RevCommit> mergedCommonAncestors = new ArrayList<RevCommit>(); RevCommit firstCommonAncestor = null; <START> if (commonAncestors == null) { <END> commonAncestors = new ArrayList<RevCommit>(); } if (commonAncestors.isEmpty()) { commonAncestors.addAll(reverseCommitList(getMergeBases(h1, h2, 1))); } if (!commonAncestors.isEmpty()) { firstCommonAncestor = commonAncestors.remove(0); mergedCommonAncestors.add(firstCommonAncestor); } if (commonAncestors.isEmpty()) { resultTree = (firstCommonAncestor == null ? null : firstCommonAncestor.getTree().getId()); } for (RevCommit commonAncestor : commonAncestors) { resultTree = null; RevCommit saved_b1; RevCommit saved_b2; callDepth++; dircache.clear(); saved_b1 = h1; saved_b2 = h2; mergeRecursive(callDepth, firstCommonAncestor, commonAncestor, null); if (resultTree == null) { throw new IOException(MessageFormat.format( JGitText.get().mergeRecursiveReturnedNoCommit, callDepth, firstCommonAncestor.name(), commonAncestor.name())); } mergedCommonAncestors.add(commonAncestor); h1 = saved_b1; h2 = saved_b2; callDepth--; } clean = mergeTrees(resultTree, h1.getTree(), h2.getTree()); return clean; }</code><technical_language>style nit: braces single line block, more</technical_language>

Target:
protected boolean mergeRecursive(int callDepth, RevCommit h1, RevCommit h2, List<RevCommit> commonAncestors) throws IOException { boolean clean = false; List<RevCommit> mergedCommonAncestors = new ArrayList<RevCommit>(); RevCommit firstCommonAncestor = null; if (commonAncestors == null) { commonAncestors = new ArrayList<RevCommit>(); } if (commonAncestors.isEmpty()) { commonAncestors.addAll(reverseCommitList(getMergeBases(h1, h2))); } if (!commonAncestors.isEmpty()) { firstCommonAncestor = commonAncestors.remove(0); mergedCommonAncestors.add(firstCommonAncestor); } if (commonAncestors.isEmpty()) { resultTree = (firstCommonAncestor == null ? null : firstCommonAncestor.getTree().getId()); } else { for (RevCommit commonAncestor : commonAncestors) { resultTree = null; RevCommit saved_b1; RevCommit saved_b2; callDepth++; dircache.clear(); saved_b1 = h1; saved_b2 = h2; mergeRecursive(callDepth, firstCommonAncestor, commonAncestor, null); if (resultTree == null) { throw new IOException(MessageFormat.format( JGitText.get().mergeRecursiveReturnedNoCommit, callDepth, (firstCommonAncestor == null ? "null" : firstCommonAncestor.name()), commonAncestor.name())); } mergedCommonAncestors.add(commonAncestor); h1 = saved_b1; h2 = saved_b2; callDepth--; } } try { clean = mergeTrees(openTree(resultTree), h1.getTree(), h2.getTree()); } finally { } return clean; }
Source:
<code>public void showFetchingError(int errorMessage) { <START> Toaster.show(rootView, getResources().getString(errorMessage)); <END> }</code><technical_language>getString(errorMessage)</technical_language>

Target:
public void showFetchingError(int errorMessage) { Toaster.show(rootView, getString(errorMessage)); }
Source:
<code><START> public void testWithJavacPluginAndAnnotationProcessors_WillResultInBothProcessorPath() <END> throws Exception { TestJavaPluginScenario scenario = new TestJavaPluginScenario(); BuildTarget apTarget = validJavaBinary.createTarget(); BuildRule apRule = validJavaBinary.createRule(apTarget); String apClasspathPath = resolveClasspath(apRule); BuildTarget pluginTarget = validJavaLibrary.createTarget(); BuildRule pluginRule = validJavaLibrary.createRule(pluginTarget); String pluginClasspath = resolveClasspath(pluginRule); scenario.addAnnotationProcessorRule(apRule, "MyProcessor"); scenario.addStandardJavacPluginTarget(pluginRule, "MyPlugin"); ImmutableList<String> parameters = scenario.buildAndGetCompileParameters(); assertHasProcessorPath(parameters, apClasspathPath + ":" + pluginClasspath); }</code><technical_language>This is failing Windows in internal CI in AppVeyor</technical_language>

Target:
public void testWithJavacPluginAndAnnotationProcessors_WillResultInBothProcessorPath() throws Exception { TestJavaPluginScenario scenario = new TestJavaPluginScenario(); BuildTarget apTarget = validJavaBinary.createTarget(); BuildRule apRule = validJavaBinary.createRule(apTarget); String apClasspathPath = resolveClasspath(apRule); BuildTarget pluginTarget = validJavaLibrary.createTarget(); BuildRule pluginRule = validJavaLibrary.createRule(pluginTarget); String pluginClasspath = resolveClasspath(pluginRule); scenario.addAnnotationProcessorRule(apRule, "MyProcessor"); scenario.addStandardJavacPluginTarget(pluginRule, "MyPlugin"); ImmutableList<String> parameters = scenario.buildAndGetCompileParameters(); assertHasProcessorPath(parameters, apClasspathPath + File.pathSeparator + pluginClasspath); }
Source:
<code>public TmfModelResponse<List<SegmentStoreTableColumnDataModel>> fetchTree(TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { List<SegmentStoreTableColumnDataModel> model = new ArrayList<>(); long startTimeColumnId = fAtomicLong.getAndIncrement(); model.add(new <START> SegmentStoreTableColumnDataModel(startTimeColumnId, -1, NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnName_StartTime), NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnTooltip_StartTime))); fComparatorMap.put(startTimeColumnId, SegmentComparators.INTERVAL_START_COMPARATOR); long endTimeColumnId = fAtomicLong.getAndIncrement(); model.add(new SegmentStoreTableColumnDataModel(endTimeColumnId, -1, NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnName_EndTime), NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnTooltip_EndTime))); fComparatorMap.put(endTimeColumnId, SegmentComparators.INTERVAL_END_COMPARATOR); long durationColumnId = fAtomicLong.getAndIncrement(); model.add(new SegmentStoreTableColumnDataModel(durationColumnId, -1, NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnName_Duration), NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnTooltip_Duration))); <END> fComparatorMap.put(durationColumnId, SegmentComparators.INTERVAL_LENGTH_COMPARATOR); for (ISegmentAspect segmentAspect : fSegmentStoreProvider.getSegmentAspects()) { long id = fAspectMap.inverse().computeIfAbsent(segmentAspect, a -> fAtomicLong.getAndIncrement()); fComparatorMap.put(id, (Comparator<ISegment>) segmentAspect.getComparator()); model.add(new SegmentStoreTableColumnDataModel(id, -1, segmentAspect.getName(), segmentAspect.getHelpText())); } return new TmfModelResponse<>(model, ITmfResponse.Status.COMPLETED, CommonStatusMessage.COMPLETED); }</code><technical_language>behave rest of aspects</technical_language>

Target:
public TmfModelResponse<List<SegmentStoreTableColumnDataModel>> fetchTree(TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { List<SegmentStoreTableColumnDataModel> model = new ArrayList<>(); for (ISegmentAspect baseAspect : BASE_ASPECT) { long id = fAspectMap.inverse().computeIfAbsent(baseAspect, a -> fAtomicLong.getAndIncrement()); fComparatorMap.put(id, (Comparator<ISegment>) baseAspect.getComparator()); model.add(new SegmentStoreTableColumnDataModel(id, -1, baseAspect.getName(), baseAspect.getHelpText())); } for (ISegmentAspect segmentAspect : fSegmentStoreProvider.getSegmentAspects()) { long id = fAspectMap.inverse().computeIfAbsent(segmentAspect, a -> fAtomicLong.getAndIncrement()); fComparatorMap.put(id, (Comparator<ISegment>) segmentAspect.getComparator()); model.add(new SegmentStoreTableColumnDataModel(id, -1, segmentAspect.getName(), segmentAspect.getHelpText())); } return new TmfModelResponse<>(model, ITmfResponse.Status.COMPLETED, CommonStatusMessage.COMPLETED); }
Source:
<code>public void checkCanDeliverNotification(String exceptionMessage) { if (!hasLooper) { throw new IllegalStateException( exceptionMessage == null ? "" : (exceptionMessage + " ") + "Realm cannot be automatically updated on a thread without a looper."); } if (isIntentServiceThread) { throw new IllegalStateException( exceptionMessage == null ? "" : (exceptionMessage + " ") + <START> "Realm cannot be automatically updated on a IntentService thread."); <END> } }</code><technical_language>IntentService</technical_language>

Target:
public void checkCanDeliverNotification(String exceptionMessage) { if (!hasLooper) { throw new IllegalStateException( exceptionMessage == null ? "" : (exceptionMessage + " ") + "Realm cannot be automatically updated on a thread without a looper."); } if (isIntentServiceThread) { throw new IllegalStateException( exceptionMessage == null ? "" : (exceptionMessage + " ") + "Realm cannot be automatically updated on an IntentService thread."); } }
Source:
<code>public void registerChildren(ManagementResourceRegistration resourceRegistration) { super.registerChildren(resourceRegistration); <START> resourceRegistration.registerSubModel(new ProviderModuleResourceDefinition(Constants.PROVIDER_MODULE)); <END> }</code><technical_language>happened MappingProviderResourceDefinition? I this is place is github is showing correctly removed</technical_language>

Target:
public void registerChildren(ManagementResourceRegistration resourceRegistration) { super.registerChildren(resourceRegistration); resourceRegistration.registerSubModel(new MappingProviderModuleDefinition(Constants.PROVIDER_MODULE)); }
Source:
<code>public void setProjectionParameters(Map projectionParameters) { super.setProjectionParameters(projectionParameters); <START> if (projectionParameters.containsKey("datelineWrappingCheckEnabled")) { <END> datelineWrappingCheckEnabled = (Boolean) projectionParameters.get("datelineWrappingCheckEnabled"); } }</code><technical_language>a public constant instead of a "magic string"</technical_language>

Target:
public void setProjectionParameters(Map projectionParameters) { super.setProjectionParameters(projectionParameters); if (projectionParameters.containsKey(DATELINE_WRAPPING_CHECK_ENABLED)) { datelineWrappingCheckEnabled = (Boolean) projectionParameters.get(DATELINE_WRAPPING_CHECK_ENABLED); } }
Source:
<code>public Event complianceCreated(Consumer consumer, Set<Entitlement> entitlements, ComplianceStatus compliance) { StringBuilder eventDataBuilder = new StringBuilder() .append("{\"consumer\": ") <START> .append("{\"uuid\": \"") <END> .append(consumer.getUuid()) .append("\"}") .append(", \"status\": \"") .append(compliance.getStatus()) .append("\"") .append("}"); return new Event(Event.Type.CREATED, Event.Target.COMPLIANCE, consumer.getName(), principalProvider.get(), consumer.getOwner().getId(), consumer.getUuid(), consumer.getUuid(), eventDataBuilder.toString(), buildComplianceDataJson(consumer, entitlements, compliance), null, null); }</code><technical_language>is this a nested field? consumer_uuid some key users of eventData need dig tree</technical_language>

Target:
public Event complianceCreated(Consumer consumer, Set<Entitlement> entitlements, ComplianceStatus compliance) { Map<String, String> eventData = new HashMap<String, String>(); eventData.put("consumer_uuid", consumer.getUuid()); eventData.put("status", compliance.getStatus()); try { String eventDataJson = mapper.writeValueAsString(eventData); return new Event(Event.Type.CREATED, Event.Target.COMPLIANCE, consumer.getName(), principalProvider.get(), consumer.getOwner().getId(), consumer.getUuid(), consumer.getUuid(), eventDataJson, buildComplianceDataJson(consumer, entitlements, compliance), null, null); } catch (JsonProcessingException e) { log.error("Error while building JSON for compliance.created event.", e); throw new IseException("Error while building JSON for compliance.created event."); } }
Source:
<code>protected Object computeValue(PermanentProperty prop, Object value, Object last, Flag flag) { if (prop == Value.TIME) { if (isRunning() && isSyncTime()) { if (flag == Flag.CHANGE) { value = (Long)last + ((((Long)value - (Long)last) / 1000L) * 1000L); } else if (flag != Flag.INTERNAL) { value = (((Long)value / 1000L) * 1000L) + (Long)last % 1000L; } } if ((flag == Flag.RESET && isCountDirectionDown()) || (Long)value > getMaximumTime() + 500 && (!isCountDirectionDown() || flag != Flag.RECALCULATE)) { return getMaximumTime(); } if ((flag == Flag.RESET && !isCountDirectionDown()) || (Long)value < getMinimumTime() - 500) { return getMinimumTime(); } } if (prop == Value.INVERTED_TIME) { return getMaximumTime() - getTime(); } if (prop == Value.MAXIMUM_TIME && getId() == ID_INTERMISSION) { <START> long duration = DEFAULT_MAXIMUM_TIME; <END> String[] sequence = getScoreBoard().getRulesets().get(Rule.INTERMISSION_DURATIONS).split(","); int number = Math.min(getScoreBoard().getCurrentPeriodNumber(), sequence.length); if (number > 0) { duration = ClockConversion.fromHumanReadable(sequence[number-1]); } value = duration; } if (prop == Value.MAXIMUM_TIME && (Long)value < getMinimumTime()) { return getMinimumTime(); } if (prop == Value.NUMBER && (Integer)value < 0) { return 0; } return value; }</code><technical_language>This means I longer override maximum time for intermissions operator screen, is required schedule needs moving forward</technical_language>

Target:
protected Object computeValue(PermanentProperty prop, Object value, Object last, Flag flag) { if (prop == Value.TIME) { if (isRunning() && isSyncTime()) { if (flag == Flag.CHANGE) { value = (Long)last + ((((Long)value - (Long)last) / 1000L) * 1000L); } else if (flag != Flag.INTERNAL) { value = (((Long)value / 1000L) * 1000L) + (Long)last % 1000L; } } if ((flag == Flag.RESET && isCountDirectionDown()) || (Long)value > getMaximumTime() + 500 && (!isCountDirectionDown() || flag != Flag.RECALCULATE)) { return getMaximumTime(); } if ((flag == Flag.RESET && !isCountDirectionDown()) || (Long)value < getMinimumTime() - 500) { return getMinimumTime(); } } if (prop == Value.INVERTED_TIME) { return getMaximumTime() - getTime(); } if (prop == Value.MAXIMUM_TIME && (Long)value < getMinimumTime()) { return getMinimumTime(); } if (prop == Value.NUMBER && (Integer)value < 0) { return 0; } return value; }
Source:
<code>public void testWithEntityPolicy() { <START> Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl("test-entity-with-policy.yaml")); <END> AssemblyTemplate at = platform.pdp().registerDeploymentPlan(input); try { Assembly assembly = at.getInstantiator().newInstance().instantiate(at, platform); log.info("Test - created " + assembly); final Entity app = brooklynMgmt.getEntityManager().getEntity(assembly.getId()); log.info("App - " + app); Assert.assertEquals(app.getDisplayName(), "test-entity-with-policy"); Set<Task<?>> tasks = BrooklynTasks.getTasksInEntityContext(brooklynMgmt.getExecutionManager(), app); log.info("Waiting on " + tasks.size() + " task(s)"); for (Task<?> t : tasks) { t.blockUntilEnded(); } log.info("App started:"); Entities.dumpInfo(app); Assert.assertEquals(app.getPolicies().size(), 0); Assert.assertEquals(app.getChildren().size(), 1); Entity child = app.getChildren().iterator().next(); Assert.assertEquals(child.getPolicies().size(), 1); Policy policy = child.getPolicies().iterator().next(); Assert.assertTrue(policy instanceof TestPolicy); Assert.assertEquals(policy.getConfig(TestPolicy.CONF_NAME), "Name from YAML"); Assert.assertEquals(policy.getConfig(TestPolicy.CONF_FROM_FUNCTION), "$brooklyn: is a fun place"); Map<?, ?> leftoverProperties = ((TestPolicy)policy).getLeftoverProperties(); Assert.assertEquals(leftoverProperties.get("policyLiteralValue1"), "Hello"); Assert.assertEquals(leftoverProperties.get("policyLiteralValue2"), "World"); Assert.assertEquals(leftoverProperties.size(), 2); } catch (Exception e) { log.warn("Unable to instantiate " + at + " (rethrowing): " + e); throw Exceptions.propagate(e); } }</code><technical_language>This yaml file is missing (test-entity-with-policy.yaml)</technical_language>

Target:
public void testWithEntityPolicy() throws Exception { Entity app = createAndStartApplication("test-entity-with-policy.yaml"); waitForApplicationTasks(app); Assert.assertEquals(app.getDisplayName(), "test-entity-with-policy"); log.info("App started:"); Entities.dumpInfo(app); Assert.assertEquals(app.getPolicies().size(), 0); Assert.assertEquals(app.getChildren().size(), 1); Entity child = app.getChildren().iterator().next(); Assert.assertEquals(child.getPolicies().size(), 1); Policy policy = child.getPolicies().iterator().next(); Assert.assertNotNull(policy); Assert.assertTrue(policy instanceof TestPolicy, "policy=" + policy + "; type=" + policy.getClass()); Assert.assertEquals(policy.getConfig(TestPolicy.CONF_NAME), "Name from YAML"); Assert.assertEquals(policy.getConfig(TestPolicy.CONF_FROM_FUNCTION), "$brooklyn: is a fun place"); Assert.assertEquals(((TestPolicy) policy).getLeftoverProperties(), ImmutableMap.of("policyLiteralValue1", "Hello", "policyLiteralValue2", "World")); }
Source:
<code>private String getProcName(TransactionTask task) { <START> return (task.m_txnState == null || task.m_txnState.getInvocation() == null) ? <END> null : task.m_txnState.getInvocation().getProcName(); }</code><technical_language>Is worth distinguishing is null in this case? Is if m_txnState invocation is null</technical_language>

Target:
private String getProcName(TransactionTask task) { return (task.m_txnState == null) ? "Null txn state" : (task.m_txnState.getInvocation() == null) ? "Null invocation" : task.m_txnState.getInvocation().getProcName(); }
Source:
<code>private void parsePdu(byte[] pdu) { ByteArrayInputStream bais = new ByteArrayInputStream(pdu); DataInputStream dis = new DataInputStream(bais); byte length; int bearerDataLength; SmsEnvelope env = new SmsEnvelope(); CdmaSmsAddress addr = new CdmaSmsAddress(); try { env.messageType = dis.readInt(); env.teleService = dis.readInt(); env.serviceCategory = dis.readInt(); addr.digitMode = dis.readByte(); addr.numberMode = dis.readByte(); addr.ton = dis.readByte(); addr.numberPlan = dis.readByte(); <START> length = dis.readByte(); <END> addr.numberOfDigits = length; addr.origBytes = new byte[length]; dis.read(addr.origBytes, 0, length); env.bearerReply = dis.readInt(); env.replySeqNo = dis.readByte(); env.errorClass = dis.readByte(); env.causeCode = dis.readByte(); bearerDataLength = dis.readInt(); env.bearerData = new byte[bearerDataLength]; dis.read(env.bearerData, 0, bearerDataLength); dis.close(); } catch (Exception ex) { Rlog.e(LOG_TAG, "createFromPdu: conversion from byte array to object failed: " + ex); } originatingAddress = addr; env.origAddress = addr; mEnvelope = env; mPdu = pdu; parseSms(); }</code><technical_language>Change this readUnsignedByte()</technical_language>

Target:
private void parsePdu(byte[] pdu) { ByteArrayInputStream bais = new ByteArrayInputStream(pdu); DataInputStream dis = new DataInputStream(bais); int length; int bearerDataLength; SmsEnvelope env = new SmsEnvelope(); CdmaSmsAddress addr = new CdmaSmsAddress(); try { env.messageType = dis.readInt(); env.teleService = dis.readInt(); env.serviceCategory = dis.readInt(); addr.digitMode = dis.readByte(); addr.numberMode = dis.readByte(); addr.ton = dis.readByte(); addr.numberPlan = dis.readByte(); length = dis.readUnsignedByte(); addr.numberOfDigits = length; addr.origBytes = new byte[length]; dis.read(addr.origBytes, 0, length); env.bearerReply = dis.readInt(); env.replySeqNo = dis.readByte(); env.errorClass = dis.readByte(); env.causeCode = dis.readByte(); bearerDataLength = dis.readInt(); env.bearerData = new byte[bearerDataLength]; dis.read(env.bearerData, 0, bearerDataLength); dis.close(); } catch (Exception ex) { Rlog.e(LOG_TAG, "createFromPdu: conversion from byte array to object failed: " + ex); } originatingAddress = addr; env.origAddress = addr; mEnvelope = env; mPdu = pdu; parseSms(); }
Source:
<code>public void testACNVPlotting() { final File tDir = IOUtils.tempDir("Test", "Plotting"); ACNVPlotter.writeSegmentedAlleleFractionPlot(SAMPLE_NAME, TUMOR_ALLELIC_COUNTS_FILE, <START> TANGENT_NORMALIZED_COVERAGE_FILE, SEGMENTS_FILE, tDir.getAbsolutePath()+"/", false); <END> Assert.assertTrue(new File(tDir, SAMPLE_NAME + "_ACNV.png").exists()); Assert.assertTrue(new File(tDir, SAMPLE_NAME + "_ACNV.png").length() > 0); }</code><technical_language>spaces +</technical_language>

Target:
public void testACNVPlotting() { final File tDir = IOUtils.tempDir("Test", "Plotting"); ACNVPlotter.writeSegmentedAlleleFractionPlot(SAMPLE_NAME, TUMOR_ALLELIC_COUNTS_FILE, TANGENT_NORMALIZED_COVERAGE_FILE, SEGMENTS_FILE, tDir.getAbsolutePath() + "/", OUTPUT_PREFIX, false); Assert.assertTrue(new File(tDir, OUTPUT_PREFIX + "_ACNV.png").exists()); Assert.assertTrue(new File(tDir, OUTPUT_PREFIX + "_ACNV.png").length() > 0); }
Source:
<code>public void testInvalidRepositoryThrowsException() throws IOException, RequestFailureException { <START> RestRepositoryConnection invalidLoginInfo = new RestRepositoryConnection("I", "don't", "exist", "<LINK_0>"); <END> try { invalidLoginInfo.checkRepositoryStatus(); fail("Should not have been able to reach here, repository status should have thrown an exception"); } catch (IOException io) { } }</code><technical_language>This hit exist.com's DNS, terribly polite suggest changing it, change doesntexist.ibm.com</technical_language>

Target:
public void testInvalidRepositoryThrowsException() throws IOException, RequestFailureException { RestRepositoryConnection invalidLoginInfo = new RestRepositoryConnection("I", "don't", "exist", "<LINK_1>"); try { invalidLoginInfo.checkRepositoryStatus(); fail("Should not have been able to reach here, repository status should have thrown an exception"); } catch (IOException io) { } }
Source:
<code>protected ServiceBusSenderClientBuilder getSenderBuilder(boolean useCredentials, MessagingEntityType entityType, int entityIndex, boolean isSessionAware, boolean sharedConnection) { <START> return getSenderBuilder(useCredentials, entityType, entityIndex, -1, isSessionAware, sharedConnection); <END> }</code><technical_language>Do need this in integration test base? test classes need viaQueueName test case? This method returns a builder, set name for test case</technical_language>

Target:
protected ServiceBusSenderClientBuilder getSenderBuilder(boolean useCredentials, MessagingEntityType entityType, int entityIndex, boolean isSessionAware, boolean sharedConnection) { ServiceBusClientBuilder builder = getBuilder(useCredentials, sharedConnection); switch (entityType) { case QUEUE: final String queueName = isSessionAware ? getSessionQueueName(entityIndex) : getQueueName(entityIndex); assertNotNull(queueName, "'queueName' cannot be null."); return builder.sender() .queueName(queueName); case SUBSCRIPTION: final String topicName = getTopicName(entityIndex); assertNotNull(topicName, "'topicName' cannot be null."); return builder.sender().topicName(topicName); default: throw logger.logExceptionAsError(new IllegalArgumentException("Unknown entity type: " + entityType)); } }
Source:
<code>@Deprecated public FieldOrderAction(Schema.Field[] fields) { this.fields = fields; boolean noReorder = true; for (int i = 0; i < fields.length; i++) <START> noReorder &= (i == fields[i].pos()); <END> this.noReorder = noReorder; }</code><technical_language>loop optimization</technical_language>

Target:
@Deprecated public FieldOrderAction(Schema.Field[] fields) { this.fields = fields; boolean noReorder = true; for (int i = 0; noReorder && i < fields.length; i++) noReorder &= (i == fields[i].pos()); this.noReorder = noReorder; }
Source:
<code>public List<?> getValues(int columnIndex, int rowIndex) { List<?> result = this.valueCache.get(columnIndex); if (result == null) { result = collectValues(columnIndex); <START> this.valueCache.put(columnIndex, result); <END> } return result; }</code><technical_language>sure, a cache update event fired here, too. cache update event fired structural refresh event handling in code informs of a clearing of cache in lazy loading cases. interested in event cache is (partially) filled here...</technical_language>

Target:
public List<?> getValues(int columnIndex, int rowIndex) { List<?> result = this.valueCache.get(columnIndex); if (result == null) { result = collectValues(columnIndex); this.valueCache.put(columnIndex, result); fireCacheUpdateEvent(buildUpdateEvent(columnIndex, null, result)); } return result; }
Source:
<code>private int timeToSpinnerType() { <START> Date formatted = Calendar.getInstance().getTime(); <END> SplitDateTime addSplitDateTime = new SplitDateTime(formatted); int hour = Integer.parseInt(addSplitDateTime.getHour()); return hourToSpinnerType(hour); }</code><technical_language>new Date() faster</technical_language>

Target:
private int timeToSpinnerType() { DateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); Date formatted = Calendar.getInstance().getTime(); SplitDateTime addSplitDateTime = new SplitDateTime(formatted, inputFormat); int hour = Integer.parseInt(addSplitDateTime.getHour()); return hourToSpinnerType(hour); }
Source:
<code>private Map<String, Set<String>> getGroupPermission(ShareableMetacardImpl shareableMetacard) { return ImmutableMap.of( Security.ACCESS_GROUPS, Optional.of(shareableMetacard) .map(w -> w.getAttribute(Security.ACCESS_GROUPS)) <START> .map(Attribute::getValues) <END> .orElseGet(Collections::emptyList) .stream() .map(Object::toString) .collect(Collectors.toSet())); }</code><technical_language>replaced with: .map(s -> s.getAccessGroups()) reduced a method reference</technical_language>

Target:
private Map<String, Set<String>> getGroupPermission(ShareableMetacardImpl shareableMetacard) { return ImmutableMap.of(Security.ACCESS_GROUPS, shareableMetacard.getAccessGroups()); }
Source:
<code>public BlobProperties getBlobProperties(String blobIdString) throws CoordinatorException { OperationContext oc = getOperationContext(); BlobId blobId = getBlobIdFromString(blobIdString); GetBlobPropertiesOperation gbpo = new GetBlobPropertiesOperation(datacenterName, connectionPool, requesterPool, oc, blobId, operationTimeoutMs, clusterMap); <START> gbpo.execute(); <END> return gbpo.getBlobProperties(); }</code><technical_language>this is lot more clear</technical_language>

Target:
public BlobProperties getBlobProperties(String blobIdString) throws CoordinatorException { BlobId blobId = getBlobIdFromString(blobIdString); GetBlobPropertiesOperation gbpo = new GetBlobPropertiesOperation(datacenterName, connectionPool, requesterPool, getOperationContext(), blobId, operationTimeoutMs, clusterMap); gbpo.execute(); return gbpo.getBlobProperties(); }
Source:
<code>public static GeometryType fromID(int id) { <START> switch (id) { <END> case 0: return POINT; case 1: return MULTI_POINT; case 2: return LINE_STRING; case 3: return MULTI_LINE_STRING; case 4: return POLYGON; case 5: return MULTI_POLYGON; case 6: return GEOMETRY_COLLECTION; default: throw new IllegalArgumentException("Invalid type id: " + id); } }</code><technical_language>static GeometryType array private static final GeometryType[] ID_TO_TYPE_MAP = new GeometryType[] {POINT, MULTI_POINT, ...}; avoid switch branching for performance return ID_TO_TYPE_MAP[id];</technical_language>

Target:
public static GeometryType fromID(int id) { if (id > ID_TO_TYPE_MAP.length) { throw new IllegalArgumentException("Invalid type id: " + id); } return ID_TO_TYPE_MAP[id]; }}
Source:
<code>private void processRequest(AsyncRequestInfo asyncRequestInfo) { long processingStartTime = System.currentTimeMillis(); long blobStorageProcessingTime = 0; RestRequest restRequest = asyncRequestInfo.getRestRequest(); try { onRequestDequeue(asyncRequestInfo); RestResponseChannel restResponseChannel = asyncRequestInfo.getRestResponseChannel(); RestMethod restMethod = restRequest.getRestMethod(); logger.trace("Processing request with RestMethod {}", restRequest.getUri(), restMethod); long blobStorageProcessingStartTime = System.currentTimeMillis(); switch (restMethod) { case GET: blobStorageService.handleGet(restRequest, restResponseChannel); break; case POST: blobStorageService.handlePost(restRequest, restResponseChannel); break; case DELETE: blobStorageService.handleDelete(restRequest, restResponseChannel); break; case HEAD: blobStorageService.handleHead(restRequest, restResponseChannel); break; default: restServerMetrics.unknownRestMethodError.inc(); RestServiceException e = new RestServiceException("Unsupported REST method: " + restMethod, RestServiceErrorCode.UnsupportedRestMethod); onResponseComplete(restRequest, restResponseChannel, e, false); releaseResources(restRequest, null); } blobStorageProcessingTime = System.currentTimeMillis() - blobStorageProcessingStartTime; } finally { restRequest.getMetrics().scalingLayerMetrics <START> .addToRequestProcessingTime(System.currentTimeMillis() - processingStartTime - blobStorageProcessingTime); <END> } }</code><technical_language>I scaling layer processing time include storage processing time, is other tasks storage processing</technical_language>

Target:
private void processRequest(AsyncRequestInfo asyncRequestInfo) { long processingStartTime = System.currentTimeMillis(); long blobStorageProcessingTime = 0; RestRequest restRequest = asyncRequestInfo.getRestRequest(); try { onRequestDequeue(asyncRequestInfo); RestResponseChannel restResponseChannel = asyncRequestInfo.getRestResponseChannel(); RestMethod restMethod = restRequest.getRestMethod(); logger.trace("Processing request with RestMethod {}", restRequest.getUri(), restMethod); long blobStorageProcessingStartTime = System.currentTimeMillis(); switch (restMethod) { case GET: blobStorageService.handleGet(restRequest, restResponseChannel); break; case POST: blobStorageService.handlePost(restRequest, restResponseChannel); break; case DELETE: blobStorageService.handleDelete(restRequest, restResponseChannel); break; case HEAD: blobStorageService.handleHead(restRequest, restResponseChannel); break; default: restServerMetrics.unknownRestMethodError.inc(); RestServiceException e = new RestServiceException("Unsupported REST method: " + restMethod, RestServiceErrorCode.UnsupportedRestMethod); onResponseComplete(restRequest, restResponseChannel, e, false); } blobStorageProcessingTime = System.currentTimeMillis() - blobStorageProcessingStartTime; } finally { restRequest.getMetricsTracker().scalingMetricsTracker .addToRequestProcessingTime(System.currentTimeMillis() - processingStartTime - blobStorageProcessingTime); } }
Source:
<code>private boolean parameterValueForTypeOfClosedAccountFileToCreateIsSet(Map<String, Integer> typeOfClosedAccountFileToCreate) { <START> if (typeOfClosedAccountFileToCreate.isEmpty() || typeOfClosedAccountFileToCreate.containsValue(CuCoaBatchConstants.ClosedAccountsFileCreationConstants.FILE_DATA_CONTENT_TYPES.NO_PARMETER_FOUND)) { return false; } else { return true; } <END> }</code><technical_language>setup of "if (condition) false else true" is redundant. good simplify this return result of expression, adjusting return true false expected</technical_language>

Target:
private boolean parameterValueForTypeOfClosedAccountFileToCreateIsSet(Map<String, Integer> typeOfClosedAccountFileToCreate) { return !(typeOfClosedAccountFileToCreate.isEmpty() || typeOfClosedAccountFileToCreate.containsValue(CuCoaBatchConstants.ClosedAccountsFileCreationConstants.FILE_DATA_CONTENT_TYPES.NO_PARAMETER_FOUND)); }
Source:
<code>private void setConnectionProperties(HttpURLConnection engineConn, String userPassword) throws ProtocolException { engineConn.setRequestProperty("Accept-Charset", "UTF-8"); engineConn.setRequestProperty("Content-Type", "application/xml; UTF-8"); String encoding = Base64.encodeBase64String(userPassword.getBytes()); encoding = encoding.replaceAll("\n", ""); engineConn.setRequestProperty("Authorization", "Basic " + encoding); engineConn.setRequestMethod("POST"); engineConn.setDoOutput(true); <START> engineConn.setReadTimeout(30000); <END> }</code><technical_language>please move constant</technical_language>

Target:
private void setConnectionProperties(HttpURLConnection engineConn, String userPassword) throws ProtocolException { engineConn.setRequestProperty("Accept-Charset", "UTF-8"); engineConn.setRequestProperty("Content-Type", "application/xml; UTF-8"); String encoding = Base64.encodeBase64String(userPassword.getBytes()); encoding = encoding.replaceAll("\n", ""); engineConn.setRequestProperty("Authorization", "Basic " + encoding); engineConn.setRequestMethod("POST"); engineConn.setDoOutput(true); engineConn.setReadTimeout(READ_TIMEOUT); }
Source:
<code>private ConceptName getNameInLocale(Locale locale) { ConceptName preferredName = getPreferredName(locale); if (preferredName != null) { return preferredName; } ConceptName fullySpecifiedName = getFullySpecifiedName(locale); if (fullySpecifiedName != null) { return fullySpecifiedName; <START> } else if (!getSynonyms(locale).isEmpty()) { <END> return getSynonyms(locale).iterator().next(); } return null; }</code><technical_language>CollectionUtils.isNotEmpty()</technical_language>

Target:
private ConceptName getNameInLocale(Locale locale) { ConceptName preferredName = getPreferredName(locale); if (preferredName != null) { return preferredName; } ConceptName fullySpecifiedName = getFullySpecifiedName(locale); if (fullySpecifiedName != null) { return fullySpecifiedName; } else if (CollectionUtils.isNotEmpty(getSynonyms(locale))) { return getSynonyms(locale).iterator().next(); } return null; }
Source:
<code>private List<DfDecoMapTablePart> getDecoMapTablePartList() { <START> if (decoMap.get(DECO_MAP_KEY) == null) { <END> throw new IllegalStateException("decoMap table list is not exists"); } return decoMap.get(DECO_MAP_KEY); }</code><technical_language>Extract decoMap.get(DECO_MAP_KEY) local variable</technical_language>

Target:
private List<DfDecoMapTablePart> getDecoMapTablePartList() { List<DfDecoMapTablePart> decoMapTablePartList = decoMap.get(DECO_MAP_KEY); if (decoMapTablePartList == null) { throw new IllegalStateException("decoMap table list is not exists"); } return decoMapTablePartList; }
Source:
<code>public static void preInit() { Configuration config = BCCoreConfig.config; propRenderLaserBeams = config.get("experimental", "renderLaserBeams", true, "When false laser beams will not be visible while transmitting power"); <START> EnumRestartRequirement.WORLD.setTo(propRenderLaserBeams); <END> MinecraftForge.EVENT_BUS.register(BCSiliconConfig.class); }</code><technical_language>below, requirement NONE, set leave</technical_language>

Target:
public static void preInit() { Configuration config = BCCoreConfig.config; propRenderLaserBeams = config.get("display", "renderLaserBeams", true, "When false laser beams will not be visible while transmitting power without wearing Goggles"); reloadConfig(EnumRestartRequirement.NONE); MinecraftForge.EVENT_BUS.register(BCSiliconConfig.class); }