auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public Waiter.Predicate<IOException> predicateTableEnabled(final TableName tableName) { return new ExplainingPredicate<IOException>() { @Override public String explainFailure() throws IOException { return explainTableState(tableName); } @Override public boolean evaluate() throws IOException { boolean tableEnabled = false; try { tableEnabled = getHBaseAdmin().tableExists(tableName) && getHBaseAdmin().isTableEnabled(tableName); } catch (TableNotFoundException tnfe) { } return tableEnabled; } }; }

Target:
public Waiter.Predicate<IOException> predicateTableEnabled(final TableName tableName) { return new ExplainingPredicate<IOException>() { @Override public String explainFailure() throws IOException { return explainTableState(tableName); } @Override public boolean evaluate() throws IOException { try { return getHBaseAdmin().tableExists(tableName) && getHBaseAdmin().isTableEnabled(tableName); } catch (TableNotFoundException tnfe) { return false; } } }; }
Source:
protected void createDefaultEditPolicies() { installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); super.createDefaultEditPolicies(); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicy()); installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy()); installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ActivityCanonicalEditPolicy()); installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizeActivityEditPolicy()); installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); removeEditPolicy(EditPolicyRoles.CANONICAL_ROLE); }

Target:
protected void createDefaultEditPolicies() { installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); super.createDefaultEditPolicies(); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicy()); installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy()); installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizeActivityEditPolicy()); installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); }
Source:
public SequencerServer(ServerContext serverContext) { this.serverContext = serverContext; this.executor = Executors.newSingleThreadExecutor( new ServerThreadFactory("sequencer-", new ServerThreadFactory.ExceptionHandler())); globalLogTail = 0; this.cache = new SequencerServerCache(serverContext.getConfiguration().getSequencerConflictWindowSize()); setUpTimerNameCache(); }

Target:
public SequencerServer(ServerContext serverContext) { this.serverContext = serverContext; this.executor = Executors.newSingleThreadExecutor( new ServerThreadFactory("sequencer-", new ServerThreadFactory.ExceptionHandler())); globalLogTail = Address.getMinAddress(); this.cache = new SequencerServerCache(serverContext .getConfiguration().getSequencerConflictWindowSize(), globalLogTail - 1); setUpTimerNameCache(); }
Source:
public byte[] encode(final Identity identity) throws IOException { final byte[] raw = this.origin.encode(identity); return Base64.encodeBase64(raw); }

Target:
public byte[] encode(final Identity identity) throws IOException { return this.origin.encode(identity); }
Source:
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if(!hasValidCSRFToken(request)) { respondCSRFError(response); return; } try { Project project = getProject(request); String columnName = request.getParameter("columnName"); String keyColumnName = request.getParameter("keyColumnName"); String separator = request.getParameter("separator"); String mode = request.getParameter("mode"); Boolean regex = Boolean.parseBoolean(request.getParameter("regex")); if ("separator".equals(mode)) { AbstractOperation op = new MultiValuedCellSplitOperation(columnName, keyColumnName, separator, regex); Process process = op.createProcess(project, new Properties()); performProcessAndRespond(request, response, project, process); } else if ("lengths".equals(mode)) { String s = request.getParameter("fieldLengths"); int[] fieldLengths = ParsingUtilities.mapper.readValue(s, new TypeReference<int[]>() {}); AbstractOperation op = new MultiValuedCellSplitOperation(columnName, keyColumnName, fieldLengths); Process process = op.createProcess(project, new Properties()); performProcessAndRespond(request, response, project, process); } else if ("cases".equals(mode)) { AbstractOperation op = new MultiValuedCellSplitOperation(columnName, keyColumnName, true); Process process = op.createProcess(project, new Properties()); performProcessAndRespond(request, response, project, process); } else if ("number".equals(mode)) { AbstractOperation op = new MultiValuedCellSplitOperation(columnName, keyColumnName, false); Process process = op.createProcess(project, new Properties()); performProcessAndRespond(request, response, project, process); } } catch (Exception e) { respondException(response, e); } }

Target:
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if(!hasValidCSRFToken(request)) { respondCSRFError(response); return; } try { Project project = getProject(request); String columnName = request.getParameter("columnName"); String keyColumnName = request.getParameter("keyColumnName"); String separator = request.getParameter("separator"); String mode = request.getParameter("mode"); Boolean regex = Boolean.parseBoolean(request.getParameter("regex")); AbstractOperation op; if ("lengths".equals(mode)) { String s = request.getParameter("fieldLengths"); int[] fieldLengths = ParsingUtilities.mapper.readValue(s, new TypeReference<int[]>() {}); op = new MultiValuedCellSplitOperation(columnName, keyColumnName, fieldLengths); } else { op = new MultiValuedCellSplitOperation(columnName, keyColumnName, separator, regex); } Process process = op.createProcess(project, new Properties()); performProcessAndRespond(request, response, project, process); } catch (Exception e) { respondException(response, e); } }
Source:
public void testSetOther() { when(i18n.get("userInfo.tooltipFormat", "user", 1000)).thenReturn("user(1000)"); PlayerBuilder playerBuilder = PlayerBuilder.create("user") .defaultValues() .socialStatus(SocialStatus.OTHER); Player player = playerBuilder.get(); instance.setPlayer(player, 1000, Faction.NOMAD); assertThat(instance.factionIcon.isVisible(), is(false)); assertThat(instance.factionImage.getImage().getUrl(), is(new Image("/images/factions/random.png").getUrl())); assertThat(instance.factionImage.isVisible(), is(true)); assertThat(instance.foeIconText.isVisible(), is(false)); assertThat(instance.friendIconText.isVisible(), is(false)); assertThat(instance.playerInfo.getText(), is("user(1000)")); }

Target:
public void testSetOther() { when(i18n.get("userInfo.tooltipFormat", "user", 1000)).thenReturn("user(1000)"); PlayerBuilder playerBuilder = PlayerBuilder.create("user") .defaultValues() .socialStatus(SocialStatus.OTHER); Player player = playerBuilder.get(); instance.setPlayer(player, 1000, Faction.RANDOM); assertThat(instance.factionIcon.isVisible(), is(false)); assertThat(instance.factionImage.getImage().getUrl(), is(PlayerCardTooltipController.RANDOM_IMAGE.getUrl())); assertThat(instance.factionImage.isVisible(), is(true)); assertThat(instance.foeIconText.isVisible(), is(false)); assertThat(instance.friendIconText.isVisible(), is(false)); assertThat(instance.playerInfo.getText(), is("user(1000)")); }
Source:
public RebaseResponse rebase(RebaseRequest request) throws ApiException { GitConnection gitConnection = getGitConnection(); try { return gitConnection.rebase(request); } finally { gitConnection.close(); } }

Target:
public RebaseResponse rebase(RebaseRequest request) throws ApiException { try (GitConnection gitConnection = getGitConnection()) { return gitConnection.rebase(request); } }
Source:
private void scheduleAppUpdate() { Constraints constraints = new Constraints.Builder() .setRequiredNetworkType(NetworkType.CONNECTED) .setRequiresBatteryNotLow(true) .build(); PeriodicWorkRequest updateRequest = new PeriodicWorkRequest.Builder(UpdateWorker.class, PERIODICITY_FOR_UPDATE_IN_HOURS, TimeUnit.HOURS) .addTag(getCurrentApp().getAppRecord().getApplicationId()) .setConstraints(constraints) .setBackoffCriteria( BackoffPolicy.EXPONENTIAL, BACKOFF_DELAY_FOR_UPDATE_RETRY, TimeUnit.MILLISECONDS) .build(); WorkManager.getInstance(this).enqueueUniquePeriodicWork( UpdateHelper.getUpdateRequestName(), ExistingPeriodicWorkPolicy.KEEP, updateRequest ); }

Target:
private void scheduleAppUpdate() { if(UpdateHelper.shouldAutoUpdate()) { Constraints constraints = new Constraints.Builder() .setRequiredNetworkType(NetworkType.CONNECTED) .setRequiresBatteryNotLow(true) .build(); PeriodicWorkRequest updateRequest = new PeriodicWorkRequest.Builder(UpdateWorker.class, UpdateHelper.getAutoUpdatePeriodicity(), TimeUnit.HOURS) .addTag(getCurrentApp().getAppRecord().getApplicationId()) .setConstraints(constraints) .setBackoffCriteria( BackoffPolicy.EXPONENTIAL, BACKOFF_DELAY_FOR_UPDATE_RETRY, TimeUnit.MILLISECONDS) .build(); WorkManager.getInstance(this).enqueueUniquePeriodicWork( UpdateHelper.getUpdateRequestName(), ExistingPeriodicWorkPolicy.KEEP, updateRequest ); } }
Source:
public CTRCryptoInputStream( Input input, Cipher cipher, int bufferSize, byte[] key, byte[] iv, long streamOffset) throws IOException { super(input, cipher, bufferSize, key, iv); Utils.checkStreamCipher(cipher); this.streamOffset = streamOffset; resetStreamOffset(streamOffset); }

Target:
public CTRCryptoInputStream( Input input, Cipher cipher, int bufferSize, byte[] key, byte[] iv, long streamOffset) throws IOException { super(input, cipher, bufferSize, key, iv); Utils.checkStreamCipher(cipher); resetStreamOffset(streamOffset); }
Source:
public Box getByAlias(String alias) throws IOException { Box o = boxStore.getBoxByAlias(alias); if (authorizationManager.readCheck(o)) return o; else throw new IOException("User " + authorizationManager.getCurrentUser().getFullName() + " cannot read Box " + alias); }

Target:
public Box getByAlias(String alias) throws IOException { Box o = boxStore.getBoxByAlias(alias); authorizationManager.throwIfNotReadable(o); return o; }
Source:
public ReadOnlyArrayInterface getArray(String key) { int index = indexForColumnName(key); return index >= 0 ? getArray(index) : null; }

Target:
public ReadOnlyArray getArray(String key) { int index = indexForColumnName(key); return index >= 0 ? getArray(index) : null; }
Source:
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { try { fConfigDir = null; SubMonitor subMonitor = SubMonitor.convert(monitor, 4); try { preLaunchCheck(configuration, launch, subMonitor.newChild(2)); } catch (CoreException e) { if (e.getStatus().getSeverity() == IStatus.CANCEL) { subMonitor.setCanceled(true); return; } throw e; } VMRunnerConfiguration runnerConfig = new VMRunnerConfiguration(getMainClass(), getClasspath(configuration)); runnerConfig.setVMArguments(getVMArguments(configuration)); runnerConfig.setProgramArguments(getProgramArguments(configuration)); runnerConfig.setWorkingDirectory(getWorkingDirectory(configuration).getAbsolutePath()); runnerConfig.setEnvironment(getEnvironment(configuration)); runnerConfig.setVMSpecificAttributesMap(getVMSpecificAttributesMap(configuration)); subMonitor.worked(1); setDefaultSourceLocator(configuration); manageLaunch(launch); IVMRunner runner = getVMRunner(configuration, mode); if (runner != null) runner.run(runnerConfig, launch, subMonitor); else subMonitor.setCanceled(true); } catch (final CoreException e) { throw e; } }

Target:
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { try { fConfigDir = null; SubMonitor subMonitor = SubMonitor.convert(monitor, 4); try { preLaunchCheck(configuration, launch, subMonitor.newChild(2)); } catch (CoreException e) { if (e.getStatus().getSeverity() == IStatus.CANCEL) { subMonitor.setCanceled(true); return; } throw e; } VMRunnerConfiguration runnerConfig = new VMRunnerConfiguration(getMainClass(), getClasspath(configuration)); runnerConfig.setVMArguments(getVMArguments(configuration)); runnerConfig.setProgramArguments(getProgramArguments(configuration)); runnerConfig.setWorkingDirectory(getWorkingDirectory(configuration).getAbsolutePath()); runnerConfig.setEnvironment(getEnvironment(configuration)); runnerConfig.setVMSpecificAttributesMap(getVMSpecificAttributesMap(configuration)); subMonitor.worked(1); setDefaultSourceLocator(configuration); manageLaunch(launch); IVMRunner runner = getVMRunner(configuration, mode); if (runner != null) runner.run(runnerConfig, launch, subMonitor.newChild(1)); else subMonitor.setCanceled(true); } catch (final CoreException e) { throw e; } }
Source:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { if (shouldUseJwtFilter(jwtFilter, filterChain, (HttpServletRequest) request, (HttpServletResponse) response)) { LOG.useJwtFilter(); jwtFilter.doFilter(request, response, filterChain); } else { super.doFilter(request, response, filterChain); } }

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { if (shouldUseJwtFilter(jwtFilter, (HttpServletRequest) request)) { LOG.useJwtFilter(); jwtFilter.doFilter(request, response, filterChain); } else { super.doFilter(request, response, filterChain); } }
Source:
public void failAll(Throwable error) throws PromiseResolvedException { PromiseResolvedException exception = null; for (BatchEntry<T> entry: _map.values()) { try { entry.getPromise().fail(error); } catch (PromiseResolvedException e) { exception = e; } } if (exception != null) { throw exception; } }

Target:
public int failAll(Throwable error) { int alreadyResolved = 0; for (Entry<K, BatchEntry<T>> entry: _map.entrySet()) { try { entry.getValue().getPromise().fail(error); } catch (PromiseResolvedException e) { alreadyResolved++; } } return alreadyResolved; }
Source:
public Target onboard( @NonNull String thingID, @NonNull String thingPassword, @Nullable OnboardWithThingIDOptions options) throws ThingIFException { return thingIfApi.onboard(thingID, thingPassword, options); }

Target:
public Target onboard( @NonNull String thingID, @NonNull String thingPassword, @Nullable OnboardWithThingIDOptions options) throws ThingIFException { return this.thingIfApi.onboard(thingID, thingPassword, options); }
Source:
public S contains(String key, String value) { isNotNull(); assertThat(actual.getAll()) .overridingErrorMessage("Expected <%s> to contain <%s> but it does not.", actual.getAll(), stringOf(key, value)) .contains(MapEntry.entry(key, value)); return myself; }

Target:
public S contains(String key, String value) { isNotNull(); assertThat(actual.getAll()) .overridingErrorMessage("Expected preferences to contain <%s> but it does not.", stringOf(key, value)) .contains(MapEntry.entry(key, value)); return myself; }
Source:
private Transmissions transmissions(SelectionKey key) { if (key == null) { throw new IllegalStateException("Attempt to get attachment from a null key"); } return (Transmissions) key.attachment(); }

Target:
private Transmissions transmissions(SelectionKey key) { return (Transmissions) key.attachment(); }
Source:
public static List<Service> addVectorLayer(InputStream is, String name) { List<Service> serviceList = new LinkedList<>(); try { String created = importUsingWPS(PROXY_WORKSPACE, PROXY_STORE, name, is); if (StringUtils.isNotBlank(created)) { serviceList.add(wfsService(created)); serviceList.add(wmsService(created, PROXY_WORKSPACE)); } } catch (FileNotFoundException ex) { log.error("Unable to publish shapefile", ex); } catch (IOException ex) { log.error("Error reading stream", ex); } return serviceList; }

Target:
public static List<Service> addVectorLayer(InputStream is, String name) { List<Service> serviceList = new LinkedList<>(); try { String created = importUsingWPS(PROXY_WORKSPACE, PROXY_STORE, name, is); if (StringUtils.isNotBlank(created)) { serviceList.add(wfsService(created)); serviceList.add(wmsService(created)); } } catch (FileNotFoundException ex) { log.error("Unable to publish shapefile", ex); } catch (IOException ex) { log.error("Error reading stream", ex); } return serviceList; }
Source:
public PaginationWrapper<Subscription> listSubscriptions(@Nullable final String owningApplication, @Nullable final Set<String> eventTypes, final boolean showStatus, final int limit, final int offset) throws InvalidLimitException { if (limit < 1 || limit > 1000) { throw new InvalidLimitException("'limit' parameter should have value between 1 and 1000"); } if (offset < 0) { throw new InvalidLimitException("'offset' parameter can't be lower than 0"); } try { final Set<String> eventTypesFilter = eventTypes == null ? ImmutableSet.of() : eventTypes; final Optional<String> owningAppOption = Optional.ofNullable(owningApplication); final List<Subscription> subscriptions = subscriptionRepository.listSubscriptions(eventTypesFilter, owningAppOption, offset, limit); final PaginationLinks paginationLinks = SubscriptionsUriHelper.createSubscriptionPaginationLinks( owningAppOption, eventTypesFilter, offset, limit, showStatus, subscriptions.size()); final PaginationWrapper<Subscription> paginationWrapper = new PaginationWrapper<>(subscriptions, paginationLinks); if (showStatus) { final List<Subscription> items = paginationWrapper.getItems(); items.forEach(s -> s.setStatus(createSubscriptionStat(s, StatsMode.LIGHT))); } return paginationWrapper; } catch (final ServiceTemporarilyUnavailableException e) { LOG.error("Error occurred during listing of subscriptions", e); throw e; } }

Target:
public PaginationWrapper<Subscription> listSubscriptions(@Nullable final String owningApplication, @Nullable final Set<String> eventTypes, final boolean showStatus, final int limit, final int offset) throws InvalidLimitException, ServiceTemporarilyUnavailableException { if (limit < 1 || limit > 1000) { throw new InvalidLimitException("'limit' parameter should have value between 1 and 1000"); } if (offset < 0) { throw new InvalidLimitException("'offset' parameter can't be lower than 0"); } final Set<String> eventTypesFilter = eventTypes == null ? ImmutableSet.of() : eventTypes; final Optional<String> owningAppOption = Optional.ofNullable(owningApplication); final List<Subscription> subscriptions = subscriptionRepository.listSubscriptions(eventTypesFilter, owningAppOption, offset, limit); final PaginationLinks paginationLinks = SubscriptionsUriHelper.createSubscriptionPaginationLinks( owningAppOption, eventTypesFilter, offset, limit, showStatus, subscriptions.size()); final PaginationWrapper<Subscription> paginationWrapper = new PaginationWrapper<>(subscriptions, paginationLinks); if (showStatus) { final List<Subscription> items = paginationWrapper.getItems(); items.forEach(s -> s.setStatus(createSubscriptionStat(s, StatsMode.LIGHT))); } return paginationWrapper; }
Source:
public HttpMessage createMessage() { HttpMessage msg = new HttpMessage(); HttpRequestHeader requestHeader = new HttpRequestHeader(); try { requestHeader.setURI(new URI("<LINK_0>", false)); } catch (URIException | NullPointerException e) { } requestHeader.setMethod(HttpRequestHeader.GET); msg = new HttpMessage(); msg.setRequestHeader(requestHeader); msg.getResponseHeader().setStatusCode(HttpStatusCode.OK); return msg; }

Target:
public HttpMessage createMessage() { HttpMessage msg = new HttpMessage(); HttpRequestHeader requestHeader = new HttpRequestHeader(); try { requestHeader.setURI(new URI("<LINK_0>", false)); } catch (URIException | NullPointerException e) { } requestHeader.setMethod(HttpRequestHeader.GET); msg.setRequestHeader(requestHeader); msg.getResponseHeader().setStatusCode(HttpStatusCode.OK); return msg; }
Source:
public TestSuite(List<TestCase> tests, KTestOptions options, FileUtil files) { this.tests = tests; this.options = options; reportGen = options.getGenerateReport() ? new ReportGen(files.resolveWorkingDirectory("junit-reports")) : null; }

Target:
public TestSuite(List<TestCase> tests, KTestOptions options, FileUtil files) { this.tests = tests; this.options = options; reportGen = options.getGenerateReport() ? new ReportGen(files.resolveWorkingDirectory(REPORT_DIR)) : null; }
Source:
protected Set<Event> handleAuthenticationTransactionAndGrantTicketGrantingTicket(final RequestContext context) { final HttpServletResponse response = WebUtils.getHttpServletResponseFromExternalWebflowContext(context); try { final Credential credential = getCredentialFromContext(context); AuthenticationResultBuilder builder = WebUtils.getAuthenticationResultBuilder(context); LOGGER.debug("Handling authentication transaction for credential [{}]", credential); final Service service = WebUtils.getService(context); builder.getInitialAuthentication().get().addAttribute("providerId", context.getActiveFlow().getId()); builder = this.authenticationSystemSupport.handleAuthenticationTransaction(service, builder, credential); LOGGER.debug("Issuing ticket-granting tickets for service [{}]", service); return CollectionUtils.wrapSet(grantTicketGrantingTicketToAuthenticationResult(context, builder, service)); } catch (final Exception e) { LOGGER.error(e.getMessage(), e); final MessageContext messageContext = context.getMessageContext(); messageContext.addMessage(new MessageBuilder() .error() .code(DEFAULT_MESSAGE_BUNDLE_PREFIX.concat(e.getClass().getSimpleName())) .build()); response.setStatus(HttpStatus.UNAUTHORIZED.value()); return CollectionUtils.wrapSet(new EventFactorySupport().error(this)); } }

Target:
protected Set<Event> handleAuthenticationTransactionAndGrantTicketGrantingTicket(final RequestContext context) { final HttpServletResponse response = WebUtils.getHttpServletResponseFromExternalWebflowContext(context); try { final Credential credential = getCredentialFromContext(context); AuthenticationResultBuilder builder = WebUtils.getAuthenticationResultBuilder(context); LOGGER.debug("Handling authentication transaction for credential [{}]", credential); final Service service = WebUtils.getService(context); builder = this.authenticationSystemSupport.handleAuthenticationTransaction(service, builder, credential); LOGGER.debug("Issuing ticket-granting tickets for service [{}]", service); return CollectionUtils.wrapSet(grantTicketGrantingTicketToAuthenticationResult(context, builder, service)); } catch (final Exception e) { LOGGER.error(e.getMessage(), e); final MessageContext messageContext = context.getMessageContext(); messageContext.addMessage(new MessageBuilder() .error() .code(DEFAULT_MESSAGE_BUNDLE_PREFIX.concat(e.getClass().getSimpleName())) .build()); response.setStatus(HttpStatus.UNAUTHORIZED.value()); return CollectionUtils.wrapSet(new EventFactorySupport().error(this)); } }
Source:
protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { return new AbstractGraphCommand() { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { decisionTable.getComponentWidths().add(uiColumnIndex, null); final int clauseIndex = getClauseIndex(); decisionTable.getAnnotations().add(clauseIndex, ruleAnnotationClause); ruleAnnotationClause.getName().setValue(getName()); decisionTable.getRule().forEach(rule -> { final RuleAnnotationClauseText le = new RuleAnnotationClauseText(); le.getText().setValue(DecisionTableDefaultValueUtilities.RULE_ANNOTATION_CLAUSE_EXPRESSION_TEXT); rule.getAnnotationEntry().add(clauseIndex, le); le.setParent(rule); }); ruleAnnotationClause.setParent(decisionTable); return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { decisionTable.getComponentWidths().remove(uiColumnIndex); final int clauseIndex = decisionTable.getAnnotations().indexOf(ruleAnnotationClause); decisionTable.getRule().forEach(rule -> rule.getAnnotationEntry().remove(clauseIndex)); decisionTable.getAnnotations().remove(ruleAnnotationClause); return GraphCommandResultBuilder.SUCCESS; } }; }

Target:
protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { return new AbstractGraphCommand() { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { decisionTable.getComponentWidths().add(uiColumnIndex, null); final int clauseIndex = getClauseIndex(); decisionTable.getAnnotations().add(clauseIndex, ruleAnnotationClause); ruleAnnotationClause.getName().setValue(getName()); decisionTable.getRule().forEach(rule -> { final RuleAnnotationClauseText ruleAnnotationClauseText = new RuleAnnotationClauseText(); ruleAnnotationClauseText.getText().setValue(DecisionTableDefaultValueUtilities.RULE_ANNOTATION_CLAUSE_EXPRESSION_TEXT); rule.getAnnotationEntry().add(clauseIndex, ruleAnnotationClauseText); ruleAnnotationClauseText.setParent(rule); }); ruleAnnotationClause.setParent(decisionTable); return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { decisionTable.getComponentWidths().remove(uiColumnIndex); final int clauseIndex = decisionTable.getAnnotations().indexOf(ruleAnnotationClause); decisionTable.getRule().forEach(rule -> rule.getAnnotationEntry().remove(clauseIndex)); decisionTable.getAnnotations().remove(ruleAnnotationClause); return GraphCommandResultBuilder.SUCCESS; } }; }
Source:
public void testThatCustomLauncherCanCustomizeTheClusteredOption() throws InterruptedException { AtomicBoolean asv = new AtomicBoolean(); AtomicBoolean bsv = new AtomicBoolean(); Launcher myLauncher = new Launcher() { @Override protected String getMainVerticle() { return HttpTestVerticle.class.getName(); } @Override public void afterStartingVertx(Vertx vertx) { LauncherExtensibilityTest.this.vertx = vertx; } @Override public void beforeStartingVertx(VertxOptions options) { options.setClustered(true); } @Override public void afterStoppingVertx() { asv.set(true); } @Override public void beforeStoppingVertx(Vertx vertx) { bsv.set(vertx != null); } }; myLauncher.dispatch(new String[0]); waitUntil(() -> { try { return RunCommandTest.getHttpCode() == 200; } catch (IOException e) { return false; } }); assertThat(this.vertx.isClustered()).isTrue(); BareCommand.getTerminationRunnable(vertx, LoggerFactory.getLogger("foo"), () -> { asv.set(true); }).run(); assertThat(asv.get()).isTrue(); vertx = null; }

Target:
public void testThatCustomLauncherCanCustomizeTheClusteredOption() throws InterruptedException { AtomicBoolean asv = new AtomicBoolean(); AtomicBoolean bsv = new AtomicBoolean(); Launcher myLauncher = new Launcher() { @Override protected String getMainVerticle() { return HttpTestVerticle.class.getName(); } @Override public void afterStartingVertx(Vertx vertx) { LauncherExtensibilityTest.this.vertx = vertx; } @Override public void beforeStartingVertx(VertxOptions options) { options.setClustered(true); } @Override public void afterStoppingVertx() { asv.set(true); } @Override public void beforeStoppingVertx(Vertx vertx) { bsv.set(vertx != null); } }; myLauncher.dispatch(new String[0]); waitUntil(() -> { try { return RunCommandTest.getHttpCode() == 200; } catch (IOException e) { return false; } }); assertThat(this.vertx.isClustered()).isTrue(); BareCommand.getTerminationRunnable(vertx, LoggerFactory.getLogger("foo"), () -> asv.set(true)).run(); assertThat(bsv.get()).isTrue(); assertThat(asv.get()).isTrue(); vertx = null; }
Source:
public Set<String> getDuplicateIndicesSequences() { return duplicateIndicesSequences; }

Target:
public Set<String> getDuplicateIndicesSequences() { Set<String> indices = new HashSet<>(); Set<String> duplicateSequences = new HashSet<>(); for (PoolableElementView item : getPoolableElementViews()) { if (hasDuplicateIndices(indices, item)) { for (Index index : item.getIndices()) { duplicateSequences.add(index.getSequence()); } } } return duplicateSequences.isEmpty() ? Collections.emptySet() : duplicateSequences; }
Source:
private Declaration getDeclarationCorrespondingToXpath( Pattern pattern, boolean isXPath, Constraint constraint ) { Declaration declFromXpath = null; if (!isXPath && pattern.hasXPath()) { Declaration xPathDecl = pattern.getXPathDeclaration(); if (xPathDecl != null) { for ( Declaration decl : constraint.getRequiredDeclarations() ) { if (xPathDecl.equals( decl )) { declFromXpath = decl; break; } } } } return declFromXpath; }

Target:
private Declaration getDeclarationCorrespondingToXpath( Pattern pattern, boolean isXPath, Constraint constraint ) { if (!isXPath && pattern.hasXPath()) { Declaration xPathDecl = pattern.getXPathDeclaration(); if (xPathDecl != null) { for ( Declaration decl : constraint.getRequiredDeclarations() ) { if (xPathDecl.equals( decl )) { return decl; } } } } return null; }
Source:
public void controlCharacters() throws Exception { String htmlInput = "<p>\u0008</p>"; Document document = this.cleaner.clean(new StringReader(htmlInput)); String textContent = document.getElementsByTagName("p").item(0).getTextContent(); assertEquals(" ", textContent); assertHTML(" ", "\u0008"); htmlInput = "<p>&#8;</p>"; document = this.cleaner.clean(new StringReader(htmlInput)); textContent = document.getElementsByTagName("p").item(0).getTextContent(); assertEquals("&#8;", textContent); assertHTML("<p>&#8;</p>", "&#8;"); htmlInput = "<p foo=\"&#8;\">content</p>"; document = this.cleaner.clean(new StringReader(htmlInput)); textContent = document.getElementsByTagName("p").item(0).getAttributes().getNamedItem("foo").getTextContent(); assertEquals("&#8;", textContent); assertHTML("<p foo=\"&#8;\">content</p>", "<p foo=\"&#8;\">content</p>"); }

Target:
void controlCharacters() throws Exception { String htmlInput = "<p>\u0008</p>"; Document document = this.cleaner.clean(new StringReader(htmlInput)); String textContent = document.getElementsByTagName("p").item(0).getTextContent(); assertEquals(" ", textContent); assertHTML(" ", "\u0008"); htmlInput = "<p>&#8;</p>"; document = this.cleaner.clean(new StringReader(htmlInput)); textContent = document.getElementsByTagName("p").item(0).getTextContent(); assertEquals("&#8;", textContent); assertHTML("<p>&#8;</p>", "&#8;"); htmlInput = "<p foo=\"&#8;\">content</p>"; document = this.cleaner.clean(new StringReader(htmlInput)); textContent = document.getElementsByTagName("p").item(0).getAttributes().getNamedItem("foo").getTextContent(); assertEquals("&#8;", textContent); assertHTML("<p foo=\"&#8;\">content</p>", "<p foo=\"&#8;\">content</p>"); }
Source:
EventHubConsumer(EventHubAsyncConsumer consumer, Duration tryTimeout) { Objects.requireNonNull(tryTimeout, "'getTryTimeout' cannot be null."); this.consumer = Objects.requireNonNull(consumer, "'consumer' cannot be null."); this.timeout = tryTimeout; }

Target:
EventHubConsumer(EventHubAsyncConsumer consumer, Duration tryTimeout) { Objects.requireNonNull(tryTimeout, "'tryTimeout' cannot be null."); this.consumer = Objects.requireNonNull(consumer, "'consumer' cannot be null."); this.timeout = tryTimeout; }
Source:
private static OseeServerInfo createOseeServerInfo(Log logger, ApplicationServerDataStore dataStore, String... defaultVersions) { String serverAddress = ""; if (System.getProperty("osee.application.server") != null) { serverAddress = System.getProperty("osee.application.server"); } else { try { serverAddress = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException ex) { } } int port = OseeServerProperties.getOseeApplicationServerPort(); String scheme = OseeServerProperties.getOseeApplicationServerScheme(); URI uri = null; try { uri = new URI(scheme, null, serverAddress, port, null, null, null); } catch (URISyntaxException ex) { logger.error(ex, "Error generating application server uri"); } String checkSum = "-1"; try { String address = String.format("%s:%s", serverAddress, port); ByteArrayInputStream inputStream = new ByteArrayInputStream(address.getBytes("UTF-8")); checkSum = ChecksumUtil.createChecksumAsString(inputStream, ChecksumUtil.MD5); } catch (Exception ex) { logger.error(ex, "Error generating application server id"); } return new OseeServerInfo(checkSum, uri == null ? null : uri.toString(), port, defaultVersions, GlobalTime.GreenwichMeanTimestamp(), false); }

Target:
private static OseeServerInfo createOseeServerInfo(Log logger, ApplicationServerDataStore dataStore, String... defaultVersions) { String serverAddress = ""; if (System.getProperty(OseeClient.OSEE_APPLICATION_SERVER) != null) { serverAddress = System.getProperty(OseeClient.OSEE_APPLICATION_SERVER); } else { try { serverAddress = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException ex) { } } int port = OseeServerProperties.getOseeApplicationServerPort(); String scheme = OseeServerProperties.getOseeApplicationServerScheme(); URI uri = null; try { uri = new URI(scheme, null, serverAddress, port, null, null, null); } catch (URISyntaxException ex) { logger.error(ex, "Error generating application server uri"); } String checkSum = "-1"; try { String address = String.format("%s:%s", serverAddress, port); ByteArrayInputStream inputStream = new ByteArrayInputStream(address.getBytes("UTF-8")); checkSum = ChecksumUtil.createChecksumAsString(inputStream, ChecksumUtil.MD5); } catch (Exception ex) { logger.error(ex, "Error generating application server id"); } return new OseeServerInfo(checkSum, uri == null ? null : uri.toString(), port, defaultVersions, GlobalTime.GreenwichMeanTimestamp(), false); }
Source:
protected boolean validate() { ClusterValidator clusterValidator = getClusterValidator(cluster, getCluster()); List<String> volumeNamesWithLowSpace = clusterValidator.isSpaceLeftOnGlusterVolume(); if (volumeNamesWithLowSpace != null && volumeNamesWithLowSpace.size() > 0) { AuditLogable auditLog = new AuditLogableImpl(); auditLog.addCustomValue("VolumeName", volumeNamesWithLowSpace.stream().map(i -> i.toString()).collect(Collectors.joining(","))); auditLogDirector.log(auditLog, AuditLogType.HOST_DISK_RUNNING_LOW_SPACE); return false; } return validate(clusterValidator.oldClusterIsValid()); }

Target:
protected boolean validate() { ClusterValidator clusterValidator = getClusterValidator(cluster, getCluster()); List<String> volumeNamesWithLowSpace = clusterValidator.getLowDeviceSpaceVolumes(); if (volumeNamesWithLowSpace != null && volumeNamesWithLowSpace.size() > 0) { AuditLogable auditLog = new AuditLogableImpl(); auditLog.setClusterId(cluster.getId()); auditLog.setClusterName(cluster.getName()); auditLog.addCustomValue("VolumeNames", volumeNamesWithLowSpace.stream().map(i -> i.toString()).collect(Collectors.joining(","))); auditLogDirector.log(auditLog, AuditLogType.HOST_DISK_RUNNING_LOW_SPACE); return false; } return validate(clusterValidator.oldClusterIsValid()); }
Source:
void clean() { logger.debug("Start temp cleaning..."); long cutoff = System.currentTimeMillis() - ONE_DAY_IN_MILLISECONDS; try { Files.list(tempDir) .filter(p -> p.getFileName().toString().startsWith("sonar-runner-batch")) .filter(p -> lastModifiedTime(p) < cutoff) .forEach(Utils::deleteQuietly); logger.debug("Temp cleaning done"); } catch (IOException e) { logger.warn("Failed to clean files in " + tempDir.toString()); } }

Target:
void clean() { logger.debug("Start temp cleaning..."); long cutoff = System.currentTimeMillis() - ONE_DAY_IN_MILLISECONDS; try { Files.list(tempDir) .filter(p -> p.getFileName().toString().startsWith("sonar-runner-batch")) .filter(p -> lastModifiedTime(p) < cutoff) .forEach(Utils::deleteQuietly); logger.debug("Temp cleaning done"); } catch (IOException e) { logger.warn("Failed to clean files in " + tempDir.toString() + ": " + e.getMessage()); } }
Source:
public void testRejectedMqttConnectMessage() throws Exception { server.getRemotingService().addIncomingInterceptor((MQTTInterceptor) (packet, connection) -> { if (packet.getClass() == MqttConnectMessage.class) { return false; } else { return true; } }); Thread publishThread = new Thread(() -> { MQTTClientProvider publishProvider = getMQTTClientProvider(); try{ initializeConnection(publishProvider); publishProvider.disconnect(); fail("The connection should be rejected!"); } catch (Exception e) { e.printStackTrace(); } }); publishThread.start(); publishThread.join(3000); if (publishThread.isAlive()) { fail("The connection is stuck!"); } }

Target:
public void testRejectedMqttConnectMessage() throws Exception { CountDownLatch publishThreadReady = new CountDownLatch(1); server.getRemotingService().addIncomingInterceptor((MQTTInterceptor) (packet, connection) -> { if (packet.getClass() == MqttConnectMessage.class) { return false; } else { return true; } }); Thread publishThread = new Thread(() -> { MQTTClientProvider publishProvider = getMQTTClientProvider(); publishThreadReady.countDown(); try { initializeConnection(publishProvider); publishProvider.disconnect(); fail("The connection should be rejected!"); } catch (Exception ignore) { } }); publishThread.start(); publishThreadReady.await(); publishThread.join(3000); if (publishThread.isAlive()) { fail("The connection is stuck!"); } }
Source:
public ResponseEntity setServerSettings(@RequestBody ServerSettingsForm serverSettingsForm, BindingResult bindingResult, @RequestHeader(HttpHeaders.ACCEPT) String acceptHeader) throws IOException { if (serverSettingsForm == null) { return getBadRequestResponseEntity(FAILED_EMPTY_FORM, acceptHeader); } validateServerSettingsForm(serverSettingsForm, bindingResult); if (bindingResult.hasErrors()) { throw new RequestBodyValidationException(FAILED_SAVE_SERVER_SETTINGS, bindingResult); } configurationManagementService.setBaseUrl(serverSettingsForm.getBaseUrl()); configurationManagementService.setPort(serverSettingsForm.getPort()); configurationManagementService.setInstanceName(serverSettingsForm.getInstanceName()); if (serverSettingsForm.getDigestAlgorithmSet() != null) { configurationManagementService.setDigestAlgorithmSet(serverSettingsForm.getDigestAlgorithmSet()); } if (serverSettingsForm.getCorsConfigurationForm() != null) { configurationManagementService.setCorsAllowedOrigins( serverSettingsForm.getCorsConfigurationForm().getAllowedOrigins() ); } if (serverSettingsForm.getSmtpConfigurationForm() != null) { configurationManagementService.setSmtpSettings( serverSettingsForm.getSmtpConfigurationForm().getMutableSmtpConfiguration() ); } if (serverSettingsForm.getProxyConfigurationForm() != null) { configurationManagementService.setProxyConfiguration( null, null, serverSettingsForm.getProxyConfigurationForm().getMutableProxyConfiguration() ); } return getSuccessfulResponseEntity(SUCCESSFUL_SAVE_SERVER_SETTINGS, acceptHeader); }

Target:
public ResponseEntity setServerSettings(@RequestBody ServerSettingsForm serverSettingsForm, BindingResult bindingResult, @RequestHeader(HttpHeaders.ACCEPT) String acceptHeader) throws IOException { if (serverSettingsForm == null) { return getBadRequestResponseEntity(FAILED_EMPTY_FORM, acceptHeader); } validateServerSettingsForm(serverSettingsForm, bindingResult); if (bindingResult.hasErrors()) { throw new RequestBodyValidationException(FAILED_SAVE_SERVER_SETTINGS, bindingResult); } configurationManagementService.setBaseUrl(serverSettingsForm.getBaseUrl()); configurationManagementService.setPort(serverSettingsForm.getPort()); configurationManagementService.setInstanceName(serverSettingsForm.getInstanceName()); if (serverSettingsForm.getCorsConfigurationForm() != null) { configurationManagementService.setCorsAllowedOrigins( serverSettingsForm.getCorsConfigurationForm().getAllowedOrigins() ); } if (serverSettingsForm.getSmtpConfigurationForm() != null) { configurationManagementService.setSmtpSettings( serverSettingsForm.getSmtpConfigurationForm().getMutableSmtpConfiguration() ); } if (serverSettingsForm.getProxyConfigurationForm() != null) { configurationManagementService.setProxyConfiguration( null, null, serverSettingsForm.getProxyConfigurationForm().getMutableProxyConfiguration() ); } return getSuccessfulResponseEntity(SUCCESSFUL_SAVE_SERVER_SETTINGS, acceptHeader); }
Source:
public SDBInstanceData(ICredential provider, IConfiguration configuration) { this.provider = provider; this.configuration = configuration; String configuredDomain = System.getProperty("priam.sdb.instanceidentity.domain"); if (configuredDomain == null) { domain = DEFAULT_DOMAIN; } else { domain = configuredDomain; } }

Target:
public SDBInstanceData(ICredential provider, IConfiguration configuration) { this.provider = provider; this.configuration = configuration; this.domain = configuration.getInstanceIdentityDomain(); }
Source:
private Range<RowKeyWrapper> rowRangeToRange(RowRange btRange) { final BoundType startBound; final ByteString startKey; switch (btRange.getStartKeyCase()) { case START_KEY_OPEN: startBound = BoundType.OPEN; startKey = btRange.getStartKeyOpen(); break; case START_KEY_CLOSED: startBound = BoundType.CLOSED; startKey = btRange.getStartKeyClosed(); break; case STARTKEY_NOT_SET: startBound = BoundType.CLOSED; startKey = ByteString.EMPTY; break; default: throw new IllegalArgumentException("Unexpected start key case: " + btRange.getStartKeyCase()); } final boolean startUnbounded = startKey.isEmpty(); final BoundType endBound; final ByteString endKey; switch (btRange.getEndKeyCase()) { case END_KEY_OPEN: endBound = BoundType.OPEN; endKey = btRange.getEndKeyOpen(); break; case END_KEY_CLOSED: endBound = BoundType.CLOSED; endKey = btRange.getEndKeyClosed(); break; case ENDKEY_NOT_SET: endBound = BoundType.OPEN; endKey = ByteString.EMPTY; break; default: throw new IllegalArgumentException("Unexpected end key case: " + btRange.getEndKeyCase()); } return boundedRange(startBound, startKey, endBound, endKey); }

Target:
private Range<RowKeyWrapper> rowRangeToRange(RowRange btRange) { final BoundType startBound; final ByteString startKey; switch (btRange.getStartKeyCase()) { case START_KEY_OPEN: startBound = BoundType.OPEN; startKey = btRange.getStartKeyOpen(); break; case START_KEY_CLOSED: startBound = BoundType.CLOSED; startKey = btRange.getStartKeyClosed(); break; case STARTKEY_NOT_SET: startBound = BoundType.CLOSED; startKey = ByteString.EMPTY; break; default: throw new IllegalArgumentException("Unexpected start key case: " + btRange.getStartKeyCase()); } final BoundType endBound; final ByteString endKey; switch (btRange.getEndKeyCase()) { case END_KEY_OPEN: endBound = BoundType.OPEN; endKey = btRange.getEndKeyOpen(); break; case END_KEY_CLOSED: endBound = BoundType.CLOSED; endKey = btRange.getEndKeyClosed(); break; case ENDKEY_NOT_SET: endBound = BoundType.OPEN; endKey = ByteString.EMPTY; break; default: throw new IllegalArgumentException("Unexpected end key case: " + btRange.getEndKeyCase()); } return boundedRange(startBound, startKey, endBound, endKey); }
Source:
public StreamExecutionListener getBuffer( String query, int windowSize, long windowMillis ) { String cacheId = getCacheKey( query, windowSize, windowMillis ); StreamExecutionListener streamListener = serviceListeners.getIfPresent( cacheId ); if ( streamListener == null ) { if ( stepStream == null ) { stepStream = new StreamList<>(); } Observable<List<RowMetaAndData>> buffer = windowMillis > 0 ? windowSize > 0 ? stepStream.getStream().buffer( windowMillis, TimeUnit.MILLISECONDS, windowSize ) : stepStream.getStream().buffer( windowMillis, TimeUnit.MILLISECONDS ) : stepStream.getStream().buffer( windowSize ); streamListener = new StreamExecutionListener( buffer ); serviceListeners.put( cacheId, streamListener ); } if ( !isRunning.get() ) { isRunning.compareAndSet( false, true ); startService(); } return streamListener; }

Target:
public StreamExecutionListener getBuffer( String query, int windowSize, long windowMillis ) { String cacheId = getCacheKey( query, windowSize, windowMillis ); StreamExecutionListener streamListener = serviceListeners.getIfPresent( cacheId ); if ( streamListener == null ) { if ( stepStream == null ) { stepStream = new StreamList<>(); } Observable<List<RowMetaAndData>> buffer = windowMillis > 0 ? windowSize > 0 ? stepStream.getStream().buffer( windowMillis, TimeUnit.MILLISECONDS, windowSize ) : stepStream.getStream().buffer( windowMillis, TimeUnit.MILLISECONDS ) : stepStream.getStream().buffer( windowSize ); streamListener = new StreamExecutionListener( buffer ); serviceListeners.put( cacheId, streamListener ); } if ( isRunning.compareAndSet( false, true ) ) { startService(); } return streamListener; }
Source:
public ASTAnnotation getAnnotation(String annotQualifiedName) { List<ASTAnnotation> annotations = getDeclaredAnnotations(); for (ASTAnnotation annotation : annotations) { if (annotation.getType() != null) { if (annotQualifiedName.equals(annotation.getType().getName())) { return annotation; } } else { ASTName name = annotation.getFirstDescendantOfType(ASTName.class); if (name != null && TypeHelper.isA(name, annotQualifiedName)) { return annotation; } } } return null; }

Target:
public ASTAnnotation getAnnotation(String annotQualifiedName) { List<ASTAnnotation> annotations = getDeclaredAnnotations(); for (ASTAnnotation annotation : annotations) { ASTName name = annotation.getFirstDescendantOfType(ASTName.class); if (name != null && TypeHelper.isA(name, annotQualifiedName)) { return annotation; } } return null; }
Source:
public static void before() { System.setProperty("cassandra.nodetool.jmx_notification_poll_interval_seconds", "1"); DatabaseDescriptor.clientInitialization(); }

Target:
public static void before() { System.setProperty("cassandra.nodetool.jmx_notification_poll_interval_seconds", "1"); }
Source:
private void loadProperties() { try { FileUtil.loadProperties(Latex2HTMLzero, getClass(), "Latex2HTMLzero.properties"); } catch (IOException e) { GlobalSettings.kem.registerCriticalError("error loading " + "Latex2HTMLzero.properties", e); } try { FileUtil.loadProperties(Latex2HTMLone, getClass(), "Latex2HTMLone.properties"); } catch (IOException e) { GlobalSettings.kem.registerCriticalError("error loading Latex2HTMLone.properties", e); } }

Target:
private void loadProperties() { try { FileUtil.loadProperties(Latex2HTMLzero, getClass(), "Latex2HTMLzero.properties"); } catch (IOException e) { GlobalSettings.kem.registerCriticalError("error loading Latex2HTMLzero.properties", e); } try { FileUtil.loadProperties(Latex2HTMLone, getClass(), "Latex2HTMLone.properties"); } catch (IOException e) { GlobalSettings.kem.registerCriticalError("error loading Latex2HTMLone.properties", e); } }