auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public TaskResult run() { Config params = request.getConfig(); Config doConfig = request.getConfig().getNested("_do"); int count = params.get("count", int.class, params.get("_command", int.class)); if (count > context.getMaxWorkflowTasks()) { throw new ConfigException("Too many loop subtasks. Limit: " + context.getMaxWorkflowTasks()); } Config generated = doConfig.getFactory().create(); for (int i = 0; i < count; i++) { Config subtask = params.getFactory().create(); subtask.setAll(doConfig); subtask.getNestedOrSetEmpty("_export").set("i", i); generated.set( String.format(ENGLISH, "+loop-%d", i), subtask); } if (ParallelControl.of(params).isParallel()) { <START> generated.set("_parallel", params.get("_parallel", JsonNode.class)); <END> } return TaskResult.defaultBuilder(request) .subtaskConfig(generated) .build(); }</code><technical_language>abstracting accesses _parallel property moving related implementations ParallelControl. move this direct access _parallel property class adding ParallelControl#copyIfNeeded(Config src, Config dst)</technical_language>

Target:
public TaskResult run() { Config params = request.getConfig(); Config doConfig = request.getConfig().getNested("_do"); int count = params.get("count", int.class, params.get("_command", int.class)); if (count > context.getMaxWorkflowTasks()) { throw new ConfigException("Too many loop subtasks. Limit: " + context.getMaxWorkflowTasks()); } Config generated = doConfig.getFactory().create(); for (int i = 0; i < count; i++) { Config subtask = params.getFactory().create(); subtask.setAll(doConfig); subtask.getNestedOrSetEmpty("_export").set("i", i); generated.set( String.format(ENGLISH, "+loop-%d", i), subtask); } ParallelControl.of(params).copyIfNeeded(generated); return TaskResult.defaultBuilder(request) .subtaskConfig(generated) .build(); }
Source:
<code>public void onSave(ManufacturerDto manufacturerDto) { ErrorHandlerAsyncCallback<GetResult<ManufacturerDto>> callback = new ErrorHandlerAsyncCallback<GetResult<ManufacturerDto>>(this) { @Override public void onSuccess(GetResult<ManufacturerDto> result) { DisplayMessageEvent.fire(EditManufacturerPresenter.this, new Message(messages.manufacturerSaved(), MessageStyle.SUCCESS)); ManufacturerAddedEvent.fire(EditManufacturerPresenter.this, result.getResult()); getView().hide(); } }; Action<GetResult<ManufacturerDto>> action; <START> if (manufacturerDto.isSaved()) { <END> action = manufacturerService.save(manufacturerDto.getId(), manufacturerDto); } else { action = manufacturerService.create(manufacturerDto); } dispatcher.execute(action, callback); }</code><technical_language>Is this is repeated a lot</technical_language>

Target:
public void onSave(ManufacturerDto manufacturerDto) { dispatcher.execute(manufacturerService.saveOrCreate(manufacturerDto), new ErrorHandlerAsyncCallback<GetResult<ManufacturerDto>>(this) { @Override public void onSuccess(GetResult<ManufacturerDto> result) { DisplayMessageEvent.fire(EditManufacturerPresenter.this, new Message(messages.manufacturerSaved(), MessageStyle.SUCCESS)); ManufacturerAddedEvent.fire(EditManufacturerPresenter.this, result.getResult()); getView().hide(); } }); }
Source:
<code>public static void addDeclIfNew(Map<String, String> decls, String prefix, String uri) { if (!decls.containsKey(prefix)) { decls.put(prefix, uri); } else { final String currentUri = decls.get(prefix); if (!currentUri.equals(uri)) { <START> log.warn("Prefix {}: <{}> is already declared, and will not be overwritten with <{}>", <END> prefix, currentUri, uri); } } }</code><technical_language>I this warning for system-defined prefixes, essentially is informing user change. If override schema: (which I is crazy, ok, leave this possibility) point warning overwriting back. ignore setting then</technical_language>

Target:
public static void addDeclIfNew(Map<String, String> decls, String prefix, String uri) { if (!decls.containsKey(prefix)) { decls.put(prefix, uri); } }
Source:
<code>private String getNewVarName(){ String varName = "sd_var_" + _var_id.toString(); while(variableMap.containsKey(varName)){ _var_id++; <START> varName = "sd_var_" + _var_id.toString(); <END> } return varName; }</code><technical_language>var_ prefix instead of sd_var_? shorter, descriptive</technical_language>

Target:
private String getNewVarName(){ String varName = "sd_var_" + String.valueOf(_var_id); while(variableMap.containsKey(varName)){ _var_id++; varName = "sd_var_" + String.valueOf(_var_id); } return varName; }
Source:
<code>protected void channelRead0( ChannelHandlerContext channelHandlerContext, PrepareStoreCopyRequest prepareStoreCopyRequest ) throws Exception { CloseablesListener closeablesListener = new CloseablesListener(); try { NeoStoreDataSource neoStoreDataSource = dataSourceSupplier.get(); if ( !storeIdMatchesLocal( prepareStoreCopyRequest.getStoreId(), neoStoreDataSource ) ) { sendStoreIdMismatchMessage( channelHandlerContext ); return; } CheckPointer checkPointer = checkPointerSupplier.get(); closeablesListener.sample( tryCheckpointAndAcquireMutex( checkPointer ) ); PrepareStoreCopyFiles prepareStoreCopyFiles = closeablesListener.sample( prepareStoreCopyFilesProvider.prepareStoreCopyFiles( neoStoreDataSource ) ); StoreResource[] nonReplayable = prepareStoreCopyFiles.getAtomicFilesSnapshot(); for ( StoreResource storeResource : nonReplayable ) { streamingProtocol.stream( channelHandlerContext, storeResource ); } channelHandlerContext.write( ResponseMessageType.PREPARE_STORE_COPY_RESPONSE ); PrepareStoreCopyResponse success = createSuccessfulResponse( checkPointer, prepareStoreCopyFiles ); channelHandlerContext.writeAndFlush( success ).addListener( closeablesListener ); } catch ( Throwable e ) { channelHandlerContext.writeAndFlush( PrepareStoreCopyResponse.error( PrepareStoreCopyResponse.Status.E_LISTING_STORE ) ).addListener( <START> closeablesListener ); <END> } finally { protocol.expect( CatchupServerProtocol.State.MESSAGE_TYPE ); } }</code><technical_language>propagating Throwable here</technical_language>

Target:
protected void channelRead0( ChannelHandlerContext channelHandlerContext, PrepareStoreCopyRequest prepareStoreCopyRequest ) throws IOException { CloseablesListener closeablesListener = new CloseablesListener(); PrepareStoreCopyResponse response = PrepareStoreCopyResponse.error( PrepareStoreCopyResponse.Status.E_LISTING_STORE ); try { NeoStoreDataSource neoStoreDataSource = dataSourceSupplier.get(); if ( !hasSameStoreId( prepareStoreCopyRequest.getStoreId(), neoStoreDataSource ) ) { channelHandlerContext.write( ResponseMessageType.PREPARE_STORE_COPY_RESPONSE ); response = PrepareStoreCopyResponse.error( PrepareStoreCopyResponse.Status.E_STORE_ID_MISMATCH ); } else { CheckPointer checkPointer = checkPointerSupplier.get(); closeablesListener.add( tryCheckpointAndAcquireMutex( checkPointer ) ); PrepareStoreCopyFiles prepareStoreCopyFiles = closeablesListener.add( prepareStoreCopyFilesProvider.prepareStoreCopyFiles( neoStoreDataSource ) ); StoreResource[] nonReplayable = prepareStoreCopyFiles.getAtomicFilesSnapshot(); for ( StoreResource storeResource : nonReplayable ) { streamingProtocol.stream( channelHandlerContext, storeResource ); } channelHandlerContext.write( ResponseMessageType.PREPARE_STORE_COPY_RESPONSE ); response = createSuccessfulResponse( checkPointer, prepareStoreCopyFiles ); } } finally { channelHandlerContext.writeAndFlush( response ).addListener( closeablesListener ); protocol.expect( CatchupServerProtocol.State.MESSAGE_TYPE ); } }
Source:
<code>FileHeader(final byte[] b, final int offset) { <START> changeType = ChangeType.MODIFY; END> buf = b; startOffset = offset; patchType = PatchType.UNIFIED; }</code><technical_language>Please move this line in constructor, essential patch</technical_language>

Target:
FileHeader(final byte[] b, final int offset) { buf = b; startOffset = offset; changeType = ChangeType.MODIFY; patchType = PatchType.UNIFIED; }
Source:
<code>public void process(Context context, CompilationUnit cu) { if (whitelist == null) { return; } List<BodyDeclaration> matchingNodes = Lists.newArrayList(); cu.accept(new ASTVisitor() { @Override public boolean visit(EnumConstantDeclaration node) { return handleMemberDeclarationNode(node); } @Override public boolean visit(EnumDeclaration node) { return handleTypeDeclarationNode(node); } @Override public boolean visit(FieldDeclaration node) { return handleMemberDeclarationNode(node); } @Override public boolean visit(MethodDeclaration node) { return handleMemberDeclarationNode(node); } @Override public boolean visit(TypeDeclaration node) { return handleTypeDeclarationNode(node); } private boolean handleTypeDeclarationNode(AbstractTypeDeclaration node) { matchIfNotWhitelistedAndNotHidden(node); return true; } private boolean handleMemberDeclarationNode(BodyDeclaration node) { matchIfNotWhitelistedAndNotHidden(node); return false; } private void matchIfNotWhitelistedAndNotHidden(final BodyDeclaration node) { if (node == null) { return; } if (!RecordPublicApiRules.isPublicApiEligible(node)) { return; } if (BodyDeclarationLocators.matchesAny(whitelist, node)) { return; } matchingNodes.add(node); } }); Collections.sort(matchingNodes, new StartPositionComparator()); ASTRewrite rewrite = context.rewrite(); for (BodyDeclaration bodyDeclaration : Lists.reverse(matchingNodes)) { <START> System.out.println("Victor: hide <END> " + bodyDeclaration.toString()); JavadocUtils.addJavadocTag(rewrite, bodyDeclaration, tagComment); } }</code><technical_language>TODO remove "Victor" line. a reporter/logger interface floating Context I if want write debug</technical_language>

Target:
public void process(Context context, CompilationUnit cu) { if (whitelist == null) { return; } List<BodyDeclaration> matchingNodes = Lists.newArrayList(); cu.accept(new ASTVisitor() { @Override public boolean visit(EnumConstantDeclaration node) { return handleMemberDeclarationNode(node); } @Override public boolean visit(EnumDeclaration node) { return handleTypeDeclarationNode(node); } @Override public boolean visit(FieldDeclaration node) { return handleMemberDeclarationNode(node); } @Override public boolean visit(MethodDeclaration node) { return handleMemberDeclarationNode(node); } @Override public boolean visit(TypeDeclaration node) { return handleTypeDeclarationNode(node); } private boolean handleTypeDeclarationNode(AbstractTypeDeclaration node) { matchIfNotWhitelistedAndNotHidden(node); return true; } private boolean handleMemberDeclarationNode(BodyDeclaration node) { matchIfNotWhitelistedAndNotHidden(node); return false; } private void matchIfNotWhitelistedAndNotHidden(final BodyDeclaration node) { if (node == null) { return; } if (!RecordPublicApiRules.isPublicApiEligible(node)) { return; } if (BodyDeclarationLocators.matchesAny(whitelist, node)) { return; } matchingNodes.add(node); } }); Collections.sort(matchingNodes, new StartPositionComparator()); ASTRewrite rewrite = context.rewrite(); for (BodyDeclaration bodyDeclaration : Lists.reverse(matchingNodes)) { JavadocUtils.addJavadocTag(rewrite, bodyDeclaration, tagComment); } }
Source:
<code>public <T extends Credential> T add(Class<T> type) { addButton.selectDropdownMenuAlt(type); String path = find(by.name("credentials")).getAttribute("path"); <START> return newInstance(type, this, "/credentials"); <END> }</code><technical_language>previous path variable instead of a hardcoded one?? If delete line 28</technical_language>

Target:
public <T extends Credential> T add(Class<T> type) { addButton.selectDropdownMenuAlt(type); String path = find(by.name("credentials")).getAttribute("path"); return newInstance(type, this, path); }
Source:
<code>public long getHeaderId(int position) { Date feedDate = feedsDate.get(position); <START> return FeedHeaderHolder.getId(context, feedDate); <END> }</code><technical_language>Year day of feedDate header's id. is easier more efficient current version require context</technical_language>

Target:
public long getHeaderId(int position) { Calendar calendar = Calendar.getInstance(); calendar.setTime(feedsDate.get(position)); return calendar.get(Calendar.YEAR) * 367 + calendar.get(Calendar.DAY_OF_YEAR); }
Source:
<code>public void testMaxApplicationId() { IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class, () -> new HttpLogOptions().setApplicationId("AppId-0123456789012345678912345")); <START> assertEquals(thrown.getMessage(), "'applicationId' length cannot be greater than 24"); <END> }</code><technical_language>Asserting actual message a good idea this localised message changed break test</technical_language>

Target:
public void testMaxApplicationId() { IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class, () -> new HttpLogOptions().setApplicationId("AppId-0123456789012345678912345")); }
Source:
<code>protected void filterClosedAccounts(UserIdentityContext userIdentityContext){ <START> if(userIdentityContext.getEffectiveAccount() != null && userIdentityContext.getEffectiveAccount().getStatus().equals(Account.Status.CLOSED)){ <END> throw new WebApplicationException(Status.FORBIDDEN); } }</code><technical_language>do this part of DAO query(WHERE clause)</technical_language>

Target:
protected void filterClosedAccounts(UserIdentityContext userIdentityContext){ if(userIdentityContext.getEffectiveAccount() != null && !userIdentityContext.getEffectiveAccount().getStatus().equals(Account.Status.ACTIVE)){ throw new WebApplicationException(status(Status.FORBIDDEN).entity("Provided Account is not active").build()); } }
Source:
<code>protected void markAlignmentEnd(long alignmentDuration) { if (!latestAlignmentDurationNanos.isDone()) { latestAlignmentDurationNanos.complete(alignmentDuration); } <START> startOfAlignmentTimestamp = 0; <END> }</code><technical_language>Extract constant for field initialization comparisons</technical_language>

Target:
protected void markAlignmentEnd(long alignmentDuration) { latestAlignmentDurationNanos.complete(alignmentDuration); latestBytesProcessedDuringAlignment.complete(bytesProcessedDuringAlignment); startOfAlignmentTimestamp = OUTSIDE_OF_ALIGNMENT; bytesProcessedDuringAlignment = 0; }
Source:
<code>public static long getDelayFromXml() { long delay = (long) minimum; if (appConfigDelay != null) { try { if (randomDelay == true){ if (appConfigDelay_asInit <= 0) { appConfigDelay_asInit = Integer.parseInt(String.valueOf(appConfigDelay)); } delay = Long.parseLong(getRandomInRange(minimum, appConfigDelay_asInit)); } else { delay = appConfigDelay; } return delay; <START> }catch (Exception e) { <END> log.error("get to get delay from xml, {}", e); } } else { AppConfig config = AppConfig.getInstance(); if (config.getDelayMinimum() > minimum){ minimum = (int) config.getDelayMinimum(); } if (config.getConstantDelay() > 0) { appConfigDelay = config.getConstantDelay(); } else if (config.getRandomDelay() > 0){ appConfigDelay = config.getRandomDelay(); randomDelay = true; }else{ delay = (long) minimum; } } return delay; }</code><technical_language>I want catch NumberFormatException instead</technical_language>

Target:
public static long getDelayFromXml() { long delay = (long) minimum; if (appConfigDelay != null) { try { if (randomDelay == true){ if (appConfigDelay_asInit <= 0) { appConfigDelay_asInit = Integer.parseInt(String.valueOf(appConfigDelay)); } delay = Long.parseLong(getRandomInRange(minimum, appConfigDelay_asInit)); } else { delay = appConfigDelay; } return delay; }catch (NumberFormatException e) { log.error("failed to get delay from xml, make sure delay is in ms {}", e); } } else { AppConfig config = AppConfig.getInstance(); if (config.getDelayMinimum() > minimum){ minimum = (int) config.getDelayMinimum(); } if (config.getConstantDelay() > 0) { appConfigDelay = config.getConstantDelay(); } else if (config.getRandomDelay() > 0){ appConfigDelay = config.getRandomDelay(); randomDelay = true; }else{ delay = (long) minimum; } } return delay; }
Source:
<code>public BigDecimal convertRain(BigDecimal value) { if (this == DEFAULT_UNIT_SYSTEM) { <START> return value.setScale(1, RoundingMode.HALF_UP); <END> } return value.multiply(MM_TO_INCHES).setScale(2, RoundingMode.HALF_UP); }</code><technical_language>question losing precision instead of formatting %.1f</technical_language>

Target:
public BigDecimal convertRain(BigDecimal value) { if (this == DEFAULT_UNIT_SYSTEM) { return value; } return value.multiply(MM_TO_INCHES); }
Source:
<code>public ProbeStatus run() { long failures = getFailures(); if (failures == 0) { return ProbeStatus.newSuccess("No failure"); } SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); <START> String dateFailure = dateFormat.format(new Date(getDetected())); <END> String message = String.format(FAILURE_MESSAGE, failures, dateFailure, getTimeout().toString()); if ((System.currentTimeMillis() - getDetected()) < getTimeout().toMillis()) { return ProbeStatus.newSuccess(message); } return ProbeStatus.newFailure(message); }</code><technical_language>new APIs java.time.format.DateTimeFormatter instead</technical_language>

Target:
public ProbeStatus run() { long failures = getFailures(); if (failures == 0) { return ProbeStatus.newSuccess("No failure"); } String dateFailure = FORMATTER.format(Instant.ofEpochMilli(detected)); String message = String.format(FAILURE_MESSAGE, failures, dateFailure, getTimeout()); if (System.currentTimeMillis() - detected < getTimeout().toMillis()) { return ProbeStatus.newSuccess(message); } return ProbeStatus.newFailure(message); }
Source:
<code><START> public void save(Object object, long windowId) throws IOException <END> { closeReaders(); FileSystemWAL.FileSystemWALWriter writer = wal.getWriter(); writer.batchCompleted(); byte[] windowIdBytes = Longs.toByteArray(windowId); writer.append(new Slice(windowIdBytes)); writer.append(toSlice(object)); wal.beforeCheckpoint(windowId); wal.windowWalParts.put(windowId, writer.getCurrentPointer().getPartNum()); }</code><technical_language>Is this method supposed called endWindow only? appears assumes batch operation</technical_language>

Target:
public void save(Object object, long windowId) throws IOException { closeReaders(); FileSystemWAL.FileSystemWALWriter writer = wal.getWriter(); byte[] windowIdBytes = Longs.toByteArray(windowId); writer.append(new Slice(windowIdBytes)); writer.append(toSlice(object)); wal.beforeCheckpoint(windowId); wal.windowWalParts.put(windowId, writer.getCurrentPointer().getPartNum()); writer.rotateIfNecessary(); }
Source:
<code>S getFeatureStats() { <START> assertIsFit(); <END> return featureStats; }</code><technical_language>Again, friendly -> protected</technical_language>

Target:
protected S getFeatureStats() { assertIsFit(); return featureStats; }
Source:
<code>public static ScrubberStore create(KeyValueService keyValueService) { TableMetadata scrubTableMeta = new TableMetadata( NameMetadataDescription.create(ImmutableList.of( new NameComponentDescription("row", ValueType.BLOB))), new ColumnMetadataDescription(new DynamicColumnDescription( NameMetadataDescription.create(ImmutableList.of( new NameComponentDescription("table", ValueType.VAR_STRING), new NameComponentDescription("col", ValueType.BLOB))), ColumnValueDescription.forType(ValueType.VAR_LONG))), ConflictHandler.IGNORE_ALL); <START> keyValueService.createTables(ImmutableMap.of( <END> AtlasDbConstants.SCRUB_TABLE, scrubTableMeta.persistToBytes())); return new KeyValueServiceScrubberStore(keyValueService); }</code><technical_language>Is advantage createTables creating table</technical_language>

Target:
public static ScrubberStore create(KeyValueService keyValueService) { TableMetadata scrubTableMeta = new TableMetadata( NameMetadataDescription.create(ImmutableList.of( new NameComponentDescription.Builder() .componentName("row") .type(ValueType.BLOB) .build())), new ColumnMetadataDescription(new DynamicColumnDescription( NameMetadataDescription.create(ImmutableList.of( new NameComponentDescription.Builder() .componentName("table") .type(ValueType.VAR_STRING) .build(), new NameComponentDescription.Builder() .componentName("col") .type(ValueType.BLOB) .build())), ColumnValueDescription.forType(ValueType.VAR_LONG))), ConflictHandler.IGNORE_ALL); keyValueService.createTable(AtlasDbConstants.SCRUB_TABLE, scrubTableMeta.persistToBytes()); return new KeyValueServiceScrubberStore(keyValueService); }
Source:
<code>public Map create(Map vmParams) { try { final Host host = getActiveHost(); final String vmId = (String) vmParams.get("vmId"); final VM vm = new VM(); vm.setTimeCreated(System.currentTimeMillis()); vm.setId(vmId); vm.setName((String) vmParams.get("vmName")); vm.setCpuType((String) vmParams.get("cpuType")); vm.setHost(host); vm.setIp(Utils.ipGenerator()); Integer memSize = 0; Object boxedMemSize = vmParams.get("memSize"); if(boxedMemSize instanceof String) { memSize = Integer.parseInt((String) boxedMemSize); } else { memSize = (Integer)boxedMemSize; } vm.setMemSize(memSize); final Object[] devices = (Object[]) vmParams.get("devices"); vm.setDeviceList(devices == null ? new ArrayList() : Arrays.asList(devices)); Map custom = (Map) vmParams.get("custom"); vm.setCustomMap(custom != null ? custom : map()); vm.generateDevicesAddressIfMissing(); vm.parseDevices(); host.getRunningVMs().put(vm.getId(), vm); updateHost(host); final Map resultMap = getDoneStatus(); vmParams.put("status", vm.getStatus().toString()); resultMap.put("vmList", vmParams); log.debug("VM created on host {}", vmId, host.getName()); addTask(TaskType.START_VM, 2000l, vm); addTask(TaskType.START_VM_POWERING_UP, 5000l, vm); <START> addTask(TaskType.START_VM_AS_UP, 19000l, vm); <END> return resultMap; } catch (Exception e) { throw error(e); } }</code><technical_language>change 20000 30000 safe side</technical_language>

Target:
public Map create(Map vmParams) { try { final Host host = getActiveHost(); final String vmId = (String) vmParams.get("vmId"); final VM vm = new VM(); vm.setTimeCreated(System.currentTimeMillis()); vm.setId(vmId); vm.setName((String) vmParams.get("vmName")); vm.setCpuType((String) vmParams.get("cpuType")); vm.setHost(host); vm.setIp(Utils.ipGenerator()); Integer memSize = 0; Object boxedMemSize = vmParams.get("memSize"); if(boxedMemSize instanceof String) { memSize = Integer.parseInt((String) boxedMemSize); } else { memSize = (Integer)boxedMemSize; } vm.setMemSize(memSize); final Object[] devices = (Object[]) vmParams.get("devices"); vm.setDeviceList(devices == null ? new ArrayList() : Arrays.asList(devices)); Map custom = (Map) vmParams.get("custom"); vm.setCustomMap(custom != null ? custom : map()); vm.generateDevicesAddressIfMissing(); vm.parseDevices(); host.getRunningVMs().put(vm.getId(), vm); updateHost(host); final Map resultMap = getDoneStatus(); vmParams.put("status", vm.getStatus().toString()); resultMap.put("vmList", vmParams); log.debug("VM created on host {}", vmId, host.getName()); addTask(TaskType.START_VM, 2000l, vm); addTask(TaskType.START_VM_POWERING_UP, 5000l, vm); addTask(TaskType.START_VM_AS_UP, 20000l, vm); return resultMap; } catch (Exception e) { throw error(e); } }
Source:
<code>protected StepEnum getStepType() { <START> return StepEnum.STOP_REBALANCING_GLUSTER_VOLUME; <END> }</code><technical_language>Step type StepEnum.REBALANCING_VOLUME;</technical_language>

Target:
protected StepEnum getStepType() { return StepEnum.REBALANCING_VOLUME; }
Source:
<code>private Object eval(Bindings bindings, String expression) { try { return jsScriptEngine.eval(bindings, expression); } catch (javax.script.ScriptException t) { <START> return new ScriptException(t.getCause()); <END> } catch (Throwable t) { return new ScriptException(t); } }</code><technical_language>![MINOR](<LINK_2> 'Severity: MINOR') Remove this of "ScriptException"; is deprecated. [![rule](<LINK_1>](<LINK_0></technical_language>

Target:
private Object eval(Bindings bindings, String expression) { try { return jsScriptEngine.eval(bindings, expression); } catch (javax.script.ScriptException t) { return new ScriptException(t.getCause()); } catch (Exception t) { return new ScriptException(t); } }
Source:
<code>public void configureChannels(OwSensorType sensorType) { <START> temperatureParameter.set(THING_TYPE_OWSERVER, <END> new OwserverDeviceParameter("/" + sensorType.name() + "/temperature")); humidityParameter.set(THING_TYPE_OWSERVER, new OwserverDeviceParameter("/" + sensorType.name() + "/humidity")); pressureParameter.set(THING_TYPE_OWSERVER, new OwserverDeviceParameter("/" + sensorType.name() + "/pressure")); lightParameter.set(THING_TYPE_OWSERVER, new OwserverDeviceParameter("/" + sensorType.name() + "/light")); isConfigured = true; }</code><technical_language>a line final String sensorTypeName = sensorType.name() sensorTypeName instead of calling sensorType.name() times</technical_language>

Target:
public void configureChannels(OwSensorType sensorType) { String sensorTypeName = sensorType.name(); temperatureParameter.set(THING_TYPE_OWSERVER, new OwserverDeviceParameter("/" + sensorTypeName + "/temperature")); humidityParameter.set(THING_TYPE_OWSERVER, new OwserverDeviceParameter("/" + sensorTypeName + "/humidity")); pressureParameter.set(THING_TYPE_OWSERVER, new OwserverDeviceParameter("/" + sensorTypeName + "/pressure")); lightParameter.set(THING_TYPE_OWSERVER, new OwserverDeviceParameter("/" + sensorTypeName + "/light")); isConfigured = true; }
Source:
<code>protected boolean canDoAction() { boolean result = true; AuditLog event = DbFacade.getInstance().getAuditLogDao().get(getParameters().getId()); if (event == null) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_EVENT_NOT_FOUND); result = false; } <START> if ((event.getOrigin() != null) && (event.getOrigin().equalsIgnoreCase(OVIRT))) { <END> addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLEGAL_ORIGIN); result = false; } if (!event.getseverity().equals(AuditLogSeverity.ALERT)) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLRGAL_OPERATION); result = false; } if (!result) { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__REMOVE); addCanDoActionMessage(VdcBllMessages.VAR__TYPE__EXTERNAL_EVENT); } return result; }</code><technical_language>need for extra brackets. instead of adding a null check, revert comparison order: if (OVIRT.equalsIgnoreCase(event.getOrigin())) { ... }</technical_language>

Target:
protected boolean canDoAction() { boolean result = true; AuditLog event = DbFacade.getInstance().getAuditLogDao().get(getParameters().getId()); if (event == null) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_EVENT_NOT_FOUND); result = false; } if (OVIRT.equalsIgnoreCase(event.getOrigin())) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLEGAL_ORIGIN); result = false; } if (!event.getseverity().equals(AuditLogSeverity.ALERT)) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLRGAL_OPERATION); result = false; } if (!result) { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__REMOVE); addCanDoActionMessage(VdcBllMessages.VAR__TYPE__EXTERNAL_EVENT); } return result; }
Source:
<code>protected Node[] createNodesForKey(Long artifactID) { if (skCase == null) { return new Node[0]; } try { BlackboardArtifact art = skCase.getBlackboardArtifact(artifactID); return new Node[]{new AccountArtifactNode(art)}; } catch (TskCoreException ex) { <START> LOGGER.log(Level.WARNING, "Error creating BlackboardArtifactNode for artifact with ID " + artifactID, ex); END> return new Node[0]; } }</code><technical_language>exception a database query failure logged SEVERE</technical_language>

Target:
protected Node[] createNodesForKey(Long artifactID) { if (skCase == null) { return new Node[0]; } try { BlackboardArtifact art = skCase.getBlackboardArtifact(artifactID); return new Node[]{new AccountArtifactNode(art)}; } catch (TskCoreException ex) { LOGGER.log(Level.SEVERE, "Error creating BlackboardArtifactNode for artifact with ID " + artifactID, ex); return new Node[0]; } }
Source:
<code>public void updateOwnerReferences ( String userId, String replacementUserId ) throws DotDataException { if(!UtilMethods.isSet(userId) || !UtilMethods.isSet(replacementUserId)) { <START> return; <END> } DotConnect dc = new DotConnect(); dc.setSQL(UPDATE_BUNDLE_OWNER_REFERENCES); dc.addParam(replacementUserId); dc.addParam(userId); dc.loadResult(); }</code><technical_language>report exception something</technical_language>

Target:
public void updateOwnerReferences ( String userId, String replacementUserId ) throws DotDataException { DotConnect dc = new DotConnect(); dc.setSQL(UPDATE_BUNDLE_OWNER_REFERENCES); dc.addParam(replacementUserId); dc.addParam(userId); dc.loadResult(); }
Source:
<code>protected void checkTxCommandResponses(Map<Address, Response> responseMap, TransactionBoundaryCommand command, LocalTxInvocationContext context, Collection<Address> recipients) { boolean handledByPartitionHandling = false; boolean throwOutdatedTopologyException = false; for (Map.Entry<Address, Response> e : responseMap.entrySet()) { Address recipient = e.getKey(); Response response = e.getValue(); if (response == CacheNotFoundResponse.INSTANCE) { if (command.getTopologyId() == stateTransferManager.getCacheTopology().getTopologyId() && !rpcManager.getMembers().contains(recipient)) { if (trace) log.tracef("Ignoring response from node not targeted %s", recipient); } else { <START> if (!handledByPartitionHandling && checkResponseInPartitionHandling(command, context, recipients)) { <END> if (trace) log.tracef("Cache not running on node %s, or the node is missing. It will be handled by the PartitionHandlingManager", recipient); handledByPartitionHandling = true; } else { if (trace) log.tracef("Cache not running on node %s, or the node is missing", recipient); throwOutdatedTopologyException = true; } } } else if (response == UnsureResponse.INSTANCE) { if (trace) log.tracef("Node %s has a newer topology id", recipient); throwOutdatedTopologyException = true; } } if (!handledByPartitionHandling && throwOutdatedTopologyException) { throw new OutdatedTopologyException("Cache not running on some recipients."); } }</code><technical_language>This if complicated me. call checkResponseInPartitionHandling log message time, return out of function moment get partition handling error</technical_language>

Target:
protected void checkTxCommandResponses(Map<Address, Response> responseMap, TransactionBoundaryCommand command, LocalTxInvocationContext context, Collection<Address> recipients) { OutdatedTopologyException outdatedTopologyException = null; for (Map.Entry<Address, Response> e : responseMap.entrySet()) { Address recipient = e.getKey(); Response response = e.getValue(); if (response == CacheNotFoundResponse.INSTANCE) { if (command.getTopologyId() == stateTransferManager.getCacheTopology().getTopologyId() && !rpcManager.getMembers().contains(recipient)) { if (trace) log.tracef("Ignoring response from node not targeted %s", recipient); } else { if (checkCacheNotFoundResponseInPartitionHandling(command, context, recipients)) { if (trace) log.tracef("Cache not running on node %s, or the node is missing. It will be handled by the PartitionHandlingManager", recipient); return; } else { if (trace) log.tracef("Cache not running on node %s, or the node is missing", recipient); outdatedTopologyException = new OutdatedTopologyException(format("Cache not running on node %s, or the node is missing", recipient)); } } } else if (response == UnsureResponse.INSTANCE) { if (trace) log.tracef("Node %s has a newer topology id", recipient); outdatedTopologyException = new OutdatedTopologyException(format("Node %s has a newer topology id", recipient)); } } if (outdatedTopologyException != null) { throw outdatedTopologyException; } }
Source:
<code><START> protected void validate() { <END> Preconditions.checkArgument(rateLimiter == null || tagCreditsMap.isEmpty(), "Only one of rateLimiter instance or read/write limits can be specified"); Preconditions.checkArgument(asyncCallbackPoolSize <= 20, "too many threads for async callback executor."); if (readFn != null && enableReadRateLimiter) { Preconditions.checkArgument(readCreditFn != null || tagCreditsMap.containsKey(RL_READ_TAG), "Read rate limiter is enabled, there is no read rate limiter configured."); } if (writeFn != null && enableWriteRateLimiter) { Preconditions.checkArgument(writeCreditFn != null || tagCreditsMap.containsKey(RL_WRITE_TAG), "Write rate limiter is enabled, there is no write rate limiter configured."); } }</code><technical_language>Thanks for change! validate a readfn writefn exist? Also, constructor of RemoteTable AsyncRemoteTable validations readfn is required. Purely remove validation enough. this change, unit/regression test fail, need fix if any</technical_language>

Target:
protected void validate() { Preconditions.checkArgument(writeFn != null || readFn != null, "Must have one of TableReadFunction or TableWriteFunction"); Preconditions.checkArgument(rateLimiter == null || tagCreditsMap.isEmpty(), "Only one of rateLimiter instance or read/write limits can be specified"); Preconditions.checkArgument(asyncCallbackPoolSize <= 20, "too many threads for async callback executor."); if (readFn != null && enableReadRateLimiter) { Preconditions.checkArgument(readCreditFn != null || tagCreditsMap.containsKey(RL_READ_TAG), "Read rate limiter is enabled, there is no read rate limiter configured."); } if (writeFn != null && enableWriteRateLimiter) { Preconditions.checkArgument(writeCreditFn != null || tagCreditsMap.containsKey(RL_WRITE_TAG), "Write rate limiter is enabled, there is no write rate limiter configured."); } }
Source:
<code>protected static void deleteTenantIDNData(int tenantId, Connection conn) throws SQLException { try { conn.setAutoCommit(false); executeDeleteQuery(conn, DELETE_CM_PURPOSE_CATEGORY, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM_DIALECT, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM_MAPPED_ATTRIBUTE, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM_MAPPING, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM_PROPERTY, tenantId); executeDeleteQuery(conn, DELETE_IDN_OIDC_SCOPE, tenantId); executeDeleteQuery(conn, DELETE_IDP, tenantId); executeDeleteQuery(conn, DELETE_IDP_AUTHENTICATOR, tenantId); executeDeleteQuery(conn, DELETE_IDP_AUTHENTICATOR_PROPERTY, tenantId); executeDeleteQuery(conn, DELETE_IDP_METADATA, tenantId); executeDeleteQuery(conn, DELETE_IDP_PROVISIONING_CONFIG, tenantId); executeDeleteQuery(conn, DELETE_IDP_PROV_CONFIG_PROPERTY, tenantId); conn.commit(); } catch (Exception e) { conn.rollback(); String errorMsg = "An error occurred while deleting identity data for tenant: " + tenantId; <START> log.error(errorMsg, e); <END> throw new SQLException(errorMsg, e); } finally { conn.close(); } }</code><technical_language>error logged times, executeDeleteQuery logging error. Check other place</technical_language>

Target:
public static void deleteTenantIDNData(int tenantId, Connection conn) throws SQLException { try { conn.setAutoCommit(false); executeDeleteQuery(conn, DELETE_CM_PURPOSE_CATEGORY, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM_DIALECT, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM_MAPPED_ATTRIBUTE, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM_MAPPING, tenantId); executeDeleteQuery(conn, DELETE_IDN_CLAIM_PROPERTY, tenantId); executeDeleteQuery(conn, DELETE_IDN_OIDC_SCOPE, tenantId); executeDeleteQuery(conn, DELETE_IDP, tenantId); executeDeleteQuery(conn, DELETE_IDP_AUTHENTICATOR, tenantId); executeDeleteQuery(conn, DELETE_IDP_AUTHENTICATOR_PROPERTY, tenantId); executeDeleteQuery(conn, DELETE_IDP_METADATA, tenantId); executeDeleteQuery(conn, DELETE_IDP_PROVISIONING_CONFIG, tenantId); executeDeleteQuery(conn, DELETE_IDP_PROV_CONFIG_PROPERTY, tenantId); conn.commit(); if (log.isDebugEnabled()) { log.debug("IDN table entries deleted for tenant :" + tenantId); } } catch (Exception e) { conn.rollback(); String errorMsg = "An error occurred while deleting identity data for tenant: " + tenantId; throw new SQLException(errorMsg, e); } finally { conn.close(); } }
Source:
<code>private boolean isMoveFromRoot(Diff target) { Iterator<? extends Diff> requiredByTarget; Iterator<? extends Diff> requiresTarget; if (target instanceof ResourceAttachmentChange) { requiredByTarget = Iterables.filter(target.getRequires(), ReferenceChange.class).iterator(); requiresTarget = Iterables.filter(target.getRequiredBy(), ReferenceChange.class).iterator(); } else { requiredByTarget = Iterables.filter(target.getRequires(), ResourceAttachmentChange.class) .iterator(); requiresTarget = Iterables.filter(target.getRequiredBy(), ResourceAttachmentChange.class) .iterator(); } while (requiredByTarget.hasNext()) { Diff requiredReference = requiredByTarget.next(); Iterator<? extends Diff> requiredByReference; if (target instanceof ResourceAttachmentChange) { requiredByReference = Iterables.filter(requiredReference.getRequires(), ResourceAttachmentChange.class).iterator(); } else { requiredByReference = Iterables .filter(requiredReference.getRequires(), ReferenceChange.class).iterator(); } while (requiredByReference.hasNext()) { Diff requiredAttachment = requiredByReference.next(); if (requiredAttachment.equals(target) <START> && Iterators.contains(requiresTarget, requiredReference)) { <END> return true; } } } return false; }</code><technical_language>This consume iterator, making useless for call iterations</technical_language>

Target:
private boolean isMoveFromRoot(Diff target) { Iterable<? extends Diff> requiredByTarget; Iterable<? extends Diff> requiresTarget; if (target instanceof ResourceAttachmentChange) { requiredByTarget = Iterables.filter(target.getRequires(), ReferenceChange.class); requiresTarget = Iterables.filter(target.getRequiredBy(), ReferenceChange.class); } else { requiredByTarget = Iterables.filter(target.getRequires(), ResourceAttachmentChange.class); requiresTarget = Iterables.filter(target.getRequiredBy(), ResourceAttachmentChange.class); } for (Diff requiredReference : requiredByTarget) { Iterable<? extends Diff> requiredByReference; if (target instanceof ResourceAttachmentChange) { requiredByReference = Iterables.filter(requiredReference.getRequires(), ResourceAttachmentChange.class); } else { requiredByReference = Iterables.filter(requiredReference.getRequires(), ReferenceChange.class); } for (Diff requiredAttachment : requiredByReference) { if (requiredAttachment.equals(target) && Iterables.contains(requiresTarget, requiredReference)) { return true; } } } return false; }
Source:
<code>public void handle(Patient patient, User voidingUser, Date voidedDate, String voidReason) { EncounterService es = Context.getEncounterService(); List<Encounter> encounters = es.getEncountersByPatient(patient); if (CollectionUtils.isNotEmpty(encounters)) { for (Encounter encounter : encounters) { if (!encounter.isVoided()) { encounter.setDateVoided(patient.getDateVoided()); es.voidEncounter(encounter, voidReason); } } } <START> if (patient.getVoided()) { <END> CohortService cs = Context.getCohortService(); cs.patientVoided(patient); } }</code><technical_language>here, this patient is voided this is redundant</technical_language>

Target:
public void handle(Patient patient, User voidingUser, Date voidedDate, String voidReason) { EncounterService es = Context.getEncounterService(); List<Encounter> encounters = es.getEncountersByPatient(patient); if (CollectionUtils.isNotEmpty(encounters)) { for (Encounter encounter : encounters) { if (!encounter.isVoided()) { encounter.setDateVoided(patient.getDateVoided()); es.voidEncounter(encounter, voidReason); } } } CohortService cs = Context.getCohortService(); cs.patientVoided(patient); }
Source:
<code>public int getThreadPoolSize() { <START> Optional<String> autoscalingContainerThreadPoolSize = Optional.ofNullable(get( <END> JOB_AUTOSIZING_CONTAINER_THREAD_POOL_SIZE)); if (getAutosizingEnabled() && autoscalingContainerThreadPoolSize.isPresent()) { return Integer.parseInt(autoscalingContainerThreadPoolSize.get()); } else { return getInt(JOB_CONTAINER_THREAD_POOL_SIZE, 0); } }</code><technical_language>autosizing instead of autoscaling</technical_language>

Target:
public int getThreadPoolSize() { Optional<String> autosizingContainerThreadPoolSize = Optional.ofNullable(get( JOB_AUTOSIZING_CONTAINER_THREAD_POOL_SIZE)); if (getAutosizingEnabled() && autosizingContainerThreadPoolSize.isPresent()) { return Integer.parseInt(autosizingContainerThreadPoolSize.get()); } else { return getInt(JOB_CONTAINER_THREAD_POOL_SIZE, 0); } }
Source:
<code>private boolean isRunningInVR() { final Context context = InstrumentationRegistry.getTargetContext(); if ((context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_MASK) <START> == Configuration.UI_MODE_TYPE_VR_HEADSET) { <END> return true; } return false; }</code><technical_language>nit: return (context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_MASK) == Configuration.UI_MODE_TYPE_VR_HEADSET</technical_language>

Target:
private boolean isRunningInVR() { final Context context = InstrumentationRegistry.getTargetContext(); return (context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_MASK) == Configuration.UI_MODE_TYPE_VR_HEADSET; }
Source:
<code>private void updateBranchCoverageMaybe() { stepNum += 1; if (stepNum % branchCoverageInterval == 0) { methodSelections.clear(); <START> CoverageTracker.instance.collect(); <END> } }</code><technical_language>is relationship CoverageTracker.instance.collect() updateWeightsForOperations() is defined immediately below? clear me</technical_language>

Target:
private void updateBranchCoverageMaybe() { boolean shouldUpdateBranchCoverage; switch (GenInputsAbstract.bloodhound_update_mode) { case TIME: long currentTime = System.currentTimeMillis(); shouldUpdateBranchCoverage = currentTime - lastUpdateTime >= t; if (shouldUpdateBranchCoverage) { lastUpdateTime = currentTime; } break; case INVOCATIONS: shouldUpdateBranchCoverage = totalSuccessfulInvocations % branchCoverageInterval == 0; if (shouldUpdateBranchCoverage) { totalSuccessfulInvocations = 1; } break; default: throw new BugInRandoopException( "Unhandled value for bloodhound_update_mode: " + GenInputsAbstract.bloodhound_update_mode); } if (shouldUpdateBranchCoverage) { if (GenInputsAbstract.bloodhound_logging) { System.out.println("Updating branch coverage information."); } methodSelectionCounts.clear(); coverageTracker.updateBranchCoverageMap(); updateWeightsForAllOperations(); logMethodWeights(); } }
Source:
<code>public void shouldReportViolationWithDetails() throws IOException { new ConfigurationSetup().setUp(ImmutableMap.of(GeneralOption.VOLATIONS_WITH_DETAILS.getKey(), "true")); renderer.getReviewResult().getViolations().clear(); Rule rule = createRule(ruleDescription, externalInfoUrl, priority); Report report = createReportWithVolation(createRuleViolation(rule, violationDescription)); renderer.renderFileReport(report); Violation violation = renderer.getReviewResult().getViolations().get(0); <START> assertThat(violation.getMessage()).contains(violationDescription); <END> assertThat(violation.getMessage()).contains(ruleDescription); assertThat(violation.getMessage()).contains(externalInfoUrl); assertThat(violation.getSeverity()).isEqualTo(renderer.convert(priority)); }</code><technical_language>match message expected string</technical_language>

Target:
public void shouldReportViolationWithDetails() throws IOException { new ConfigurationSetup().setUp(ImmutableMap.of(GeneralOption.VOLATIONS_WITH_DETAILS.getKey(), "true")); renderer.getReviewResult().getViolations().clear(); Rule rule = createRule(ruleDescription, externalInfoUrl, RulePriority.HIGH); Report report = createReportWithVolation(createRuleViolation(rule, violationDescription)); renderer.renderFileReport(report); Violation violation = renderer.getReviewResult().getViolations().get(0); assertThat(violation.getMessage()).startsWith(violationDescription); assertThat(violation.getMessage()).contains(ruleDescription); assertThat(violation.getMessage()).contains(externalInfoUrl); assertThat(violation.getSeverity()).isEqualTo(Severity.ERROR); }
Source:
<code>public void updateFromLocalAssignment( LocalVariableNode lhs, Node rhs, ClassTree classTree, MethodTree methodTree) { if (!isElementFromSourceCode(lhs)) { return; } String className = getEnclosingClassName(lhs); String jaifPath = storage.getJaifPath(className); AClass clazz = storage.getAClass( className, jaifPath, (ClassSymbol) TreeUtils.elementFromDeclaration(classTree)); ExecutableElement methodElt = TreeUtils.elementFromDeclaration(methodTree); AMethod method = clazz.methods.getVivify(JVMNames.getJVMMethodSignature(methodElt)); method.setFieldsFromMethodElement(methodElt); List<? extends VariableTree> params = methodTree.getParameters(); for (int i = 0; i < params.size(); i++) { VariableTree vt = params.get(i); if (vt.getName().contentEquals(lhs.getName())) { Tree rhsTree = rhs.getTree(); if (rhsTree == null) { continue; } AnnotatedTypeMirror paramATM = atypeFactory.getAnnotatedType(vt); AnnotatedTypeMirror argATM = atypeFactory.getAnnotatedType(rhsTree); VariableElement ve = TreeUtils.elementFromDeclaration(vt); AField param = method.vivifyAndAddTypeMirrorToParameter( i, argATM.getUnderlyingType(), ve.getSimpleName()); updateAnnotationSetInScene( param.type, TypeUseLocation.PARAMETER, argATM, paramATM, <START> atypeFactory, <END> jaifPath); break; } } }</code><technical_language>I need pass type factory anymore</technical_language>

Target:
public void updateFromLocalAssignment( LocalVariableNode lhs, Node rhs, ClassTree classTree, MethodTree methodTree) { if (!isElementFromSourceCode(lhs)) { return; } String className = getEnclosingClassName(lhs); String jaifPath = storage.getJaifPath(className); AClass clazz = storage.getAClass( className, jaifPath, (ClassSymbol) TreeUtils.elementFromDeclaration(classTree)); ExecutableElement methodElt = TreeUtils.elementFromDeclaration(methodTree); AMethod method = clazz.methods.getVivify(JVMNames.getJVMMethodSignature(methodElt)); method.setFieldsFromMethodElement(methodElt); List<? extends VariableTree> params = methodTree.getParameters(); for (int i = 0; i < params.size(); i++) { VariableTree vt = params.get(i); if (vt.getName().contentEquals(lhs.getName())) { Tree rhsTree = rhs.getTree(); if (rhsTree == null) { continue; } AnnotatedTypeMirror paramATM = atypeFactory.getAnnotatedType(vt); AnnotatedTypeMirror argATM = atypeFactory.getAnnotatedType(rhsTree); VariableElement ve = TreeUtils.elementFromDeclaration(vt); AField param = method.vivifyAndAddTypeMirrorToParameter( i, argATM.getUnderlyingType(), ve.getSimpleName()); updateAnnotationSetInScene( param.type, TypeUseLocation.PARAMETER, argATM, paramATM, jaifPath); break; } } }
Source:
<code><START> public SubscriptionCursorWithoutToken getOffset(final EventTypePartition key) { <END> try { final String offset = new String(getCurator().getData().forPath(getOffsetPath(key)), UTF_8); return new SubscriptionCursorWithoutToken(key.getEventType(), key.getPartition(), offset); } catch (final Exception e) { throw new NakadiRuntimeException(e); } }</code><technical_language>throws NakadiRuntimeException</technical_language>

Target:
public SubscriptionCursorWithoutToken getOffset(final EventTypePartition key) throws NakadiRuntimeException { try { final String offset = new String(getCurator().getData().forPath(getOffsetPath(key)), UTF_8); return new SubscriptionCursorWithoutToken(key.getEventType(), key.getPartition(), offset); } catch (final Exception e) { throw new NakadiRuntimeException(e); } }
Source:
<code>private void init() { log.info("Start initializing {}", getClass().getSimpleName()); isoDomainRefreshRate = Config.<Integer> getValue(ConfigValues.AutoRepoDomainRefreshTime) * MIN_TO_MILLISECONDS; schedulerUtil.scheduleAFixedDelayJob(this, <START> "fetchIsoDomains", <END> new Class[] {}, new Object[] {}, 300000, isoDomainRefreshRate, TimeUnit.MILLISECONDS); invalidateCachePeriod = Config.<Integer> getValue(ConfigValues.RepoDomainInvalidateCacheTimeInMinutes) * MIN_TO_MILLISECONDS; domainsLastRefreshedTime = new ConcurrentHashMap<>(); log.info("Finished initializing {}", getClass().getSimpleName()); }</code><technical_language>This tied mechanism somehow, it</technical_language>

Target:
private void init() { invalidateCachePeriod = Config.<Integer> getValue(ConfigValues.RepoDomainInvalidateCacheTimeInMinutes) * 60 * 1000; domainsLastRefreshedTime = new ConcurrentHashMap<>(); }