auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String toString() { return "KafkaSupervisorIOConfig{" + "topic='" + getTopic() + '\'' + ", replicas=" + getReplicas() + ", taskCount=" + getTaskCount() + ", taskDuration=" + getTaskDuration() + ", consumerProperties=" + consumerProperties + ", startDelay=" + getStartDelay() + ", period=" + getPeriod() + ", useEarliestOffset=" + isUseEarliestOffset() + ", completionTimeout=" + getCompletionTimeout() + <START> ", lateMessageRejectionPeriod=" + getLateMessageRejectionPeriod() + <END> ", skipOffsetGaps=" + skipOffsetGaps + '}'; }</code><technical_language>Missing earlyMessageRejectionPeriod</technical_language>

Target:
public String toString() { return "KafkaSupervisorIOConfig{" + "topic='" + getTopic() + '\'' + ", replicas=" + getReplicas() + ", taskCount=" + getTaskCount() + ", taskDuration=" + getTaskDuration() + ", consumerProperties=" + consumerProperties + ", startDelay=" + getStartDelay() + ", period=" + getPeriod() + ", useEarliestOffset=" + isUseEarliestOffset() + ", completionTimeout=" + getCompletionTimeout() + ", earlyMessageRejectionPeriod=" + getEarlyMessageRejectionPeriod() + ", lateMessageRejectionPeriod=" + getLateMessageRejectionPeriod() + ", skipOffsetGaps=" + skipOffsetGaps + '}'; }
Source:
<code>protected long saveEvent(String eventType, JSONObject event) { String eventString = event.toString(); if (Utils.isEmptyString(eventString)) { logger.e(TAG, String.format( "Detected empty event string for event type %s, skipping", eventType )); return -1; } if (eventString.getBytes().length >= Constants.MAX_EVENT_SIZE_BYTES) { logger.e(TAG, String.format( <START> "Event %s with properties exceeds 1MB in sizes, skipping", eventType <END> )); return -1; } if (eventType.equals(Constants.IDENTIFY_EVENT) || eventType.equals(Constants.GROUP_IDENTIFY_EVENT)) { lastIdentifyId = dbHelper.addIdentify(eventString); setLastIdentifyId(lastIdentifyId); } else { lastEventId = dbHelper.addEvent(eventString); setLastEventId(lastEventId); } int numEventsToRemove = Math.min( Math.max(1, eventMaxCount/10), Constants.EVENT_REMOVE_BATCH_SIZE ); if (dbHelper.getEventCount() > eventMaxCount) { dbHelper.removeEvents(dbHelper.getNthEventId(numEventsToRemove)); } if (dbHelper.getIdentifyCount() > eventMaxCount) { dbHelper.removeIdentifys(dbHelper.getNthIdentifyId(numEventsToRemove)); } long totalEventCount = dbHelper.getTotalEventCount(); if ((totalEventCount % eventUploadThreshold) == 0 && totalEventCount >= eventUploadThreshold) { updateServer(); } else { updateServerLater(eventUploadPeriodMillis); } return ( eventType.equals(Constants.IDENTIFY_EVENT) || eventType.equals(Constants.GROUP_IDENTIFY_EVENT) ) ? lastIdentifyId : lastEventId; }</code><technical_language>"size"</technical_language>

Target:
protected long saveEvent(String eventType, JSONObject event) { String eventString = event.toString(); if (Utils.isEmptyString(eventString)) { logger.e(TAG, String.format( "Detected empty event string for event type %s, skipping", eventType )); return -1; } if (eventType.equals(Constants.IDENTIFY_EVENT) || eventType.equals(Constants.GROUP_IDENTIFY_EVENT)) { lastIdentifyId = dbHelper.addIdentify(eventString); setLastIdentifyId(lastIdentifyId); } else { lastEventId = dbHelper.addEvent(eventString); setLastEventId(lastEventId); } int numEventsToRemove = Math.min( Math.max(1, eventMaxCount/10), Constants.EVENT_REMOVE_BATCH_SIZE ); if (dbHelper.getEventCount() > eventMaxCount) { dbHelper.removeEvents(dbHelper.getNthEventId(numEventsToRemove)); } if (dbHelper.getIdentifyCount() > eventMaxCount) { dbHelper.removeIdentifys(dbHelper.getNthIdentifyId(numEventsToRemove)); } long totalEventCount = dbHelper.getTotalEventCount(); if ((totalEventCount % eventUploadThreshold) == 0 && totalEventCount >= eventUploadThreshold) { updateServer(); } else { updateServerLater(eventUploadPeriodMillis); } return ( eventType.equals(Constants.IDENTIFY_EVENT) || eventType.equals(Constants.GROUP_IDENTIFY_EVENT) ) ? lastIdentifyId : lastEventId; }
Source:
<code>private String readKieVersionPropertyString(MavenProject mavenProject) { if (mavenProject.getProperties() != null) { <START> if (mavenProject.getProperties().getProperty(_kieVersionPropertyKey) != null) { <END> return mavenProject.getProperties().getProperty(_kieVersionPropertyKey); } else { return mavenProject.getProperties().getProperty("version.org.kie"); } } return null; }</code><technical_language>mavenProject.getProperties() extracted a variable</technical_language>

Target:
private String readKieVersionPropertyString(MavenProject mavenProject) { if (mavenProject != null && mavenProject.getProperties() != null) { Properties properties = mavenProject.getProperties(); if (properties.getProperty(_kieVersionPropertyKey) != null) { return properties.getProperty(_kieVersionPropertyKey); } else { return properties.getProperty(M2EUtils.ALT_KIE_VERSION); } } return null; }
Source:
<code>public ASTField(ASTClass declaringClass, String source, FieldDeclaration field, VariableDeclarationFragment fragment) { this.declaringClass = declaringClass; name = fragment.getName().getIdentifier(); modifiers = field.getModifiers(); start = field.getStartPosition(); Javadoc doc = field.getJavadoc(); List<TagElement> tags = null; if (doc != null) { tags = doc.tags(); for (TagElement tag : tags) { if ("@field".equals(tag.getTagName())) { String data = tag.fragments().get(0).toString(); setMetaData(data); break; } } } type = new ASTType(declaringClass.resolver, field.getType(), fragment.getExtraDimensions()); type64 = this.type; if (GEN64) { String s = source.substring(field.getStartPosition(), field.getStartPosition() + field.getLength()); <START> if (type.isType("int") && s.contains("int ")) type64 = new ASTType("J"); <END> else if (type.isType("float") && s.contains("float ")) type64 = new ASTType("D"); else if (type.isType("[I") && (s.contains("int ") || s.contains("int[] "))) type64 = new ASTType("[J"); else if (type.isType("[F") && (s.contains("float ")|| s.contains("float[] "))) type64 = new ASTType("[D"); else if (type.isType("long") && s.contains("long ")) type = new ASTType("I"); else if (type.isType("double") && s.contains("double ")) type = new ASTType("F"); else if (type.isType("[J") && (s.contains("long ")|| s.contains("long[] "))) type = new ASTType("[I"); else if (type.isType("[D") && (s.contains("double ")|| s.contains("double[] "))) type = new ASTType("[F"); } }</code><technical_language>classes in "JNI Generation" generated? If so, is change</technical_language>

Target:
public ASTField(ASTClass declaringClass, String source, FieldDeclaration field, VariableDeclarationFragment fragment) { this.declaringClass = declaringClass; name = fragment.getName().getIdentifier(); modifiers = field.getModifiers(); start = field.getStartPosition(); Javadoc doc = field.getJavadoc(); List<TagElement> tags = null; if (doc != null) { tags = doc.tags(); for (TagElement tag : tags) { if ("@field".equals(tag.getTagName())) { String data = tag.fragments().get(0).toString(); setMetaData(data); break; } } } type = new ASTType(declaringClass.resolver, field.getType(), fragment.getExtraDimensions()); type64 = this.type; if (GEN64) { String s = source.substring(field.getStartPosition(), field.getStartPosition() + field.getLength()); if (type.isType("int") && s.indexOf("int ") != -1) type64 = new ASTType("J"); else if (type.isType("float") && s.indexOf("float ") != -1) type64 = new ASTType("D"); else if (type.isType("[I") && (s.indexOf("int ") != -1 || s.indexOf("int[] ") != -1)) type64 = new ASTType("[J"); else if (type.isType("[F") && (s.indexOf("float ") != -1|| s.indexOf("float[] ") != -1)) type64 = new ASTType("[D"); else if (type.isType("long") && s.indexOf("long ") != -1) type = new ASTType("I"); else if (type.isType("double") && s.indexOf("double ") != -1) type = new ASTType("F"); else if (type.isType("[J") && (s.indexOf("long ") != -1|| s.indexOf("long[] ") != -1)) type = new ASTType("[I"); else if (type.isType("[D") && (s.indexOf("double ") != -1|| s.indexOf("double[] ") != -1)) type = new ASTType("[F"); } }
Source:
<code>public static <T extends IForgeRegistryEntry<T>> void writeRegistryEntries(@Nonnull ByteBuf out, @Nonnull Collection<T> entries) { writeVarInt(out, entries.size(), 5); Iterator<T> it = entries.iterator(); if (it.hasNext()) { T entry = it.next(); FMLControlledNamespacedRegistry<T> registry = (FMLControlledNamespacedRegistry<T>)GameRegistry.findRegistry(entry.getRegistryType()); writeUTF8String(out, registry.getRegistryName().toString()); do { writeVarInt(out, registry.getId(entry), 5); if (it.hasNext()) { entry = it.next(); } else { break; } } while (true); <START> } <END> }</code><technical_language>java if (it.hasNext()) { T entry = it.next(); FMLControlledNamespacedRegistry<T> registry = (FMLControlledNamespacedRegistry<T>) GameRegistry.findRegistry(entry.getRegistryType()); writeUTF8String(out, registry.getRegistryName().toString()); writeVarInt(out, registry.getId(entry), 5); while (it.hasNext()) { writeVarInt(out, registry.getId(it.next()), 5); } }</technical_language>

Target:
public static <T extends IForgeRegistryEntry<T>> void writeRegistryEntries(@Nonnull ByteBuf out, @Nonnull Collection<T> entries) { writeVarInt(out, entries.size(), 5); Iterator<T> it = entries.iterator(); if (it.hasNext()) { T first = it.next(); FMLControlledNamespacedRegistry<T> registry = (FMLControlledNamespacedRegistry<T>)GameRegistry.findRegistry(first.getRegistryType()); writeUTF8String(out, PersistentRegistryManager.getRegistryRegistryName(registry).toString()); writeVarInt(out, registry.getId(first), 5); while (it.hasNext()) { int id = registry.getId(it.next()); if (id == -1) { throw new IllegalArgumentException("Unregistered IForgeRegistryEntry in collection " + entries + "."); } writeVarInt(out, id, 5); } } }
Source:
<code>public void testSetDateEffectiveToNull() throws Exception, UpdateException { ArrayList<Coordinate> coordinates = new ArrayList<>(); Coordinate coordinate = new Coordinate(0, 2); coordinates.add(coordinate); table52.getData() .get(0) .get(2) .setDateValue(null); updateManager.update(table52, coordinates); <START> verify(analyzer).update(anySet()); <END> }</code><technical_language>I this test is effective if do check content of set passed method update</technical_language>

Target:
public void testSetDateEffectiveToNull() throws Exception { ArrayList<Coordinate> coordinates = new ArrayList<>(); Coordinate coordinate = new Coordinate(0, 2); coordinates.add(coordinate); table52.getData() .get(0) .get(2) .setDateValue(null); updateManager.update(table52, coordinates); verify(analyzer).update(setArgumentCaptor.capture()); Set value = setArgumentCaptor.getValue(); assertEquals(1, value.size()); assertEquals(0, value.iterator().next()); }
Source:
<code>private void fireChanges() { fireContentChanged(); RepositoryMapping mapping = RepositoryMapping.getMapping(path); if (mapping != null) { <START> mapping.getRepository().fireEvent(new IndexChangedEvent()); <END> } else { Repository myRepository = repository; if (myRepository != null && !myRepository.isBare()) { refreshRepositoryState(myRepository); } } }</code><technical_language>code I do do this all? I mean, *always* else branch, *dedicated* change event for a single path for entire repository. This is of caused change, I if "else" branch</technical_language>

Target:
private void fireChanges() { fireContentChanged(); Repository myRepository = repository; boolean updated = false; if (myRepository != null && !myRepository.isBare()) { updated = refreshRepositoryState(myRepository); } if (!updated) { RepositoryMapping mapping = RepositoryMapping.getMapping(path); if (mapping != null) { mapping.getRepository().fireEvent(new IndexChangedEvent()); } } }
Source:
<code>public User findByUserName(String name) { <START> String sQuery = String.format("select * from %s where userName=:userName", getEntityClass().getSimpleName(), <END> name); OSQLSynchQuery<Long> oQuery = new OSQLSynchQuery<Long>(sQuery); oQuery.setLimit(1); HashMap<String, String> params = new HashMap<String, String>(); params.put("userName", name); List<User> resultList = getDelegate().command(oQuery).execute(params); return resultList.size() > 0 ? resultList.iterator().next() : null; }</code><technical_language>Is this a false positive? (I complaining about)..</technical_language>

Target:
public User findByUserName(String name) { String sQuery = String.format("select * from %s where userName=:userName", getEntityClass().getSimpleName()); OSQLSynchQuery<Long> oQuery = new OSQLSynchQuery<Long>(sQuery); oQuery.setLimit(1); HashMap<String, String> params = new HashMap<String, String>(); params.put("userName", name); List<User> resultList = getDelegate().command(oQuery).execute(params); return !resultList.isEmpty() ? resultList.iterator().next() : null; }
Source:
<code>protected ContentProviderStoreCoreBase(@NonNull final ContentResolver contentResolver) { <START> this(contentResolver, 100, 30); <END> }</code><technical_language>constants</technical_language>

Target:
protected ContentProviderStoreCoreBase(@NonNull final ContentResolver contentResolver) { this(contentResolver, DEFAULT_GROUPING_TIMEOUT_MS, DEFAULT_GROUP_MAX_SIZE_MS); }
Source:
<code>TxnContext merge(@Nonnull Table<K, V, M> table, @Nonnull final K key, @Nonnull BiFunction<CorfuRecord<V, M>, CorfuRecord<V,M>, CorfuRecord<V,M>> mergeOperator, @Nonnull final CorfuRecord<V,M> recordDelta) { if (!table.getNamespace().equals(namespace)) { throw new IllegalArgumentException("TxnContext can't apply table from namespace " + table.getNamespace() + " to transaction on namespace " + namespace); } tablesInTxn.add(table); operations.add(() -> { CorfuRecord<V,M> oldRecord = table.get(key); CorfuRecord<V, M> mergedRecord; try { mergedRecord = mergeOperator.apply(oldRecord, recordDelta); } catch (Exception ex) { txAbort(); log.error("TX Abort merge: {}", table.getFullyQualifiedTableName(), ex); throw ex; } table.put(key, mergedRecord.getPayload(), mergedRecord.getMetadata()); <START> table.getMetrics().numMerges.incrementAndGet(); <END> }); return this; }</code><technical_language>throw a lambda works expectations. Please check unit test</technical_language>

Target:
TxnContext merge(@Nonnull Table<K, V, M> table, @Nonnull final K key, @Nonnull BiFunction<CorfuRecord<V, M>, CorfuRecord<V,M>, CorfuRecord<V,M>> mergeOperator, @Nonnull final CorfuRecord<V,M> recordDelta) { validateTableWrittenIsInNamespace(table); operations.add(() -> { CorfuRecord<V,M> oldRecord = table.get(key); CorfuRecord<V, M> mergedRecord; try { mergedRecord = mergeOperator.apply(oldRecord, recordDelta); } catch (Exception ex) { txAbort(); log.error("TX Abort merge: {}", table.getFullyQualifiedTableName(), ex); throw ex; } table.put(key, mergedRecord.getPayload(), mergedRecord.getMetadata()); table.getMetrics().incNumMerges(); }); return this; }
Source:
<code><START> public void testRowsAfterIteratorDetach(String acc, int recordIndex, int flags, String readName, String bases, String quals, <END> int refStart, String cigar, String refName, int mapQ, boolean hasMate, boolean isSecondaryAlignment) { if (!SRAAccession.isSupported()) return; SamReader reader = SamReaderFactory.make().validationStringency(ValidationStringency.SILENT).open( SamInputResource.of(new SRAAccession(acc)) ); final SAMRecordIterator samRecordIterator = reader.iterator(); while (recordIndex != 0) { Assert.assertTrue(samRecordIterator.hasNext(), "Record set is too small"); samRecordIterator.next(); recordIndex--; } Assert.assertTrue(samRecordIterator.hasNext(), "Record set is too small"); SAMRecord record = samRecordIterator.next(); samRecordIterator.next(); List<SAMValidationError> validationErrors = record.isValid(); Assert.assertNull(validationErrors, "SRA Lazy record is invalid. List of errors: " + (validationErrors != null ? validationErrors.toString() : "")); Assert.assertEquals(record.getReadName(), readName); Assert.assertEquals(new String(record.getReadBases()), bases); Assert.assertEquals(record.getBaseQualityString(), quals); Assert.assertEquals(record.getReadPairedFlag(), hasMate); Assert.assertEquals(record.getFlags(), flags); Assert.assertEquals(record.getNotPrimaryAlignmentFlag(), isSecondaryAlignment); if (refStart == -1) { Assert.assertEquals(record.getReadUnmappedFlag(), true); Assert.assertEquals(record.getAlignmentStart(), 0); Assert.assertEquals(record.getCigarString(), "*"); Assert.assertEquals(record.getReferenceName(), "*"); Assert.assertEquals(record.getMappingQuality(), 0); } else { Assert.assertEquals(record.getReadUnmappedFlag(), false); Assert.assertEquals(record.getAlignmentStart(), refStart); Assert.assertEquals(record.getCigarString(), cigar); Assert.assertEquals(record.getReferenceName(), refName); Assert.assertEquals(record.getMappingQuality(), mapQ); } }</code><technical_language>code in this test is identical for line -- tests call a shared method for of work</technical_language>

Target:
public void testRowsAfterIteratorDetach(String acc, int recordIndex, int flags, String readName, String bases, String quals, int refStart, String cigar, String refName, int mapQ, boolean hasMate, boolean isSecondaryAlignment) { if (!SRAAccession.isSupported()) return; SAMRecord record = getRecordByIndex(acc, recordIndex, true); checkSAMRecord(record, flags, readName, bases, quals, refStart, cigar, refName, mapQ, hasMate, isSecondaryAlignment); }
Source:
<code>public Document(JsonNode json) { this.jsonFields = new HashMap<>(); json.fields().forEachRemaining( e -> { if ("coreId".equals(e.getKey())) { this.id = (json.get("doi").asText().equals("null")) ? json.get("coreId").asText() : "doi:" + json.get("doi").asText(); } else if ("abstract".equals(e.getKey())) { this.contents = json.get("title").asText() + "\n" + json.get("abstract").asText(); } else { <START> jsonFields.put(e.getKey(), e.getValue()); <END> } }); }</code><technical_language>this.jsonFields for consistency</technical_language>

Target:
public Document(JsonNode json) { this.jsonFields = new HashMap<>(); json.fields().forEachRemaining( e -> { if ("coreId".equals(e.getKey())) { this.id = (json.get("doi").asText().equals("null")) ? json.get("coreId").asText() : "doi:" + json.get("doi").asText(); } else if ("abstract".equals(e.getKey())) { this.contents = json.get("title").asText() + "\n" + json.get("abstract").asText(); } else { this.jsonFields.put(e.getKey(), e.getValue()); } }); }
Source:
<code>public <T> T execute(Request<T> request, boolean authenticateIfNeeded, IProgressMonitor monitor) throws IOException, GerritException { String openIdProvider = getOpenIdProvider(); hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor); for (int attempt = 0; attempt < 2; attempt++) { if (authenticateIfNeeded && needsAuthentication()) { AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); if (openIdProvider != null || credentials != null) { authenticate(openIdProvider, monitor); } <START> if (!obtainedXsrfKey) { <END> updateXsrfKey(monitor); } } HttpMethodBase method = request.createMethod(); try { WebUtil.execute(httpClient, hostConfiguration, method, monitor); } catch (IOException e) { WebUtil.releaseConnection(method, monitor); throw e; } catch (RuntimeException e) { WebUtil.releaseConnection(method, monitor); throw e; } int code = method.getStatusCode(); if (code == HttpURLConnection.HTTP_OK) { try { return request.process(method); } finally { WebUtil.releaseConnection(method, monitor); } } else { WebUtil.releaseConnection(method, monitor); if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) { authenticate(openIdProvider, monitor); } else { throw new GerritHttpException(code); } } } throw new GerritLoginException(); }</code><technical_language>move this if block</technical_language>

Target:
public <T> T execute(Request<T> request, boolean authenticateIfNeeded, IProgressMonitor monitor) throws IOException, GerritException { String openIdProvider = getOpenIdProvider(); hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor); for (int attempt = 0; attempt < 2; attempt++) { if (authenticateIfNeeded) { if (needsAuthentication()) { AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); if (openIdProvider != null || credentials != null) { authenticate(openIdProvider, monitor); } } if (!obtainedXsrfKey) { updateXsrfKey(monitor); } } HttpMethodBase method = request.createMethod(); try { WebUtil.execute(httpClient, hostConfiguration, method, monitor); } catch (IOException e) { WebUtil.releaseConnection(method, monitor); throw e; } catch (RuntimeException e) { WebUtil.releaseConnection(method, monitor); throw e; } int code = method.getStatusCode(); if (code == HttpURLConnection.HTTP_OK) { try { return request.process(method); } finally { WebUtil.releaseConnection(method, monitor); } } else { WebUtil.releaseConnection(method, monitor); if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) { authenticate(openIdProvider, monitor); } else { throw new GerritHttpException(code); } } } throw new GerritLoginException(); }
Source:
<code><START> public void test_bug_7548161() { <END> long now = System.currentTimeMillis(); long today = now; long tomorrow = now + DateUtils.DAY_IN_MILLIS; long yesterday = now - DateUtils.DAY_IN_MILLIS; assertEquals("Tomorrow", DateUtils.getRelativeTimeSpanString(tomorrow, now, DateUtils.DAY_IN_MILLIS, 0)); assertEquals("Yesterday", DateUtils.getRelativeTimeSpanString(yesterday, now, DateUtils.DAY_IN_MILLIS, 0)); assertEquals("Today", DateUtils.getRelativeTimeSpanString(today, now, DateUtils.DAY_IN_MILLIS, 0)); }</code><technical_language>huh. this start Locale.US test, heard needing a waiver. CTS run in en-US</technical_language>

Target:
public void test_bug_7548161() { if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { return; } long now = System.currentTimeMillis(); long today = now; long tomorrow = now + DateUtils.DAY_IN_MILLIS; long yesterday = now - DateUtils.DAY_IN_MILLIS; assertEquals("Tomorrow", DateUtils.getRelativeTimeSpanString(tomorrow, now, DateUtils.DAY_IN_MILLIS, 0)); assertEquals("Yesterday", DateUtils.getRelativeTimeSpanString(yesterday, now, DateUtils.DAY_IN_MILLIS, 0)); assertEquals("Today", DateUtils.getRelativeTimeSpanString(today, now, DateUtils.DAY_IN_MILLIS, 0)); }
Source:
<code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater .inflate(R.layout.activity_fragment_quickreturn_recycler, container, false); recycleView = (RecyclerView) rootView.findViewById(R.id.recycler); toolbar = (Toolbar) rootView.findViewById(R.id.toolbar); <START> ((MainActivity) getActivity()).setSupportActionBar(toolbar); <END> return rootView; }</code><technical_language>FIXME: cast getActivity(), interface</technical_language>

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { EventBusExt.getDefault().register(this); String currentUserId = AppPrefs.getInstance(getActivity()).getCurrentUserId(); TaskQueue.loadQueueDefault(getActivity()) .execute(new GetCurrentUserCampaignTask(currentUserId)); TaskQueue.loadQueueDefault(getActivity()) .execute(new GetPastUserCampaignTask(currentUserId)); View rootView = inflater .inflate(R.layout.activity_fragment_quickreturn_recycler, container, false); recycleView = (RecyclerView) rootView.findViewById(R.id.recycler); toolbar = (Toolbar) rootView.findViewById(R.id.toolbar); TextView title = (TextView) rootView.findViewById(R.id.toolbar_title); toolbar.setTitle(""); title.setText(getString(R.string.app_name)); setToolbarListener.setToolbar(toolbar); return rootView; }
Source:
<code>public Map.Entry<KeyExtent,Bulk.Files> next() { if (!hasNext()) <START> return null; <END> Bulk.Mapping bm = gson.fromJson(reader, Bulk.Mapping.class); if (renameMap != null) { return new AbstractMap.SimpleEntry<>(bm.getKeyExtent(tableId), bm.getFiles().mapNames(renameMap)); } else { return new AbstractMap.SimpleEntry<>(bm.getKeyExtent(tableId), bm.getFiles()); } }</code><technical_language>a fan of null-oriented programming here. prefer caller check hasNext throw exception here. However, better</technical_language>

Target:
public Map.Entry<KeyExtent,Bulk.Files> next() { Bulk.Mapping bm = gson.fromJson(reader, Bulk.Mapping.class); if (renameMap != null) { return new AbstractMap.SimpleEntry<>(bm.getKeyExtent(tableId), bm.getFiles().mapNames(renameMap)); } else { return new AbstractMap.SimpleEntry<>(bm.getKeyExtent(tableId), bm.getFiles()); } }
Source:
<code>public void test_run_without_user() throws IOException, InterruptedException { EnvVars launchEnv = newLaunchEnv(); String containerId = dockerClient.run(launchEnv, "learn/tutorial", null, null, Collections.<String, String>emptyMap(), Collections.<String>emptyList(), new EnvVars(), null, "echo", "hello world"); Assert.assertEquals(64, containerId.length()); ContainerRecord containerRecord = dockerClient.getContainerRecord(launchEnv, containerId); Assert.assertEquals(dockerClient.inspect(launchEnv, "learn/tutorial", ".Id"), containerRecord.getImageId()); Assert.assertTrue(containerRecord.getContainerName().length() > 0); Assert.assertTrue(containerRecord.getHost().length() > 0); Assert.assertTrue(containerRecord.getCreated() > 1000000000000L); <START> Assert.assertEquals(Collections.<String>emptyList(), dockerClient.getVolumes(launchEnv, containerId)); <END> Assert.assertNotNull(dockerClient.inspect(launchEnv, containerId, ".Name")); dockerClient.stop(launchEnv, containerId); Assert.assertNull(dockerClient.inspect(launchEnv, containerId, ".Name")); }</code><technical_language>testing interesting here; delete this, especially if user argument is deleted. I in a test (if is possible) is verification in WithContainerStepTest fixing some bug: a script fails switch of user ID run exec passes afterwards</technical_language>

Target:
public void test_run_without_user() throws IOException, InterruptedException { EnvVars launchEnv = newLaunchEnv(); String containerId = dockerClient.run(launchEnv, "learn/tutorial", null, null, Collections.<String, String>emptyMap(), Collections.<String>emptyList(), new EnvVars(), null, "cat"); Assert.assertEquals(64, containerId.length()); ContainerRecord containerRecord = dockerClient.getContainerRecord(launchEnv, containerId); Assert.assertEquals(dockerClient.inspect(launchEnv, "learn/tutorial", ".Id"), containerRecord.getImageId()); Assert.assertTrue(containerRecord.getContainerName().length() > 0); Assert.assertTrue(containerRecord.getHost().length() > 0); Assert.assertTrue(containerRecord.getCreated() > 1000000000000L); Assert.assertEquals(Collections.<String>emptyList(), dockerClient.getVolumes(launchEnv, containerId)); Assert.assertNotNull(dockerClient.inspect(launchEnv, containerId, ".Name")); dockerClient.stop(launchEnv, containerId); Assert.assertNull(dockerClient.inspect(launchEnv, containerId, ".Name")); }
Source:
<code>public static void filterAdminOnlyFlowParams(final UserManager userManager, final ExecutionOptions options, final User user, final Props props) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) { return; } final Map<String, String> params = options.getFlowParameters(); boolean hasAdminPermission = hasPermission(userManager, user, Type.ADMIN); if (!hasAdminPermission) { params.remove(ExecutionOptions.USE_EXECUTOR); } else { validateIntegerParam(params, ExecutionOptions.USE_EXECUTOR); } <START> boolean disableAdminOnlyForFlowPriority = props.getBoolean(ConfigurationKeys.AZKABAN_DISABLE_ADMIN_ONLY_PERMISSION_FOR_FLOW_PRIORITY, false); <END> if (!hasAdminPermission && !disableAdminOnlyForFlowPriority ) { params.remove(ExecutionOptions.FLOW_PRIORITY); } else { validateIntegerParam(params, ExecutionOptions.FLOW_PRIORITY); } }</code><technical_language>Is necessary pass props reference boolean property sent</technical_language>

Target:
public static void filterAdminOnlyFlowParams(final UserManager userManager, final ExecutionOptions options, final User user, final Props props) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) { return; } final Map<String, String> params = options.getFlowParameters(); final boolean hasAdminPermission = hasPermission(userManager, user, Type.ADMIN); if (!hasAdminPermission) { params.remove(ExecutionOptions.USE_EXECUTOR); } else { validateIntegerParam(params, ExecutionOptions.USE_EXECUTOR); } final boolean disableAdminOnlyForFlowPriority = props .getBoolean(ConfigurationKeys.AZKABAN_DISABLE_ADMIN_ONLY_PERMISSION_FOR_FLOW_PRIORITY, false); if (!hasAdminPermission && !disableAdminOnlyForFlowPriority ) { params.remove(ExecutionOptions.FLOW_PRIORITY); } else { validateIntegerParam(params, ExecutionOptions.FLOW_PRIORITY); } }
Source:
<code>private void interpretCommandStatus(String status, ResultHandler handler) { long oid = 0; int count = 0; Matcher matcher = COMMAND_COMPLETE_PATTERN.matcher(status); if (matcher.matches()) { try { <START> if (matcher.group(3) != null) { <END> oid = Long.parseLong(matcher.group(2)); count = Integer.parseInt(matcher.group(3)); } else if (matcher.group(2) != null) { count = Integer.parseInt(matcher.group(2)); } } catch (NumberFormatException e) { handler.handleError(new PSQLException( GT.tr("Unable to parse the count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE)); return; } } handler.handleCommandStatus(status, count, oid); }</code><technical_language>extract a variable for matcher.group(...)</technical_language>

Target:
private void interpretCommandStatus(String status, ResultHandler handler) { long oid = 0; long count = 0; Matcher matcher = COMMAND_COMPLETE_PATTERN.matcher(status); if (matcher.matches()) { String group2 = matcher.group(2); String group3 = matcher.group(3); try { if (group3 != null) { oid = Long.parseLong(group2); count = Long.parseLong(group3); } else if (group2 != null) { count = Long.parseLong(group2); } } catch (NumberFormatException e) { handler.handleError(new PSQLException( GT.tr("Unable to parse the count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE)); return; } } int countAsInt = 0; if (count > Integer.MAX_VALUE) { countAsInt = Statement.SUCCESS_NO_INFO; } else if (count > 0) { countAsInt = (int) count; } handler.handleCommandStatus(status, countAsInt, oid); }
Source:
<code>public List<StorageResourceDescription> getStorageResourceList(Map<String, String> filters) throws AppCatalogException { try { if (filters.containsKey(DBConstants.StorageResource.HOST_NAME)) { Map<String,Object> queryParameters = new HashMap<>(); queryParameters.put(DBConstants.ComputeResource.HOST_NAME, filters.get(DBConstants.StorageResource.HOST_NAME)); List<StorageResourceDescription> storageResourceDescriptionList = select(QueryConstants.FIND_STORAGE_RESOURCE, -1, 0, queryParameters); return storageResourceDescriptionList; <START> } <END> else { logger.error("Unsupported field name for compute resource.", new IllegalArgumentException()); throw new IllegalArgumentException("Unsupported field name for compute resource."); } } catch (Exception e) { logger.error("Error while retrieving storage resource list", e); throw new AppCatalogException(e); } }</code><technical_language>} else {</technical_language>

Target:
public List<StorageResourceDescription> getStorageResourceList(Map<String, String> filters) throws AppCatalogException { try { if (filters.containsKey(DBConstants.StorageResource.HOST_NAME)) { Map<String,Object> queryParameters = new HashMap<>(); queryParameters.put(DBConstants.ComputeResource.HOST_NAME, filters.get(DBConstants.StorageResource.HOST_NAME)); List<StorageResourceDescription> storageResourceDescriptionList = select(QueryConstants.FIND_STORAGE_RESOURCE, -1, 0, queryParameters); return storageResourceDescriptionList; } else { logger.error("Unsupported field name for compute resource. " + filters.get(DBConstants.StorageResource.HOST_NAME)); throw new IllegalArgumentException("Unsupported field name for compute resource. " + filters.get(DBConstants.StorageResource.HOST_NAME)); } } catch (Exception e) { logger.error("Error while retrieving storage resource list", e); throw new AppCatalogException("Error while retrieving storage resource list", e); } }
Source:
<code>private void prepareFiles() { int fileType = getIntent().getIntExtra(Intents.Extras.FILE_TYPE, FileManager.SERVER_FILE); if (fileType == FileManager.RECENT_FILE) { RecentFileRepository repository = new RecentFileRepository(this); RecentFile recentFile = repository.getRecentFile(getIntent().getStringExtra(Intents.Extras.UNIQUE_KEY)); ServerFile serverFile = new ServerFile(recentFile.getName(), recentFile.getModificationTime(), recentFile.getMime()); serverFile.setSize(recentFile.getSize()); serverFile.setMime(recentFile.getMime()); getIntent().putExtra(Intents.Extras.SERVER_FILE, serverFile); List<ServerFile> serverFiles = new ArrayList<>(); serverFiles.add(serverFile); getIntent().putExtra(Intents.Extras.SERVER_FILES, new ArrayList<Parcelable>(serverFiles)); } NetworkUtils networkUtils = new NetworkUtils(this); if (!networkUtils.isNetworkAvailable()) { Toast.makeText(this, R.string.message_connect_and_try_again, Toast.LENGTH_SHORT).show(); finish(); <START> } <END> }</code><technical_language>I if check connection opening activity</technical_language>

Target:
private void prepareFiles() { int fileType = getIntent().getIntExtra(Intents.Extras.FILE_TYPE, FileManager.SERVER_FILE); if (fileType == FileManager.RECENT_FILE) { RecentFileRepository repository = new RecentFileRepository(this); RecentFile recentFile = repository.getRecentFile(getIntent().getStringExtra(Intents.Extras.UNIQUE_KEY)); ServerFile serverFile = new ServerFile(recentFile.getName(), recentFile.getModificationTime(), recentFile.getMime()); serverFile.setSize(recentFile.getSize()); serverFile.setMime(recentFile.getMime()); getIntent().putExtra(Intents.Extras.SERVER_FILE, serverFile); List<ServerFile> serverFiles = new ArrayList<>(); serverFiles.add(serverFile); getIntent().putExtra(Intents.Extras.SERVER_FILES, new ArrayList<Parcelable>(serverFiles)); } }
Source:
<code>public Set<String> retrieveSameURIs(String uri) { Set<String> result = null; boolean uriIsCached = false; try { cacheReadMutex.acquire(); } catch (InterruptedException e) { LOGGER.error("Exception while waiting for read mutex. Returning null.", e); return null; } try { uriIsCached = uriSetIdMapping.containsKey(uri); if (uriIsCached) { int setId = uriSetIdMapping.get(uri); if (setId != ENTITY_NOT_FOUND) { result = sets.get(setId); } } } finally { cacheReadMutex.release(); } if (!uriIsCached || (uriIsCached && (result == null) && requestEntitiesNotFound)) { <START> requestUri(uri); <END> } return result; }</code><technical_language>I returned Uri set assigned result</technical_language>

Target:
public Set<String> retrieveSameURIs(String uri) { Set<String> result = null; boolean uriIsCached = false; try { cacheReadMutex.acquire(); } catch (InterruptedException e) { LOGGER.error("Exception while waiting for read mutex. Returning null.", e); return null; } try { uriIsCached = uriSetIdMapping.containsKey(uri); if (uriIsCached) { int setId = uriSetIdMapping.get(uri); if (setId != ENTITY_NOT_FOUND) { result = sets.get(setId); } } } finally { cacheReadMutex.release(); } if (!uriIsCached || (uriIsCached && (result == null) && requestEntitiesNotFound)) { result = requestUri(uri); } return result; }
Source:
<code>public boolean registerBlockUpdateListener(final BlockUpdateListener listener) { <START> throw new UnsupportedOperationException("This class doesn't support " <END> + this.getClass().getEnclosingMethod().getName()); }</code><technical_language>changed type of exception NotImplementedException _don't a plan for now_, imply _we'll support this feature_</technical_language>

Target:
public boolean registerBlockUpdateListener(final BlockUpdateListener listener) { throw new NotImplementedException(); }
Source:
<code>public static RowMapperFactory of(Type type, RowMapper<?> mapper) { <START> return (t, ctx) -> t == type <END> ? Optional.of(mapper) : Optional.empty(); }</code><technical_language>t.equals(type) parameterized types satisfy test</technical_language>

Target:
public static RowMapperFactory of(Type type, RowMapper<?> mapper) { return (t, ctx) -> t.equals(type) ? Optional.of(mapper) : Optional.empty(); }
Source:
<code>public void applyConfig(Message m, boolean reindex) { <START> XMLDecoder d = new XMLDecoder(new ByteArrayInputStream(m.getText().getBytes())); <END> Configuration config = (Configuration) d.readObject(); d.close(); setConfiguration(config); LOGGER.log(Level.INFO, "Configuration updated: {0}", configuration.getSourceRoot()); if (reindex) { refreshSearcherManagerMap(); maybeRefreshIndexSearchers(); config.refreshDateForLastIndexRun(); } }</code><technical_language><LINK_0></technical_language>

Target:
public void applyConfig(Message m, boolean reindex) { Configuration config; try { config = makeXMLStringAsConfiguration(m.getText()); } catch (IOException ex) { LOGGER.log(Level.WARNING, "Configuration decoding failed" + ex); return; } setConfiguration(config); LOGGER.log(Level.INFO, "Configuration updated: {0}", configuration.getSourceRoot()); if (reindex) { refreshSearcherManagerMap(); maybeRefreshIndexSearchers(); config.refreshDateForLastIndexRun(); } }
Source:
<code>@Override public void run() { try { Integer exitStatus = controller.exitStatus(workspace, listener); long lastLocation = 0; FilePath lastLocationFile = controller.getLastLocationFile(workspace); if (lastLocationFile.exists()) { lastLocation = Long.parseLong(lastLocationFile.readToString()); } FilePath logFile = controller.getLogFile(workspace); <START> long len = logFile.length(); <END> if (len > lastLocation) { assert !logFile.isRemote(); try (FileChannel ch = FileChannel.open(Paths.get(logFile.getRemote()), StandardOpenOption.READ)) { CountingInputStream cis = new CountingInputStream(Channels.newInputStream(ch.position(lastLocation))); handler.output(cis); lastLocationFile.write(Long.toString(lastLocation + cis.getByteCount()), null); } } if (exitStatus != null) { byte[] output; if (controller.getOutputFile(workspace).exists()) { output = controller.getOutput(workspace); } else { output = null; } handler.exited(exitStatus, output); controller.cleanup(workspace); } else { watchService().schedule(this, 100, TimeUnit.MILLISECONDS); } } catch (Exception x) { LOGGER.log(Level.WARNING, "giving up on watching " + controller.controlDir, x); } }</code><technical_language>check file's existence in case? watcher give immediately (IOException ). IIUC code want wait avoid race conditions. not</technical_language>

Target:
@Override public void run() { try { Integer exitStatus = controller.exitStatus(workspace, listener); long lastLocation = 0; FilePath lastLocationFile = controller.getLastLocationFile(workspace); if (lastLocationFile.exists()) { lastLocation = Long.parseLong(lastLocationFile.readToString()); } FilePath logFile = controller.getLogFile(workspace); long len = logFile.length(); if (len > lastLocation) { assert !logFile.isRemote(); try (FileChannel ch = FileChannel.open(Paths.get(logFile.getRemote()), StandardOpenOption.READ)) { InputStream locallyEncodedStream = Channels.newInputStream(ch.position(lastLocation)); InputStream utf8EncodedStream = cs == null ? locallyEncodedStream : new ReaderInputStream(new InputStreamReader(locallyEncodedStream, cs), StandardCharsets.UTF_8); handler.output(utf8EncodedStream); lastLocationFile.write(Long.toString(ch.position()), null); } } if (exitStatus != null) { byte[] output; if (controller.getOutputFile(workspace).exists()) { output = controller.getOutput(workspace); } else { output = null; } handler.exited(exitStatus, output); controller.cleanup(workspace); } else { if (!controller.controlDir(workspace).isDirectory()) { LOGGER.log(Level.WARNING, "giving up on watching nonexistent {0}", controller.controlDir); return; } watchService().schedule(this, 100, TimeUnit.MILLISECONDS); } } catch (Exception x) { LOGGER.log(Level.WARNING, "giving up on watching " + controller.controlDir, x); } }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AllelicCount)) { return false; } final AllelicCount count = (AllelicCount) o; return interval.equals(count.interval) && refReadCount == count.refReadCount && altReadCount == count.altReadCount <START> && (!((refNucleotide != null) && (count.refNucleotide != null)) || (refNucleotide == count.refNucleotide)) <END> && (!((altNucleotide != null) && (count.altNucleotide != null)) || (altNucleotide == count.altNucleotide)); }</code><technical_language>call equal() for refNucleotide count.refNucleotide</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AllelicCount)) { return false; } final AllelicCount count = (AllelicCount) o; return interval.equals(count.interval) && refReadCount == count.refReadCount && altReadCount == count.altReadCount && (((refNucleotide == null) || (count.refNucleotide == null)) || (refNucleotide == count.refNucleotide)) && (((altNucleotide == null) || (count.altNucleotide == null)) || (altNucleotide == count.altNucleotide)); }
Source:
<code>protected QueryResponse addProcessingDetails(Set<ProcessingDetails> exceptions, QueryResponse response) { if (!exceptions.isEmpty()) { if (response == null) { <START> logger.error("Could not add Query exceptions to a QueryResponse because the list of ProcessingDetails was null -- according to the API this should not happen"); <END> } else { Set<ProcessingDetails> sourceDetails = response.getProcessingDetails(); sourceDetails.addAll(exceptions); } } return response; }</code><technical_language>tweak this error log sense now</technical_language>

Target:
protected QueryResponse addProcessingDetails(Set<ProcessingDetails> exceptions, QueryResponse response) { if (!exceptions.isEmpty()) { if (response == null) { logger.error("Could not add exceptions to response because the response was null"); } else { Set<ProcessingDetails> sourceDetails = response.getProcessingDetails(); if (null != sourceDetails) { sourceDetails.addAll(exceptions); } else { logger.error("Could not add exceptions to response because the response's processing details was null"); } } } return response; }
Source:
<code>public Linkifier(GitilesUrls urls, Config config) { this.urls = checkNotNull(urls, "urls"); this.mCommentLinks = new Vector<CommentLinkInfo>(); CommentLinkInfo http = new CommentLinkInfo("StandardHtmlLinks", httpUrl, "", ""); mCommentLinks.add(http); Set<String> <START> subSections = <END> config.getSubsections(COMMENTLINK); for (String subSection : subSections) { String match = config.getString("commentlink", subSection, "match"); String link = config.getString("commentlink", subSection, "link"); String html = config.getString("commentlink", subSection, "link"); mCommentLinks.add(new CommentLinkInfo(subSection, match, link, html)); } }</code><technical_language>Nit: "subsections", this is a single English word, consistent JGit method naming</technical_language>

Target:
public Linkifier(GitilesUrls urls, Config config) { this.urls = checkNotNull(urls, "urls"); String regexp = REGEXP_HTTP_CHANGE_ID; List<CommentLinkInfo> list = new ArrayList<CommentLinkInfo>(); list.add(new CommentLinkInfo("StandardHtmlLinks", HTTP_URL_PATTERN, "", "")); Set<String> subsections = config.getSubsections(COMMENTLINK); for (String subsection : subsections) { String match = config.getString("commentlink", subsection, "match"); String link = config.getString("commentlink", subsection, "link"); String html = config.getString("commentlink", subsection, "html"); checkArgument(!Strings.isNullOrEmpty(match), "invalid commentlink.%s.match", subsection); try { Pattern compiledPattern = Pattern.compile(match); list.add(new CommentLinkInfo(subsection, compiledPattern, link, html)); regexp += "|(" + match + ")"; } catch (RuntimeException err) { System.err.println("Ommiting commentlink " + subsection); } } this.commentLinks = Collections.unmodifiableList(list); try { allPattern = Pattern.compile(regexp); } catch (RuntimeException err) { System.err.println("Could not compile all commentlinks as a whole"); } }
Source:
<code><START> public ILocation getLocation() { <END> LineRange selectedRange = getSelectedRange(); ILineLocation location = ReviewsFactory.eINSTANCE.createLineLocation(); ILineRange range = ReviewsFactory.eINSTANCE.createLineRange(); range.setStart(selectedRange.getStartLine()); range.setEnd(selectedRange.getStartLine() + selectedRange.getNumberOfLines()); location.getRanges().add(range); return location; }</code><technical_language>Fine move command, try refactor code, this method private</technical_language>

Target:
private ILocation getLocation() { LineRange selectedRange = getSelectedRange(); ILineLocation location = ReviewsFactory.eINSTANCE.createLineLocation(); ILineRange range = ReviewsFactory.eINSTANCE.createLineRange(); range.setStart(selectedRange.getStartLine()); range.setEnd(selectedRange.getStartLine() + selectedRange.getNumberOfLines()); location.getRanges().add(range); return location; }
Source:
<code>private void createResourceGroup(EnvironmentDto environmentDto, Environment environment) { if (!azureSingleResourceGroupFeatureSwitch.isActive()) { LOGGER.debug("Azure single resource group feature turned off, not creating resourcegroup."); return; } Optional<AzureResourceGroupDto> azureResourceGroupDtoOptional = getAzureResourceGroupDto(environmentDto); if (!AZURE.name().equals(environmentDto.getCloudPlatform()) || azureResourceGroupDtoOptional.isEmpty()) { LOGGER.debug("Cloudplatform not azure or no azure resource group dto defined, not creating resource group."); return; } AzureResourceGroupDto azureResourceGroupDto = azureResourceGroupDtoOptional.get(); if (!CREATE_NEW.equals(azureResourceGroupDto.getResourceGroupCreation())) { <START> LOGGER.debug("Azure resource group creation not requested, not creating resource group."); <END> return; } CloudCredential cloudCredential = credentialToCloudCredentialConverter.convert(environmentDto.getCredential()); AzureClient azureClient = azureClientService.getClient(cloudCredential); String resourceGroupName = String.format("%s_%d", environmentDto.getName(), clock.getCurrentTimeMillis()); LOGGER.debug("Azure generated resource group name: {}.", resourceGroupName); azureClient.createResourceGroup(resourceGroupName, environmentDto.getLocation().getName(), mergeTags(environmentDto)); parameterService.updateResourceGroupName(environment, resourceGroupName); LOGGER.debug("Azure resource group created successfully."); }</code><technical_language>Azure resource group creation requested -> New single Azure resource group creation requested</technical_language>

Target:
private void createResourceGroup(EnvironmentDto environmentDto, Environment environment) { if (!azureSingleResourceGroupFeatureSwitch.isActive()) { LOGGER.debug("Azure single resource group feature turned off, not creating resourcegroup."); return; } Optional<AzureResourceGroupDto> azureResourceGroupDtoOptional = getAzureResourceGroupDto(environmentDto); if (azureResourceGroupDtoOptional.isEmpty()) { LOGGER.debug("No azure resource group dto defined, not creating resource group."); return; } AzureResourceGroupDto azureResourceGroupDto = azureResourceGroupDtoOptional.get(); if (!CREATE_NEW.equals(azureResourceGroupDto.getResourceGroupCreation())) { LOGGER.debug("New single azure resource group creation not requested, not creating resource group."); return; } String resourceGroupName = String.format("%s_%d", environmentDto.getName(), clock.getCurrentTimeMillis()); LOGGER.debug("Azure generated resource group name: {}.", resourceGroupName); createResourceGroup(environmentDto, resourceGroupName); parameterService.updateResourceGroupName(environment, resourceGroupName); LOGGER.debug("Azure resource group created successfully."); }