auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeReport(Locale locale) throws MavenReportException { getLog().info("Report Version: " + reportVersion); getLog().info("Results Pattern: " + resultsPattern); File[] reportDirectories = getReportDirectories(projectBaseDirectory, resultsPattern); getLog().info(String.format("Found [%s] results directories by pattern [%s]", reportDirectories.length, resultsPattern)); if (reportDirectories.length == 0) { throw new MavenReportException(String.format("Can't find any results directories by pattern [%s]", resultsPattern)); } try { Aether aether = Aether.aether(repoSystem, repoSession, projectRepos); AllureReportBuilder builder = new AllureReportBuilder(reportVersion, outputDirectory, aether); getLog().info("Generate report to " + outputDirectory); builder.processResults(reportDirectories); if (failReportIfEmpty && isReportEmpty()) { throw new MavenReportException("There are no test cases info in given result" + " directories found"); } getLog().info("Report data generated successfully. Unpack report face..."); builder.unpackFace(); getLog().info("Report unpacked successfully."); render(getSink(), getName(locale)); } catch (AllureReportBuilderException e) { getLog().error("Can't generate allure report data", e); throw new MavenReportException("Can't generate allure report data", e); } }

Target:
protected void executeReport(Locale locale) throws MavenReportException { getLog().info("Report Version: " + reportVersion); getLog().info("Results Pattern: " + resultsPattern); File[] reportDirectories = getReportDirectories(projectBaseDirectory, resultsPattern); getLog().info(String.format("Found [%s] results directories by pattern [%s]", reportDirectories.length, resultsPattern)); logDirectories(reportDirectories); if (reportDirectories.length == 0) { throw new MavenReportException(String.format("Can't find any results directories by pattern [%s]", resultsPattern)); } try { Aether aether = Aether.aether(repoSystem, repoSession, projectRepos); AllureReportBuilder builder = new AllureReportBuilder(reportVersion, outputDirectory, aether); getLog().info("Generate report to " + outputDirectory); builder.processResults(reportDirectories); if (failReportIfEmpty && isReportEmpty()) { throw new MavenReportException("There are no allure results found."); } getLog().info("Report data generated successfully. Unpack report face..."); builder.unpackFace(); getLog().info("Report unpacked successfully."); render(getSink(), getName(locale)); } catch (AllureReportBuilderException e) { getLog().error("Can't generate allure report data", e); throw new MavenReportException("Can't generate allure report data", e); } }
Source:
public String getCsvSeparator() { String csvSeparatorValue = getControllerProperties().getProperty( PROP_CONTROLLER_CSV_SEPARATOR, "comma"); if (csvSeparatorValue.equals("comma")) { csvSeparatorValue = ","; } else if (csvSeparatorValue.equals("tab")) { csvSeparatorValue = "\t"; } else { csvSeparatorValue = ";"; } return csvSeparatorValue; }

Target:
public String getCsvSeparator() { String csvSeparator = getControllerProperties().getProperty(PROP_CONTROLLER_CSV_SEPARATOR); if (("tab").equals(csvSeparator)) { csvSeparator = "\t"; } else if (("semicolon").equals(csvSeparator)) { csvSeparator = ";"; } else { csvSeparator = ","; } return csvSeparator; }
Source:
public static void warnIfDeprecatedDnsLookupValue(AbstractConfig config) { String clientDnsLookupValue = config.getString(CLIENT_DNS_LOOKUP_CONFIG); if (clientDnsLookupValue.equals(ClientDnsLookup.DEFAULT.toString())) log.warn("Configuration '{}' with value '{}' is deprecated and will be removed in " + "future version. Please use '{}' or another non-deprecated value.", CLIENT_DNS_LOOKUP_CONFIG, ClientDnsLookup.DEFAULT.toString(), ClientDnsLookup.USE_ALL_DNS_IPS); }

Target:
public static void warnIfDeprecatedDnsLookupValue(AbstractConfig config) { String clientDnsLookupValue = config.getString(CLIENT_DNS_LOOKUP_CONFIG); if (clientDnsLookupValue.equals(ClientDnsLookup.DEFAULT.toString())) log.warn("Configuration '{}' with value '{}' is deprecated and will be removed in " + "future version. Please use '{}' or another non-deprecated value.", CLIENT_DNS_LOOKUP_CONFIG, ClientDnsLookup.DEFAULT, ClientDnsLookup.USE_ALL_DNS_IPS); }
Source:
public static boolean hasElytraFlightAbility(EntityLivingBase player, ItemStack itemstack) { if(!(player instanceof EntityPlayer)) return false; boolean vanillaElytra = itemstack.getItem() == Items.ELYTRA && ItemElytra.isUsable(itemstack); double attributeValue = player.getEntityAttribute(SharedMonsterAttributes.ELYTRA_FLIGHT).getAttributeValue(); return attributeValue>1.0D || (vanillaElytra && attributeValue >=1.0D); }

Target:
public static boolean hasElytraFlightAbility(EntityLivingBase player, ItemStack itemstack) { boolean vanillaElytra = itemstack.getItem() == Items.ELYTRA && ItemElytra.isUsable(itemstack); if (!(player instanceof EntityPlayer)) { return vanillaElytra; } double attributeValue = player.getEntityAttribute(EntityPlayer.ELYTRA_FLIGHT).getAttributeValue(); return attributeValue > 1.0D || (vanillaElytra && attributeValue >= 1.0D); }
Source:
private String formatMessage(long extraSleepTime, Map<String, GcTimes> gcTimesAfterSleep, Map<String, GcTimes> gcTimesBeforeSleep) { Set<String> gcBeanNames = new HashSet<>(gcTimesAfterSleep.keySet()); gcBeanNames.retainAll(gcTimesBeforeSleep.keySet()); List<String> gcDiffs = new ArrayList<>(); for (String name : gcBeanNames) { GcTimes diff = gcTimesAfterSleep.get(name).subtract(gcTimesBeforeSleep.get(name)); if (diff.gcCount != 0) { gcDiffs.add("GC pool '" + name + "' had collection(s): " + diff.toString()); } } String ret = "Detected pause in JVM or host machine (eg GC): pause of approximately " + extraSleepTime + "ms, total pause: info level: " + numGcInfoThresholdExceeded + ", warn level: " + numGcWarnThresholdExceeded + "\n"; if (gcDiffs.isEmpty()) { ret += ("No GCs detected"); } else { ret += String.join("\n", gcDiffs); } return ret; }

Target:
private String formatMessage(long extraSleepTime, Map<String, GcTimes> gcTimesAfterSleep, Map<String, GcTimes> gcTimesBeforeSleep) { Set<String> gcBeanNames = new HashSet<>(gcTimesAfterSleep.keySet()); gcBeanNames.retainAll(gcTimesBeforeSleep.keySet()); List<String> gcDiffs = new ArrayList<>(); for (String name : gcBeanNames) { GcTimes diff = gcTimesAfterSleep.get(name).subtract(gcTimesBeforeSleep.get(name)); if (diff.gcCount != 0) { gcDiffs.add("GC pool '" + name + "' had collection(s): " + diff.toString()); } } String ret = String.format("Detected pause in JVM or host machine (eg GC): pause of approximately %d ms, " + "total pause: info level: %d, warn level: %d %n", extraSleepTime, numGcInfoThresholdExceeded, numGcWarnThresholdExceeded); if (gcDiffs.isEmpty()) { ret += ("No GCs detected"); } else { ret += String.join("\n", gcDiffs); } return ret; }
Source:
private static void addMeasurementFilter(final Map<String, String> requestParameters, final List<MeasurementFilter> measurementFilters, final int systemIndex, final int measurementIndex) { final String indexPostfix = "_" + (systemIndex + 1) + "_" + (measurementIndex + 1); final MeasurementFilter measurementFilter = new MeasurementFilter(); measurementFilter.setId(measurementIndex + 1); measurementFilter.setNode(requestParameters.get(Keys.KEY_MEASUREMENT_FILTER_NODE.concat(indexPostfix))); measurementFilters.add(measurementFilter); }

Target:
private static void addMeasurementFilter(final Map<String, String> requestParameters, final List<MeasurementFilter> measurementFilters, final int systemIndex, final int measurementIndex) { final String indexPostfix = "_" + (systemIndex + 1) + "_" + (measurementIndex + 1); final MeasurementFilter measurementFilter = new MeasurementFilter(); if (requestParameters.containsKey(Keys.KEY_MEASUREMENT_FILTER_ID.concat(indexPostfix))) { measurementFilter.setId( Integer.parseInt(requestParameters.get(Keys.KEY_MEASUREMENT_FILTER_ID.concat(indexPostfix)))); } measurementFilter.setNode(requestParameters.get(Keys.KEY_MEASUREMENT_FILTER_NODE.concat(indexPostfix))); measurementFilters.add(measurementFilter); }
Source:
private void checkResourceErrors() { Collection<Diagnostic> errors = Lists.newArrayList(); Collection<Viewpoint> activatedViewpoints = getActivatedViewpoints(); for (Viewpoint viewpoint : activatedViewpoints) { errors.addAll(viewpoint.eResource().getErrors()); } Iterable<Resource> representationResources = Iterables.concat(getReferencedSessionResources(), Sets.newHashSet(getSessionResource())); for (Resource resource : representationResources) { errors.addAll(resource.getErrors()); } for (Diagnostic diagnostic : errors) { if (diagnostic instanceof RuntimeException) { throw (RuntimeException) diagnostic; } else { RuntimeException runtimeException = new RuntimeException(diagnostic.getMessage()); throw runtimeException; } } }

Target:
private void checkResourceErrors() { Collection<ResourceVersionMismatchDiagnostic> diagnostics = Lists.newArrayList(); Collection<Viewpoint> activatedViewpoints = getSelectedViewpoints(true); for (Viewpoint viewpoint : activatedViewpoints) { for (Diagnostic diagnostic : viewpoint.eResource().getErrors()) { if (diagnostic instanceof ResourceVersionMismatchDiagnostic) { diagnostics.add((ResourceVersionMismatchDiagnostic) diagnostic); } } } if (!diagnostics.isEmpty()) { throw new DescriptionResourceVersionMismatchException(diagnostics); } Iterable<Resource> representationResources = Iterables.concat(getReferencedSessionResources(), Sets.newHashSet(getSessionResource())); for (Resource resource : representationResources) { for (Diagnostic diagnostic : resource.getErrors()) { if (diagnostic instanceof ResourceVersionMismatchDiagnostic) { diagnostics.add((ResourceVersionMismatchDiagnostic) diagnostic); } } } if (!diagnostics.isEmpty()) { throw new AirdResourceVersionMismatchException(diagnostics); } }
Source:
public void show() { super.show(); contentScrollPanel.getElement().getStyle().setHeight(getOffsetHeight() - 100, Unit.PX); contentPanel.getElement().getStyle().setProperty("minHeight", getOffsetHeight() - 115, Unit.PX); }

Target:
public void show() { super.show(); contentScrollPanel.getElement().getStyle().setHeight(getOffsetHeight() - HEADER_FOOTER_HEIGHT, Unit.PX); contentPanel.getElement().getStyle().setProperty("minHeight", getOffsetHeight() - HEADER_FOOTER_HEIGHT, Unit.PX); }
Source:
public void unregisterHandler(HandlerRegistration reg) { if (reg != null) { reg.removeHandler(); handlerRegistrations.remove(reg); } }

Target:
public final void unregisterHandler(HandlerRegistration reg) { if (reg != null) { reg.removeHandler(); handlerRegistrations.remove(reg); } }
Source:
public void testFailWithMultipleDisksWhichOneInBackupStorage() { final VM vm = new VM(); command.setVm(vm); when(vmDao.get(command.getParameters().getVmId())).thenReturn(vm); command.setCluster(new Cluster()); DiskImage image1 = new DiskImage(); Guid sdId1 = Guid.newGuid(); image1.setId(Guid.newGuid()); image1.setStorageIds(new ArrayList<>(Collections.singletonList(sdId1))); when(storageDomainStaticDao.get(sdId1)).thenReturn(backupStorageDomain(false)); DiskImage image2 = new DiskImage(); Guid sdId2 = Guid.newGuid(); image2.setId(Guid.newGuid()); image2.setStorageIds(new ArrayList<>(Collections.singletonList(sdId2))); when(storageDomainStaticDao.get(sdId1)).thenReturn(backupStorageDomain(true)); vm.getDiskMap().put(image1.getId(), image1); vm.getDiskMap().put(image2.getId(), image2); assertFalse("checkDisksNotInBackupStorage() fails to run because one or more disk is in backup domain", command.checkDisksNotInBackupStorage()); }

Target:
public void testFailWithMultipleDisksWhichOneInBackupStorage() { final VM vm = new VM(); command.setVm(vm); when(vmDao.get(command.getParameters().getVmId())).thenReturn(vm); command.setCluster(new Cluster()); Guid storageDomainId1 = initDiskImage(vm); when(storageDomainStaticDao.get(storageDomainId1)).thenReturn(backupStorageDomain(false)); Guid storageDomainId2 = initDiskImage(vm); when(storageDomainStaticDao.get(storageDomainId2)).thenReturn(backupStorageDomain(true)); assertFalse("checkDisksNotInBackupStorage() fails to run because one or more disk is in backup domain", command.checkDisksNotInBackupStorage()); }
Source:
public static void createThumbnail(final IndexedFile item, final IOnResult<Boolean> callback) { new Thread(new Runnable() { @Override public void run() { try { Bitmap thumb = FileUtils.getThumbnail(Utils.getContext(), item.getUnlockedFile()); if (thumb == null) return; File cache = Utils.getRandomCacheFile(".jpg"); FileOutputStream out = new FileOutputStream(cache); thumb.compress(Bitmap.CompressFormat.JPEG, 90, out); out.close(); File thumbFile = item.getThumbFile(); Utils.getMainCrypto().encrypt(thumbFile, cache, item.getName()); Utils.delete(cache); if (callback != null) { callback.onResult(true); } } catch (Exception e) { Utils.d("Failed to create thumbnail of item '" + item.getName() + "'. " + e.getMessage()); e.printStackTrace(); if (callback != null) { callback.onResult(false); } } } }).start(); }

Target:
public static void createThumbnail(final IndexedFile item, final IOnResult<Boolean> callback) { if (mCreatingThumbs.contains(item)) { callback.onResult(false); return; } mCreatingThumbs.add(item); new Thread(new Runnable() { @Override public void run() { boolean result = false; try { Bitmap thumb = FileUtils.getThumbnail(Utils.getContext(), item.getUnlockedFile()); if (thumb == null) { return; } File cache = Utils.getRandomCacheFile(".jpg"); FileOutputStream out = new FileOutputStream(cache); thumb.compress(Bitmap.CompressFormat.JPEG, 90, out); out.close(); File thumbFile = item.getThumbFile(); Utils.getMainCrypto().encrypt(thumbFile, cache, item.getName()); Utils.delete(cache); result = true; } catch (Exception e) { Utils.d("Failed to create thumbnail of item '" + item.getName() + "'. " + e.getMessage()); e.printStackTrace(); } mCreatingThumbs.remove(item); Utils.runCallbackOnMain(callback, result); } }).start(); }
Source:
private BigtableOptions( String clusterAdminHost, String tableAdminHost, String dataHost, String overrideIp, int port, String projectId, String zoneId, String clusterId, CredentialOptions credentialOptions, String userAgent, RetryOptions retryOptions, int timeoutMs, int channelCount) { Preconditions.checkArgument(channelCount > 0, "Channel count has to be at least 1."); Preconditions.checkArgument(timeoutMs >= -1, "ChannelTimeoutMs has to be positive, or -1 for none."); this.tableAdminHost = Preconditions.checkNotNull(tableAdminHost); this.clusterAdminHost = Preconditions.checkNotNull(clusterAdminHost); this.dataHost = Preconditions.checkNotNull(dataHost); this.overrideIp = overrideIp; this.port = port; this.projectId = projectId; this.zoneId = zoneId; this.clusterId = clusterId; this.credentialOptions = credentialOptions; this.userAgent = userAgent; this.retryOptions = retryOptions; this.timeoutMs = timeoutMs; this.channelCount = channelCount; this.clusterName = new BigtableClusterName(getProjectId(), getZoneId(), getClusterId()); LOG.debug("Connection Configuration: projectId: %s, zoneId: %s, clusterId: %s, data host %s, " + "table admin host %s, cluster admin host %s.", projectId, zoneId, clusterId, dataHost, tableAdminHost, clusterAdminHost); }

Target:
private BigtableOptions( String clusterAdminHost, String tableAdminHost, String dataHost, String overrideIp, int port, String projectId, String zoneId, String clusterId, CredentialOptions credentialOptions, String userAgent, RetryOptions retryOptions, int timeoutMs, int channelCount) { Preconditions.checkArgument(channelCount > 0, "Channel count has to be at least 1."); Preconditions.checkArgument(timeoutMs >= -1, "ChannelTimeoutMs has to be positive, or -1 for none."); this.tableAdminHost = Preconditions.checkNotNull(tableAdminHost); this.clusterAdminHost = Preconditions.checkNotNull(clusterAdminHost); this.dataHost = Preconditions.checkNotNull(dataHost); this.overrideIp = overrideIp; this.port = port; this.projectId = projectId; this.zoneId = zoneId; this.clusterId = clusterId; this.credentialOptions = credentialOptions; this.userAgent = userAgent; this.retryOptions = retryOptions; this.timeoutMs = timeoutMs; this.dataChannelCount = channelCount; if (!Strings.isNullOrEmpty(projectId) && !Strings.isNullOrEmpty(zoneId) && !Strings.isNullOrEmpty(clusterId)) { this.clusterName = new BigtableClusterName(getProjectId(), getZoneId(), getClusterId()); } else { this.clusterName = null; } LOG.debug("Connection Configuration: projectId: %s, zoneId: %s, clusterId: %s, data host %s, " + "table admin host %s, cluster admin host %s.", projectId, zoneId, clusterId, dataHost, tableAdminHost, clusterAdminHost); }
Source:
private String ensureValidLength(String fileName) { try { String encoded = URLEncoder.encode(fileName, "UTF-8"); if (encoded.length() <= fileNameShorteningThreshold) { Timber.d(""); return fileName; } else { Timber.d("Filename was longer than %d, shortening", fileNameShorteningThreshold); String shortenedFileName = encoded.substring(0, 90) + "..." + getExtension(fileName); Timber.d("Shortened filename '%s' to '%s'", fileName, shortenedFileName); return URLDecoder.decode(shortenedFileName, "UTF-8"); } } catch (Exception e) { Timber.w(e, "Failed to shorten file: %s", fileName); return fileName; } }

Target:
private String ensureValidLength(String fileName) { try { String encoded = URLEncoder.encode(fileName, "UTF-8"); if (encoded.length() <= fileNameShorteningThreshold) { Timber.d("No filename truncation necessary"); return fileName; } else { Timber.d("Filename was longer than %d, shortening", fileNameShorteningThreshold); int substringLength = fileNameShorteningThreshold - 10; String shortenedFileName = encoded.substring(0, substringLength) + "..." + getExtension(fileName); Timber.d("Shortened filename '%s' to '%s'", fileName, shortenedFileName); return URLDecoder.decode(shortenedFileName, "UTF-8"); } } catch (Exception e) { Timber.w(e, "Failed to shorten file: %s", fileName); return fileName; } }
Source:
public CloseNoOpServerProtocolHandler(String websocketPath) { super(websocketPath, null, false); }

Target:
CloseNoOpServerProtocolHandler(String websocketPath) { super(websocketPath, null, false); }
Source:
public byte[] getResourceContentAsBytes(String name) throws IOException { InputStream temp = null; if (getEngineContext() != null) { try { temp = getResourceAsStream(name); } catch (Exception e) { } } if (temp == null) { return FileUtils.readFileToByteArray(new File(name)); } try (InputStream is = temp) { return IOUtils.toByteArray(is); } }

Target:
public byte[] getResourceContentAsBytes(String name) throws IOException { if (getEngineContext() != null) { try (InputStream is = getResourceAsStream(name)) { if (is != null) { return IOUtils.toByteArray(is); } } catch (Exception e) { } } return FileUtils.readFileToByteArray(new File(name)); }
Source:
public final List<PartitionDescProto> getAllPartitions(final String databaseName, final String tableName) throws UndefinedDatabaseException, UndefinedTableException, UndefinedPartitionMethodException, UndefinedPartitionException { try { final BlockingInterface stub = getStub(); final TableIdentifierProto request = buildTableIdentifier(databaseName, tableName); final GetPartitionsResponse response = stub.getPartitionsByTableName(null, request); throwsIfThisError(response.getState(), UndefinedDatabaseException.class); throwsIfThisError(response.getState(), UndefinedTableException.class); throwsIfThisError(response.getState(), UndefinedPartitionMethodException.class); throwsIfThisError(response.getState(), UndefinedPartitionException.class); ensureOk(response.getState()); return response.getPartitionList(); } catch (ServiceException e) { throw new RuntimeException(e); } }

Target:
public final List<PartitionDescProto> getAllPartitions(final String databaseName, final String tableName) throws UndefinedDatabaseException, UndefinedTableException, UndefinedPartitionMethodException { try { final BlockingInterface stub = getStub(); final TableIdentifierProto request = buildTableIdentifier(databaseName, tableName); final GetPartitionsResponse response = stub.getPartitionsByTableName(null, request); throwsIfThisError(response.getState(), UndefinedDatabaseException.class); throwsIfThisError(response.getState(), UndefinedTableException.class); throwsIfThisError(response.getState(), UndefinedPartitionMethodException.class); ensureOk(response.getState()); return response.getPartitionList(); } catch (ServiceException e) { throw new RuntimeException(e); } }
Source:
public static void classSetup() { final Context ctx = new Context(DataHandleService.class, ThreadService.class, EventService.class); handles = ctx.service(DataHandleService.class); threadService = ctx.service(ThreadService.class); eventService = ctx.service(EventService.class); }

Target:
public void classSetup() { final Context ctx = new Context(DataHandleService.class, ThreadService.class, EventService.class); handles = ctx.service(DataHandleService.class); threadService = ctx.service(ThreadService.class); eventService = ctx.service(EventService.class); data = randomBytes(0xbabebabe); inFile = new BytesLocation(data); outFile = new BytesLocation(TEST_SIZE); }
Source:
public static ResultFormat fromString(String name) { switch (name) { case "compactedList": return RESULT_FORMAT_COMPACTED_LIST; case "valueVector": return RESULT_FORMAT_VALUE_VECTOR; case "list": return RESULT_FORMAT_LIST; default: return RESULT_FORMAT_LIST; } }

Target:
public static ResultFormat fromString(String name) { switch (name) { case "compactedList": return RESULT_FORMAT_COMPACTED_LIST; case "valueVector": return RESULT_FORMAT_VALUE_VECTOR; case "list": return RESULT_FORMAT_LIST; default: throw new UOE("Scan query result format [%s] is not supported.", name); } }
Source:
public long getMotdDelay() { return config.getInt("delay-motd", 0) / 50; }

Target:
public int getMotdDelay() { return config.getInt("delay-motd", 0); }
Source:
DatanodeReportCacheLoader() { ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat("DatanodeReport-Cache-Reload") .setDaemon(true) .build(); ThreadPoolExecutor parentExecutor = new ThreadPoolExecutor( 1, 1, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory); parentExecutor.allowCoreThreadTimeOut(true); executorService = MoreExecutors.listeningDecorator(parentExecutor); }

Target:
DatanodeReportCacheLoader() { ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat("DatanodeReport-Cache-Reload") .setDaemon(true) .build(); executorService = MoreExecutors.listeningDecorator( Executors.newSingleThreadExecutor(threadFactory)); }
Source:
protected void warnUnneededSuppressions( Set<Element> elementsSuppress, Set<String> prefixes, Set<String> allErrorKeys) { prefixes.remove(SourceChecker.SUPPRESS_ALL_PREFIX); boolean requirePrefix = hasOption("requirePrefixInWarningSuppressions"); for (Tree tree : getVisitor().treesWithSuppressWarnings) { Element elt = TreeUtils.elementFromTree(tree); if (elementsSuppress.contains(elt)) { continue; } SuppressWarnings suppressAnno = elt.getAnnotation(SuppressWarnings.class); for (final String suppressWarningsString : suppressAnno.value()) { String suppressWarningsMessageKey; int colonPos = suppressWarningsString.indexOf(":"); if (colonPos == -1) { if (prefixes.contains(suppressWarningsString)) { reportUnneededSuppression(tree, suppressWarningsString); } if (requirePrefix) { continue; } suppressWarningsMessageKey = suppressWarningsString; } else { String userPrefix = suppressWarningsString.substring(0, colonPos); if (!prefixes.contains(userPrefix)) { continue; } suppressWarningsMessageKey = suppressWarningsString.substring(colonPos + 1); } for (String errorKey : allErrorKeys) { if (errorKey.contains(suppressWarningsMessageKey)) { reportUnneededSuppression(tree, suppressWarningsString); } } } } }

Target:
protected void warnUnneededSuppressions( Set<Element> elementsSuppress, Set<String> prefixes, Set<String> allErrorKeys) { prefixes.remove(SourceChecker.SUPPRESS_ALL_PREFIX); for (Tree tree : getVisitor().treesWithSuppressWarnings) { Element elt = TreeUtils.elementFromTree(tree); if (elementsSuppress.contains(elt)) { continue; } SuppressWarnings suppressAnno = elt.getAnnotation(SuppressWarnings.class); String[] suppressWarningsStrings = suppressAnno.value(); Arrays.setAll(suppressWarningsStrings, i -> suppressWarningsStrings[i].toLowerCase()); for (String suppressWarningsString : suppressWarningsStrings) { for (String errorKey : allErrorKeys) { if (shouldSuppress(prefixes, new String[] {suppressWarningsString}, errorKey)) { reportUnneededSuppression(tree, suppressWarningsString); break; } } } } }
Source:
public String getUrl() { final StringBuilder b = new StringBuilder(); b.append("jdbc:postgresql://"); b.append(hostname(optional(cfg, "hostname"))); b.append(port(optional(cfg, "port"))); b.append("/"); b.append(required(cfg, "database")); return b.toString(); }

Target:
public String getUrl() { final StringBuilder b = new StringBuilder(); final ConfigSection dbc = new ConfigSection(cfg, "database"); b.append("jdbc:postgresql://"); b.append(hostname(dbc.optional("hostname"))); b.append(port(dbc.optional("port"))); b.append("/"); b.append(dbc.required("database")); return b.toString(); }
Source:
public List<HostAddress> getPreferredNodes(List<HostAddress> sortedCandidates) { if (sortedCandidates == null || sortedCandidates.isEmpty()) { throw new PrestoException(NO_EXECUTION_NODE, "sortedCandidates is null or empty for HiveSplit"); } if (getNodeSelectionStrategy() == SOFT_AFFINITY) { int size = sortedCandidates.size(); int mod = path.hashCode() % size; int position = mod < 0 ? mod + size : mod; return ImmutableList.of( sortedCandidates.get(position), sortedCandidates.get((position + 1) % size)); } return addresses; }

Target:
public List<HostAddress> getPreferredNodes(List<HostAddress> sortedCandidates) { if (sortedCandidates == null || sortedCandidates.isEmpty()) { throw new PrestoException(NO_NODES_AVAILABLE, "sortedCandidates is null or empty for HiveSplit"); } if (getNodeSelectionStrategy() == SOFT_AFFINITY) { int size = sortedCandidates.size(); int mod = path.hashCode() % size; int position = mod < 0 ? mod + size : mod; return ImmutableList.of( sortedCandidates.get(position), sortedCandidates.get((position + 1) % size)); } return addresses; }
Source:
public static String printFileList(final Iterable<Path> files) { if (Iterables.isEmpty(files)) { return "No matching recovery files found."; } final StringBuffer fileList = new StringBuffer(); try { for (Path file : files) { final RecoveryJob job = getRecoveryJobByName(file.getFileName().toString()); fileList.append(job.toString()); fileList.append("\n"); } return fileList.toString(); } catch (final IOException e) { return e.getMessage(); } }

Target:
public static String printFileList(final Iterable<Path> files) { if (Iterables.isEmpty(files)) { return "No matching recovery files found."; } final StringBuffer fileList = new StringBuffer(); try { for (final Path file : files) { final RecoveryJob job = getRecoveryJobByName(file.getFileName().toString()); fileList.append(job.toString()); fileList.append("\n"); } return fileList.toString(); } catch (final IOException e) { return e.getMessage(); } }
Source:
protected void doExecute() throws Exception { if (skip) { return; } if (features == null) { return; } checkServerHomeExists(); List<String> configurationFeatures = new ArrayList<String>(); List<Feature> configurationEsas = new ArrayList<Feature>(); populateConfigurationFeaturesLists(configurationFeatures, configurationEsas); if (handleFallbackScenarios(configurationEsas)) { return; } Set<File> downloadedJsons = downloadProductJsons(); if (downloadedJsons.isEmpty()) { handleJsonsNotFound(); return; } List<String> dependencyFeatures = getDependencyFeaturesList(); List<String> serverFeatures = getServerFeaturesList(configurationFeatures.isEmpty()); Set<String> featuresToInstall = combineLists(configurationFeatures, dependencyFeatures, serverFeatures); installFeatures(new ArrayList<File>(downloadedJsons), new ArrayList<String>(featuresToInstall)); }

Target:
protected void doExecute() throws Exception { if (skip) { return; } if (features == null) { return; } checkServerHomeExists(); installFeatures(); }
Source:
public void setReferencedSubfields(List<SubfieldPath> subfields, int depth) { Map<String, List<SubfieldPath>> subfieldPaths = new HashMap(); referencedFields = new HashSet(); for (SubfieldPath subfield : subfields) { List<PathElement> pathElements = subfield.getPath(); PathElement immediateSubfield = pathElements.get(depth + 1); checkArgument(immediateSubfield instanceof NestedField, "Unsupported subfield type: " + immediateSubfield.getClass().getSimpleName()); String fieldName = ((NestedField) immediateSubfield).getName(); referencedFields.add(fieldName); StreamReader fieldReader = structFields.get(fieldName); if (fieldReader instanceof StructStreamReader || fieldReader instanceof MapStreamReader || fieldReader instanceof ListStreamReader) { if (pathElements.size() > depth + 1) { subfieldPaths.computeIfAbsent(fieldName, k -> new ArrayList<>()) .add(subfield); } } } for (Map.Entry<String, List<SubfieldPath>> entry : subfieldPaths.entrySet()) { structFields.get(entry.getKey()).setReferencedSubfields(entry.getValue(), depth + 1); } }

Target:
public void setReferencedSubfields(List<SubfieldPath> subfields, int depth) { Map<String, List<SubfieldPath>> fieldToPaths = new HashMap(); referencedFields = new HashSet(); for (SubfieldPath subfield : subfields) { List<PathElement> pathElements = subfield.getPath(); PathElement immediateSubfield = pathElements.get(depth + 1); checkArgument(immediateSubfield instanceof NestedField, "Unsupported subfield type: " + immediateSubfield.getClass().getSimpleName()); String fieldName = ((NestedField) immediateSubfield).getName(); referencedFields.add(fieldName); StreamReader fieldReader = structFields.get(fieldName); if (fieldReader instanceof StructStreamReader || fieldReader instanceof MapStreamReader || fieldReader instanceof ListStreamReader) { if (pathElements.size() > depth + 1) { fieldToPaths.computeIfAbsent(fieldName, k -> new ArrayList<>()) .add(subfield); } } } for (Map.Entry<String, List<SubfieldPath>> entry : fieldToPaths.entrySet()) { structFields.get(entry.getKey()).setReferencedSubfields(entry.getValue(), depth + 1); } }
Source:
protected void buildVmFloppy() { if (vm.isRunOnce()) { VmDevice vmDevice = new VmDevice(new VmDeviceId(Guid.NewGuid(), vm.getId()), VmDeviceType.DISK.getName(), VmDeviceType.FLOPPY.getName(), "", 0, new HashMap<String, Object>(), true, true, true); XmlRpcStruct struct = new XmlRpcStruct(); addFloppyDetails(vmDevice, struct); addDevice(struct, vmDevice, vm.getFloppyPath()); } else { List<VmDevice> vmDevices = DbFacade.getInstance() .getVmDeviceDAO() .getVmDeviceByVmIdTypeAndDevice(vm.getId(), VmDeviceType.DISK.getName(), VmDeviceType.FLOPPY.getName()); for (VmDevice vmDevice : vmDevices) { if (!vmDevice.getIsManaged()) { continue; } String file = (String) vmDevice.getSpecParams().get(VdsProperties.Path); if (!StringHelper.isNullOrEmpty(file)) { XmlRpcStruct struct = new XmlRpcStruct(); addFloppyDetails(vmDevice, struct); addCdOrFloppyFileDetails(file, struct); addDevice(struct, vmDevice, file); break; } } } }

Target:
protected void buildVmFloppy() { if (vm.isRunOnce() && !StringHelper.isNullOrEmpty(vm.getFloppyPath())) { VmDevice vmDevice = new VmDevice(new VmDeviceId(Guid.NewGuid(), vm.getId()), VmDeviceType.DISK.getName(), VmDeviceType.FLOPPY.getName(), "", 0, new HashMap<String, Object>(), true, true, true); XmlRpcStruct struct = new XmlRpcStruct(); addFloppyDetails(vmDevice, struct); addDevice(struct, vmDevice, vm.getFloppyPath()); } else { List<VmDevice> vmDevices = DbFacade.getInstance() .getVmDeviceDAO() .getVmDeviceByVmIdTypeAndDevice(vm.getId(), VmDeviceType.DISK.getName(), VmDeviceType.FLOPPY.getName()); for (VmDevice vmDevice : vmDevices) { if (!vmDevice.getIsManaged()) { continue; } String file = (String) vmDevice.getSpecParams().get(VdsProperties.Path); if (!StringHelper.isNullOrEmpty(file)) { XmlRpcStruct struct = new XmlRpcStruct(); addFloppyDetails(vmDevice, struct); addCdOrFloppyFileDetails(file, struct); addDevice(struct, vmDevice, file); break; } } } }
Source:
protected IStatus run(IProgressMonitor monitor) { try { DebugTree<?> tmpTree = debugTree; traverseDebugTree(tmpTree, monitor); debugTree = (DebugTree<String>) tmpTree; if (monitor != null && monitor.isCanceled()) return Status.CANCEL_STATUS; } catch (Exception e) { e.printStackTrace(); } finally { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { if (!viewer.getControl().isDisposed()) { viewer.refresh(); } } }); } return Status.OK_STATUS; }

Target:
protected IStatus run(IProgressMonitor monitor) { try { DebugTree<?> tmpTree = debugTree; traverseDebugTree(tmpTree, monitor); debugTree = (DebugTree<String>) tmpTree; if (monitor != null && monitor.isCanceled()) return Status.CANCEL_STATUS; } catch (Exception e) { e.printStackTrace(); } return Status.OK_STATUS; }
Source:
public void pushExportBuffer(int partitionId, String signature, long uso, ByteBuffer buffer, boolean sync) { Map<String, ExportDataSource> sources = m_dataSourcesByPartition.get(partitionId); if (sources == null) { (new Exception()).printStackTrace(); exportLog.error("PUSH Could not find export data sources for partition " + partitionId + ". The export data is being discarded."); if (buffer != null) { DBBPool.wrapBB(buffer).discard(); } return; } ExportDataSource source = sources.get(signature); if (source == null) { (new Exception()).printStackTrace(); exportLog.error("PUSH Could not find export data source for partition " + partitionId + " Signature " + signature + ". The export data is being discarded."); if (buffer != null) { DBBPool.wrapBB(buffer).discard(); } return; } source.pushExportBuffer(uso, buffer, sync); }

Target:
public void pushExportBuffer(int partitionId, String signature, long uso, ByteBuffer buffer, boolean sync) { Map<String, ExportDataSource> sources = m_dataSourcesByPartition.get(partitionId); if (sources == null) { exportLog.error("PUSH Could not find export data sources for partition " + partitionId + ". The export data is being discarded."); if (buffer != null) { DBBPool.wrapBB(buffer).discard(); } return; } ExportDataSource source = sources.get(signature); if (source == null) { exportLog.error("PUSH Could not find export data source for partition " + partitionId + " Signature " + signature + ". The export data is being discarded."); if (buffer != null) { DBBPool.wrapBB(buffer).discard(); } return; } source.pushExportBuffer(uso, buffer, sync); }
Source:
static org.apache.parquet.column.statistics.Statistics fromParquetStatisticsInternal (String createdBy, Statistics formatStats, PrimitiveType type, SortOrder typeSortOrder) { StatisticsBuilder builder = org.apache.parquet.column.statistics.Statistics.getBuilder(type); if (formatStats != null) { if (formatStats.isSetMin_value() && formatStats.isSetMax_value()) { byte[] min = formatStats.min_value.array(); byte[] max = formatStats.max_value.array(); if (isMinMaxStatsSupported(type) || Arrays.equals(min, max)) { builder.withMin(min); builder.withMax(max); } if (formatStats.isSetNull_count()) { builder.withNumNulls(formatStats.null_count); } } else { boolean isSet = formatStats.isSetMax() && formatStats.isSetMin(); boolean maxEqualsMin = isSet ? Arrays.equals(formatStats.getMin(), formatStats.getMax()) : false; boolean sortOrdersMatch = SortOrder.SIGNED == typeSortOrder; if (!CorruptStatistics.shouldIgnoreStatistics(createdBy, type.getPrimitiveTypeName()) && (sortOrdersMatch || maxEqualsMin)) { if (isSet) { builder.withMin(formatStats.min.array()); builder.withMax(formatStats.max.array()); } if (formatStats.isSetNull_count()) { builder.withNumNulls(formatStats.null_count); } } } } return builder.build(); }

Target:
static org.apache.parquet.column.statistics.Statistics fromParquetStatisticsInternal (String createdBy, Statistics formatStats, PrimitiveType type, SortOrder typeSortOrder) { org.apache.parquet.column.statistics.Statistics.Builder statsBuilder = org.apache.parquet.column.statistics.Statistics.getBuilder(type); if (formatStats != null) { if (formatStats.isSetMin_value() && formatStats.isSetMax_value()) { byte[] min = formatStats.min_value.array(); byte[] max = formatStats.max_value.array(); if (isMinMaxStatsSupported(type) || Arrays.equals(min, max)) { statsBuilder.withMin(min); statsBuilder.withMax(max); } if (formatStats.isSetNull_count()) { statsBuilder.withNumNulls(formatStats.null_count); } } else { boolean isSet = formatStats.isSetMax() && formatStats.isSetMin(); boolean maxEqualsMin = isSet ? Arrays.equals(formatStats.getMin(), formatStats.getMax()) : false; boolean sortOrdersMatch = SortOrder.SIGNED == typeSortOrder; if (!CorruptStatistics.shouldIgnoreStatistics(createdBy, type.getPrimitiveTypeName()) && (sortOrdersMatch || maxEqualsMin)) { if (isSet) { statsBuilder.withMin(formatStats.min.array()); statsBuilder.withMax(formatStats.max.array()); } if (formatStats.isSetNull_count()) { statsBuilder.withNumNulls(formatStats.null_count); } } } } return statsBuilder.build(); }
Source:
private static DataSchema backfillSchemaIfPossible(Class<?> type) { if (type == CompoundKey.class || type == ComplexResourceKey.class || type == Void.class || (!DataSchemaUtil.isPrimitiveClass(type) && DataTemplateUtil.hasCoercer(type))) { return null; } try { return DataTemplateUtil.getSchema(type); } catch (TemplateRuntimeException e) { return null; } }

Target:
private static DataSchema backfillSchemaIfPossible(Class<?> type) { if (type == CompoundKey.class || type == ComplexResourceKey.class || type == Void.class) { return null; } try { return DataTemplateUtil.getSchema(type); } catch (TemplateRuntimeException e) { return null; } }
Source:
public Response doShutdown(@PathParam("taskid") String taskid) { try { taskRunner.shutdown(taskid); } catch (Exception e) { return Response.serverError().build(); } return Response.ok(ImmutableMap.of("task", taskid)).build(); }

Target:
public Response doShutdown(@PathParam("taskid") String taskid) { try { taskRunner.shutdown(taskid); } catch (Exception e) { log.error(e, "Failed to issue shutdown for task: %s", taskid); return Response.serverError().build(); } return Response.ok(ImmutableMap.of("task", taskid)).build(); }
Source:
private Optional<ProgramState> constrainOperand(SymbolicValue sending, SymbolicValue receiving, ProgramState state, Constraint constraint) { Constraint constraintOnSending = state.getConstraint(sending); if (constraintOnSending.isStricterOrEqualTo(Constraint.NULL_OR_UNDEFINED)) { if (constraint.isStricterOrEqualTo(Constraint.TRUTHY)) { return state.constrain(receiving, constraintOnNullOrUndefined(constraintOnSending, false)); } else if (constraint.isStricterOrEqualTo(Constraint.FALSY)) { return state.constrain(receiving, constraintOnNullOrUndefined(constraintOnSending, true)); } } if (Kind.STRICT_EQUAL_TO.equals(kind) && constraint.isStricterOrEqualTo(Constraint.TRUTHY)) { return state.constrain(receiving, constraintOnSending); } return Optional.of(state); }

Target:
private Optional<ProgramState> constrainOperand(SymbolicValue sending, SymbolicValue receiving, ProgramState state, Constraint constraint) { Constraint constraintOnSending = state.getConstraint(sending); if (constraintOnSending.isStricterOrEqualTo(Constraint.NULL_OR_UNDEFINED)) { if (constraint.isStricterOrEqualTo(Constraint.TRUTHY)) { return state.constrain(receiving, constraintOnNullOrUndefined(constraintOnSending, false)); } else if (constraint.isStricterOrEqualTo(Constraint.FALSY)) { return state.constrain(receiving, constraintOnNullOrUndefined(constraintOnSending, true)); } } if (Kind.STRICT_EQUAL_TO.equals(kind) && constraint.isStricterOrEqualTo(Constraint.TRUTHY)) { return state.constrain(receiving, constraintOnSending); } if (Kind.STRICT_NOT_EQUAL_TO.equals(kind) && constraint.isStricterOrEqualTo(Constraint.FALSY)) { return state.constrain(receiving, constraintOnSending); } return Optional.of(state); }
Source:
public void eventReceived(Action action, Pod pod) { LOGGER.log(Level.FINEST, "[{0}] {1}", new Object[]{action, pod.getMetadata().getName()}); this.podStatus = pod.getStatus(); switch (action) { case MODIFIED: if (areAllContainersRunning(pod)) { LOGGER.log(Level.FINE, "All containers are running for pod {0}", new Object[] {pod.getMetadata().getName()}); reference.set(pod); latch.countDown(); } break; default: } }

Target:
public void eventReceived(Action action, Pod pod) { LOGGER.log(Level.FINEST, "[{0}] {1}", new Object[]{action, pod.getMetadata().getName()}); this.podStatus = pod.getStatus(); switch (action) { case MODIFIED: updateState(pod); break; default: } }
Source:
public void testInvalidConfiguration() { H2DaoProvider daoProvider = setup("selectors"); H2ResourceGroupsDao dao = daoProvider.get(); dao.createResourceGroupsTable(); dao.createSelectorsTable(); dao.insertResourceGroup(1, "global", "100%", 100, 100, 100, null, null, null, null, null, null, null, null, ENVIRONMENT); DbResourceGroupConfigurationManager manager = new DbResourceGroupConfigurationManager( (poolId, listener) -> {}, new DbResourceGroupConfig().setMaxRefreshInterval(Duration.valueOf("1ms")), daoProvider.get(), ENVIRONMENT); manager.load(); manager.getSelectors(); }

Target:
public void testInvalidConfiguration() { H2DaoProvider daoProvider = setup("selectors"); H2ResourceGroupsDao dao = daoProvider.get(); dao.createResourceGroupsTable(); dao.createSelectorsTable(); dao.insertResourceGroup(1, "global", "100%", 100, 100, 100, null, null, null, null, null, null, null, null, ENVIRONMENT); DbResourceGroupConfigurationManager manager = new DbResourceGroupConfigurationManager( (poolId, listener) -> {}, new DbResourceGroupConfig().setMaxRefreshInterval(Duration.valueOf("1ms")), daoProvider.get(), ENVIRONMENT); manager.getSelectors(); }
Source:
public long freeMemory(long windowId) throws IOException { long originSize = keyStream.size() + valueStream.size(); keyStream.resetUpToWindow(windowId); valueStream.resetUpToWindow(windowId); long memoryFreed = originSize - (keyStream.size() + valueStream.size()); LOG.debug("space freed for bucket is {}", bucketId, memoryFreed); sizeInBytes.getAndAdd(0 - memoryFreed); return memoryFreed; }

Target:
public long freeMemory(long windowId) throws IOException { long size = keyStream.dataSizeUpToWindow(windowId) + valueStream.dataSizeUpToWindow(windowId); windowsForFreeMemory.add(windowId); return size; }
Source:
public void testAddChart() { System.out.println("addChart"); ChartLibLoaderBehavior loader = new ChartLibLoaderBehavior(); assertTrue(loader.addChart(chart1)); assertTrue(loader.addChart(chart2)); }

Target:
public void testAddChart() { ChartLibLoaderBehavior loader = new ChartLibLoaderBehavior(); assertTrue(loader.addChart(chart1)); assertTrue(loader.addChart(chart2)); }
Source:
void onContextEntireFile(ValueChangeEvent<Boolean> e) { if (e.getValue()) { context.setText(""); prefs.context(WHOLE_FILE_CONTEXT); } else { prefs.context(DEFAULT_CONTEXT); context.setIntValue(prefs.context()); } view.setContext(prefs.context()); }

Target:
void onContextEntireFile(ValueChangeEvent<Boolean> e) { if (e.getValue()) { oldContext = context.getIntValue(); context.setText(""); prefs.context(WHOLE_FILE_CONTEXT); } else { prefs.context(oldContext); context.setIntValue(prefs.context()); } view.setContext(prefs.context()); }
Source:
private void addMyAllVideosData(){ try{ if(myCoursesAdaptor!=null){ myCoursesAdaptor.clear(); if(getAllDownloadedVideosTask != null) { getAllDownloadedVideosTask.cancel(true); } else { getAllDownloadedVideosTask = new GetAllDownloadedVideosTask(getActivity()) { @Override protected void onSuccess(List<EnrolledCoursesResponse> enrolledCoursesResponses) throws Exception { super.onSuccess(enrolledCoursesResponses); if (enrolledCoursesResponses != null) { for (EnrolledCoursesResponse m : enrolledCoursesResponses) { if (m.isIs_active()) { myCoursesAdaptor.add(m); } } } } @Override protected void onException(Exception ex) { super.onException(ex); logger.error(ex); } }; } getAllDownloadedVideosTask.execute(); } }catch(Exception e){ logger.error(e); } }

Target:
private void addMyAllVideosData() { if (myCoursesAdaptor != null) { myCoursesAdaptor.clear(); if (getAllDownloadedVideosTask != null) { getAllDownloadedVideosTask.cancel(true); } else { getAllDownloadedVideosTask = new GetAllDownloadedVideosTask(getActivity()) { @Override protected void onSuccess(List<EnrolledCoursesResponse> enrolledCoursesResponses) throws Exception { super.onSuccess(enrolledCoursesResponses); if (enrolledCoursesResponses != null) { for (EnrolledCoursesResponse m : enrolledCoursesResponses) { if (m.isIs_active()) { myCoursesAdaptor.add(m); } } } } }; } getAllDownloadedVideosTask.execute(); } }
Source:
protected void configure(HttpSecurity http) throws Exception { http.rememberMe() .rememberMeServices(new TokenBasedRememberMeServices("key", userDetailsService())); }

Target:
protected void configure(HttpSecurity http) throws Exception { super.configure(http); http.rememberMe() .rememberMeServices(new TokenBasedRememberMeServices("key", userDetailsService())); }
Source:
public void setWin32ServiceName(String serviceName) { m_win32SvcName = serviceName; LOG.debug("setWin32ServiceName: setting service name to {}", serviceName); OID oid = new OID(SV_SVC_OPERATING_STATE_OID); OctetString oString = new OctetString(m_win32SvcName); oid.append(oString.toSubIndex(false)); LOG.debug("setWin32ServiceName: the OID for the Win32 service is {}", oid.toString()); setOid(oid.toString()); }

Target:
public void setWin32ServiceName(String serviceName) { m_win32SvcName = serviceName; LOG.debug("setWin32ServiceName: setting service name to {}", serviceName); StringBuilder serviceOidBuf = new StringBuilder(SV_SVC_OPERATING_STATE_OID); serviceOidBuf.append(".").append(SnmpObjId.convertStringToDottedOIDString(serviceName, true)); LOG.debug("setWin32ServiceName: the OID for the Win32 service is {}", serviceOidBuf.toString()); setOid(serviceOidBuf.toString()); }
Source:
protected boolean processVmCreateResponseFromDatacenter(SimEvent ev) { final Vm vm = (Vm) ev.getData(); boolean vmCreated = false; vmCreationAcks++; if (vm.isCreated()) { processSuccessVmCreationInDatacenter(vm, vm.getHost().getDatacenter()); vmCreated = true; } else { processFailedVmCreationInDatacenter(vm, lastSelectedDc); } if (getVmWaitingList().isEmpty()) { requestDatacentersToCreateWaitingCloudlets(); notifyOnCreationOfWaitingVmsFinishListeners(); } else if (getVmCreationRequests() == getVmCreationAcks()) { requestCreationOfWaitingVmsToFallbackDatacenter(); } return vmCreated; }

Target:
protected boolean processVmCreateResponseFromDatacenter(SimEvent ev) { final Vm vm = (Vm) ev.getData(); boolean vmCreated = false; vmCreationAcks++; if (vm.isCreated()) { processSuccessVmCreationInDatacenter(vm, vm.getHost().getDatacenter()); vmCreated = true; } else { processFailedVmCreationInDatacenter(vm, lastSelectedDc); } if (vmWaitingList.isEmpty()) { requestDatacentersToCreateWaitingCloudlets(); notifyOnCreationOfWaitingVmsFinishListeners(); } else if (getVmCreationRequests() == getVmCreationAcks()) { requestCreationOfWaitingVmsToFallbackDatacenter(); } return vmCreated; }
Source:
public GitHubSCMSource(String repositoryUrl) { this(); this.setRepositoryUrl(repositoryUrl); }

Target:
public GitHubSCMSource(String repositoryUrl) { this(); setRepositoryUrl(repositoryUrl); }
Source:
public static boolean checkImageConfiguration(storage_domain_static storageDomain, DiskImageBase diskInfo, List<String> messages, boolean isCopyCollapse) { boolean result = true; if ((diskInfo.getvolume_type() == VolumeType.Preallocated && diskInfo.getvolume_format() == VolumeFormat.COW) || (!isCopyCollapse && isStorageBlockDevice(storageDomain) && isVolumeSparseRaw(diskInfo)) || diskInfo.getvolume_format() == VolumeFormat.Unassigned || diskInfo.getvolume_type() == VolumeType.Unassigned) { result = false; messages.add(VdcBllMessages.ACTION_TYPE_FAILED_DISK_CONFIGURATION_NOT_SUPPORTED.toString()); } return result; }

Target:
public static boolean checkImageConfiguration(storage_domain_static storageDomain, DiskImageBase diskInfo, List<String> messages, boolean isCopyCollapse) { boolean result = true; if ((diskInfo.getvolume_type() == VolumeType.Preallocated && diskInfo.getvolume_format() == VolumeFormat.COW) || (!isCopyCollapse && isStorageBlockDevice(storageDomain) && volumeNotSupportedForBlockDevice(diskInfo)) || diskInfo.getvolume_format() == VolumeFormat.Unassigned || diskInfo.getvolume_type() == VolumeType.Unassigned) { result = false; messages.add(VdcBllMessages.ACTION_TYPE_FAILED_DISK_CONFIGURATION_NOT_SUPPORTED.toString()); } return result; }