auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void testExecute() throws Exception { InstructorAttributes instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); CourseAttributes courseAttributes = logic.getCourse(instructor1OfCourse1.getCourseId()); loginAsInstructor(instructor1OfCourse1.googleId); ______TS("Not enough parameters"); verifyHttpParameterFailure(); ______TS("typical success case for instructor"); String[] params = { Const.ParamsNames.COURSE_ID, instructor1OfCourse1.getCourseId(), }; GetCourseAction getCourseAction = getAction(params); JsonResult response = getJsonResult(getCourseAction); assertEquals(HttpStatus.SC_OK, response.getStatusCode()); CourseData courseData = (CourseData) response.getOutput(); assertEquals(courseAttributes.getId(), courseData.getCourseId()); assertEquals(courseAttributes.getName(), courseData.getCourseName()); assertEquals(courseAttributes.getTimeZone().getId(), courseData.getTimeZone()); }

Target:
protected void testExecute() throws Exception { }
Source:
public void registerHandler(HandlerRegistration reg) { if (reg != null && !handlerRegistrations.contains(reg)) { handlerRegistrations.add(reg); } }

Target:
public final void registerHandler(HandlerRegistration reg) { if (reg != null && !handlerRegistrations.contains(reg)) { handlerRegistrations.add(reg); } }
Source:
public void startEditingCellPointCoordinateWithinGridBounds() { final ArgumentCaptor<GridBodyCellRenderContext> contextArgumentCaptor = ArgumentCaptor.forClass(GridBodyCellRenderContext.class); final ArgumentCaptor<GridBodyCellEditContext> editContextArgumentCaptor = ArgumentCaptor.forClass(GridBodyCellEditContext.class); cellSelectionManager.startEditingCell(new Point2D(150, 42)); verify(col2, times(1)).edit(any(GridCell.class), contextArgumentCaptor.capture(), any(Callback.class)); verify(col2, times(1)).edit(any(GridCell.class), editContextArgumentCaptor.capture(), any(Callback.class)); final GridBodyCellRenderContext context = contextArgumentCaptor.getValue(); assertEquals(0, context.getRowIndex()); assertEquals(1, context.getColumnIndex()); final GridBodyCellEditContext editContext = editContextArgumentCaptor.getValue(); assertTrue(editContext.getRelativeLocation().isPresent()); assertEquals(150, editContext.getRelativeLocation().get().getX(), 0.0); assertEquals(42, editContext.getRelativeLocation().get().getY(), 0.0); }

Target:
public void startEditingCellPointCoordinateWithinGridBounds() { final ArgumentCaptor<GridBodyCellRenderContext> contextArgumentCaptor = ArgumentCaptor.forClass(GridBodyCellRenderContext.class); final ArgumentCaptor<GridBodyCellEditContext> editContextArgumentCaptor = ArgumentCaptor.forClass(GridBodyCellEditContext.class); final Point2D editedAtPoint = new Point2D(150, 42); cellSelectionManager.startEditingCell(editedAtPoint); verify(col2, times(1)).edit(any(GridCell.class), contextArgumentCaptor.capture(), any(Callback.class)); verify(col2, times(1)).edit(any(GridCell.class), editContextArgumentCaptor.capture(), any(Callback.class)); final GridBodyCellRenderContext context = contextArgumentCaptor.getValue(); assertEquals(0, context.getRowIndex()); assertEquals(1, context.getColumnIndex()); final GridBodyCellEditContext editContext = editContextArgumentCaptor.getValue(); assertTrue(editContext.getRelativeLocation().isPresent()); assertEquals(editedAtPoint, editContext.getRelativeLocation().get()); }
Source:
public void shiftColumns(int startColumn, int endColumn, int n){ throw new RuntimeException("NotImplemented"); }

Target:
public void shiftColumns(int startColumn, int endColumn, int n){ throw new UnsupportedOperationException("NotImplemented"); }
Source:
public DocumentModelList getRegistrationsForUser(final String docId, final String username, final String configurationName) { final DocumentModelList registrationDocs = new DocumentModelListImpl(); new UnrestrictedSessionRunner(getTargetRepositoryName()) { @Override public void run() { String query = "SELECT * FROM Document WHERE ecm:currentLifeCycleState != 'validated' AND" + " ecm:mixinType = '" + getConfiguration(configurationName).getRequestDocType() + "' AND docinfo:documentId = '%s' AND " + getConfiguration(configurationName).getUserInfoUsernameField() + " = '%s' AND ecm:isVersion = 0"; query = String.format(query, docId, username); registrationDocs.addAll(session.query(query)); } }.runUnrestricted(); return registrationDocs; }

Target:
public DocumentModelList getRegistrationsForUser(final String docId, final String username, final String configurationName) { final DocumentModelList registrationDocs = new DocumentModelListImpl(); new UnrestrictedSessionRunner(getTargetRepositoryName()) { @Override public void run() { String query = "SELECT * FROM Document WHERE ecm:currentLifeCycleState != 'validated'" + " AND ecm:mixinType = '%s' AND docinfo:documentId = '%s'" + " AND %s = '%s' AND ecm:isVersion = 0"; UserRegistrationConfiguration configuration = getConfiguration(configurationName); query = String.format(query, configuration.getRequestDocType(), docId, configuration.getUserInfoUsernameField(), username); registrationDocs.addAll(session.query(query)); } }.runUnrestricted(); return registrationDocs; }
Source:
public void verifyDisablingOfTracker() throws Exception { AbfsPerfTracker abfsPerfTracker = new AbfsPerfTracker(accountName, filesystemName, false); String latencyDetails = abfsPerfTracker.getClientLatency(); assertThat(latencyDetails).describedAs("AbfsPerfTracker should be empty").isNull(); try (AbfsPerfInfo tracker = new AbfsPerfInfo(abfsPerfTracker, "disablingCaller", "disablingCallee")) { tracker.registerResult(new AbfsHttpOperation(url, "GET", new ArrayList<>())).registerSuccess(true); } latencyDetails = abfsPerfTracker.getClientLatency(); assertThat(latencyDetails).describedAs("AbfsPerfTracker should return no record").isNull(); }

Target:
public void verifyDisablingOfTracker() throws Exception { AbfsPerfTracker abfsPerfTracker = new AbfsPerfTracker(accountName, filesystemName, false); String latencyDetails = abfsPerfTracker.getClientLatency(); assertThat(latencyDetails).describedAs("AbfsPerfTracker should be empty").isNull(); try (AbfsPerfInfo tracker = new AbfsPerfInfo(abfsPerfTracker, "disablingCaller", "disablingCallee")) { AbfsHttpOperation op = new AbfsHttpOperation(url, "GET", new ArrayList<>()); tracker.registerResult(op).registerSuccess(true); } latencyDetails = abfsPerfTracker.getClientLatency(); assertThat(latencyDetails).describedAs("AbfsPerfTracker should return no record").isNull(); }
Source:
public void visitMethod(MethodTree tree) { if (!isEquals(tree)) { super.visitMethod(tree); } }

Target:
public final void visitMethod(MethodTree tree) { if (!isEquals(tree)) { super.visitMethod(tree); } }
Source:
public String getPasswordFormat() { return passwordFormat; }

Target:
public PasswordFormat getPasswordFormat() { return passwordFormat; }
Source:
public static String getDebugStringFromDRId(long drId) { if (drId == Long.MAX_VALUE) { return "QUEUE EMPTY"; } if (drId < 0) { return String.format("%d", drId); } return String.format("%d:%d", getClusterIdFromDRId(drId), getSequenceNumberFromDRId(drId)); }

Target:
public static String getDebugStringFromDRId(long drId) { if (drId == Long.MAX_VALUE) { return "QUEUE EMPTY"; } if (isEmptyDRId(drId)) { return String.format("%d:Empty DR ID", getClusterIdFromDRId(drId)); } if (isInitialAckDRId(drId)) { if (drId == -1) { return "0:Init Ack ID"; } return String.format("%d:Init Ack ID", getClusterIdFromDRId(drId) + 1); } return String.format("%d:%d", getClusterIdFromDRId(drId), getSequenceNumberFromDRId(drId)); }
Source:
public void onProcessSelectionEvent(@Observes ProcessInstanceSelectionEvent event) { boolean resetTabs = (processInstanceId != event.getProcessInstanceId()); deploymentId = event.getDeploymentId(); processId = event.getProcessDefId(); processInstanceId = event.getProcessInstanceId(); serverTemplateId = event.getServerTemplateId(); selectedDeploymentId = event.getDeploymentId(); selectedProcessInstanceStatus = event.getProcessInstanceStatus(); selectedProcessDefName = event.getProcessDefName(); setIsForLog(event.isForLog()); changeTitleWidgetEvent.fire(new ChangeTitleWidgetEvent(this.place, String.valueOf(processInstanceId) + " - " + selectedProcessDefName)); boolean signalAbortVisible = false; if (isForLog()) { view.displayOnlyLogTab(); } else { if (selectedProcessInstanceStatus == ProcessInstance.STATE_ACTIVE) { signalAbortVisible = true; } view.displayAllTabs(); } setSignalAbortActionsVisible(signalAbortVisible); if (resetTabs) { view.resetTabs(event.isForLog()); } }

Target:
public void onProcessSelectionEvent(@Observes ProcessInstanceSelectionEvent event) { boolean refreshDetails = (event != null && event.getProcessInstanceId() != null && event.getProcessInstanceId().equals(processInstanceId)); deploymentId = event.getDeploymentId(); processId = event.getProcessDefId(); processInstanceId = event.getProcessInstanceId(); serverTemplateId = event.getServerTemplateId(); selectedDeploymentId = event.getDeploymentId(); selectedProcessInstanceStatus = event.getProcessInstanceStatus(); selectedProcessDefName = event.getProcessDefName(); setIsForLog(event.isForLog()); changeTitleWidgetEvent.fire(new ChangeTitleWidgetEvent(this.place, String.valueOf(processInstanceId) + " - " + selectedProcessDefName)); boolean signalAbortVisible = false; if (isForLog()) { view.displayOnlyLogTab(); } else { if (selectedProcessInstanceStatus == ProcessInstance.STATE_ACTIVE) { signalAbortVisible = true; } view.displayAllTabs(); } setSignalAbortActionsVisible(signalAbortVisible); if (!refreshDetails) { view.resetTabs(event.isForLog()); } }
Source:
public TaskConfig convertJsonToTaskConfig(String configJson) { Map<String, Object> configMap = (Map) new GsonBuilder().create().fromJson(configJson, Object.class); TaskConfig taskConfig = new TaskConfig(); for (Map.Entry<String, Object> entry : configMap.entrySet()) { TaskConfigProperty property = new TaskConfigProperty(entry.getKey(), null); Map propertyValue = (Map) entry.getValue(); if (propertyValue != null) { property.withDefault((String) propertyValue.get("default-value")); property.with(Property.SECURE, (Boolean) propertyValue.get("secure")); property.with(Property.REQUIRED, (Boolean) propertyValue.get("required")); property.with(Property.DISPLAY_NAME, (String) propertyValue.get("display-name")); if (!StringUtil.isBlank((String) propertyValue.get("display-order"))) { property.with(Property.DISPLAY_ORDER, Integer.parseInt((String) propertyValue.get("display-order"))); } } taskConfig.add(property); } return taskConfig; }

Target:
public TaskConfig convertJsonToTaskConfig(String configJson) { Map<String, Object> configMap = (Map) new GsonBuilder().create().fromJson(configJson, Object.class); TaskConfig taskConfig = new TaskConfig(); for (Map.Entry<String, Object> entry : configMap.entrySet()) { TaskConfigProperty property = new TaskConfigProperty(entry.getKey(), null); Map propertyValue = (Map) entry.getValue(); if (propertyValue != null) { property.withDefault((String) propertyValue.get("default-value")); property.with(Property.SECURE, (Boolean) propertyValue.get("secure")); property.with(Property.REQUIRED, (Boolean) propertyValue.get("required")); } taskConfig.add(property); } return taskConfig; }
Source:
private List<Service> getServices(String serviceClass, String serviceFilter, boolean ocdRequired) throws InvalidSyntaxException { List<Service> serviceList = new ArrayList<>(); String newFilter = null; if (serviceFilter != null) { newFilter = serviceFilter.replace("service.factoryPid", "service.pid"); } ServiceReference[] refs = this.getBundleContext().getAllServiceReferences(serviceClass, newFilter); for (int i = 0; refs != null && i < refs.length; i++) { Object pidObject = refs[i].getProperty(SERVICE_PID); if (pidObject instanceof String && isAllowedPid((String) pidObject)) { String pid = (String) pidObject; String name = pid; boolean haveOcd = !ocdRequired; final ObjectClassDefinition ocd = getObjectClassDefinition(refs[i].getBundle(), pid); if (ocd != null) { name = ocd.getName(); haveOcd = true; } if (haveOcd) { Service service = new ServiceImpl(); service.setId(pid); if(StringUtils.isNotEmpty(ocd.getDescription())) { service.setDescription(ocd.getDescription()); } service.setName(name); serviceList.add(service); } } } return serviceList .stream() .filter(service -> isPermittedToViewService(service.getId())) .collect(Collectors.toList()); }

Target:
private List<Service> getServices(String serviceClass, String serviceFilter, boolean ocdRequired) throws InvalidSyntaxException { List<Service> serviceList = new ArrayList<>(); String newFilter = null; if (serviceFilter != null) { newFilter = serviceFilter.replace("service.factoryPid", "service.pid"); } ServiceReference[] refs = this.getBundleContext().getAllServiceReferences(serviceClass, newFilter); for (int i = 0; refs != null && i < refs.length; i++) { Object pidObject = refs[i].getProperty(SERVICE_PID); if (pidObject instanceof String && isAllowedPid((String) pidObject)) { String pid = (String) pidObject; String name = pid; boolean haveOcd = !ocdRequired; final ObjectClassDefinition ocd = getObjectClassDefinition(refs[i].getBundle(), pid); if (ocd != null) { name = ocd.getName(); haveOcd = true; } if (haveOcd) { Service service = new ServiceImpl(); String description = ocd.getDescription(); service.setId(pid); if (StringUtils.isNotEmpty(description)) { service.setDescription(description); } service.setName(name); serviceList.add(service); } } } return serviceList .stream() .filter(service -> isPermittedToViewService(service.getId())) .collect(Collectors.toList()); }
Source:
EventHubProperties( final String name, final Instant createdAt, final String[] partitionIds) { this.name = name; this.createdAt = createdAt; this.partitionIds = partitionIds != null ? new IterableStream<>(Arrays.asList(partitionIds)) : new IterableStream<>(Collections.emptyList()); }

Target:
EventHubProperties(final String name, final Instant createdAt, final String[] partitionIds) { this.name = Objects.requireNonNull(name, "'name' cannot be null."); this.createdAt = Objects.requireNonNull(createdAt, "'createdAt' cannot be null."); this.partitionIds = new IterableStream<>(Arrays.asList( Objects.requireNonNull(partitionIds, "'partitionIds' cannot be null."))); }
Source:
public void warmup() { log.info("===WARMUP==="); values = new String[valueCount]; for (int k = 0; k < values.length; k++) { values[k] = makeString(valueLength); } for (int i = 0; i < maxMaps; i++) { IMap map = targetInstance.getMap(basename + i); for (int count = 0; count < mapEntryListenerCount; count++) { EntryListenerImpl l = new EntryListenerImpl(mapEntryListenerDelayMills); listeners.add(l); map.addEntryListener(l, true); } for (int count = 0; count < localMapEntryListenerCount; count++) { EntryListenerImpl l = new EntryListenerImpl(localMapEntryListenerDelayMills); listeners.add(l); map.addLocalEntryListener(l); } int v = 0; for (int k = 0; k < keyCount; k++) { map.put(k, values[v]); v = (v + 1 == values.length ? 0 : v + 1); } } log.info("===WARMUP==="); }

Target:
public void warmup() { values = new String[valueCount]; for (int k = 0; k < values.length; k++) { values[k] = makeString(valueLength); } for (int i = 0; i < maxMaps; i++) { IMap map = targetInstance.getMap(basename + i); for (int count = 0; count < mapEntryListenerCount; count++) { EntryListenerImpl l = new EntryListenerImpl(mapEntryListenerDelayMills); listeners.add(l); map.addEntryListener(l, true); } for (int count = 0; count < localMapEntryListenerCount; count++) { EntryListenerImpl l = new EntryListenerImpl(localMapEntryListenerDelayMills); listeners.add(l); map.addLocalEntryListener(l); } int v = 0; for (int k = 0; k < keyCount; k++) { map.put(k, values[v]); v = (v + 1 == values.length ? 0 : v + 1); } } }
Source:
public FeatureScenario[] getFeatureDetails() { List<Feature> features = Features.getFeatures(); FeatureScenario[] list_tfs = new FeatureScenario[0]; for (Feature feature : features){ String featureName = feature.getName(); String deviceName = feature.getDeviceName(); Element[] scenarios = feature.getElements(); for (Element scenario : scenarios){ if(scenario.isScenario()){ String scenarioName = scenario.getName(); String scenarioStatus = scenario.getStatus().toString(); String line = scenario.getLine(); FeatureScenario trendFeatureScenario = new FeatureScenario(deviceName, featureName, scenarioName, scenarioStatus,line); list_tfs = (FeatureScenario[]) ArrayUtils.add(list_tfs, trendFeatureScenario); } } } return list_tfs; }

Target:
public FeatureScenario[] getFeatureDetails() { FeatureScenario[] featureScenarios = new FeatureScenario[0]; for (Feature feature : features){ String featureName = feature.getName(); String deviceName = feature.getDeviceName(); Element[] scenarios = feature.getElements(); for (Element scenario : scenarios){ if(scenario.isScenario()){ String scenarioName = scenario.getName(); String scenarioStatus = scenario.getStatus().toString(); String line = scenario.getLine(); FeatureScenario trendFeatureScenario = new FeatureScenario(deviceName, featureName, scenarioName, scenarioStatus,line); featureScenarios = (FeatureScenario[]) ArrayUtils.add(featureScenarios, trendFeatureScenario); } } } return featureScenarios; }
Source:
public void contextInitialized(ServletContextEvent sce) { servletContext = sce.getServletContext(); final JGitFileSystemProvider fsProvider = resolveProvider(); if (fsProvider != null && fsProvider.getConfig().isHttpEnabled()) { if (fsProvider.getConfig().isHttpEnabled()) { fsProvider.addHostName("http", fsProvider.getConfig().getHttpHostName() + ":" + fsProvider.getConfig().getHttpPort() + servletContext.getContextPath() + "/" + GIT_PATH); } if (fsProvider.getConfig().isHttpsEnabled()) { fsProvider.addHostName("https", fsProvider.getConfig().getHttpsHostName() + ":" + fsProvider.getConfig().getHttpsPort() + servletContext.getContextPath() + "/" + GIT_PATH); } final GitServlet gitServlet = new GitServlet(); gitServlet.setRepositoryResolver(fsProvider.getRepositoryResolver()); gitServlet.setAsIsFileService(null); gitServlet.setReceivePackFactory((req, db) -> fsProvider.getReceivePack("http", req, db)); ServletRegistration.Dynamic sd = servletContext.addServlet("GitServlet", gitServlet); sd.addMapping("/" + GIT_PATH + "/*"); sd.setLoadOnStartup(1); sd.setAsyncSupported(false); } }

Target:
public void contextInitialized(ServletContextEvent sce) { servletContext = sce.getServletContext(); final JGitFileSystemProvider fsProvider = resolveProvider(); if (fsProvider != null && (fsProvider.getConfig().isHttpEnabled() || fsProvider.getConfig().isHttpsEnabled())) { if (fsProvider.getConfig().isHttpEnabled()) { fsProvider.addHostName("http", fsProvider.getConfig().getHttpHostName() + ":" + fsProvider.getConfig().getHttpPort() + servletContext.getContextPath() + "/" + GIT_PATH); } if (fsProvider.getConfig().isHttpsEnabled()) { fsProvider.addHostName("https", fsProvider.getConfig().getHttpsHostName() + ":" + fsProvider.getConfig().getHttpsPort() + servletContext.getContextPath() + "/" + GIT_PATH); } final GitServlet gitServlet = new GitServlet(); gitServlet.setRepositoryResolver(fsProvider.getRepositoryResolver()); gitServlet.setAsIsFileService(null); gitServlet.setReceivePackFactory((req, db) -> fsProvider.getReceivePack("http", req, db)); ServletRegistration.Dynamic sd = servletContext.addServlet("GitServlet", gitServlet); sd.addMapping("/" + GIT_PATH + "/*"); sd.setLoadOnStartup(1); sd.setAsyncSupported(false); } }
Source:
public boolean onContextItemSelected(final MenuItem item) { BitmapDrawable currentDrawable = (BitmapDrawable) currentView.getDrawable(); switch (item.getItemId()) { case R.id.image_open_file: viewImageInStandardApp(currentImage, currentDrawable); return true; case R.id.image_open_browser: if (currentImage != null) { currentImage.openInBrowser(activity); } return true; case R.id.menu_navigate: final Geopoint geopoint = geoPoints.get(currentView.getId()); if (geopoint != null) { NavigationAppFactory.showNavigationMenu(activity, null, null, geopoint); } return true; default: return false; } }

Target:
public boolean onContextItemSelected(final MenuItem item) { final BitmapDrawable currentDrawable = (BitmapDrawable) currentView.getDrawable(); switch (item.getItemId()) { case R.id.image_open_file: viewImageInStandardApp(currentImage, currentDrawable); return true; case R.id.image_open_browser: if (currentImage != null) { currentImage.openInBrowser(activity); } return true; case R.id.menu_navigate: final Geopoint geopoint = geoPoints.get(currentView.getId()); if (geopoint != null) { NavigationAppFactory.showNavigationMenu(activity, null, null, geopoint); } return true; default: return false; } }
Source:
public void startSchedulingTasks() { Thread taskSchedulingThread = new Thread(taskScheduler); taskSchedulingThread.start(); }

Target:
public void startSchedulingTasks() { Thread.UncaughtExceptionHandler h = new Thread.UncaughtExceptionHandler() { @Override public void uncaughtException(Thread thread, Throwable throwable) { log.error("Unknow exception was caught in TaskScheduler", throwable); } }; Thread t = new Thread(taskScheduler); t.setUncaughtExceptionHandler(h); t.start(); }
Source:
public List<CatalogPartitionSpec> listPartitionsByFilter(ObjectPath tablePath, List<Expression> filters) throws TableNotExistException, TableNotPartitionedException, CatalogException { if (!supportListPartitionByFilter) { throw new UnsupportedOperationException("TestValuesCatalog doesn't support list partition by filters"); } List<CatalogPartitionSpec> partitions = listPartitions(tablePath); if (partitions.isEmpty()) { return partitions; } CatalogBaseTable table = this.getTable(tablePath); TableSchema schema = table.getSchema(); TestValuesTableFactory.FilterUtil util = TestValuesTableFactory.FilterUtil.INSTANCE; List<CatalogPartitionSpec> remainingPartitions = new ArrayList<>(); for (CatalogPartitionSpec partition : partitions) { boolean isRetained = true; Function<String, Comparable<?>> gettter = getGetter(partition.getPartitionSpec(), schema); for (Expression predicate : filters) { isRetained = util.isRetainedAfterApplyingFilterPredicates((ResolvedExpression) predicate, gettter); if (!isRetained) { break; } } if (isRetained) { remainingPartitions.add(partition); } } return remainingPartitions; }

Target:
public List<CatalogPartitionSpec> listPartitionsByFilter(ObjectPath tablePath, List<Expression> filters) throws TableNotExistException, TableNotPartitionedException, CatalogException { if (!supportListPartitionByFilter) { throw new UnsupportedOperationException("TestValuesCatalog doesn't support list partition by filters"); } List<CatalogPartitionSpec> partitions = listPartitions(tablePath); if (partitions.isEmpty()) { return partitions; } CatalogBaseTable table = this.getTable(tablePath); TableSchema schema = table.getSchema(); List<ResolvedExpression> resolvedExpressions = filters.stream() .map(filter -> { if (filter instanceof ResolvedExpression) { return (ResolvedExpression) filter; } throw new UnsupportedOperationException( String.format("TestValuesCatalog only works with resolved expressions. Get unresolved expression: %s", filter)); }) .collect(Collectors.toList()); return partitions.stream() .filter( partition -> { Function<String, Comparable<?>> getter = getValueGetter(partition.getPartitionSpec(), schema); return FilterUtils.isRetainedAfterApplyingFilterPredicates(resolvedExpressions, getter); }) .collect(Collectors.toList()); }
Source:
public UpdateStackRequest createUpdateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String subnet, String cfTemplate) { return new UpdateStackRequest() .withStackName(cFStackName) .withTemplateBody(cfTemplate) .withTags(awsTaggingService.prepareCloudformationTags(ac, stack.getTags())) .withCapabilities(CAPABILITY_IAM) .withParameters(getStackParameters(ac, stack, cFStackName, subnet)); }

Target:
public UpdateStackRequest createUpdateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String subnet, String cfTemplate) { return new UpdateStackRequest() .withStackName(cFStackName) .withParameters(getStackParameters(ac, stack, cFStackName, subnet)) .withTemplateBody(cfTemplate) .withTags(awsTaggingService.prepareCloudformationTags(ac, stack.getTags())) .withCapabilities(CAPABILITY_IAM); }
Source:
public void validateParam(Object obj) throws Exception { ProxiesParamProxy mainProxy = getMainProxyPanel().getProxy(); String newAddress = mainProxy.getAddress(); int newPort = mainProxy.getPort(); if (!this.currentAddress.equals(newAddress) || this.currentPort != newPort) { if (!extension.canListenOn(newAddress, newPort) || extension.getAdditionalProxy(newAddress, newPort) != null) { throw new Exception(Constant.messages.getString("options.proxy.dialog.proxy.warning.fail.message")); } } }

Target:
public void validateParam(Object obj) throws Exception { getSecurityProtocolsPanel().validateSecurityProtocols(); ProxiesParamProxy mainProxy = getMainProxyPanel().getProxy(); String newAddress = mainProxy.getAddress(); int newPort = mainProxy.getPort(); if (!this.currentAddress.equals(newAddress) || this.currentPort != newPort) { if (!extension.canListenOn(newAddress, newPort) || extension.getAdditionalProxy(newAddress, newPort) != null) { throw new Exception( Constant.messages.getString("options.proxy.dialog.proxy.warning.fail.message", newAddress, newPort)); } } }
Source:
public ClientNettyPipelineBuilder addFraming() { add( "frame_encoder", new LengthFieldPrepender( 4 ) ); add( "frame_decoder", new LengthFieldBasedFrameDecoder( Integer.MAX_VALUE, 0, 4, 0, 4 ) ); return this; }

Target:
public ClientNettyPipelineBuilder addFraming() { add( "frame_encoder", new LengthFieldPrepender( LENGTH_FIELD_BYTES ) ); add( "frame_decoder", new LengthFieldBasedFrameDecoder( Integer.MAX_VALUE, 0, LENGTH_FIELD_BYTES, 0, LENGTH_FIELD_BYTES ) ); return this; }
Source:
public CallBatcher<Void, E> forArgsGenerator(CallArgsGenerator<E> generator, String forestName) { return new CallBatcherImpl(client, caller, Void.class, generator, forestName); }

Target:
public CallBatcher<Void, E> forArgsGenerator(CallArgsGenerator<E> generator, String forestName) { return new CallBatcherImpl(client, caller, Void.class, generator, forestName).finishConstruction(); }
Source:
public void deliver(final VoltMessage message) { if (SCHEDULE_IN_SITE_THREAD) { this.m_scheduler.getQueue().offer(new SiteTasker.SiteTaskerRunnable() { private String taskInfo = ""; @Override void run() { synchronized (InitiatorMailbox.this) { deliverInternal(message); } } private SiteTasker.SiteTaskerRunnable init(VoltMessage message){ taskInfo = message.getMessageInfo(); return this; } @Override public String getTaskInfo() { return taskInfo; } }.init(message)); } else { synchronized (this) { deliverInternal(message); } } }

Target:
public void deliver(final VoltMessage message) { if (SCHEDULE_IN_SITE_THREAD) { this.m_scheduler.getQueue().offer(new SiteTasker.SiteTaskerRunnable() { @Override void run() { synchronized (InitiatorMailbox.this) { deliverInternal(message); } } private SiteTasker.SiteTaskerRunnable init(VoltMessage message){ taskInfo = message.getMessageInfo(); return this; } }.init(message)); } else { synchronized (this) { deliverInternal(message); } } }
Source:
public @ResponseBody ObjectSpecification initializeMultipartUpload( @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = true) final String accessToken, @PathVariable(value = "object-id") String objectId, @RequestParam(value = "overwrite", required = false, defaultValue = "false") boolean overwrite, @RequestParam(value = "fileSize", required = true) long fileSize, @RequestParam(value = "md5", required = false) String md5, @RequestHeader(value = "User-Agent", defaultValue = "unknown") String userAgent, HttpServletRequest request) { log.info("Request received from client {}", userAgent); String ipAddress = request.getHeader(com.google.common.net.HttpHeaders.X_FORWARDED_FOR); if (ipAddress == null) { ipAddress = request.getRemoteAddr(); } log.info( "Initiating upload of object id with access token (MD5) having size of from using client version {}", objectId, TokenHasher.hashToken(accessToken), Long.toString(fileSize), ipAddress, userAgent); return uploadService.initiateUpload(objectId, fileSize, md5, overwrite); }

Target:
public @ResponseBody ObjectSpecification initializeMultipartUpload( @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = true) final String accessToken, @PathVariable(value = "object-id") String objectId, @RequestParam(value = "overwrite", required = false, defaultValue = "false") boolean overwrite, @RequestParam(value = "fileSize", required = true) long fileSize, @RequestParam(value = "md5", required = false) String md5, @RequestHeader(value = "User-Agent", defaultValue = "unknown") String userAgent, HttpServletRequest request) { log.info("Request received from client {}", userAgent); val ipAddress = RequestHeaderUtils.getIpAddress(request); log.info( "Initiating upload of object id with access token (MD5) having size of from using client version {}", objectId, TokenHasher.hashToken(accessToken), Long.toString(fileSize), ipAddress, userAgent); return uploadService.initiateUpload(objectId, fileSize, md5, overwrite); }
Source:
public void destroy() throws Exception { for (ConnectionFactory connectionFactory : this.nodeFactories.values()) { ((DisposableBean) connectionFactory).destroy(); } if (this.defaultConnectionFactory instanceof DisposableBean) { ((DisposableBean) this.defaultConnectionFactory).destroy(); } }

Target:
public void destroy() throws Exception { for (ConnectionFactory connectionFactory : this.nodeFactories.values()) { if (connectionFactory instanceof DisposableBean) { ((DisposableBean) connectionFactory).destroy(); } } if (this.defaultConnectionFactory instanceof DisposableBean) { ((DisposableBean) this.defaultConnectionFactory).destroy(); } }
Source:
public void refreshableIsRepopulatedWithNewSupplierValuesAfterTheRefreshIntervalPasses() { AtomicLong atomicLong = new AtomicLong(); PollingRefreshable<Long> pollingRefreshable = PollingRefreshable.createWithSpecificPoller( atomicLong::incrementAndGet, scheduler); Refreshable<Long> refreshable = pollingRefreshable.getRefreshable(); assertThat(refreshable.getAndClear()).isPresent().contains(1L); scheduler.tick(PollingRefreshable.POLL_INTERVAL.toMillis() + 1, TimeUnit.MILLISECONDS); assertThat(refreshable.getAndClear()).isPresent().contains(2L); scheduler.tick(PollingRefreshable.POLL_INTERVAL.toMillis() + 1, TimeUnit.MILLISECONDS); assertThat(refreshable.getAndClear()).isPresent().contains(3L); }

Target:
public void refreshableIsRepopulatedWithNewSupplierValuesAfterTheRefreshIntervalPasses() { AtomicLong atomicLong = new AtomicLong(); PollingRefreshable<Long> pollingRefreshable = createPollingRefreshableWithTestScheduler( atomicLong::incrementAndGet); Refreshable<Long> refreshable = pollingRefreshable.getRefreshable(); assertRefreshableContainsAndClear(refreshable, 1L); scheduler.tick(REFRESH_INTERVAL.toMillis() + 1, TimeUnit.MILLISECONDS); assertRefreshableContainsAndClear(refreshable, 2L); scheduler.tick(REFRESH_INTERVAL.toMillis() + 1, TimeUnit.MILLISECONDS); assertRefreshableContainsAndClear(refreshable, 3L); }
Source:
private void crawling() { try { URL url = new URL("<LINK_0>"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setConnectTimeout(10000); connection.setDoInput(true); connection.setRequestMethod("GET"); int respCode = connection.getResponseCode(); if (respCode == 200) { InputStream inputStream = connection.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int len; while ((len = inputStream.read(buffer, 0, buffer.length)) != -1) { out.write(buffer, 0, len); } String jsonStr = new String(out.toByteArray()); recentContestList = JSON.parseArray(jsonStr, RecentContestDTO.class); } } catch (IOException ignored) { } }

Target:
private void crawling() { try { URL url = new URL(REQUEST_URL); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setConnectTimeout(10000); connection.setDoInput(true); connection.setRequestMethod("GET"); int respCode = connection.getResponseCode(); if (respCode == 200) { InputStream inputStream = connection.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int length; while ((length = inputStream.read(buffer, 0, buffer.length)) != -1) { out.write(buffer, 0, length); } String jsonStr = new String(out.toByteArray()); recentContestList = JSON.parseArray(jsonStr, RecentContestDTO.class); } } catch (IOException ignored) { } }
Source:
protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { String sentence = (String) msg; int typeIndex = sentence.indexOf(":GT"); if (typeIndex < 0) { return null; } Object result; String type = sentence.substring(typeIndex + 3, typeIndex + 6); if (typeIndex >= 4 && sentence.startsWith("+ACK", typeIndex - 4)) { result = decodeAck(channel, remoteAddress, sentence, type); } else { switch (type) { case "INF": result = decodeInf(channel, remoteAddress, sentence); break; case "OBD": result = decodeObd(channel, remoteAddress, sentence); break; case "FRI": result = decodeFri(channel, remoteAddress, sentence); break; case "IGN": case "IGF": result = decodeIgn(channel, remoteAddress, sentence); break; case "IDA": result = decodeIda(channel, remoteAddress, sentence); break; default: result = decodeOther(channel, remoteAddress, sentence, type); break; } if (result == null) { result = decodeBasic(channel, remoteAddress, sentence); } if (result != null) { if (result instanceof Position) { ((Position) result).set(Position.KEY_TYPE, type); } else { for (Position p : (List<Position>) result) { p.set(Position.KEY_TYPE, type); } } } } return result; }

Target:
protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { String sentence = (String) msg; int typeIndex = sentence.indexOf(":GT"); if (typeIndex < 0) { return null; } Object result; String type = sentence.substring(typeIndex + 3, typeIndex + 6); if (sentence.startsWith("+ACK")) { result = decodeAck(channel, remoteAddress, sentence, type); } else { switch (type) { case "INF": result = decodeInf(channel, remoteAddress, sentence); break; case "OBD": result = decodeObd(channel, remoteAddress, sentence); break; case "FRI": result = decodeFri(channel, remoteAddress, sentence); break; case "IGN": case "IGF": result = decodeIgn(channel, remoteAddress, sentence); break; case "IDA": result = decodeIda(channel, remoteAddress, sentence); break; default: result = decodeOther(channel, remoteAddress, sentence, type); break; } if (result == null) { result = decodeBasic(channel, remoteAddress, sentence); } if (result != null) { if (result instanceof Position) { ((Position) result).set(Position.KEY_TYPE, type); } else { for (Position p : (List<Position>) result) { p.set(Position.KEY_TYPE, type); } } } } return result; }
Source:
public <A extends Annotation> boolean attributeOrRelationAnnotationExists( Class<?> cls, String fieldName, Class<A> annotationClass ) { ConcurrentHashMap<String, AccessibleObject> fieldOrMethods = getEntityBinding(cls).fieldsToValues; if (fieldOrMethods == null) { return false; } AccessibleObject fieldOrMethod = fieldOrMethods.get(fieldName); if (fieldOrMethod == null) { return false; } return getAttributeOrRelationAnnotation(cls, annotationClass, EntityBinding.getFieldName(fieldOrMethod)) != null; }

Target:
public <A extends Annotation> boolean attributeOrRelationAnnotationExists( Class<?> cls, String fieldName, Class<A> annotationClass ) { return getAttributeOrRelationAnnotation(cls, annotationClass, fieldName) != null; }
Source:
private static boolean isImperativeExpressionVisible(MImperativeExpression exp, final ExpressionContext eContext) { Object imperativeExpressionObject = exp.getObject(); if (imperativeExpressionObject == null) { IContributionFactory contributionFactory = eContext.eclipseContext.get(IContributionFactory.class); Object newImperativeExpression = contributionFactory.create(exp.getContributionURI(), eContext.eclipseContext); exp.setObject(newImperativeExpression); imperativeExpressionObject = newImperativeExpression; } if (imperativeExpressionObject == null) return false; Object result = null; if (exp.isTracking()) { result = invoke(imperativeExpressionObject, Evaluate.class, eContext.eclipseContext, null, missingEvaluate); } else { result = ContextInjectionFactory.invoke(imperativeExpressionObject, Evaluate.class, eContext.eclipseContext, null, missingEvaluate); } if (result == missingEvaluate) { String className="null"; if (imperativeExpressionObject != null) { className = imperativeExpressionObject.getClass().getName(); } throw new IllegalStateException( "There is no method annotated with @Evaluate in the " + className + " imperative expression class " ); } return (boolean) result; }

Target:
private static boolean isImperativeExpressionVisible(MImperativeExpression exp, final ExpressionContext eContext) { Object imperativeExpressionObject = exp.getObject(); if (imperativeExpressionObject == null) { IContributionFactory contributionFactory = eContext.eclipseContext.get(IContributionFactory.class); Object newImperativeExpression = contributionFactory.create(exp.getContributionURI(), eContext.eclipseContext); exp.setObject(newImperativeExpression); imperativeExpressionObject = newImperativeExpression; } if (imperativeExpressionObject == null) { return false; } Object result = null; if (exp.isTracking()) { result = invoke(imperativeExpressionObject, Evaluate.class, eContext.eclipseContext, null, missingEvaluate); } else { result = ContextInjectionFactory.invoke(imperativeExpressionObject, Evaluate.class, eContext.eclipseContext, null, missingEvaluate); } if (result == missingEvaluate) { String className="null"; if (imperativeExpressionObject != null) { className = imperativeExpressionObject.getClass().getName(); } throw new IllegalStateException( "There is no method annotated with @Evaluate in the " + className + " imperative expression class " ); } return (boolean) result; }
Source:
private void stressTestCreating(MotechDataService service, Class clazz) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException, ClassNotFoundException { EntityDto entityDto = entityService.getEntityByClassName(FOO_CLASS); for (int i = 0 ; i < TEST_INSTANCES; i++) { testInstances.add(generator.makeDummyInstance(entityDto.getId())); } Long startTime = System.nanoTime(); for (Object instance : testInstances) { service.create(instance); } double endTime = (System.nanoTime() - startTime) / 1000000; LOGGER.info("MDS Service: Creating " + TEST_INSTANCES + " instances took " + endTime + "ms."); logToFile(endTime); }

Target:
private void stressTestCreating(MotechDataService service, Class clazz) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException, ClassNotFoundException { EntityDto entityDto = entityService.getEntityByClassName(FOO_CLASS); for (int i = 0 ; i < TEST_INSTANCES; i++) { testInstances.add(generator.makeDummyInstance(entityDto.getId())); } Long startTime = System.nanoTime(); for (Object instance : testInstances) { service.create(instance); } Long endTime = (System.nanoTime() - startTime) / 1000000; LOGGER.info("MDS Service: Creating " + TEST_INSTANCES + " instances took " + endTime + "ms."); logToFile((double) endTime); }
Source:
public void restClientShouldPropagateSecurityContext() throws Exception { IgniteEx node1 = grid(0); TestSecurityProcessor secPrc = U.field(node1.context().security(), "secPrc"); List<TestSecurityProcessor.AuthorizeRecord> records = secPrc.getAuthorizeRecords(); records.clear(); Map<String, String> pie = new JettyRestProcessorAbstractSelfTest.VisorGatewayArgument(VisorQueryTask.class) .forNode(node1.localNode()) .argument(VisorQueryTaskArg.class, "pie", URLEncoder.encode("select * from pie", StandardCharsets.UTF_8.name()), false, false, false, false, 1); pie.put("user", "client"); pie.put("password", "client"); content(pie); for (TestSecurityProcessor.AuthorizeRecord record : records) assertEquals("client", record.getLogin()); }

Target:
public void restClientShouldPropagateSecurityContext() throws Exception { IgniteEx node1 = grid(0); TestSecurityProcessor secPrc = U.field(node1.context().security(), "secPrc"); List<TestSecurityProcessor.AuthorizeRecord> records = secPrc.getAuthorizeRecords(); records.clear(); String qry = URLEncoder.encode("select * from pie", StandardCharsets.UTF_8.name()); Map<String, String> pie = new JettyRestProcessorAbstractSelfTest.VisorGatewayArgument(VisorQueryTask.class) .forNode(node1.localNode()) .argument(VisorQueryTaskArg.class, "pie", qry, false, false, false, false, 1); pie.put("user", "client"); pie.put("password", "client"); content(pie); for (TestSecurityProcessor.AuthorizeRecord record : records) assertEquals("client", record.getLogin()); }
Source:
public String apply(String value) { return Strings.emptyToNull(String.format(format, value)); }

Target:
public String apply(String value) { return String.format(format, value); }
Source:
public static TaskFactory finalizeTaskFactory(TaskFactory factory, ExecutorService taskThreadPool) { validateFactory(factory); boolean isAsyncTaskClass = factory instanceof AsyncStreamTaskFactory; if (isAsyncTaskClass) { log.info("Got an AsyncStreamTask implementation."); return factory; } boolean isStreamOperatorTaskClass = factory instanceof StreamOperatorTaskFactory; if (isStreamOperatorTaskClass) { log.info("Adapting StreamOperatorTask to AsyncStreamTaskAdapter"); return (AsyncStreamTaskFactory) () -> { StreamOperatorTask operatorTask = (StreamOperatorTask) factory.createInstance(); operatorTask.setTaskThreadPool(taskThreadPool); return operatorTask; }; } log.info("Converting StreamTask to AsyncStreamTaskAdapter"); return (AsyncStreamTaskFactory) () -> new AsyncStreamTaskAdapter(((StreamTaskFactory) factory).createInstance(), taskThreadPool); }

Target:
public static TaskFactory finalizeTaskFactory(TaskFactory factory, ExecutorService taskThreadPool) { validateFactory(factory); boolean isAsyncTaskClass = factory instanceof AsyncStreamTaskFactory; if (isAsyncTaskClass) { log.info("Got an AsyncStreamTask implementation."); return factory; } boolean isStreamOperatorTaskClass = factory instanceof StreamOperatorTaskFactory; if (isStreamOperatorTaskClass) { log.info("Adapting StreamOperatorTaskFactory to inject container thread pool"); return (AsyncStreamTaskFactory) () -> { StreamOperatorTask operatorTask = (StreamOperatorTask) factory.createInstance(); operatorTask.setTaskThreadPool(taskThreadPool); return operatorTask; }; } log.info("Converting StreamTask to AsyncStreamTaskAdapter"); return (AsyncStreamTaskFactory) () -> new AsyncStreamTaskAdapter(((StreamTaskFactory) factory).createInstance(), taskThreadPool); }
Source:
public void addRelationMembers(PerunSession sess, Group resultGroup, List<Member> changedMembers, int sourceGroupId) throws InternalErrorException, AlreadyMemberException, WrongReferenceAttributeValueException, WrongAttributeValueException, GroupNotExistsException { List<Member> newMembers; try{ newMembers = addIndirectMembers(sess, resultGroup, changedMembers, sourceGroupId); if(newMembers.isEmpty()) { return; } List<Integer> relations = groupsManagerImpl.getResultGroupsIds(sess, resultGroup.getId()); for (Integer groupId : relations) { addRelationMembers(sess, groupsManagerImpl.getGroupById(sess, groupId), newMembers, resultGroup.getId()); } } catch (InternalErrorException | AlreadyMemberException | WrongReferenceAttributeValueException | WrongAttributeValueException | GroupNotExistsException ex) { log.info("Can't add new member. Cause: {}", ex); } }

Target:
public void addRelationMembers(PerunSession sess, Group resultGroup, List<Member> changedMembers, int sourceGroupId) throws InternalErrorException, AlreadyMemberException, WrongReferenceAttributeValueException, WrongAttributeValueException, GroupNotExistsException { List<Member> newMembers; newMembers = addIndirectMembers(sess, resultGroup, changedMembers, sourceGroupId); if(newMembers.isEmpty()) { return; } List<Integer> relations = groupsManagerImpl.getResultGroupsIds(sess, resultGroup.getId()); for (Integer groupId : relations) { addRelationMembers(sess, groupsManagerImpl.getGroupById(sess, groupId), newMembers, resultGroup.getId()); } }
Source:
public void updateStatData() { URI curStatPathURI = null; URI oldStatPathURI = null; StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(PerfPlugin.PERF_COMMAND); stringBuilder.append("%s."); stringBuilder.append(PerfSaveStatsHandler.DATA_EXT); String statNameFormat = stringBuilder.toString(); IPath workingDir = getWorkDir(); String curStatName = String.format(statNameFormat, ""); IPath curStatPath = workingDir.append(curStatName); IRemoteFileProxy proxy = null; try { curStatPathURI = new URI(curStatPath.toPortableString()); proxy = RemoteProxyManager.getInstance().getFileProxy(curStatPathURI); IFileStore curFileStore = proxy.getResource(curStatPathURI.getPath()); if (curFileStore.fetchInfo().exists()) { String oldStatName = String.format(statNameFormat, ".old"); IPath oldStatPath = workingDir.append(oldStatName); oldStatPathURI = new URI(oldStatPath.toPortableString()); IFileStore oldFileStore = proxy.getResource(oldStatPathURI.getPath()); if (oldFileStore.fetchInfo().exists()) { oldFileStore.delete(EFS.NONE, null); } curFileStore.copy(oldFileStore, EFS.NONE, null); } PerfSaveStatsHandler saveStats = new PerfSaveStatsHandler(); saveStats.saveData(PerfPlugin.PERF_COMMAND); } catch (URISyntaxException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } catch (CoreException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } }

Target:
public void updateStatData() { URI curStatPathURI = null; URI oldStatPathURI = null; StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(PerfPlugin.PERF_COMMAND); stringBuilder.append("%s."); stringBuilder.append(PerfSaveStatsHandler.DATA_EXT); String statNameFormat = stringBuilder.toString(); IPath workingDir = getWorkDir(); String curStatName = String.format(statNameFormat, ""); IPath curStatPath = workingDir.append(curStatName); IRemoteFileProxy proxy = null; try { curStatPathURI = new URI(curStatPath.toPortableString()); proxy = RemoteProxyManager.getInstance().getFileProxy(curStatPathURI); IFileStore curFileStore = proxy.getResource(curStatPathURI.getPath()); if (curFileStore.fetchInfo().exists()) { String oldStatName = String.format(statNameFormat, ".old"); IPath oldStatPath = workingDir.append(oldStatName); oldStatPathURI = new URI(oldStatPath.toPortableString()); IFileStore oldFileStore = proxy.getResource(oldStatPathURI.getPath()); if (oldFileStore.fetchInfo().exists()) { oldFileStore.delete(EFS.NONE, null); } curFileStore.copy(oldFileStore, EFS.NONE, null); curFileStore.delete(EFS.NONE, null); } PerfSaveStatsHandler saveStats = new PerfSaveStatsHandler(); saveStats.saveData(PerfPlugin.PERF_COMMAND); } catch (URISyntaxException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } catch (CoreException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } }
Source:
public boolean matchDestination(final String r) { if (allowMismatchedWildcards && getDestination() == null) { return match(r, getSource()); } return match(r, getDestination()); }

Target:
public boolean matchDestination(final String r) { return match(r, getDestination()); }