auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public HttpUriRequest build() throws URISyntaxException { if (hasPathParameters()) { List<NameValuePair> paramList = createParamList(); String replacedPath = originalRelativePath; Iterator<NameValuePair> itor = paramList.iterator(); while (itor.hasNext()) { NameValuePair pair = itor.next(); String paramName = pair.getName(); if (replacedPath.contains("{" + paramName + "}")) { replacedPath = replacedPath.replaceAll( "\\{" + paramName + "\\}", pair.getValue()); itor.remove(); } } replacedRelativePath = replacedPath; nonPathParams = paramList; } return httpMethod.createFrom(this); }

Target:
HttpUriRequest build() throws URISyntaxException { if (hasPathParameters()) { List<NameValuePair> paramList = createParamList(); String replacedPath = requestLine.getRelativePath(); Iterator<NameValuePair> itor = paramList.iterator(); while (itor.hasNext()) { NameValuePair pair = itor.next(); String paramName = pair.getName(); if (replacedPath.contains("{" + paramName + "}")) { replacedPath = replacedPath.replaceAll( "\\{" + paramName + "\\}", pair.getValue()); itor.remove(); } } replacedRelativePath = replacedPath; nonPathParams = paramList; } return requestLine.getHttpMethod().createFrom(this); }
Source:
public void writeFloat(float v) { final int bits = Float.floatToIntBits(v); int newcount = ensureCapacity(4); final int s = pos; bytes[s] = (byte) (bits >> 24); bytes[s+1] = (byte) (bits >> 16); bytes[s+2] = (byte) (bits >> 8); bytes[s+3] = (byte) bits; pos = newcount; }

Target:
public void writeFloat(float v) { writeInt(Float.floatToIntBits(v)); }
Source:
public void handleAction(Map<String, Object> parameters) throws IOException, ClassNotFoundException, ParserConfigurationException, SAXException { String templateName = (String) parameters.get(Constants.TEMPLATE_NAME_PARAM); String recipientName = (String) parameters.get(Constants.RECIPIENT_NAME_PARAM); CdaTemplate cdaTemplate = iheTemplateDataService.findByName(templateName); if (cdaTemplate == null) { LOGGER.error("Cannot find template", templateName); throw new TemplateNotFoundException(templateName); } HL7Recipient hl7Recipient = hl7RecipientsService.getRecipientbyName(recipientName); if (hl7Recipient == null) { LOGGER.error("Cannot find recipient", recipientName); throw new RecipientNotFoundException(templateName); } Byte[] templateData = (Byte[]) iheTemplateDataService.getDetachedField(cdaTemplate, TEMPLATE_DATA_FIELD_NAME); StreamingTemplateEngine streamingTemplateEngine = new StreamingTemplateEngine(); Template template = streamingTemplateEngine.createTemplate(new String(ArrayUtils.toPrimitive(templateData))); Writable writable = template.make(parameters); LOGGER.info("Template with name {}:\n{}", cdaTemplate.getTemplateName(), writable.toString()); if (hl7Recipient.getRecipientUsername() != null && hl7Recipient.getRecipientPassword() != null) { iheTemplateService.sendTemplateToRecipientUrlWithBA(hl7Recipient, writable.toString()); } else { iheTemplateService.sendTemplateToRecipientUrl(hl7Recipient.getRecipientUrl(), writable.toString()); } }

Target:
public void handleAction(Map<String, Object> parameters) throws IOException, ClassNotFoundException, ParserConfigurationException, SAXException { String templateName = (String) parameters.get(Constants.TEMPLATE_NAME_PARAM); String recipientName = (String) parameters.get(Constants.RECIPIENT_NAME_PARAM); CdaTemplate cdaTemplate = iheTemplateDataService.findByName(templateName); if (cdaTemplate == null) { LOGGER.error("Cannot find template", templateName); throw new TemplateNotFoundException(templateName); } HL7Recipient hl7Recipient = hl7RecipientsService.getRecipientbyName(recipientName); if (hl7Recipient == null) { LOGGER.error("Cannot find recipient", recipientName); throw new RecipientNotFoundException(templateName); } Byte[] templateData = (Byte[]) iheTemplateDataService.getDetachedField(cdaTemplate, TEMPLATE_DATA_FIELD_NAME); StreamingTemplateEngine streamingTemplateEngine = new StreamingTemplateEngine(); Template template = streamingTemplateEngine.createTemplate(new String(ArrayUtils.toPrimitive(templateData))); Writable writable = template.make(parameters); LOGGER.info("Template with name {}:\n{}", cdaTemplate.getTemplateName(), writable.toString()); if (hl7Recipient.getRecipientUsername() != null && hl7Recipient.getRecipientPassword() != null) { iheTemplateService.sendTemplateToRecipientUrlWithBasicAuthentication(hl7Recipient, writable.toString()); } else { iheTemplateService.sendTemplateToRecipientUrl(hl7Recipient.getRecipientUrl(), writable.toString()); } }
Source:
private static TypeData<?> getTypeData(final Method method) { if (isGetter(method.getName())) { return getTypeData(method.getGenericReturnType(), method.getReturnType()); } else { if (method.getGenericParameterTypes().length != 1) { throw new CodecConfigurationException(format("Invalid count of arguments for setter method: %s", method.getName())); } return getTypeData(method.getGenericParameterTypes()[0], method.getParameterTypes()[0]); } }

Target:
private static TypeData<?> getTypeData(final Method method) { if (isGetter(method)) { return getTypeData(method.getGenericReturnType(), method.getReturnType()); } else { return getTypeData(method.getGenericParameterTypes()[0], method.getParameterTypes()[0]); } }
Source:
public MachineResolver build() { if (container == null || cheContainer == null || defaultSidecarMemoryLimitAttribute == null || defaultSidecarMemoryRequestAttribute == null || defaultSidecarCpuLimitAttribute == null || defaultSidecarCpuRequestAttribute == null || containerEndpoints == null || projectsRootPathEnvVar == null) { throw new IllegalStateException(); } return new MachineResolver( projectsRootPathEnvVar, container, cheContainer, defaultSidecarMemoryLimitAttribute, defaultSidecarMemoryRequestAttribute, defaultSidecarCpuLimitAttribute, defaultSidecarCpuRequestAttribute, containerEndpoints, component); }

Target:
public MachineResolver build() { if (container == null || cheContainer == null || defaultSidecarMemoryLimitAttribute == null || defaultSidecarMemoryRequestAttribute == null || defaultSidecarCpuLimitAttribute == null || defaultSidecarCpuRequestAttribute == null || containerEndpoints == null || projectsRootPathEnvVar == null) { throw new IllegalStateException( "Unable to build MachineResolver because some fields are null"); } return new MachineResolver( projectsRootPathEnvVar, container, cheContainer, defaultSidecarMemoryLimitAttribute, defaultSidecarMemoryRequestAttribute, defaultSidecarCpuLimitAttribute, defaultSidecarCpuRequestAttribute, containerEndpoints, component); }
Source:
public static void createWorkDefHeader(Composite comp, XFormToolkit toolkit, IAtsWorkItem workItem, int horizontalSpan) { Composite headerComp = new Composite(comp, SWT.NONE); GridData gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.horizontalSpan = horizontalSpan; headerComp.setLayoutData(gridData); headerComp.setLayout(ALayout.getZeroMarginLayout(5, false)); toolkit.adapt(headerComp); IAtsWorkDefinition workDef = workItem.getWorkDefinition(); Label label = FormsUtil.createLabelValue(toolkit, headerComp, "Work Definition: ", workDef.getName()); label.addListener(SWT.MouseDoubleClick, new Listener() { @Override public void handleEvent(Event event) { IWorkbenchPage page = AWorkbench.getActivePage(); try { page.showView("org.eclipse.ui.views.ContentOutline", null, IWorkbenchPage.VIEW_ACTIVATE); } catch (PartInitException ex) { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } } }); Label dragDropLabel = new Label(headerComp, SWT.NONE); dragDropLabel.setText("Drag/Drop Related Here: "); FormsUtil.setLabelFonts(dragDropLabel, FontManager.getDefaultLabelFont()); dragDropLabel.setLayoutData(new GridData()); toolkit.adapt(dragDropLabel, true, true); Label dragDropBox = new Label(headerComp, SWT.BORDER); new WfeDragAndDrop(dragDropBox, (AbstractWorkflowArtifact) workItem.getStoreObject(), WorkflowEditor.EDITOR_ID); dragDropBox.setText(" "); dragDropBox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); toolkit.adapt(dragDropBox, true, true); dragDropBox.setBackground(getLightGreyColor()); }

Target:
public static void createWorkDefHeader(Composite comp, XFormToolkit toolkit, IAtsWorkItem workItem, int horizontalSpan) { Composite headerComp = new Composite(comp, SWT.NONE); GridData gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.horizontalSpan = horizontalSpan; headerComp.setLayoutData(gridData); int numColumns = 5; headerComp.setLayout(ALayout.getZeroMarginLayout(numColumns, false)); toolkit.adapt(headerComp); IAtsWorkDefinition workDef = workItem.getWorkDefinition(); Label label = FormsUtil.createLabelValue(toolkit, headerComp, "Work Definition: ", workDef.getName()); label.addListener(SWT.MouseDoubleClick, new Listener() { @Override public void handleEvent(Event event) { IWorkbenchPage page = AWorkbench.getActivePage(); try { page.showView("org.eclipse.ui.views.ContentOutline", null, IWorkbenchPage.VIEW_ACTIVATE); } catch (PartInitException ex) { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } } }); Label dragDropLabel = new Label(headerComp, SWT.NONE); dragDropLabel.setText("Drag/Drop Related Here: "); FormsUtil.setLabelFonts(dragDropLabel, FontManager.getDefaultLabelFont()); dragDropLabel.setLayoutData(new GridData()); toolkit.adapt(dragDropLabel, true, true); Label dragDropBox = new Label(headerComp, SWT.BORDER); new WfeDragAndDrop(dragDropBox, (AbstractWorkflowArtifact) workItem.getStoreObject(), WorkflowEditor.EDITOR_ID); dragDropBox.setText(" "); dragDropBox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); toolkit.adapt(dragDropBox, true, true); dragDropBox.setBackground(getLightGreyColor()); }
Source:
public void remove(MapillaryAbstractImage image) { images.remove(image); if (getMultiSelectedImages().contains(image)) { setSelectedImage(null); } image.getSequence().remove(image); MapillaryLayer.invalidateInstance(); }

Target:
public void remove(MapillaryAbstractImage image) { images.remove(image); if (getMultiSelectedImages().contains(image)) { setSelectedImage(null); } if (image.getSequence() != null) { image.getSequence().remove(image); } MapillaryLayer.invalidateInstance(); }
Source:
private JsonObject getLatestReleaseElement() throws IOException { JsonElement doc = getPage(getApiUrl()); for(int index = 0; index < doc.getAsJsonArray().size(); index++) { JsonObject jsonObject = (JsonObject) doc.getAsJsonArray().get(index); if(jsonObject.get("zipball_url") != null) return jsonObject; } return null; }

Target:
private JsonObject getLatestReleaseElement() throws IOException { JsonElement doc = getPage(getApiUrl()); for(JsonElement jsonElement: doc.getAsJsonArray()) { JsonObject jsonObject = jsonElement.getAsJsonObject(); if(jsonObject.get("zipball_url") != null) return jsonObject; } return null; }
Source:
public Observable<RealmResults<DynamicRealmObject>> from(DynamicRealm realm, final RealmResults<DynamicRealmObject> results) { final RealmConfiguration realmConfig = realm.getConfiguration(); return Observable.create(new Observable.OnSubscribe<RealmResults<DynamicRealmObject>>() { @Override public void call(final Subscriber<? super RealmResults<DynamicRealmObject>> subscriber) { final DynamicRealm observableRealm = DynamicRealm.getInstance(realmConfig); resultsRefs.get().acquireReference(results); final RealmChangeListener<RealmResults<DynamicRealmObject>> listener = new RealmChangeListener<RealmResults<DynamicRealmObject>>() { @Override public void onChange(RealmResults<DynamicRealmObject> object) { if (!subscriber.isUnsubscribed()) { subscriber.onNext(results); } } }; results.addChangeListener(listener); subscriber.add(Subscriptions.create(new Action0() { @Override public void call() { results.removeChangeListener(listener); observableRealm.close(); resultsRefs.get().releaseReference(results); } })); subscriber.onNext(results); } }); }

Target:
public Observable<RealmResults<DynamicRealmObject>> from(DynamicRealm realm, final RealmResults<DynamicRealmObject> results) { final RealmConfiguration realmConfig = realm.getConfiguration(); return Observable.create(new Observable.OnSubscribe<RealmResults<DynamicRealmObject>>() { @Override public void call(final Subscriber<? super RealmResults<DynamicRealmObject>> subscriber) { final DynamicRealm observableRealm = DynamicRealm.getInstance(realmConfig); resultsRefs.get().acquireReference(results); final RealmChangeListener<RealmResults<DynamicRealmObject>> listener = new RealmChangeListener<RealmResults<DynamicRealmObject>>() { @Override public void onChange(RealmResults<DynamicRealmObject> result) { if (!subscriber.isUnsubscribed()) { subscriber.onNext(results); } } }; results.addChangeListener(listener); subscriber.add(Subscriptions.create(new Action0() { @Override public void call() { results.removeChangeListener(listener); observableRealm.close(); resultsRefs.get().releaseReference(results); } })); subscriber.onNext(results); } }); }
Source:
public void useHostIDRequestAsCurrentHostNotBackendUser() throws DotDataException, DotSecurityException { final Host host = new SiteDataGen().nextPersisted(); final Host anotherHost = new SiteDataGen().nextPersisted(); final HttpServletRequest request = mock(HttpServletRequest.class); final HttpSession session = mock(HttpSession.class); setAllParametersAndAttributes(request, session, anotherHost); when(request.getParameter("host_id")).thenReturn(host.getIdentifier()); final User user = createUser(host); final HostWebAPIImpl hostWebAPI = new HostWebAPIImpl(); final Host currentHost = hostWebAPI.getCurrentHost(request, user); assertEquals(anotherHost.getIdentifier(), currentHost.getIdentifier()); verify(request).setAttribute(WebKeys.CURRENT_HOST, currentHost); verify(session, never()).setAttribute(anyString(), anyObject()); }

Target:
public void useHostIDRequestAsCurrentHostNotBackendUser() throws DotDataException, DotSecurityException { final Host host = new SiteDataGen().nextPersisted(); final Host anotherHost = new SiteDataGen().nextPersisted(); final HttpServletRequest request = mock(HttpServletRequest.class); final HttpSession session = mock(HttpSession.class); setAllParametersAndAttributes(request, session, anotherHost); when(request.getParameter(HOST_ID_PARAMETER_NAME)).thenReturn(host.getIdentifier()); final User user = createUser(host); final HostWebAPIImpl hostWebAPI = new HostWebAPIImpl(); final Host currentHost = hostWebAPI.getCurrentHost(request, user); assertEquals(anotherHost.getIdentifier(), currentHost.getIdentifier()); verify(request).setAttribute(WebKeys.CURRENT_HOST, currentHost); verify(session, never()).setAttribute(anyString(), anyObject()); }
Source:
private State getCommand(TellstickSensorEvent event, BigDecimal dValue, TellstickValueSelector selector) { State cmd = null; switch (event.getDataType()) { case TEMPERATURE: switch (selector) { case MOTION: cmd = OnOffType.ON; break; default: cmd = new DecimalType(dValue); } break; case HUMIDITY: switch (selector) { case BATTERY_LEVEL: cmd = new DecimalType(dValue); break; case HUMIDITY: default: double val = Math.min(100, dValue.doubleValue()); cmd = new PercentType((int) val); } break; case WINDAVERAGE: case WINDDIRECTION: case WINDGUST: case RAINRATE: case RAINTOTAL: cmd = new DecimalType(dValue); break; default: logger.warn("Event of type " + event.getDataType() + " does not have a mapping"); } return cmd; }

Target:
private State getCommand(TellstickSensorEvent event, BigDecimal dValue, TellstickValueSelector selector) { State cmd = null; switch (event.getDataType()) { case TEMPERATURE: switch (selector) { case MOTION: cmd = OnOffType.ON; break; default: cmd = new DecimalType(dValue); } break; case HUMIDITY: switch (selector) { case BATTERY_LEVEL: cmd = new DecimalType(dValue); break; case HUMIDITY: default: cmd = new PercentType(HUNDRED.min(dValue)); } break; case WINDAVERAGE: case WINDDIRECTION: case WINDGUST: case RAINRATE: case RAINTOTAL: cmd = new DecimalType(dValue); break; default: logger.warn("Event of type " + event.getDataType() + " does not have a mapping"); } return cmd; }
Source:
public int compare(GenericRow row1, GenericRow row2) { RowKind kind1 = row1.getRowKind(); RowKind kind2 = row2.getRowKind(); if (kind1 != kind2) { return kind1.ordinal() - kind2.ordinal(); } else { Object key1 = TypeGetterSetters.get(row1, sortKeyIdx, sortKeyType); Object key2 = TypeGetterSetters.get(row2, sortKeyIdx, sortKeyType); if (key1 instanceof Comparable) { return ((Comparable) key1).compareTo(key2); } else { throw new UnsupportedOperationException(); } } }

Target:
public int compare(GenericRow row1, GenericRow row2) { RowKind kind1 = row1.getRowKind(); RowKind kind2 = row2.getRowKind(); if (kind1 != kind2) { return kind1.toByteValue() - kind2.toByteValue(); } else { Object key1 = TypeGetterSetters.get(row1, sortKeyIdx, sortKeyType); Object key2 = TypeGetterSetters.get(row2, sortKeyIdx, sortKeyType); if (key1 instanceof Comparable) { return ((Comparable) key1).compareTo(key2); } else { throw new UnsupportedOperationException(); } } }
Source:
private void testSegmentSplitsHelperWithFilter(PinotTableHandle table, int segmentsPerSplit, int expectedNumSplits) { PinotConfig pinotConfig = new PinotConfig().setForbidBrokerQueries(false); SessionHolder sessionHolder = new SessionHolder(pinotConfig); PlanBuilder planBuilder = createPlanBuilder(sessionHolder); PlanNode plan = filter(planBuilder, tableScan(planBuilder, table, regionId, city, fare, secondsSinceEpoch), getRowExpression("city = 'Boston'", sessionHolder)); PinotQueryGenerator.PinotQueryGeneratorResult pinotQueryGeneratorResult = new PinotQueryGenerator(pinotConfig, typeManager, functionMetadataManager, standardFunctionResolution).generate(plan, sessionHolder.getConnectorSession()).get(); ImmutableList<PinotColumnHandle> expectedHandles = ImmutableList.copyOf(pinotQueryGeneratorResult.getContext().getAssignments().values()); PinotQueryGenerator.GeneratedPql generatedPql = pinotQueryGeneratorResult.getGeneratedPql(); PinotTableHandle pinotTableHandle = new PinotTableHandle(table.getConnectorId(), table.getSchemaName(), table.getTableName(), Optional.of(false), Optional.of(expectedHandles), Optional.of(generatedPql)); List<PinotSplit> splits = getSplitsHelper(pinotTableHandle, segmentsPerSplit, false); assertSplits(splits, expectedNumSplits, SEGMENT); splits.forEach(s -> assertSegmentSplitWellFormed(s, true)); }

Target:
private void testSegmentSplitsHelperWithFilter(PinotTableHandle table, int segmentsPerSplit, int expectedNumSplits) { PinotConfig pinotConfig = new PinotConfig().setForbidBrokerQueries(false); SessionHolder sessionHolder = new SessionHolder(pinotConfig); PlanBuilder planBuilder = createPlanBuilder(sessionHolder); PlanNode plan = filter(planBuilder, tableScan(planBuilder, table, regionId, city, fare, secondsSinceEpoch), getRowExpression("city = 'Boston'", sessionHolder)); PinotQueryGenerator.PinotQueryGeneratorResult pinotQueryGeneratorResult = new PinotQueryGenerator(pinotConfig, typeManager, functionMetadataManager, standardFunctionResolution).generate(plan, sessionHolder.getConnectorSession()).get(); List<PinotColumnHandle> expectedHandles = ImmutableList.copyOf(pinotQueryGeneratorResult.getContext().getAssignments().values()); PinotQueryGenerator.GeneratedPql generatedPql = pinotQueryGeneratorResult.getGeneratedPql(); PinotTableHandle pinotTableHandle = new PinotTableHandle(table.getConnectorId(), table.getSchemaName(), table.getTableName(), Optional.of(false), Optional.of(expectedHandles), Optional.of(generatedPql)); List<PinotSplit> splits = getSplitsHelper(pinotTableHandle, segmentsPerSplit, false); assertSplits(splits, expectedNumSplits, SEGMENT); splits.forEach(s -> assertSegmentSplitWellFormed(s, true)); }
Source:
@Override public final boolean permitsFieldGet(Field field, Object receiver) { String key = Whitelist.canonicalFieldSig(field); Boolean b = permittedCache.get(key); if (b != null) { return b; } boolean output = false; for (FieldSignature s : fieldSignatures()) { if (s.matches(field)) { output = true; break; } } permittedCache.put(key, output); return output; }

Target:
@Override public final boolean permitsFieldGet(Field field, Object receiver) { String key = canonicalFieldSig(field); Boolean b = permittedCache.get(key); if (b != null) { return b; } boolean output = false; for (FieldSignature s : fieldSignatures()) { if (s.matches(field)) { output = true; break; } } permittedCache.put(key, output); return output; }
Source:
private void tryToAddVariant(final VariantContext vc, final ReferenceSequence refSeq, final VariantContext source) { if (!refSeq.getName().equals(vc.getContig())) { throw new IllegalStateException("The contig of the VariantContext, " + vc.getContig() + ", doesnt match the ReferenceSequence: " + refSeq.getName()); } boolean mismatchesReference = false; for (final Allele allele : vc.getAlleles()) { if (allele.isReference()) { final byte[] ref = refSeq.getBases(); final String refString = StringUtil.bytesToString(ref, vc.getStart() - 1, vc.getEnd() - vc.getStart() + 1); if (!refString.equalsIgnoreCase(allele.getBaseString())) { if (vc.isBiallelic() && vc.isSNP() && refString.equalsIgnoreCase(vc.getAlternateAllele(0).getBaseString())) { if (RECOVER_SWAPPED_REF_ALT){ totalRecoveredBySwapRefAlt++; addAndTrack(LiftoverUtils.swapRefAlt(vc, TAGS_TO_REVERSE, TAGS_TO_DROP), source); return; } else { totalNotRecoveredSwapRefAlt++; } } mismatchesReference = true; } break; } } if (mismatchesReference) { rejects.add(new VariantContextBuilder(source) .filter(FILTER_MISMATCHING_REF_ALLELE) .attribute(ATTEMPTED_LOCUS, String.format("%s:%d-%d", vc.getContig(), vc.getStart(), vc.getEnd())) .make()); failedAlleleCheck++; trackLiftedVariantContig(rejectsByContig, source.getContig()); } else { addAndTrack(vc, source); } }

Target:
private void tryToAddVariant(final VariantContext vc, final ReferenceSequence refSeq, final VariantContext source) { if (!refSeq.getName().equals(vc.getContig())) { throw new IllegalStateException("The contig of the VariantContext, " + vc.getContig() + ", doesnt match the ReferenceSequence: " + refSeq.getName()); } boolean mismatchesReference = false; for (final Allele allele : vc.getAlleles()) { if (allele.isReference()) { final byte[] ref = refSeq.getBases(); final String refString = StringUtil.bytesToString(ref, vc.getStart() - 1, vc.getEnd() - vc.getStart() + 1); if (!refString.equalsIgnoreCase(allele.getBaseString())) { if (vc.isBiallelic() && vc.isSNP() && refString.equalsIgnoreCase(vc.getAlternateAllele(0).getBaseString())) { if (RECOVER_SWAPPED_REF_ALT) { totalTrackedAsSwapRefAlt++; addAndTrack(LiftoverUtils.swapRefAlt(vc, TAGS_TO_REVERSE, TAGS_TO_DROP), source); return; } else { totalTrackedAsSwapRefAlt++; } } mismatchesReference = true; } break; } } if (mismatchesReference) { rejects.add(new VariantContextBuilder(source) .filter(FILTER_MISMATCHING_REF_ALLELE) .attribute(ATTEMPTED_LOCUS, String.format("%s:%d-%d", vc.getContig(), vc.getStart(), vc.getEnd())) .make()); failedAlleleCheck++; trackLiftedVariantContig(rejectsByContig, source.getContig()); } else { addAndTrack(vc, source); } }
Source:
private ListenableFuture<Void> initInternal(Context context, AppConfig appConfig) { if (mInitialized.getAndSet(true)) { return Futures.immediateFuture(null); } ListenableFuture<Void> future = CallbackToFutureAdapter.getFuture( completer -> { mCameraExecutor.execute(() -> { mContext = context.getApplicationContext(); mCameraFactory = appConfig.getCameraFactory(null); if (mCameraFactory == null) { completer.setException(new IllegalStateException( "Invalid app configuration provided. Missing CameraFactory.")); } mSurfaceManager = appConfig.getDeviceSurfaceManager(null); if (mSurfaceManager == null) { completer.setException(new IllegalStateException( "Invalid app configuration provided. Missing " + "CameraDeviceSurfaceManager.")); } mSurfaceManager.init(); mDefaultConfigFactory = appConfig.getUseCaseConfigRepository(null); if (mDefaultConfigFactory == null) { completer.setException(new IllegalStateException( "Invalid app configuration provided. Missing " + "UseCaseConfigFactory.")); } if (mCameraExecutor instanceof CameraExecutor) { CameraExecutor executor = (CameraExecutor) mCameraExecutor; executor.init(mCameraFactory); } mCameraRepository.init(mCameraFactory); completer.set(null); }); return "CameraX initInternal"; }); return future; }

Target:
private ListenableFuture<Void> initInternal(Context context, AppConfig appConfig) { if (mInitialized.getAndSet(true)) { return mInitInternalFuture; } mInitInternalFuture = CallbackToFutureAdapter.getFuture( completer -> { mCameraExecutor.execute(() -> { mContext = context.getApplicationContext(); mCameraFactory = appConfig.getCameraFactory(null); if (mCameraFactory == null) { completer.setException(new IllegalStateException( "Invalid app configuration provided. Missing CameraFactory.")); return; } mSurfaceManager = appConfig.getDeviceSurfaceManager(null); if (mSurfaceManager == null) { completer.setException(new IllegalStateException( "Invalid app configuration provided. Missing " + "CameraDeviceSurfaceManager.")); return; } mSurfaceManager.init(); mDefaultConfigFactory = appConfig.getUseCaseConfigRepository(null); if (mDefaultConfigFactory == null) { completer.setException(new IllegalStateException( "Invalid app configuration provided. Missing " + "UseCaseConfigFactory.")); return; } if (mCameraExecutor instanceof CameraExecutor) { CameraExecutor executor = (CameraExecutor) mCameraExecutor; executor.init(mCameraFactory); } mCameraRepository.init(mCameraFactory); completer.set(null); }); return "CameraX initInternal"; }); return mInitInternalFuture; }
Source:
public void init(final DaemonContext context) { final File confFile = PropertiesUtil.findConfigFile("server.properties"); if (confFile == null) { LOG.warn(String.format("Server configuration file not found. Initializing server daemon on %s:%s, with https.enabled=%s, https.port=%s, context.path=%s", bindInterface, httpPort, httpsEnable, httpsPort, contextPath)); return; } LOG.info("Server configuration file found: " + confFile.getAbsolutePath()); try { final Properties properties = PropertiesUtil.loadFromFile(confFile); if (properties == null) { return; } setBindInterface(properties.getProperty(BIND_INTERFACE, "")); setContextPath(properties.getProperty(CONTEXT_PATH, "/client")); setHttpPort(Integer.valueOf(properties.getProperty(HTTP_PORT, "8080"))); setHttpsEnable(Boolean.valueOf(properties.getProperty(HTTPS_ENABLE, "false"))); setHttpsPort(Integer.valueOf(properties.getProperty(HTTPS_PORT, "8443"))); setKeystoreFile(properties.getProperty(KEYSTORE_FILE)); setKeystorePassword(properties.getProperty(KEYSTORE_PASSWORD)); setWebAppLocation(properties.getProperty(WEBAPP_DIR)); setAccessLogFile(properties.getProperty(ACCESS_LOG, "access.log")); setSessionTimeout(Integer.valueOf(properties.getProperty(SESSION_TIMEOUT, "10"))); } catch (final IOException e) { LOG.warn("Failed to load configuration from server.properties file", e); } LOG.info(String.format("Initializing server daemon on %s:%s, with https.enabled=%s, https.port=%s, context.path=%s", bindInterface, httpPort, httpsEnable, httpsPort, contextPath)); }

Target:
public void init(final DaemonContext context) { final File confFile = PropertiesUtil.findConfigFile("server.properties"); if (confFile == null) { LOG.warn(String.format("Server configuration file not found. Initializing server daemon on %s:%s, with https.enabled=%s, https.port=%s, context.path=%s", bindInterface, httpPort, httpsEnable, httpsPort, contextPath)); return; } LOG.info("Server configuration file found: " + confFile.getAbsolutePath()); try { final Properties properties = PropertiesUtil.loadFromFile(confFile); if (properties == null) { return; } setBindInterface(properties.getProperty(BIND_INTERFACE, "")); setContextPath(properties.getProperty(CONTEXT_PATH, "/client")); setHttpPort(Integer.valueOf(properties.getProperty(HTTP_PORT, "8080"))); setHttpsEnable(Boolean.valueOf(properties.getProperty(HTTPS_ENABLE, "false"))); setHttpsPort(Integer.valueOf(properties.getProperty(HTTPS_PORT, "8443"))); setKeystoreFile(properties.getProperty(KEYSTORE_FILE)); setKeystorePassword(properties.getProperty(KEYSTORE_PASSWORD)); setWebAppLocation(properties.getProperty(WEBAPP_DIR)); setAccessLogFile(properties.getProperty(ACCESS_LOG, "access.log")); setSessionTimeout(Integer.valueOf(properties.getProperty(SESSION_TIMEOUT, "30"))); } catch (final IOException e) { LOG.warn("Failed to load configuration from server.properties file", e); } LOG.info(String.format("Initializing server daemon on %s:%s, with https.enabled=%s, https.port=%s, context.path=%s", bindInterface, httpPort, httpsEnable, httpsPort, contextPath)); }
Source:
public Collection<String> getChangesByType(HelixConstants.ChangeType changeType) { assignPropertyMapByType(changeType); return getChangedItems(); }

Target:
public Collection<String> getChangesByType(HelixConstants.ChangeType changeType) { return _changedItems.computeIfAbsent(changeType, changedItems -> getChangedItems(determinePropertyMapByType(changeType, _oldSnapshot), determinePropertyMapByType(changeType, _newSnapshot))); }
Source:
private void changeOpacity(String selector, int value, WebDriver driver) { PageObjectLogging.log("Css selector",selector, true, driver); ((JavascriptExecutor) driver).executeScript( "$(arguments[0]).css('opacity', arguments[1]);", selector, Integer.toString(value) ); }

Target:
private void changeOpacity(String selector, int value, WebDriver driver) { PageObjectLogging.log("CSS selector", selector, true, driver); ((JavascriptExecutor) driver).executeScript( "$(arguments[0]).css('opacity', arguments[1]);", selector, Integer.toString(value) ); }
Source:
public static ExecutionReport makeReport(String xmlString) throws InvalidReportException { Document xmlDocument = null; try { xmlDocument = XmlUtil.newDocument(xmlString); } catch (IOException | SAXException e) { throw new InvalidReportException("%s is not a valid execution report", e); } Element documentElement = xmlDocument.getDocumentElement(); String documentNodeName = documentElement.getNodeName(); switch (documentNodeName) { case "testResults": return new TestExecutionReport(xmlDocument); case "suiteResults": return new SuiteExecutionReport(xmlDocument); default: throw new InvalidReportException(String.format("%s is not a valid document element tag for an Execution Report.", documentNodeName)); } }

Target:
public static ExecutionReport makeReport(String xmlString) throws InvalidReportException { Document xmlDocument = null; try { xmlDocument = XmlUtil.newDocument(xmlString); } catch (IOException | SAXException e) { throw new InvalidReportException(format("%s is not a valid execution report", xmlString), e); } Element documentElement = xmlDocument.getDocumentElement(); String documentNodeName = documentElement.getNodeName(); switch (documentNodeName) { case "testResults": return new TestExecutionReport(xmlDocument); case "suiteResults": return new SuiteExecutionReport(xmlDocument); default: throw new InvalidReportException(format("%s is not a valid document element tag for an Execution Report.", documentNodeName)); } }
Source:
public void testTopologyLevelClassCastException() { final Properties props = new Properties(); props.put(StreamsConfig.APPLICATION_ID_CONFIG, "test"); props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "dummy:1234"); final StreamsBuilder builder = new StreamsBuilder(); builder.<String, String>stream("streams-plaintext-input") .flatMapValues(value -> { return Arrays.asList(""); }); final Topology topology = builder.build(); final TopologyTestDriver testDriver = new TopologyTestDriver(topology, props); final ConsumerRecordFactory<String, String> factory = new ConsumerRecordFactory<>(new StringSerializer(), new StringSerializer()); final ConsumerRecord<byte[], byte[]> consumerRecord = factory.create("streams-plaintext-input", "a-key", "a value"); try { testDriver.pipeInput(consumerRecord); } catch (final StreamsException s) { final String msg = s.getMessage(); assertTrue("Error about class cast with serdes", msg.contains("ClassCastException")); assertTrue("Error about class cast with serdes", msg.contains("serdes")); throw s; } }

Target:
public void testTopologyLevelClassCastException() { final Properties props = new Properties(); props.put(StreamsConfig.APPLICATION_ID_CONFIG, "test"); props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "dummy:1234"); final StreamsBuilder builder = new StreamsBuilder(); builder.<String, String>stream("streams-plaintext-input") .flatMapValues(value -> { return Arrays.asList(""); }); final Topology topology = builder.build(); final TopologyTestDriver testDriver = new TopologyTestDriver(topology, props); final TestInputTopic<String, String> topic = testDriver.createInputTopic("streams-plaintext-input", new StringSerializer(), new StringSerializer()); final StreamsException se = assertThrows(StreamsException.class, () -> topic.pipeInput("a-key", "a value")); final String msg = se.getMessage(); assertTrue("Error about class cast with serdes", msg.contains("ClassCastException")); assertTrue("Error about class cast with serdes", msg.contains("Serdes")); }
Source:
public void testCompareTo() { final MockNode node1 = new MockNode(10, 1); final MockNode node2 = new MockNode(8, 1); assertEquals(2, node1.compareOrder(node2), "Invalid comparison result"); assertEquals(-2, node2.compareOrder(node1), "Invalid comparison result"); }

Target:
public void testCompareTo() { final MockNode node1 = new MockNode(10, 1); final MockNode node2 = new MockNode(8, 1); assertWithMessage("Invalid comparison result") .that(node1.compareOrder(node2)) .isEqualTo(2); assertWithMessage("Invalid comparison result") .that(node2.compareOrder(node1)) .isEqualTo(-2); }
Source:
public void setUp() throws Exception { cli=HCatUtil.getHCatClient(servers.get(0)); }

Target:
public void setUp() throws HCatException { cli=HCatUtil.getHCatClient(servers.get(0)); }
Source:
public CalDavConfig() { super(); }

Target:
public CalDavConfig() { }
Source:
SFTPInputStream(ChannelSftp channel, Path path, FileSystem.Statistics stats) { try { this.channel = channel; this.path = path; this.stats = stats; this.wrappedStream = channel.get(path.toUri().getPath()); SftpATTRS stat = channel.lstat(path.toString()); this.contentLength = stat.getSize(); } catch (SftpException e) { throw new UncheckedIOException(new IOException(e)); } }

Target:
SFTPInputStream(ChannelSftp channel, Path path, FileSystem.Statistics stats) throws IOException { try { this.channel = channel; this.path = path; this.stats = stats; this.wrappedStream = channel.get(path.toUri().getPath()); SftpATTRS stat = channel.lstat(path.toString()); this.contentLength = stat.getSize(); } catch (SftpException e) { throw new IOException(e); } }
Source:
public RepositoryState getRepositoryState() { if (isBare() || getDirectory() == null) return RepositoryState.BARE; if (new File(getWorkTree(), ".dotest").exists()) return RepositoryState.REBASING; if (new File(getDirectory(), ".dotest-merge").exists()) return RepositoryState.REBASING_INTERACTIVE; if (new File(getDirectory(),"rebase-apply/rebasing").exists()) return RepositoryState.REBASING_REBASING; if (new File(getDirectory(),"rebase-apply/applying").exists()) return RepositoryState.APPLY; if (new File(getDirectory(),"rebase-apply").exists()) return RepositoryState.REBASING; if (new File(getDirectory(),"rebase-merge/interactive").exists()) return RepositoryState.REBASING_INTERACTIVE; if (new File(getDirectory(),"rebase-merge").exists()) return RepositoryState.REBASING_MERGE; if (new File(getDirectory(), Constants.MERGE_HEAD).exists()) { try { if (!readDirCache().hasUnmergedPaths()) { return RepositoryState.MERGING_RESOLVED; } } catch (IOException e) { } return RepositoryState.MERGING; } if (new File(getDirectory(), "BISECT_LOG").exists()) return RepositoryState.BISECTING; if (new File(getDirectory(), Constants.CHERRY_PICK_HEAD).exists()) { try { if (!readDirCache().hasUnmergedPaths()) { return RepositoryState.CHERRY_PICKING_RESOLVED; } } catch (IOException e) { } return RepositoryState.CHERRY_PICKING; } if (new File(getDirectory(), Constants.REVERT_HEAD).exists()) { try { if (!readDirCache().hasUnmergedPaths()) { return RepositoryState.REVERTING_RESOLVED; } } catch (IOException e) { e.printStackTrace(); } return RepositoryState.REVERTING; } return RepositoryState.SAFE; }

Target:
public RepositoryState getRepositoryState() { if (isBare() || getDirectory() == null) return RepositoryState.BARE; if (new File(getWorkTree(), ".dotest").exists()) return RepositoryState.REBASING; if (new File(getDirectory(), ".dotest-merge").exists()) return RepositoryState.REBASING_INTERACTIVE; if (new File(getDirectory(),"rebase-apply/rebasing").exists()) return RepositoryState.REBASING_REBASING; if (new File(getDirectory(),"rebase-apply/applying").exists()) return RepositoryState.APPLY; if (new File(getDirectory(),"rebase-apply").exists()) return RepositoryState.REBASING; if (new File(getDirectory(),"rebase-merge/interactive").exists()) return RepositoryState.REBASING_INTERACTIVE; if (new File(getDirectory(),"rebase-merge").exists()) return RepositoryState.REBASING_MERGE; if (new File(getDirectory(), Constants.MERGE_HEAD).exists()) { try { if (!readDirCache().hasUnmergedPaths()) { return RepositoryState.MERGING_RESOLVED; } } catch (IOException e) { } return RepositoryState.MERGING; } if (new File(getDirectory(), "BISECT_LOG").exists()) return RepositoryState.BISECTING; if (new File(getDirectory(), Constants.CHERRY_PICK_HEAD).exists()) { try { if (!readDirCache().hasUnmergedPaths()) { return RepositoryState.CHERRY_PICKING_RESOLVED; } } catch (IOException e) { } return RepositoryState.CHERRY_PICKING; } if (new File(getDirectory(), Constants.REVERT_HEAD).exists()) { try { if (!readDirCache().hasUnmergedPaths()) { return RepositoryState.REVERTING_RESOLVED; } } catch (IOException e) { } return RepositoryState.REVERTING; } return RepositoryState.SAFE; }
Source:
public void testLimit() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); EnvironmentSettings envSettings = EnvironmentSettings.newInstance() .useBlinkPlanner() .inStreamingMode() .build(); StreamTableEnvironment tEnv = StreamTableEnvironment.create(env, envSettings); tEnv.executeSql( "CREATE TABLE " + INPUT_TABLE + "(" + "id BIGINT," + "timestamp6_col TIMESTAMP(6)," + "timestamp9_col TIMESTAMP(9)," + "time_col TIME," + "real_col FLOAT," + "double_col DOUBLE," + "decimal_col DECIMAL(10, 4)" + ") WITH (" + " 'connector'='jdbc'," + " 'url'='" + DB_URL + "'," + " 'table-name'='" + INPUT_TABLE + "'" + ")" ); Iterator<Row> collected = tEnv.executeSql("SELECT id FROM " + INPUT_TABLE + " LIMIT 1").collect(); List<String> result = CollectionUtil.iteratorToList(collected).stream() .map(Row::toString) .sorted() .collect(Collectors.toList()); List<String> expected = Collections.singletonList("1"); assertEquals(expected, result); }

Target:
public void testLimit() throws Exception { tEnv.executeSql( "CREATE TABLE " + INPUT_TABLE + "(\n" + "id BIGINT,\n" + "timestamp6_col TIMESTAMP(6),\n" + "timestamp9_col TIMESTAMP(9),\n" + "time_col TIME,\n" + "real_col FLOAT,\n" + "double_col DOUBLE,\n" + "decimal_col DECIMAL(10, 4)\n" + ") WITH (\n" + " 'connector'='jdbc',\n" + " 'url'='" + DB_URL + "',\n" + " 'table-name'='" + INPUT_TABLE + "',\n" + " 'scan.partition.column'='id',\n" + " 'scan.partition.num'='2',\n" + " 'scan.partition.lower-bound'='1',\n" + " 'scan.partition.upper-bound'='2'\n" + ")" ); Iterator<Row> collected = tEnv.executeSql("SELECT * FROM " + INPUT_TABLE + " LIMIT 1").collect(); List<String> result = CollectionUtil.iteratorToList(collected).stream() .map(Row::toString) .sorted() .collect(Collectors.toList()); Set<String> expected = new HashSet<>(); expected.add("1,2020-01-01T15:35:00.123456,2020-01-01T15:35:00.123456789,15:35,1.175E-37,1.79769E308,100.1234"); expected.add("2,2020-01-01T15:36:01.123456,2020-01-01T15:36:01.123456789,15:36:01,-1.175E-37,-1.79769E308,101.1234"); assertEquals(1, result.size()); assertTrue("The actual output is not a subset of the expected set.", expected.containsAll(result)); }
Source:
public MotorControl(Motor motor, Controller controller, int axis, double scale) { super("motorControl", motor); this.motor = motor; this.controller = controller; this.axis = axis; this.scale = scale; LogKitten.d("MotorControl created."); }

Target:
public MotorControl(Motor motor, Controller controller, int axis, double scale) { this("Motor Control", motor, controller, axis, scale); }
Source:
void doHandle(String newName, String profileKey) { checkRequest(StringUtils.isNotBlank(newName), "Name must be set"); checkRequest(newName.length() <= MAXIMUM_NAME_LENGTH, String.format("Name is too long (>%d characters)", MAXIMUM_NAME_LENGTH)); userSession.checkLoggedIn(); try (DbSession dbSession = dbClient.openSession(false)) { QualityProfileDto qualityProfile = ofNullable(dbClient.qualityProfileDao().selectByKey(dbSession, profileKey)) .orElseThrow(() -> new NotFoundException("Quality profile not found: " + profileKey)); String organizationUuid = qualityProfile.getOrganizationUuid(); userSession.checkPermission(ADMINISTER_QUALITY_PROFILES, organizationUuid); if (!StringUtils.equals(newName, qualityProfile.getName())) { OrganizationDto organization = dbClient.organizationDao().selectByUuid(dbSession, organizationUuid) .orElseThrow(() -> new IllegalStateException("No organization found for uuid "+organizationUuid)); String language = qualityProfile.getLanguage(); ofNullable(dbClient.qualityProfileDao().selectByNameAndLanguage(organization, newName, language, dbSession)) .ifPresent(found -> {throw BadRequestException.create(format("Quality profile already exists: %s", newName));}); qualityProfile.setName(newName); dbClient.qualityProfileDao().update(dbSession, qualityProfile); } dbSession.commit(); } }

Target:
void doHandle(String newName, String profileKey) { checkRequest(StringUtils.isNotBlank(newName), "Name must be set"); checkRequest(newName.length() <= MAXIMUM_NAME_LENGTH, String.format("Name is too long (>%d characters)", MAXIMUM_NAME_LENGTH)); userSession.checkLoggedIn(); try (DbSession dbSession = dbClient.openSession(false)) { QualityProfileDto qualityProfile = ofNullable(dbClient.qualityProfileDao().selectByKey(dbSession, profileKey)) .orElseThrow(() -> new NotFoundException("Quality profile not found: " + profileKey)); String organizationUuid = qualityProfile.getOrganizationUuid(); userSession.checkPermission(ADMINISTER_QUALITY_PROFILES, organizationUuid); if (!Objects.equals(newName, qualityProfile.getName())) { OrganizationDto organization = dbClient.organizationDao().selectByUuid(dbSession, organizationUuid) .orElseThrow(() -> new IllegalStateException("No organization found for uuid " + organizationUuid)); String language = qualityProfile.getLanguage(); ofNullable(dbClient.qualityProfileDao().selectByNameAndLanguage(organization, newName, language, dbSession)) .ifPresent(found -> { throw BadRequestException.create(format("Quality profile already exists: %s", newName)); }); qualityProfile.setName(newName); dbClient.qualityProfileDao().update(dbSession, qualityProfile); dbSession.commit(); } } }
Source:
public Optional<String> namespace() { return getSid(); }

Target:
public Optional<String> namespace() { if (getSid().isPresent()) { return getSid(); } return serviceNameConfiguration().map(ServiceNameConfiguration::namespaceOverride); }
Source:
public Note get(String noteId, String notePath, AuthenticationInfo subject) throws IOException { LOG.info("====get{}:{}", noteId, notePath); return getNote(noteId, notePath); }

Target:
public Note get(String noteId, String notePath, AuthenticationInfo subject) throws IOException { LOG.debug("get note, noteId: {}, notePath:{}", noteId, notePath); return getNote(noteId, notePath); }
Source:
public IStatus validate(IProject project, String path) { if(fileExists(path)) { return Status.OK_STATUS; } return new Status(IStatus.ERROR, "XML", "File not found : "+ path); }

Target:
public IStatus validate(IProject project, String path) { if (fileExists(path)) { return Status.OK_STATUS; } return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.CustomTrace_FileNotFound + ": " + path); }
Source:
public void configure(JobConf job) { KMER_SIZE = Integer.parseInt(job.get(GenomixJobConf.KMER_LENGTH)); Kmer.setGlobalKmerLength(KMER_SIZE); lineCount = 0; String filename = job.get("map.input.file"); String[] tokens = filename.split("\\.(?=[^\\.]+$)"); if (tokens.length > 2) throw new IllegalStateException("Parse error trying to parse filename... split extension tokens are: " + tokens.toString()); String basename = tokens[0]; String extension = tokens.length == 2 ? tokens[1] : ""; if (extension.equals("fastq") || extension.equals("fq")) { if (!(job.getInputFormat() instanceof NLineInputFormat)) { throw new IllegalStateException("Fastq files require the NLineInputFormat (was " + job.getInputFormat() + " )."); } if (job.getInt("mapred.line.input.format.linespermap", -1) % 4 != 0) { throw new IllegalStateException( "Fastq files require the `mapred.line.input.format.linespermap` option to be divisible by 4 (was " + job.get("mapred.line.input.format.linespermap") + ")."); } fastqFormat = true; } }

Target:
public void configure(JobConf job) { KMER_SIZE = Integer.parseInt(job.get(GenomixJobConf.KMER_LENGTH)); Kmer.setGlobalKmerLength(KMER_SIZE); }
Source:
public void removePageMultiTrees(final String pageIdentifier) { for (final String group : getGroups()) { removePageMultiTrees(pageIdentifier, group); } }

Target:
public void removePageMultiTrees(final String pageIdentifier) { Arrays.asList(getGroups()).forEach(group -> removePageMultiTrees(pageIdentifier, group)); }
Source:
protected void onResume() { super.onResume(); instanceSaved = false; reinitMenu(); if (!Preferences.isLoggedIn(this)) { SharedPreferences sharedPrefs = this.getSharedPreferences( "skip_intro", this.MODE_PRIVATE); if (sharedPrefs.getInt("clickedSkip", 0) == 0) startActivity(new Intent(this, IntroActivity.class)); else startActivity(new Intent(this, AccountActivity.class)); finish(); } }

Target:
protected void onResume() { super.onResume(); instanceSaved = false; reinitMenu(); if (!Preferences.isLoggedIn(this)) { if(Preferences.getSkipButton() == false) startActivity(new Intent(this, IntroActivity.class)); else startActivity(new Intent(this, AccountActivity.class)); finish(); } }
Source:
public GetPQValuesResponse dequeueGetPQValuesPeriodicResponse( final String correlationUid ) throws OsgpException { LOGGER.debug( "dequeueSetDataRequest called with correlation uid {}", correlationUid ); return (GetPQValuesResponse) processResponse( correlationUid ); }

Target:
public GetPQValuesResponse dequeueGetPQValuesPeriodicResponse(final String correlationUid) throws OsgpException { LOGGER.debug("dequeueGetPQValuesPeriodicResponse called with correlation uid {}", correlationUid); return (GetPQValuesResponse) processResponse(correlationUid); }
Source:
protected ValidationResult validateBondModeVsNetworksAttachedToIt( Collection<NetworkAttachment> attachmentsToConfigure) { Map<String, Bond> parameterBondsByName = mapParameterBondsByName(); Map<String, VdsNetworkInterface> hostInterfacesByNetworkName = Entities.hostInterfacesByNetworkName(existingInterfaces); ValidationResult validationResult = ValidationResult.VALID; for (NetworkAttachment attachment : attachmentsToConfigure){ if (!mustAttachementBeCheckedForBondMode(attachment, hostInterfacesByNetworkName)){ continue; } Bond modifiedOrNewBond = parameterBondsByName.get(attachment.getNicName()); if (modifiedOrNewBond != null){ validationResult = checkBondModeForNewOrModifiedBond(attachment, modifiedOrNewBond); } else { validationResult = checkBondModeForExistingBond(attachment); } if (!validationResult.isValid()){ return validationResult; } } return ValidationResult.VALID; }

Target:
protected ValidationResult validateBondModeVsNetworksAttachedToIt( Collection<NetworkAttachment> attachmentsToConfigure) { Map<String, VdsNetworkInterface> hostInterfacesByNetworkName = Entities.hostInterfacesByNetworkName(existingInterfaces); for (NetworkAttachment attachment : attachmentsToConfigure){ if (!mustAttachementBeCheckedForBondMode(attachment, hostInterfacesByNetworkName)){ continue; } Bond modifiedOrNewBond = bondsMap.get(attachment.getNicName()); ValidationResult validationResult = checkBondMode(attachment, modifiedOrNewBond); if (!validationResult.isValid()){ return validationResult; } } return ValidationResult.VALID; }