auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetRefsByPrefixes() throws IOException { List<Ref> refs = db.getRefDatabase().getRefsByPrefix("refs/heads/p", "refs/tags/A"); assertEquals(3, refs.size()); checkContainsRef(refs, db.exactRef("refs/heads/prefix/a")); checkContainsRef(refs, db.exactRef("refs/heads/pa")); checkContainsRef(refs, db.exactRef("refs/tags/A")); }

Target:
public void testGetRefsByPrefixes() throws IOException { List<Ref> refs = db.getRefDatabase().getRefsByPrefix(); assertEquals(0, refs.size()); refs = db.getRefDatabase().getRefsByPrefix("refs/heads/p", "refs/tags/A"); assertEquals(3, refs.size()); checkContainsRef(refs, db.exactRef("refs/heads/prefix/a")); checkContainsRef(refs, db.exactRef("refs/heads/pa")); checkContainsRef(refs, db.exactRef("refs/tags/A")); }
Source:
private boolean isManagementNetworkChanged(){ String mgmtNetworkName = managementNetworkUtil.getManagementNetwork(getVds().getVdsGroupId()).getName(); for (VdsNetworkInterface modifiedNic : getModifiedInterfaces()) { if (mgmtNetworkName.equals(modifiedNic.getNetworkName())){ return true; } } for (VdsNetworkInterface bond : getBonds()) { if (mgmtNetworkName.equals(bond.getNetworkName())){ return true; } } return false; }

Target:
private boolean isManagementNetworkChanged(){ String mgmtNetworkName = managementNetworkUtil.getManagementNetwork(getVds().getVdsGroupId()).getName(); for (Network netowrk : getNetworks()) { if (mgmtNetworkName.equals(netowrk.getName())){ return true; } } for (VdsNetworkInterface bond : getBonds()) { if (mgmtNetworkName.equals(bond.getNetworkName())){ return true; } } return false; }
Source:
private void populateInitialFromUri(BasicBrooklynCatalog catalog, String catalogUrl, PopulateMode mode) { log.debug("Loading initial catalog from {}", catalogUrl); Exception problem = null; Object result = null; String contents = null; try { contents = new ResourceUtils(this).getResourceAsString(catalogUrl); } catch (Exception e) { Exceptions.propagateIfFatal(e); if (problem==null) problem = e; } if (contents!=null && (mode==PopulateMode.YAML || mode==PopulateMode.AUTODETECT)) { try { catalog.reset(MutableList.<CatalogItem<?,?>>of()); result = catalog.addItems(contents); } catch (Exception e) { Exceptions.propagateIfFatal(e); if (problem==null) problem = e; } } if (result==null && contents!=null && (mode==PopulateMode.XML || mode==PopulateMode.AUTODETECT)) { problem = populateInitialFromUriXml(catalog, catalogUrl, problem, contents); } if (result!=null) { log.debug("Loaded initial catalog from {}: {}", catalogUrl, result); } if (problem!=null) { log.warn("Error importing catalog from " + catalogUrl + ": " + problem, problem); } }

Target:
private void populateInitialFromUri(BasicBrooklynCatalog catalog, String catalogUrl, PopulateMode mode) { log.debug("Loading initial catalog from {}", catalogUrl); Exception problem = null; Object result = null; String contents = null; try { contents = new ResourceUtils(this).getResourceAsString(catalogUrl); } catch (Exception e) { Exceptions.propagateIfFatal(e); if (problem==null) problem = e; } if (contents!=null && (mode==PopulateMode.YAML || mode==PopulateMode.AUTODETECT)) { try { catalog.reset(MutableList.<CatalogItem<?,?>>of()); result = catalog.addItems(contents); } catch (Exception e) { Exceptions.propagateIfFatal(e); if (problem==null) problem = e; } } if (result==null && contents!=null && (mode==PopulateMode.XML || mode==PopulateMode.AUTODETECT)) { try { populateInitialFromUriXml(catalog, catalogUrl, contents); problem = null; } catch (Exception e) { Exceptions.propagateIfFatal(e); if (problem==null) problem = e; } } if (result!=null) { log.debug("Loaded initial catalog from {}: {}", catalogUrl, result); } if (problem!=null) { log.warn("Error importing catalog from " + catalogUrl + ": " + problem, problem); } }
Source:
public ConstructorIO(String apiToken, String apiKey, boolean isHTTPS, String host, String constructorToken) { this.apiToken = apiToken; this.apiKey = apiKey; this.host = host; this.version = this.getVersion(); if (host == null) { this.host = "ac.cnstrc.com"; } if (isHTTPS) { this.protocol = "https"; } else { this.protocol = "http"; } if (constructorToken != null) { this.constructorToken = constructorToken; } this.credentials = "Basic " + Base64.getEncoder().encodeToString((this.apiToken + ":").getBytes()); }

Target:
public ConstructorIO(String apiToken, String apiKey, boolean isHTTPS, String host, String constructorToken) { this.apiToken = apiToken; this.apiKey = apiKey; this.host = host; this.version = this.getVersion(); if (host == null) { this.host = "ac.cnstrc.com"; } if (isHTTPS) { this.protocol = "https"; } else { this.protocol = "http"; } this.constructorToken = constructorToken; this.credentials = "Basic " + Base64.getEncoder().encodeToString((this.apiToken + ":").getBytes()); }
Source:
public void endElement(String uri, String localName, String qName) { if (strings != null && strings[0] != null && qName.equals(nodeName)) { list.add(strings); strings = null; } }

Target:
public void endElement(String uri, String localName, String qName) { if (singleCheckNameList != null && qName.equals(NODE_NAME)) { checkNamesList.add(singleCheckNameList); singleCheckNameList = null; } }
Source:
public OffHeapLoadingCache( @JsonProperty("maxStoreSize") double maxStoreSize, @JsonProperty("maxEntriesSize") long maxEntriesSize, @JsonProperty("expireAfterWrite") long expireAfterWrite, @JsonProperty("expireAfterAccess") long expireAfterAccess ) { this.maxStoreSize = maxStoreSize; this.maxEntriesSize = maxEntriesSize; this.expireAfterWrite = expireAfterWrite; this.expireAfterAccess = expireAfterAccess; this.cache = DB.createHashMap(name) .expireStoreSize(this.maxStoreSize) .expireAfterWrite(this.expireAfterWrite, TimeUnit.MILLISECONDS) .expireAfterAccess(this.expireAfterAccess, TimeUnit.MILLISECONDS) .expireMaxSize(this.maxEntriesSize) .make(); cache.modificationListenerAdd(new Bind.MapListener<K, V>() { @Override public void update(K key, V oldVal, V newVal) { if (oldVal != null && newVal == null) { evictionCount.getAndIncrement(); } } }); this.isClosed.compareAndSet(true, false); }

Target:
public OffHeapLoadingCache( @JsonProperty("maxStoreSize") double maxStoreSize, @JsonProperty("maxEntriesSize") long maxEntriesSize, @JsonProperty("expireAfterWrite") long expireAfterWrite, @JsonProperty("expireAfterAccess") long expireAfterAccess ) { this.maxStoreSize = maxStoreSize; this.maxEntriesSize = maxEntriesSize; this.expireAfterWrite = expireAfterWrite; this.expireAfterAccess = expireAfterAccess; this.cache = DB.createHashMap(name) .expireStoreSize(this.maxStoreSize) .expireAfterWrite(this.expireAfterWrite, TimeUnit.MILLISECONDS) .expireAfterAccess(this.expireAfterAccess, TimeUnit.MILLISECONDS) .expireMaxSize(this.maxEntriesSize) .make(); cache.modificationListenerAdd(new Bind.MapListener<K, V>() { @Override public void update(K key, V oldVal, V newVal) { if (oldVal != null && newVal == null) { evictionCount.getAndIncrement(); } } }); this.closed.set(false); }
Source:
public void generatedVersion1ShouldDecodeLegacyFormat() { final LegacySubscriptionInfoSerde info = new LegacySubscriptionInfoSerde( 1, LATEST_SUPPORTED_VERSION, processId, ACTIVE_TASKS, STANDBY_TASKS, "localhost:80", null ); final ByteBuffer buffer = info.encode(); buffer.rewind(); final SubscriptionInfo decoded = SubscriptionInfo.decode(buffer); assertEquals(1, decoded.version()); assertEquals(SubscriptionInfo.UNKNOWN, decoded.latestSupportedVersion()); assertEquals(processId, decoded.processId()); assertEquals(ACTIVE_TASKS, decoded.prevTasks()); assertEquals(STANDBY_TASKS, decoded.standbyTasks()); assertNull(decoded.userEndPoint()); }

Target:
public void generatedVersion1ShouldDecodeLegacyFormat() { final LegacySubscriptionInfoSerde info = new LegacySubscriptionInfoSerde( 1, LATEST_SUPPORTED_VERSION, processId, ACTIVE_TASKS, STANDBY_TASKS, "localhost:80" ); final ByteBuffer buffer = info.encode(); buffer.rewind(); final SubscriptionInfo decoded = SubscriptionInfo.decode(buffer); assertEquals(1, decoded.version()); assertEquals(SubscriptionInfo.UNKNOWN, decoded.latestSupportedVersion()); assertEquals(processId, decoded.processId()); assertEquals(ACTIVE_TASKS, decoded.prevTasks()); assertEquals(STANDBY_TASKS, decoded.standbyTasks()); assertNull(decoded.userEndPoint()); }
Source:
public RespondingGatewayPRPAIN201306UV02ResponseType respondingGatewayPRPAIN201305UV02(PRPAIN201305UV02 pdRequest, AssertionType assertion, NhinTargetCommunitiesType targetCommunities) { LOG.debug("Begin respondingGatewayPRPAIN201305UV02"); RespondingGatewayPRPAIN201306UV02ResponseType response = null; try { String url = getEndpointURL(); if (pdRequest == null) { LOG.error("PRPAIN201305UV02 was null"); } else if (assertion == null) { LOG.error("AssertionType was null"); } else if (targetCommunities == null) { LOG.error("NhinTargetCommunitiesType was null"); } else { RespondingGatewayPRPAIN201305UV02RequestType request = new RespondingGatewayPRPAIN201305UV02RequestType(); request.setPRPAIN201305UV02(pdRequest); request.setAssertion(assertion); request.setNhinTargetCommunities(targetCommunities); response = (RespondingGatewayPRPAIN201306UV02ResponseType) getClient(url, assertion).invokePort( EntityPatientDiscoverySecuredPortType.class, "respondingGatewayPRPAIN201305UV02", request); } } catch (Exception ex) { LOG.error("Error calling respondingGatewayPRPAIN201305UV02: " + ex.getMessage(), ex); } LOG.debug("End respondingGatewayPRPAIN201305UV02"); return response; }

Target:
public RespondingGatewayPRPAIN201306UV02ResponseType respondingGatewayPRPAIN201305UV02(PRPAIN201305UV02 pdRequest, AssertionType assertion, NhinTargetCommunitiesType targetCommunities) { LOG.debug("Begin respondingGatewayPRPAIN201305UV02"); RespondingGatewayPRPAIN201306UV02ResponseType response = null; try { String url = getEndpointURL(); if (pdRequest == null) { LOG.error("PRPAIN201305UV02 was null"); } else if (assertion == null) { LOG.error("AssertionType was null"); } else if (targetCommunities == null) { LOG.error("NhinTargetCommunitiesType was null"); } else { RespondingGatewayPRPAIN201305UV02RequestType request = new RespondingGatewayPRPAIN201305UV02RequestType(); request.setPRPAIN201305UV02(pdRequest); request.setAssertion(assertion); request.setNhinTargetCommunities(targetCommunities); response = (RespondingGatewayPRPAIN201306UV02ResponseType) getClient(url, assertion).invokePort( EntityPatientDiscoverySecuredPortType.class, "respondingGatewayPRPAIN201305UV02", request); } } catch (Exception ex) { LOG.error("Error calling respondingGatewayPRPAIN201305UV02: " , ex.getMessage(), ex); } LOG.debug("End respondingGatewayPRPAIN201305UV02"); return response; }
Source:
public void put(String URL, String key, String value) { if (parseMap.containsKey(URL)) { parseMap.get(URL).getMetadata().addValue(key, value); } else { ParseData parse = ParseData.empty; parse.put(key, value); parseMap.put(URL, parse); } }

Target:
public void put(String URL, String key, String value) { if (parseMap.containsKey(URL)) { parseMap.get(URL).getMetadata().addValue(key, value); } else { ParseData parse = new ParseData(); parse.put(key, value); parseMap.put(URL, parse); } }
Source:
public void exportMultipleNatTables( final ILayerExporter exporter, final Map<String, NatTable> natTablesMap) { final OutputStream outputStream = exporter.getOutputStream(this.shell); if (outputStream == null) { return; } Runnable exportRunnable = new Runnable() { @Override public void run() { try { exporter.exportBegin(outputStream); for (String name : natTablesMap.keySet()) { NatTable natTable = natTablesMap.get(name); exportLayer(exporter, outputStream, name, natTable, natTable.getConfigRegistry()); } exporter.exportEnd(outputStream); } catch (IOException e) { throw new RuntimeException("Failed to export.", e); } finally { try { outputStream.close(); } catch (IOException e) { log.error("Failed to close the output stream", e); } } if (NatExporter.this.open) { openExport(exporter); } } }; if (this.shell != null) { this.shell.getDisplay().asyncExec(exportRunnable); } else { exportRunnable.run(); } }

Target:
public void exportMultipleNatTables( final ILayerExporter exporter, final Map<String, NatTable> natTablesMap) { final OutputStream outputStream = exporter.getOutputStream(this.shell); if (outputStream == null) { return; } Runnable exportRunnable = new Runnable() { @Override public void run() { try { exporter.exportBegin(outputStream); for (String name : natTablesMap.keySet()) { NatTable natTable = natTablesMap.get(name); exportLayer(exporter, outputStream, name, natTable, natTable.getConfigRegistry()); } exporter.exportEnd(outputStream); } catch (IOException e) { throw new RuntimeException("Failed to export.", e); } finally { try { outputStream.close(); } catch (IOException e) { log.error("Failed to close the output stream", e); } } if (NatExporter.this.openResult) { openExport(exporter); } } }; if (this.shell != null) { this.shell.getDisplay().asyncExec(exportRunnable); } else { exportRunnable.run(); } }
Source:
private static void convertAAAProfilesResult(AsyncQuery aQuery) { aQuery.converterCallback = new IAsyncConverter() { @Override public Object Convert(Object source, AsyncQuery _asyncQuery) { List<String> results = new ArrayList<String>(); for (ProfileEntry profileEntry : source != null ? (Collection<ProfileEntry>) source : new ArrayList<ProfileEntry>()) { results.add(profileEntry.getProfile()); } return results; } }; }

Target:
private static void convertAAAProfilesResult(AsyncQuery aQuery) { aQuery.converterCallback = new IAsyncConverter() { @Override public Object Convert(Object source, AsyncQuery _asyncQuery) { List<String> results = new ArrayList<String>(); for (ProfileEntry profileEntry : (Collection<ProfileEntry>) source) { results.add(profileEntry.getProfile()); } return results; } }; }
Source:
public void send(MessageContext synCtx) { try { oauthHandler.setOAuthHeader(synCtx); } catch (OAuthException e) { handleError(synCtx, "Could not generate access token for oauth configured http endpoint " + this.getName(), e); } if (synCtx.getProperty(SynapseConstants.BLOCKING_MSG_SENDER) != null) { org.apache.axis2.context.MessageContext axis2Ctx = ((Axis2MessageContext) synCtx).getAxis2MessageContext(); axis2Ctx.setProperty(HTTPConstants.NON_ERROR_HTTP_STATUS_CODES, String.valueOf(OAuthConstants.HTTP_SC_UNAUTHORIZED)); } try { MessageContext cloneMessageContext = MessageHelper.cloneMessageContext(synCtx); MessageCache.getInstance().addMessageContext(synCtx.getMessageID(), cloneMessageContext); } catch (AxisFault axisFault) { handleError(synCtx, "Error cloning the message context for oauth configured http endpoint " + this.getName(), axisFault); } super.send(synCtx); }

Target:
public void send(MessageContext synCtx) { try { oAuthHandler.setOAuthHeader(synCtx); if (synCtx.getProperty(SynapseConstants.BLOCKING_MSG_SENDER) != null) { org.apache.axis2.context.MessageContext axis2Ctx = ((Axis2MessageContext) synCtx).getAxis2MessageContext(); axis2Ctx.setProperty(HTTPConstants.NON_ERROR_HTTP_STATUS_CODES, String.valueOf(OAuthConstants.HTTP_SC_UNAUTHORIZED)); } MessageContext cloneMessageContext = MessageHelper.cloneMessageContext(synCtx); MessageCache.getInstance().addMessageContext(synCtx.getMessageID(), cloneMessageContext); super.send(synCtx); } catch (OAuthException e) { handleError(synCtx, "Could not generate access token for oauth configured http endpoint " + this.getName(), e); } catch (AxisFault axisFault) { handleError(synCtx, "Error cloning the message context for oauth configured http endpoint " + this.getName(), axisFault); } }
Source:
private void internalLoad(Properties props, Set<String> seenUrls, ClassLoader loader, URL url, StrInterpolator strInterpolator, StrInterpolator.Lookup lookup) { LOG.debug("Attempting to load : {}", url.toExternalForm()); if (!seenUrls.contains(url.toExternalForm())) { seenUrls.add(url.toExternalForm()); try { Map<String, Object> p = new URLConfigReader(url).call().getToAdd(); LOG.debug("Loaded : {}", url.toExternalForm()); props.putAll(p); Object next = p.get(INCLUDE_KEY); if (next != null && next instanceof String) { p.remove(INCLUDE_KEY); for (String urlString : ((String) next).split(",")) { URL nextUrl = getResource(loader, strInterpolator.create(lookup).resolve(urlString)); if (nextUrl != null) { internalLoad(props, seenUrls, loader, nextUrl, strInterpolator, lookup); } } } } catch (IOException e) { LOG.debug("Unable to load configuration file {}. {}", url, e.getMessage()); } } else { LOG.debug("Circular dependency trying to load url : {}", url.toExternalForm()); } }

Target:
private void internalLoad(Properties props, Set<String> seenUrls, ClassLoader loader, URL url, StrInterpolator strInterpolator, StrInterpolator.Lookup lookup) { LOG.debug("Attempting to load : {}", url.toExternalForm()); if (!seenUrls.contains(url.toExternalForm())) { seenUrls.add(url.toExternalForm()); try { Map<String, Object> p = new URLConfigReader(url).call().getToAdd(); LOG.debug("Loaded : {}", url.toExternalForm()); props.putAll(p); String next = (String) p.get(INCLUDE_KEY); if (next != null) { p.remove(INCLUDE_KEY); for (String urlString : next.split(",")) { URL nextUrl = getResource(loader, strInterpolator.create(lookup).resolve(urlString)); if (nextUrl != null) { internalLoad(props, seenUrls, loader, nextUrl, strInterpolator, lookup); } } } } catch (IOException e) { LOG.debug("Unable to load configuration file {}. {}", url, e.getMessage()); } } else { LOG.debug("Circular dependency trying to load url : {}", url.toExternalForm()); } }
Source:
public PositionedCryptoInputStream(Properties props, ReadableByteChannel in, byte[] key, byte[] iv, long streamOffset) throws IOException { this(in, Utils.getCipherInstance(props), Utils.getBufferSize(props), key, iv, streamOffset); }

Target:
public PositionedCryptoInputStream(Properties props, ReadableByteChannel in, byte[] key, byte[] iv, long streamOffset) throws IOException { this(in, CipherFactory.getInstance(props), Utils.getBufferSize(props), key, iv, streamOffset); }
Source:
public static BBox createBBox(NodeAccess na, EdgeIteratorState edgeState) { return BBox.fromPoints(na.getLatitude(edgeState.getBaseNode()), na.getLongitude(edgeState.getBaseNode()), na.getLatitude(edgeState.getAdjNode()), na.getLongitude(edgeState.getAdjNode())); }

Target:
private static BBox createBBox(NodeAccess na, EdgeIteratorState edgeState) { return BBox.fromPoints(na.getLatitude(edgeState.getBaseNode()), na.getLongitude(edgeState.getBaseNode()), na.getLatitude(edgeState.getAdjNode()), na.getLongitude(edgeState.getAdjNode())); }
Source:
public CompoundSlotProvider add(InventoryAdapter<TInventory, TStack> adapter) { for (Inventory slot : adapter.slots()) { SlotLens slotLens = ((SlotLens<IInventory, ItemStack>) ((SlotAdapter) slot).getRootLens()); if (!slotList.contains(slotLens)) { slotList.add(slotLens); } } return this; }

Target:
public CompoundSlotProvider add(InventoryAdapter<TInventory, TStack> adapter) { for (Inventory slot : adapter.slots()) { SlotLens slotLens = ((SlotLens<IInventory, ItemStack>) ((SlotAdapter) slot).getRootLens()); if (!this.slotList.contains(slotLens)) { this.slotList.add(slotLens); } } return this; }
Source:
protected EntitySpec<?> getMemberSpec() { EntitySpec<?> spec = config().get(MEMBER_SPEC); if (spec == null) { spec = EntitySpec.create(MongoDBServer.class); } MongoDBAuthenticationUtils.setAuthenticationConfig(spec, this); return spec; }

Target:
protected EntitySpec<?> getMemberSpec() { EntitySpec<?> spec = config().get(MEMBER_SPEC); if (spec == null) { spec = EntitySpec.create(MongoDBServer.class); config().set(MEMBER_SPEC, spec); } MongoDBAuthenticationUtils.setAuthenticationConfig(spec, this); return spec; }
Source:
public void processLeftData(final MistDataEvent input) { S state = initializeStateSup.get(); try { final Collection<IN> value = ((WindowData<IN>) input.getValue()).getDataCollection(); final Iterator<IN> iterator = value.iterator(); while (iterator.hasNext()) { final IN data = iterator.next(); state = updateStateFunc.apply(data, state); } input.setValue(produceResultFunc.apply(state)); outputEmitter.emitData(input); } catch (ClassCastException e) { throw e; } }

Target:
public void processLeftData(final MistDataEvent input) { S state = initializeStateSup.get(); try { final Collection<IN> value = ((WindowData<IN>) input.getValue()).getDataCollection(); final Iterator<IN> iterator = value.iterator(); while (iterator.hasNext()) { final IN data = iterator.next(); state = updateStateFunc.apply(data, state); } input.setValue(produceResultFunc.apply(state)); outputEmitter.emitData(input); } catch (final ClassCastException e) { throw e; } }
Source:
public void getConceptsByClass_shouldGetConceptsByClass() { ConceptClass cc = new ConceptClass(3); List<Concept> concepts = conceptService.getConceptsByClass(cc); Assert.assertEquals(4, concepts.size()); }

Target:
public void getConceptsByClass_shouldGetConceptsByClass() { List<Concept> actualConcepts = conceptService.getConceptsByClass(new ConceptClass(3)); Assert.assertThat(actualConcepts.size(), is(4)); Assert.assertThat(actualConcepts, containsInAnyOrder(conceptService.getConcept(3), conceptService.getConcept(60), conceptService.getConcept(88), conceptService.getConcept(792))); }
Source:
public Response associatePlatformAlert(@PathParam("alert") String alert, @QueryParam("type") String type) { alertService.applyDefaults(alert, AlertReferenceType.valueOf(type.toUpperCase())); return Response.noContent().build(); }

Target:
public Response associatePlatformAlert(@PathParam("alert") String alert, @QueryParam("type") String type) { alertService.applyDefaults(alert, AlertReferenceType.valueOf(type.toUpperCase())); return Response.ok().build(); }
Source:
public void autoConfirm() { if (!isAcknowledgementSent) { confirmMessage(); } }

Target:
public void autoConfirm() { executeAutoAck(() -> { confirmMessage(); LOG.debug(String.format("[consumer tag: %s] A message was automatically confirmed after message processing", consumerTag)); }); }
Source:
public void process(Exchange exchange) throws Exception { final Message in = exchange.getIn(); String fcrepoBinaryUri = (String) in.getHeader(FCREPO_URI); PIDs.setRepository(repository); int retryAttempt = 0; while (true) { try { SolrUpdateRequest updateRequest = new SolrUpdateRequest(fcrepoBinaryUri, IndexingActionType.ADD); DocumentIndexingPackage dip = updateRequest.getDocumentIndexingPackage(); dip = factory.createDip(updateRequest.getPid()); updateRequest.setDocumentIndexingPackage(dip); pipeline.process(dip); solrUpdateDriver.addDocument(dip.getDocument()); } catch (Exception e) { if (retryAttempt == maxRetries) { throw e; } retryAttempt++; log.info("Unable to update solr for {}. Retrying, attempt {}", fcrepoBinaryUri, retryAttempt); TimeUnit.MILLISECONDS.sleep(retryDelay); } } }

Target:
public void process(Exchange exchange) throws Exception { final Message in = exchange.getIn(); String fcrepoBinaryUri = (String) in.getHeader(FCREPO_URI); int retryAttempt = 0; while (true) { try { SolrUpdateRequest updateRequest = new SolrUpdateRequest(fcrepoBinaryUri, IndexingActionType.ADD); DocumentIndexingPackage dip = factory.createDip(updateRequest.getPid()); updateRequest.setDocumentIndexingPackage(dip); pipeline.process(dip); solrUpdateDriver.addDocument(dip.getDocument()); return; } catch (Exception e) { if (retryAttempt == maxRetries) { throw e; } retryAttempt++; log.info("Unable to update solr for {}. Retrying, attempt {}", fcrepoBinaryUri, retryAttempt); TimeUnit.MILLISECONDS.sleep(retryDelay); } } }
Source:
default BundleSpecBuilder addConfiguration(URL url) { return requireCapability("osgi.extender").filter("(osgi.extender=osgi.configurator)") .addResource(CONFIGURATION_JSON, url); }

Target:
default BundleSpecBuilder addConfiguration(URL url) { return requireCapability(ExtenderNamespace.EXTENDER_NAMESPACE) .filter(String.format("(%s=%s)", ExtenderNamespace.EXTENDER_NAMESPACE, ConfiguratorConstants.CONFIGURATOR_EXTENDER_NAME)) .addResource(CONFIGURATION_JSON, url); }
Source:
protected AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz) { this(clazz,TimeUnit.MINUTES.toMillis(PERIOD_MINUTES)); }

Target:
protected AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz) { this(clazz, PERIOD); }
Source:
public void addTable(Table table) { String version = table.getVersion(); EntityDictionary dictionary = hashMapDataStores.computeIfAbsent(version, ERROR_OUT).getDictionary(); tables.put(dictionary.getEntityClass(table.getName(), version), table); addMetaData(table, version); table.getColumns().forEach(this::addColumn); }

Target:
public void addTable(Table table) { String version = table.getVersion(); EntityDictionary dictionary = hashMapDataStores.computeIfAbsent(version, SERVER_ERROR).getDictionary(); tables.put(dictionary.getEntityClass(table.getName(), version), table); addMetaData(table, version); table.getColumns().forEach(this::addColumn); }
Source:
protected boolean runScript(ResourceResolver resourceResolver, OnDeployScript script) { Resource statusResource = getOrCreateStatusTrackingResource(resourceResolver, script.getClass()); String status = getScriptStatus(statusResource); if (status == null || status.equals(SCRIPT_STATUS_FAIL)) { trackScriptStart(statusResource); try { script.execute(resourceResolver); logger.info("On-deploy script completed successfully: {}", statusResource.getPath()); trackScriptEnd(statusResource, SCRIPT_STATUS_SUCCESS, null); return true; } catch (Exception e) { String errMsg = "On-deploy script failed: " + statusResource.getPath(); logger.error(errMsg, e); trackScriptEnd(statusResource, SCRIPT_STATUS_FAIL, ExceptionUtils.getStackTrace(e.getCause())); throw new OnDeployEarlyTerminationException(new RuntimeException(errMsg)); } } else if (!status.equals(SCRIPT_STATUS_SUCCESS)) { String errMsg = "On-deploy script is already running or in an otherwise unknown state: " + statusResource.getPath() + " - status: " + status; logger.error(errMsg); throw new OnDeployEarlyTerminationException(new RuntimeException(errMsg)); } else { logger.debug("Skipping on-deploy script, as it is already complete: {}", statusResource.getPath()); } return false; }

Target:
protected boolean runScript(ResourceResolver resourceResolver, OnDeployScript script) { Resource statusResource = getOrCreateStatusTrackingResource(resourceResolver, script.getClass()); String status = getScriptStatus(statusResource); if (status == null || status.equals(SCRIPT_STATUS_FAIL)) { trackScriptStart(statusResource); try { script.execute(resourceResolver); logger.info("On-deploy script completed successfully: {}", statusResource.getPath()); trackScriptEnd(statusResource, SCRIPT_STATUS_SUCCESS, ""); return true; } catch (Exception e) { String errMsg = "On-deploy script failed: " + statusResource.getPath(); logger.error(errMsg, e); trackScriptEnd(statusResource, SCRIPT_STATUS_FAIL, ExceptionUtils.getStackTrace(e.getCause())); throw new OnDeployEarlyTerminationException(new RuntimeException(errMsg)); } } else if (!status.equals(SCRIPT_STATUS_SUCCESS)) { String errMsg = "On-deploy script is already running or in an otherwise unknown state: " + statusResource.getPath() + " - status: " + status; logger.error(errMsg); throw new OnDeployEarlyTerminationException(new RuntimeException(errMsg)); } else { logger.debug("Skipping on-deploy script, as it is already complete: {}", statusResource.getPath()); } return false; }
Source:
private static void assertSetElements(final SortedSet<String> expectedSet, final SortedSet<String> actualSet) { final Iterator<String> expectedIterator = expectedSet.iterator(); final Iterator<String> actualIterator = actualSet.iterator(); for (int i = 0; i < expectedSet.size(); i++) { String expected = expectedIterator.next(); String actual = actualIterator.next(); try { Assert.assertEquals(expected, actual); } catch (AssertionError e) { LOG.error("Expected: " + expected + "\n but was:" + actual); } } }

Target:
private static void assertSetElements(final SortedSet<String> expectedSet, final SortedSet<String> actualSet) { final Iterator<String> expectedIterator = expectedSet.iterator(); final Iterator<String> actualIterator = actualSet.iterator(); for (int i = 0; i < expectedSet.size(); i++) { String expected = expectedIterator.next(); String actual = actualIterator.next(); if (!expected.equals(actual)) { LOG.error("Expected: " + expected + "\n but was:" + actual); } } Assert.assertEquals(expectedSet, actualSet); }
Source:
public void run() { InitializerWizard wizard = new InitializerWizard(this.editingDomain.getResourceSet(), selection); WizardDialog dialog = new WizardDialog(null, wizard); dialog.create(); if (dialog.open() == Window.OK) { this.result = wizard.getCommand(); result.execute(); } }

Target:
public void run() { InitializerWizard wizard = new InitializerWizard(this.editingDomain.getResourceSet(), selection); WizardDialog dialog = new WizardDialog(null, wizard); dialog.create(); if (dialog.open() == Window.OK) { this.result = wizard.getCommand(); editingDomain.getCommandStack().execute(result); } }
Source:
public ResponseEntity<?> createEventType(@Valid @RequestBody final EventType eventType, final Errors errors, final NativeWebRequest nativeWebRequest) { if (errors.hasErrors()) { return create(new ValidationProblem(errors), nativeWebRequest); } try { validateSchema(eventType); validatePartitioningStrategy(eventType); eventTypeRepository.saveEventType(eventType); topicRepository.createTopic(eventType.getName()); return status(HttpStatus.CREATED).build(); } catch (final InvalidEventTypeException | NoSuchPartitioningStrategyException | DuplicatedEventTypeNameException e) { LOG.warn(e.getMessage(), e); return create(e.asProblem(), nativeWebRequest); } catch (final TopicCreationException e) { LOG.error("Problem creating kafka topic. Rolling back event type database registration.", e); try { eventTypeRepository.removeEventType(eventType.getName()); } catch (final NakadiException e1) { return create(e.asProblem(), nativeWebRequest); } return create(e.asProblem(), nativeWebRequest); } catch (final NakadiException e) { LOG.error("Error creating event type " + eventType, e); return create(e.asProblem(), nativeWebRequest); } }

Target:
public ResponseEntity<?> createEventType(@Valid @RequestBody final EventType eventType, final Errors errors, final NativeWebRequest nativeWebRequest) { if (errors.hasErrors()) { return create(new ValidationProblem(errors), nativeWebRequest); } try { validateSchema(eventType); validatePartitioningStrategy(eventType); eventTypeRepository.saveEventType(eventType); topicRepository.createTopic(eventType.getName()); return status(HttpStatus.CREATED).build(); } catch (final InvalidEventTypeException | NoSuchPartitioningStrategyException | DuplicatedEventTypeNameException e) { LOG.debug("Failed to create EventType.", e); return create(e.asProblem(), nativeWebRequest); } catch (final TopicCreationException e) { LOG.error("Problem creating kafka topic. Rolling back event type database registration.", e); try { eventTypeRepository.removeEventType(eventType.getName()); } catch (final NakadiException e1) { return create(e.asProblem(), nativeWebRequest); } return create(e.asProblem(), nativeWebRequest); } catch (final NakadiException e) { LOG.error("Error creating event type " + eventType, e); return create(e.asProblem(), nativeWebRequest); } }
Source:
public void edit(String code, LocalizedString description) { if (Bennu.getInstance().getPaymentMethodSet().stream().filter(i -> !i.equals(this)) .noneMatch(i -> i.getCode().equals(code))) { if(!this.getCode().equals(code) || !this.getDescription().equals(description)) { createLog(Bundle.MESSAGING, "log.paymentMethod.edited", getCode(), code, getLocalizedName(), description.getContent(I18N.getLocale())); setBennu(Bennu.getInstance()); setCode(code); setDescription(description); } } else { throw new DomainException(Optional.of(Bundle.ACCOUNTING), "error.payment.method.already.exists", code); } }

Target:
public void edit(String code, LocalizedString description) { if (Bennu.getInstance().getPaymentMethodSet().stream().filter(i -> !i.equals(this)) .noneMatch(i -> i.getCode().equals(code))) { if (!this.getCode().equals(code) || !this.getDescription().equals(description)) { createLog(Bundle.MESSAGING, "log.paymentMethod.edited", getCode(), code, getFormattedDescriptionForLog(getDescription()), getFormattedDescriptionForLog(description)); setCode(code); setDescription(description); } } else { throw new DomainException(Optional.of(Bundle.ACCOUNTING), "error.payment.method.already.exists", code); } }
Source:
public void testReplaceTitle() throws Exception { PID pid = makePid(); String oldTitle = "old_work_title"; Model workModel = ModelFactory.createDefaultModel(); workModel.add(workModel.createResource(pid.getRepositoryPath()), DcElements.title, oldTitle); WorkObject work = repositoryObjectFactory.createWorkObject(pid, workModel); String newTitle = "new_work_title"; MvcResult result = mvc.perform(put("/edit/title/" + pid.getUUID()) .param("title", newTitle)) .andExpect(status().is2xxSuccessful()) .andReturn(); Map<String, Object> respMap = getMapFromResponse(result); assertEquals(pid.getUUID(), respMap.get("pid")); assertEquals("editTitle", respMap.get("action")); hasTitleValue(getUpdatedDescriptionDocument(work.getDescription()), newTitle); }

Target:
public void testReplaceTitle() throws Exception { PID pid = makePid(); String oldTitle = "old_work_title"; WorkObject work = repositoryObjectFactory.createWorkObject(pid, null); Document document = new Document(); document.addContent(new Element("mods", MODS_V3_NS) .addContent(new Element("titleInfo", MODS_V3_NS) .addContent(new Element("title", MODS_V3_NS).setText(oldTitle)))); File workModsFile = writeToFile(document); work.setDescription(workModsFile.toPath().toUri()); String newTitle = "new_work_title"; MvcResult result = mvc.perform(put("/edit/title/" + pid.getUUID()) .param("title", newTitle)) .andExpect(status().is2xxSuccessful()) .andReturn(); Map<String, Object> respMap = getMapFromResponse(result); assertEquals(pid.getUUID(), respMap.get("pid")); assertEquals("editTitle", respMap.get("action")); hasTitleValue(getUpdatedDescriptionDocument(work.getDescription()), newTitle); }
Source:
protected static Iterator<BucketResult> getResultsIterator(@AggregationState PrecisionRecallState state) { if (state.getTrueWeights() == null) { return Collections.<BucketResult>emptyList().iterator(); } final Double totalTrueWeight = Streams.stream(state.getTrueWeights().iterator()) .mapToDouble(c -> c.weight) .sum(); final Double totalFalseWeight = Streams.stream(state.getFalseWeights().iterator()) .mapToDouble(c -> c.weight) .sum(); return new Iterator<BucketResult>() { Iterator<FixedDoubleHistogram.Bin> trueIt = state.getTrueWeights().iterator(); Iterator<FixedDoubleHistogram.Bin> falseIt = state.getFalseWeights().iterator(); Double runningFalseWeight = 0.0; Double runningTrueWeight = 0.0; @Override public boolean hasNext() { return trueIt.hasNext() && totalTrueWeight > runningTrueWeight; } @Override public BucketResult next() { final FixedDoubleHistogram.Bin trueResult = trueIt.next(); final FixedDoubleHistogram.Bin falseResult = falseIt.next(); final BucketResult result = new BucketResult( trueResult.left, trueResult.right, totalTrueWeight, totalFalseWeight, runningTrueWeight, runningFalseWeight); runningTrueWeight += trueResult.weight; runningFalseWeight += falseResult.weight; return result; } @Override public void remove() { throw new UnsupportedOperationException(); } }; }

Target:
protected static Iterator<BucketResult> getResultsIterator(@AggregationState PrecisionRecallState state) { if (state.getTrueWeights() == null) { return Collections.<BucketResult>emptyList().iterator(); } final double totalTrueWeight = Streams.stream(state.getTrueWeights().iterator()) .mapToDouble(c -> c.weight) .sum(); final double totalFalseWeight = Streams.stream(state.getFalseWeights().iterator()) .mapToDouble(c -> c.weight) .sum(); return new Iterator<BucketResult>() { Iterator<FixedDoubleHistogram.Bin> trueIt = state.getTrueWeights().iterator(); Iterator<FixedDoubleHistogram.Bin> falseIt = state.getFalseWeights().iterator(); double runningFalseWeight; double runningTrueWeight; @Override public boolean hasNext() { return trueIt.hasNext() && totalTrueWeight > runningTrueWeight; } @Override public BucketResult next() { if (!trueIt.hasNext() || !falseIt.hasNext()) { throw new NoSuchElementException(); } final FixedDoubleHistogram.Bin trueResult = trueIt.next(); final FixedDoubleHistogram.Bin falseResult = falseIt.next(); final BucketResult result = new BucketResult( trueResult.left, trueResult.right, totalTrueWeight, totalFalseWeight, runningTrueWeight, runningFalseWeight); runningTrueWeight += trueResult.weight; runningFalseWeight += falseResult.weight; return result; } @Override public void remove() { throw new UnsupportedOperationException(); } }; }
Source:
public WriteResult<Brand, Content> visit(Brand brand) { metricRegistry.meter(visit + "Brand" + METER_CALLED).mark(); try { Optional<Content> previous = getPreviousContent(brand); brand.setItemRefs(ImmutableSet.of()); brand.setSeriesRefs(ImmutableSet.of()); if (previous.isPresent()) { return writeBrandWithPrevious(brand, previous.get()); } updateTimes(brand); handleContainer(brand, Optional.absent()); write(brand, NO_PREVIOUS); return WriteResult.<Brand, Content>written(brand).build(); } catch (RuntimeException e) { metricRegistry.meter(visit + METER_FAILURE).mark(); throw Throwables.propagate(e); } }

Target:
public WriteResult<Brand, Content> visit(Brand brand) { metricRegistry.meter(visitMeterPrefix + "Brand." + METER_CALLED).mark(); try { Optional<Content> previous = getPreviousContent(brand); brand.setItemRefs(ImmutableSet.of()); brand.setSeriesRefs(ImmutableSet.of()); if (previous.isPresent()) { return writeBrandWithPrevious(brand, previous.get()); } updateTimes(brand); handleContainer(brand, Optional.absent()); write(brand, NO_PREVIOUS); return WriteResult.<Brand, Content>written(brand).build(); } catch (RuntimeException e) { metricRegistry.meter(visitMeterPrefix + "Brand." + METER_FAILURE).mark(); throw Throwables.propagate(e); } }
Source:
public boolean handleError(RowWithMetaData metaData, ClientResponse response, String error) { if (m_args.maxerrors <= 0) return false; if (response != null) { byte status = response.getStatus(); if (status != ClientResponse.SUCCESS) { m_log.error("Failed to Insert Row: error=" + error + " response=" + ((ClientResponseImpl)response).toJSONString() + " data=" + metaData.rawLine); long fc = m_failedCount.incrementAndGet(); String errMsg = null; if (m_args.maxerrors > 0 && fc > m_args.maxerrors) { errMsg = "Max error count reached, exiting."; } else if (status != ClientResponse.USER_ABORT && status != ClientResponse.GRACEFUL_FAILURE) { errMsg = "Error response received from database, exiting; status=" + Byte.toString(status); } if (errMsg != null) { m_log.error(errMsg); try { closeExecutors(); } catch (InterruptedException e) { } return true; } } else { if (metaData.procedureCallback != null) { try { metaData.procedureCallback.clientCallback(response); } catch (Exception e) { } } } } return false; }

Target:
public boolean handleError(RowWithMetaData metaData, ClientResponse response, String error) { if (m_args.maxerrors <= 0) return false; if (response != null) { byte status = response.getStatus(); if (status != ClientResponse.SUCCESS) { m_log.error("Failed to Insert Row: error=" + error + " response=" + ((ClientResponseImpl)response).toJSONString() + " data=" + metaData.rawLine); long failCount = m_failedCount.incrementAndGet(); String errMsg = null; if (m_args.maxerrors > 0 && failCount > m_args.maxerrors) { errMsg = "Max error count reached, exiting."; } else if (status != ClientResponse.USER_ABORT && status != ClientResponse.GRACEFUL_FAILURE) { errMsg = "Error response received from database, exiting; status=" + Byte.toString(status); } if (errMsg != null) { m_log.error(errMsg); try { closeExecutors(); } catch (InterruptedException e) { } return true; } } else { if (metaData.procedureCallback != null) { try { metaData.procedureCallback.clientCallback(response); } catch (Exception e) { } } } } return false; }
Source:
public static void store(BaseObject baseObject, File f) { if (baseObject.getName().contains("?") && baseObject instanceof DataCenter){ baseObject.setName(baseObject.getId()); } ObjectOutputStream oos = null; try { oos = new ObjectOutputStream(new FileOutputStream(f)); oos.writeObject(baseObject); } catch (Exception e) { log.error("Cannot save object", e); throw new RuntimeException("Cannot save object", e); } finally { IOUtils.closeQuietly(oos); baseObject.setLastUpdate(f.lastModified()); } }

Target:
public static void store(BaseObject baseObject, File f) { if (baseObject instanceof DataCenter && baseObject.getName().contains("?")){ baseObject.setName(baseObject.getId()); } ObjectOutputStream oos = null; try { oos = new ObjectOutputStream(new FileOutputStream(f)); oos.writeObject(baseObject); } catch (Exception e) { log.error("Cannot save object", e); throw new RuntimeException("Cannot save object", e); } finally { IOUtils.closeQuietly(oos); baseObject.setLastUpdate(f.lastModified()); } }
Source:
private void addHerder(SourceAndTarget sourceAndTarget) { log.info("creating herder for " + sourceAndTarget.toString()); Map<String, String> workerProps = config.workerConfig(sourceAndTarget); String advertisedUrl = advertisedBaseUrl + "/" + sourceAndTarget.source(); String workerId = sourceAndTarget.toString(); Plugins plugins = new Plugins(workerProps); plugins.compareAndSwapWithDelegatingLoader(); DistributedConfig distributedConfig = new DistributedConfig(workerProps); String kafkaClusterId = ConnectUtils.lookupKafkaClusterId(distributedConfig); KafkaOffsetBackingStore offsetBackingStore = new KafkaOffsetBackingStore(kafkaClusterId); offsetBackingStore.configure(distributedConfig); Worker worker = new Worker(workerId, time, plugins, distributedConfig, offsetBackingStore, CLIENT_CONFIG_OVERRIDE_POLICY, kafkaClusterId); WorkerConfigTransformer configTransformer = worker.configTransformer(); Converter internalValueConverter = worker.getInternalValueConverter(); StatusBackingStore statusBackingStore = new KafkaStatusBackingStore(time, internalValueConverter, kafkaClusterId); statusBackingStore.configure(distributedConfig); ConfigBackingStore configBackingStore = new KafkaConfigBackingStore( internalValueConverter, distributedConfig, configTransformer, kafkaClusterId); Herder herder = new DistributedHerder(distributedConfig, time, worker, kafkaClusterId, statusBackingStore, configBackingStore, advertisedUrl, CLIENT_CONFIG_OVERRIDE_POLICY); herders.put(sourceAndTarget, herder); }

Target:
private void addHerder(SourceAndTarget sourceAndTarget) { log.info("creating herder for " + sourceAndTarget.toString()); Map<String, String> workerProps = config.workerConfig(sourceAndTarget); String advertisedUrl = advertisedBaseUrl + "/" + sourceAndTarget.source(); String workerId = sourceAndTarget.toString(); Plugins plugins = new Plugins(workerProps); plugins.compareAndSwapWithDelegatingLoader(); DistributedConfig distributedConfig = new DistributedConfig(workerProps); String kafkaClusterId = ConnectUtils.lookupKafkaClusterId(distributedConfig); KafkaOffsetBackingStore offsetBackingStore = new KafkaOffsetBackingStore(); offsetBackingStore.configure(distributedConfig); Worker worker = new Worker(workerId, time, plugins, distributedConfig, offsetBackingStore, CLIENT_CONFIG_OVERRIDE_POLICY); WorkerConfigTransformer configTransformer = worker.configTransformer(); Converter internalValueConverter = worker.getInternalValueConverter(); StatusBackingStore statusBackingStore = new KafkaStatusBackingStore(time, internalValueConverter); statusBackingStore.configure(distributedConfig); ConfigBackingStore configBackingStore = new KafkaConfigBackingStore( internalValueConverter, distributedConfig, configTransformer); Herder herder = new DistributedHerder(distributedConfig, time, worker, kafkaClusterId, statusBackingStore, configBackingStore, advertisedUrl, CLIENT_CONFIG_OVERRIDE_POLICY); herders.put(sourceAndTarget, herder); }
Source:
private boolean createResumeFromCacheFile( MavenExecutionResult result, String resumeFromProject ) { String buildDirectory = result.getProject().getBuild().getDirectory(); File buildDirectoryFile = new File( buildDirectory ); boolean isBuildDirectoryPresent = ( buildDirectoryFile.exists() || buildDirectoryFile.mkdirs() ); if ( isBuildDirectoryPresent ) { Path resumeFromCache = Paths.get( buildDirectory, "resume-from-cache" ); try { Files.write( resumeFromCache, resumeFromProject.getBytes() ); return true; } catch ( IOException e ) { slf4jLogger.debug( "Failed writing last failed project to resume-from-cache file at: {}", resumeFromCache, e ); return false; } } else { slf4jLogger.debug( "Failed creating build directory for root project to store resume-from-cache file" ); return false; } }

Target:
private boolean createResumeFromCacheFile( MavenExecutionResult result, String resumeFromProject ) { String buildDirectory = result.getProject().getBuild().getDirectory(); File buildDirectoryFile = new File( buildDirectory ); boolean isBuildDirectoryPresent = buildDirectoryFile.exists() || buildDirectoryFile.mkdirs(); if ( isBuildDirectoryPresent ) { Path resumeFromCache = Paths.get( buildDirectory, "resume-from-cache" ); try { Files.write( resumeFromCache, resumeFromProject.getBytes() ); return true; } catch ( IOException e ) { slf4jLogger.info( "Failed writing last failed project to resume-from-cache file at: {}", resumeFromCache, e ); return false; } } else { slf4jLogger.info( "Failed creating build directory for root project to store resume-from-cache file" ); return false; } }
Source:
private static HaxeFunctionDescription tryGetDescription(HaxeCallExpression callExpression) { final HaxeReference expression = (HaxeReference)callExpression.getExpression(); final PsiElement target = expression.resolve(); final boolean isExtension = expression.resolveIsExtension(); if (target instanceof HaxeMethod) { final HaxeClass targetParent = (HaxeClass) ((HaxeMethod) target).getContainingClass(); final HaxeClassResolveResult resolveResult = HaxeClassResolveResult.create(targetParent); return HaxeFunctionDescription.createDescription((HaxeNamedComponent) target, resolveResult, isExtension); } return null; }

Target:
private static HaxeFunctionDescription tryGetDescription(HaxeCallExpression callExpression) { final HaxeReference expression = (HaxeReference)callExpression.getExpression(); final PsiElement target = expression.resolve(); final boolean isStaticExtension = expression.resolveIsStaticExtension(); if (target instanceof HaxeMethod) { final HaxeClass targetParent = (HaxeClass) ((HaxeMethod) target).getContainingClass(); final HaxeClassResolveResult resolveResult = HaxeClassResolveResult.create(targetParent); return HaxeFunctionDescription.createDescription((HaxeNamedComponent) target, resolveResult, isStaticExtension); } return null; }
Source:
private void initialize() { this.setOrder(26); this.setName(NAME); if (View.isInitialised()) { getScanStatus(); } }

Target:
private void initialize() { this.setOrder(26); this.setName(NAME); }
Source:
public static int totalVideoRAMSizeMb(VM vm) { Map<String, Integer> params = getVideoDeviceParams(vm.getStaticData()); return (params.getOrDefault(VdsProperties.VIDEO_RAM, 0) + params.getOrDefault(VdsProperties.VIDEO_VRAM, 0) + 1023) / 1024; }

Target:
public static int totalVideoRAMSizeMb(VM vm) { Map<String, Integer> params = getVideoDeviceRAMSettings(vm.getStaticData()); return (params.getOrDefault(VdsProperties.VIDEO_RAM, 0) + params.getOrDefault(VdsProperties.VIDEO_VRAM, 0) + 1023) / 1024; }