auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>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()); } } <START> String ret = "Detected pause in JVM or host machine (eg GC): pause of approximately " + extraSleepTime <END> + "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; }</code><technical_language>String.format instead</technical_language>

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:
<code>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(); <START> measurementFilter.setId(measurementIndex + 1); <END> measurementFilter.setNode(requestParameters.get(Keys.KEY_MEASUREMENT_FILTER_NODE.concat(indexPostfix))); measurementFilters.add(measurementFilter); }</code><technical_language>Check if KEY_MEASUREMENT_FILTER_ID for specific measurement filter is present in request parameters. If present set request parameters, set..</technical_language>

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:
<code>private void checkResourceErrors() { Collection<Diagnostic> errors = Lists.newArrayList(); Collection<Viewpoint> activatedViewpoints <START> = getActivatedViewpoints(); <END> 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; } } }</code><technical_language>testing activated session opening? if is issue of Viewpoint is referenced active this point, user activates later</technical_language>

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:
<code>public void show() { super.show(); contentScrollPanel.getElement().getStyle().setHeight(getOffsetHeight() - 100, Unit.PX); contentPanel.getElement().getStyle().setProperty("minHeight", getOffsetHeight() - <START> 115, Unit.PX); <END> }</code><technical_language>question above</technical_language>

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:
<code><START> public void unregisterHandler(HandlerRegistration reg) { <END> if (reg != null) { reg.removeHandler(); handlerRegistrations.remove(reg); } }</code><technical_language>I this final</technical_language>

Target:
public final void unregisterHandler(HandlerRegistration reg) { if (reg != null) { reg.removeHandler(); handlerRegistrations.remove(reg); } }
Source:
<code>public void testFailWithMultipleDisksWhichOneInBackupStorage() { final VM vm = new VM(); command.setVm(vm); <START> 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))); <END> 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()); }</code><technical_language>Please refactor methods</technical_language>

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:
<code>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()); <START> if (thumb == null) return; <END> 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(); }</code><technical_language>Single-line nesting done brackets, return statement newline. (#71)</technical_language>

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:
<code>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, <START> "ChannelTimeoutMs has to be positive, or -1 for none."); <END> 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); }</code><technical_language>create BigtableClusterName. constructor checks in it. In sense, this changes much? sense remove project id, zone id, cluster id direct members of BigtableOptions class users of BigtableClusterName? (That is a bigger change...)</technical_language>

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:
<code>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); <START> String shortenedFileName = encoded.substring(0, 90) + "..." + getExtension(fileName); <END> 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; } }</code><technical_language>I 90 fileNameShorteningThreshold - 10 numbers magic, 10 for extension adjustment is a magic adjustment constant</technical_language>

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:
<code><START> public CloseNoOpServerProtocolHandler(String websocketPath) { <END> super(websocketPath, null, false); }</code><technical_language>remove public</technical_language>

Target:
CloseNoOpServerProtocolHandler(String websocketPath) { super(websocketPath, null, false); }
Source:
<code>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)); } <START> try (InputStream is = temp) { <END> return IOUtils.toByteArray(is); } }</code><technical_language>previous code great in place I move this block merge content of if (getEngineContext() != null) { a lot cleaner</technical_language>

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:
<code>public final List<PartitionDescProto> getAllPartitions(final String databaseName, final String tableName) throws UndefinedDatabaseException, UndefinedTableException, UndefinedPartitionMethodException, <START> UndefinedPartitionException { <END> 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); } }</code><technical_language>retrieves partitions. inproper throw UndefinedPartitionException, thrown in case is partition a specific partition key</technical_language>

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:
<code><START> public static void classSetup() { <END> 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); }</code><technical_language>this non-static. I.e.: spin a new context in @Before @BeforeClass potentially bleeding state tests</technical_language>

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:
<code>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: <START> return RESULT_FORMAT_LIST; <END> } }</code><technical_language>I throw exception for default case indicating invalid input</technical_language>

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:
<code><START> public long getMotdDelay() { <END> return config.getInt("delay-motd", 0) / 50; }</code><technical_language>Return int</technical_language>

Target:
public int getMotdDelay() { return config.getInt("delay-motd", 0); }
Source:
<code>DatanodeReportCacheLoader() { <START> ThreadFactory threadFactory = new ThreadFactoryBuilder() <END> .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); }</code><technical_language>hmm use: java executorService = MoreExecutors.listeningDecorator( Executors.newSingleThreadExecutor());</technical_language>

Target:
DatanodeReportCacheLoader() { ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat("DatanodeReport-Cache-Reload") .setDaemon(true) .build(); executorService = MoreExecutors.listeningDecorator( Executors.newSingleThreadExecutor(threadFactory)); }
Source:
<code><START> protected void warnUnneededSuppressions( <END> 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); } } } } }</code><technical_language>implementations of SourceChecker.shouldSuppressWarningStringSuppressKey SourceChecker.warnUnneededSuppressions similar. abstract out common logic, eliminate of methods. (Note some undesirable differences, logic for permitting a user-written messagekey a substring of a full Checker Framework messagekey.)</technical_language>

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:
<code>public String getUrl() { <START> final StringBuilder b = new StringBuilder(); <END> 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(); }</code><technical_language>URLBuilder URLComposer more natural</technical_language>

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:
<code>public List<HostAddress> getPreferredNodes(List<HostAddress> sortedCandidates) { if (sortedCandidates == null || sortedCandidates.isEmpty()) { <START> throw new PrestoException(NO_EXECUTION_NODE, "sortedCandidates is null or empty for HiveSplit"); <END> } 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; }</code><technical_language>Reuse NO_NODES_AVAILABLE</technical_language>

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:
<code>public static String printFileList(final Iterable<Path> files) { if (Iterables.isEmpty(files)) { return "No matching recovery files found."; } final StringBuffer fileList = new StringBuffer(); try { <START> for (Path file : files) { <END> final RecoveryJob job = getRecoveryJobByName(file.getFileName().toString()); fileList.append(job.toString()); fileList.append("\n"); } return fileList.toString(); } catch (final IOException e) { return e.getMessage(); } }</code><technical_language>final</technical_language>

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:
<code>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)) { <START> return; <END> } 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)); }</code><technical_language>Ant task checks for existence of installUtility, shoudn't combine logic lines 97 105 this: // If kernal JAR product jsons exist, kernel. installUtility. if (getMapBasedInstallKernelJar() != null && !downloadedJsons.isEmpty()) // do installation kernel else // call installUtility</technical_language>

Target:
protected void doExecute() throws Exception { if (skip) { return; } if (features == null) { return; } checkServerHomeExists(); installFeatures(); }
Source:
<code>public void setReferencedSubfields(List<SubfieldPath> subfields, int depth) { <START> Map<String, List<SubfieldPath>> subfieldPaths = new HashMap(); <END> 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); } }</code><technical_language>rename this key is included in name? i.e. is String</technical_language>

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:
<code>protected void buildVmFloppy() { <START> if (vm.isRunOnce()) { <END> 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; } } } }</code><technical_language>Please check here: - Do create empty floppy in run once? - in runvm? - sysprep needed</technical_language>

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:
<code>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 { <START> Display.getDefault().asyncExec(new Runnable() { <END> @Override public void run() { if (!viewer.getControl().isDisposed()) { viewer.refresh(); } } }); } return Status.OK_STATUS; }</code><technical_language>a style thing, I CheckFileExistenceJob do refresh, other job in a JobChangeAdapter</technical_language>

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:
<code>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) { <START> (new Exception()).printStackTrace(); <END> 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); }</code><technical_language>Thread.dumpStack()</technical_language>

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:
<code>static org.apache.parquet.column.statistics.Statistics fromParquetStatisticsInternal (String createdBy, Statistics formatStats, PrimitiveType type, SortOrder typeSortOrder) { <START> StatisticsBuilder builder = org.apache.parquet.column.statistics.Statistics.getBuilder(type); <END> 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(); }</code><technical_language>(optional, nit): I stats more descriptive purpose of this variable, if is a builder. Alternatively, statsBuilder</technical_language>

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:
<code>private static DataSchema backfillSchemaIfPossible(Class<?> type) { if (type == CompoundKey.class || type == ComplexResourceKey.class || type == Void.class <START> || (!DataSchemaUtil.isPrimitiveClass(type) && DataTemplateUtil.hasCoercer(type))) <END> { return null; } try { return DataTemplateUtil.getSchema(type); } catch (TemplateRuntimeException e) { return null; } }</code><technical_language>do need primitive class check</technical_language>

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:
<code>public Response doShutdown(@PathParam("taskid") String taskid) { try { taskRunner.shutdown(taskid); } catch (Exception e) { <START> return Response.serverError().build(); <END> } return Response.ok(ImmutableMap.of("task", taskid)).build(); }</code><technical_language>gonna hard figure out exception caused a failure. log locally if send in response</technical_language>

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:
<code>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); <START> } <END> return Optional.of(state); }</code><technical_language>@vilchik-elena This is correct a restrictive. Handles: function bar(d) { c = d; a = (c === null); if (d === 'aaa') { // c = 'aaa' a = false if (typeof(c) == "string") { // OK, raises "always true" } if (a) { // OK, raises "always false" } } foo(c); } handle: function baz(d) { c = d; a = (c === null); if (d !== 'aaa') { } else { // c = 'aaa' a = false if (typeof(c) == "string") { // KO, misses "always true" } if (a) { // KO, misses "always false" } } foo(c); }</technical_language>

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:
<code>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: <START> if (areAllContainersRunning(pod)) { <END> LOGGER.log(Level.FINE, "All containers are running for pod {0}", new Object[] {pod.getMetadata().getName()}); reference.set(pod); latch.countDown(); } break; default: } }</code><technical_language>do need check for terminated pods? if pod fails wait timeout instead of failing early</technical_language>

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:
<code>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); <START> manager.load(); <END> manager.getSelectors(); }</code><technical_language>load() is unnecessary constructor calls it</technical_language>

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:
<code>public long freeMemory(long windowId) throws IOException { long originSize = keyStream.size() + valueStream.size(); <START> keyStream.resetUpToWindow(windowId); <END> 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; }</code><technical_language>This called a thread, this a synchronization issue in WindowableBlockStream</technical_language>

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

Target:
public void testAddChart() { ChartLibLoaderBehavior loader = new ChartLibLoaderBehavior(); assertTrue(loader.addChart(chart1)); assertTrue(loader.addChart(chart2)); }
Source:
<code>void onContextEntireFile(ValueChangeEvent<Boolean> e) { if (e.getValue()) { context.setText(""); prefs.context(WHOLE_FILE_CONTEXT); } else { <START> prefs.context(DEFAULT_CONTEXT); <END> context.setIntValue(prefs.context()); } view.setContext(prefs.context()); }</code><technical_language>Ideally this previous of context, if i toggled button off</technical_language>

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:
<code>private void addMyAllVideosData(){ <START> try{ <END> 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); } }</code><technical_language>This generic try-catch removed</technical_language>

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:
<code>protected void configure(HttpSecurity http) throws Exception { <START> http.rememberMe() <END> .rememberMeServices(new TokenBasedRememberMeServices("key", userDetailsService())); }</code><technical_language>I I misled in previous review, need additional configuration here. // @formatter:off http .authorizeRequests() .anyRequest().hasRole("USER") .and() .formLogin() .and() .rememberMe() .rememberMeServices(new TokenBasedRememberMeServices("key", userDetailsService())); // @formatter:on</technical_language>

Target:
protected void configure(HttpSecurity http) throws Exception { super.configure(http); http.rememberMe() .rememberMeServices(new TokenBasedRememberMeServices("key", userDetailsService())); }
Source:
<code>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); <START> oid.append(oString.toSubIndex(false)); <END> LOG.debug("setWin32ServiceName: the OID for the Win32 service is {}", oid.toString()); setOid(oid.toString()); }</code><technical_language>this fixed encoding in getBytes()? confused platform default encoding here</technical_language>

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:
<code>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); } <START> if (getVmWaitingList().isEmpty()) { <END> requestDatacentersToCreateWaitingCloudlets(); notifyOnCreationOfWaitingVmsFinishListeners(); } else if (getVmCreationRequests() == getVmCreationAcks()) { requestCreationOfWaitingVmsToFallbackDatacenter(); } return vmCreated; }</code><technical_language>access attribute</technical_language>

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:
<code>public GitHubSCMSource(String repositoryUrl) { this(); <START> this.setRepositoryUrl(repositoryUrl); <END> }</code><technical_language>Is a reason this. is for calling setter in constructors</technical_language>

Target:
public GitHubSCMSource(String repositoryUrl) { this(); setRepositoryUrl(repositoryUrl); }