auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>@Subscribe public void on(CheckSyncStatusEvent event) { if (event.isSyncDisable() && Prefs.isReadingListSyncEnabled()) { ReadingListSyncBehaviorDialogs.detectedMultipleSyncSettingsDialog(BaseActivity.this, () -> Prefs.setReadingListSyncEnabled(false)); } else { ReadingListCheckSetupStatusTask checkSetupStatusTask = new ReadingListCheckSetupStatusTask() { @Override <START> public void onFinish(@Nullable Void result) { <END> Prefs.setReadingListSyncEnabled(true); if (event.getPreferenceOfSyncReadingLists() != null) { ((SwitchPreferenceCompat) event.getPreferenceOfSyncReadingLists()).setChecked(true); } } @Override public void onCatch(Throwable caught) { if (Prefs.isReadingListSyncEnabled()) { ReadingListSyncBehaviorDialogs.detectedMultipleSyncSettingsDialog(BaseActivity.this, () -> Prefs.setReadingListSyncEnabled(false)); } else { Prefs.setReadingListSyncEnabled(false); } if (event.getPreferenceOfSyncReadingLists() != null) { ((SwitchPreferenceCompat) event.getPreferenceOfSyncReadingLists()).setChecked(false); } } }; checkSetupStatusTask.execute(); } }</code><technical_language>performing actions a long-running async task, always, check current activity exists, checking isDestroyed(), isAdded() in case of a Fragment. Otherwise, if user closed current activity, this code crash</technical_language>

Target:
@Subscribe public void on(CheckSyncStatusEvent event) { if (event.isSyncDisable() && Prefs.isReadingListSyncEnabled()) { ReadingListSyncBehaviorDialogs.detectedMultipleSyncSettingsDialog(BaseActivity.this, () -> Prefs.setReadingListSyncEnabled(false)); } else { ReadingListCheckSetupStatusTask checkSetupStatusTask = new ReadingListCheckSetupStatusTask() { @Override public void onFinish(@Nullable Void result) { if (isDestroyed()) { return; } Prefs.setReadingListSyncEnabled(true); if (event.getPreferenceOfSyncReadingLists() != null) { ((SwitchPreferenceCompat) event.getPreferenceOfSyncReadingLists()).setChecked(true); } } @Override public void onCatch(Throwable caught) { if (isDestroyed()) { return; } if (Prefs.isReadingListSyncEnabled()) { ReadingListSyncBehaviorDialogs.detectedMultipleSyncSettingsDialog(BaseActivity.this, () -> Prefs.setReadingListSyncEnabled(false)); } else { Prefs.setReadingListSyncEnabled(false); } if (event.getPreferenceOfSyncReadingLists() != null) { ((SwitchPreferenceCompat) event.getPreferenceOfSyncReadingLists()).setChecked(false); } } }; checkSetupStatusTask.execute(); } }
Source:
<code>public void close() { <START> cacheManager.disposeCache(this); <END> }</code><technical_language>Suggest debug message lines of log.debug("Closing [%s]", id);</technical_language>

Target:
public void close() { cacheManager.disposeCache(this); log.debug("Closed %s", super.toString()); }
Source:
<code>public byte[] getAPIData() { ByteArrayOutputStream os = new ByteArrayOutputStream(); try { os.write(frameID); <START> os.write(command.getBytes()); <END> if (parameter != null) os.write(parameter); } catch (IOException e) { e.printStackTrace(); } return os.toByteArray(); }</code><technical_language>Check if command is null</technical_language>

Target:
public byte[] getAPIData() { ByteArrayOutputStream os = new ByteArrayOutputStream(); try { os.write(frameID); os.write(command.getBytes()); if (parameter != null) os.write(parameter); } catch (IOException e) { } return os.toByteArray(); }
Source:
<code>protected Rectangle getCurrentConstraintFor(GraphicalEditPart child) { IFigure fig = child.getFigure(); <START> IFigure parent = fig.getParent(); <END> LayoutManager parentLayoutManger = parent.getLayoutManager(); if (parentLayoutManger == null) { return null; } return (Rectangle) parentLayoutManger.getConstraint(fig); }</code><technical_language>discussed, this code executed for connections. checked in stack trace</technical_language>

Target:
protected Rectangle getCurrentConstraintFor(GraphicalEditPart child) { if (child instanceof ConnectionEditPart && child.getParent() instanceof DiagramRootEditPart) { return null; } return super.getCurrentConstraintFor(child); }
Source:
<code>protected void populateHiddenFields(EntityInfo ei, Map<String, String> fieldMap) throws IOException { LOGGER.debug("Starting population of hidden fields due to new or modified indexes."); MongoDataStore ds = (MongoDataStore) ei.getDataStore(); DB entityDB = dbResolver.get(ds); DBCollection coll = entityDB.getCollection(ds.getCollectionName()); DBCursor cursor = coll.find(); while (cursor.hasNext()) { DBObject doc = cursor.next(); for (String index : fieldMap.keySet()) { int arrIndex = index.indexOf("*"); if (arrIndex > -1) { doMultiArrayMap(doc, index, fieldMap.get(index), arrIndex); } else { Object dbObject = Translator.getDBObject(doc, new Path(index)); ObjectNode arrNode = JsonNodeFactory.instance.objectNode(); JsonDoc.modify(arrNode, new Path(fieldMap.get(index)), JsonNodeFactory.instance.textNode(dbObject.toString().toUpperCase()), true); ObjectMapper mapper = new ObjectMapper(); JsonNode merged = merge(mapper.readTree(doc.toString()), mapper.readTree(arrNode.toString())); DBObject obj = (DBObject) JSON.parse(merged.toString()); ((BasicDBObject) doc).clear(); ((BasicDBObject) doc).putAll(obj); } } <START> coll.save(doc); <END> } cursor.close(); LOGGER.debug("Finished population of hidden fields."); }</code><technical_language>nice if skip save if doc is changed</technical_language>

Target:
protected void populateHiddenFields(EntityInfo ei, Map<String, String> fieldMap) throws IOException { LOGGER.debug("Starting population of hidden fields due to new or modified indexes."); MongoDataStore ds = (MongoDataStore) ei.getDataStore(); DB entityDB = dbResolver.get(ds); DBCollection coll = entityDB.getCollection(ds.getCollectionName()); DBCursor cursor = coll.find(); while (cursor.hasNext()) { DBObject doc = cursor.next(); DBObject original = (DBObject) ((BasicDBObject) doc).copy(); for (String index : fieldMap.keySet()) { int arrIndex = index.indexOf("*"); if (arrIndex > -1) { populateHiddenArrayField(doc, index, fieldMap.get(index)); } else { Object dbObject = Translator.getDBObject(doc, new Path(index)); ObjectNode arrNode = JsonNodeFactory.instance.objectNode(); JsonDoc.modify(arrNode, new Path(fieldMap.get(index)), JsonNodeFactory.instance.textNode(dbObject.toString().toUpperCase()), true); ObjectMapper mapper = new ObjectMapper(); JsonNode merged = merge(mapper.readTree(doc.toString()), mapper.readTree(arrNode.toString())); DBObject obj = (DBObject) JSON.parse(merged.toString()); ((BasicDBObject) doc).clear(); ((BasicDBObject) doc).putAll(obj); } } if (!doc.equals(original)) { coll.save(doc); } } cursor.close(); LOGGER.debug("Finished population of hidden fields."); }
Source:
<code>public void testInsertWithFailureDoesntLeaveBehindOrphanedTable() throws Exception { <START> try (AutoCloseable table = withTable("tpch.test_cleanup", "(column_a INTEGER)")) { <END> assertQuery("SHOW TABLES", "VALUES 'orders', 'test_cleanup'"); execute("ALTER TABLE tpch.test_cleanup ADD CHECK (column_a > 0)"); Exception thrown = null; try { assertUpdate("INSERT INTO tpch.test_cleanup(column_a) VALUES (0)", 1); } catch (Exception e) { thrown = e; assertQuery("SHOW TABLES", "VALUES 'orders', 'test_cleanup'"); } assertNotNull(thrown, "Expected exception to be thrown when attempting to insert"); } }</code><technical_language>Nit: shorten column_a a x</technical_language>

Target:
public void testInsertWithFailureDoesntLeaveBehindOrphanedTable() throws Exception { String schemaName = format("tmp_schema_%s", UUID.randomUUID().toString().replaceAll("-", "")); try (AutoCloseable schema = withSchema(schemaName); AutoCloseable table = withTable(format("%s.test_cleanup", schemaName), "(x INTEGER)")) { assertQuery(format("SELECT table_name FROM information_schema.tables WHERE table_schema = '%s'", schemaName), "VALUES 'test_cleanup'"); execute(format("ALTER TABLE %s.test_cleanup ADD CHECK (x > 0)", schemaName)); assertQueryFails(format("INSERT INTO %s.test_cleanup (x) VALUES (0)", schemaName), "ERROR: new row .* violates check constraint [\\s\\S]*"); assertQuery(format("SELECT table_name FROM information_schema.tables WHERE table_schema = '%s'", schemaName), "VALUES 'test_cleanup'"); } }
Source:
<code>private void testGetBlob(BlobInfo blobInfo, ByteRange range) throws Exception { SecurityServiceCallback callback = new SecurityServiceCallback(); MockRestResponseChannel restResponseChannel = new MockRestResponseChannel(); JSONObject headers = null; if (range != null) { headers = new JSONObject(); switch (range.getType()) { case LAST_N_BYTES: headers.put(RestUtils.Headers.RANGE, "bytes=-" + range.getLastNBytes()); break; case FROM_START_OFFSET: headers.put(RestUtils.Headers.RANGE, "bytes=" + range.getStartOffset() + "-"); break; case OFFSET_RANGE: headers.put(RestUtils.Headers.RANGE, "bytes=" + range.getStartOffset() + "-" + range.getEndOffset()); break; } } RestRequest restRequest = createRestRequest(RestMethod.GET, "/", headers); securityService.processResponse(restRequest, restResponseChannel, blobInfo, callback).get(); Assert.assertTrue("Callback should have been invoked", callback.callbackLatch.await(1, TimeUnit.SECONDS)); Assert.assertNull("Exception should not have been thrown", callback.exception); <START> Assert.assertEquals("Response should have been set", <END> range == null ? ResponseStatus.Ok : ResponseStatus.PartialContent, restResponseChannel.getStatus()); verifyHeadersForGetBlob(blobInfo.getBlobProperties(), range, restResponseChannel); }</code><technical_language>add word "status"? message missed it</technical_language>

Target:
private void testGetBlob(BlobInfo blobInfo, ByteRange range) throws Exception { SecurityServiceCallback callback = new SecurityServiceCallback(); MockRestResponseChannel restResponseChannel = new MockRestResponseChannel(); JSONObject headers = range != null ? new JSONObject().put(RestUtils.Headers.RANGE, RestTestUtils.getRangeHeaderString(range)) : null; RestRequest restRequest = createRestRequest(RestMethod.GET, "/", headers); securityService.processResponse(restRequest, restResponseChannel, blobInfo, callback).get(); Assert.assertTrue("Callback should have been invoked", callback.callbackLatch.await(1, TimeUnit.SECONDS)); Assert.assertNull("Exception should not have been thrown", callback.exception); Assert.assertEquals("Response status should have been set", range == null ? ResponseStatus.Ok : ResponseStatus.PartialContent, restResponseChannel.getStatus()); verifyHeadersForGetBlob(blobInfo.getBlobProperties(), range, restResponseChannel); }
Source:
<code>private List<StackImpl> loadStacks(String stackPath) throws ServerException { try (InputStream is = getResource(stackPath)) { <START> return firstNonNull(GSON.fromJson(new InputStreamReader(is), new TypeToken<List<StackImpl>>() {}.getType()), emptyList()); <END> } catch (IOException | JsonIOException | JsonSyntaxException e) { throw new ServerException("Failed to get stacks from specified path " + stackPath, e); } }</code><technical_language>null is acceptable situation</technical_language>

Target:
private List<DecoratedStackImpl> loadStacks(String stackPath) throws ServerException { try (InputStream is = getResource(stackPath)) { return firstNonNull(GSON.fromJson(new InputStreamReader(is), new TypeToken<List<DecoratedStackImpl>>() {}.getType()), emptyList()); } catch (IOException | JsonIOException | JsonSyntaxException e) { throw new ServerException("Failed to get stacks from specified path " + stackPath, e); } }
Source:
<code>private void restoreWidgetValues() { IDialogSettings settings = getDialogSettings(); if <START> (settings != null) { <END> openType = settings.getBoolean(STORE_OPEN_TYPE_ID); replaceSource = settings.getBoolean(STORE_REPLACE_SOURCE_ID); } }</code><technical_language>null != settings</technical_language>

Target:
private void restoreWidgetValues() { IDialogSettings settings = getDialogSettings(); if (null != settings) { openType = settings.getBoolean(STORE_OPEN_TYPE_ID); replaceSource = settings.getBoolean(STORE_REPLACE_SOURCE_ID); } }
Source:
<code><START> public static Systems getInstance() { <END> if(systems == null) { systems = new Systems(); } if(!systems.initialized && !systems.initializing) { systems.initializing = true; systems.loader = new Thread(new Runnable() { @Override public void run() { systems.initialize(); } }, "Planet Loader"); systems.loader.setPriority(Thread.NORM_PRIORITY - 1); systems.loader.start(); } Systems temp_systems = systems; return systems; }</code><technical_language>this need synchronized somehow</technical_language>

Target:
public static Systems getInstance() { if(systems == null) { systems = new Systems(); } if(!systems.initialized && !systems.initializing) { systems.initializing = true; systems.loader = new Thread(new Runnable() { @Override public void run() { systems.initialize(); } }, "Planet Loader"); systems.loader.setPriority(Thread.NORM_PRIORITY - 1); systems.loader.start(); } return systems; }
Source:
<code>public void testMerge() { final Parameters params1 = new Parameters("foo", "bar"); final Parameters params2 = new Parameters("baz", "xyzzy"); assertThat(Parameters.merge(params1)).isSameAs(params1); assertThat(Parameters.merge(params1, null)).isSameAs(params1); assertThat(Parameters.merge(null, params1)).isSameAs(params1); assertThat(Parameters.merge(null, params1, null, params2, null)).isSameAs(params1); <START> assertThat(params1).hasSize(4); <END> assertThat(params2).hasSize(2); }</code><technical_language>suggestion assertThat(params1).hasSize(2);</technical_language>

Target:
public void testMerge() { final Parameters params1 = new Parameters("foo", "bar"); final Parameters params2 = new Parameters("baz", "xyzzy"); assertThat(Parameters.merge(params1)).isSameAs(params1); assertThat(Parameters.merge(params1, null)).isSameAs(params1); assertThat(Parameters.merge(null, params1)).isSameAs(params1); assertThat(Parameters.merge(null, params1, null, params2, null)).isSameAs(params1); assertThat(params1).hasSize(2); assertThat(params2).hasSize(1); }
Source:
<code>public static BigInteger decodeBigInteger(byte[] data, int index) { final byte[] valueBytes = decodeItemBytes(data, index); if (valueBytes.length == 0) { return BigInteger.ZERO; } else { BigInteger res = new BigInteger(1, valueBytes); <START> if (res.compareTo(BigInteger.ZERO) < 0) throw new RuntimeException("not a valid number"); <END> return res; } }</code><technical_language>this condition met</technical_language>

Target:
public static BigInteger decodeBigInteger(byte[] data, int index) { final byte[] valueBytes = decodeItemBytes(data, index); if (valueBytes.length == 0) { return BigInteger.ZERO; } else { BigInteger res = new BigInteger(1, valueBytes); return res; } }
Source:
<code>public void shouldEncryptPluggablePublishArtifactPropertiesDuringSave() throws Exception { setupMetadataForPlugin(); ArtifactStore artifactStore = new ArtifactStore("dockerhub", "cd.go.artifact.docker.registry"); artifactStoreService.create(Username.ANONYMOUS, artifactStore, new HttpLocalizedOperationResult()); File configFile = new File(new SystemEnvironment().getCruiseConfigFile()); String config = IOUtils.toString(getClass().getResourceAsStream("/data/pluggable_artifacts_with_params.xml"), UTF_8); FileUtils.writeStringToFile(configFile, config, UTF_8); cachedGoConfig.forceReload(); Configuration ancestorPluggablePublishAftifactConfigAfterEncryption = goConfigDao.loadConfigHolder() .configForEdit.pipelineConfigByName(new CaseInsensitiveString("ancestor")) .getExternalArtifactConfigs().get(0).getConfiguration(); assertThat(ancestorPluggablePublishAftifactConfigAfterEncryption.getProperty("Image").getValue(), is("SECRET")); <START> assertThat(ancestorPluggablePublishAftifactConfigAfterEncryption.getProperty("Image").getEncryptedValue(), startsWith("AES:")); <END> assertThat(ancestorPluggablePublishAftifactConfigAfterEncryption.getProperty("Image").getConfigValue(), is(CoreMatchers.nullValue())); }</code><technical_language>change new GoCipher().encrypt(..)</technical_language>

Target:
public void shouldEncryptPluggablePublishArtifactPropertiesDuringSave() throws Exception { resetCipher.setupAESCipherFile(); resetCipher.setupDESCipherFile(); setupMetadataForPlugin(); ArtifactStore artifactStore = new ArtifactStore("dockerhub", "cd.go.artifact.docker.registry"); artifactStoreService.create(Username.ANONYMOUS, artifactStore, new HttpLocalizedOperationResult()); File configFile = new File(new SystemEnvironment().getCruiseConfigFile()); String config = IOUtils.toString(getClass().getResourceAsStream("/data/pluggable_artifacts_with_params.xml"), UTF_8); FileUtils.writeStringToFile(configFile, config, UTF_8); cachedGoConfig.forceReload(); Configuration ancestorPluggablePublishAftifactConfigAfterEncryption = goConfigDao.loadConfigHolder() .configForEdit.pipelineConfigByName(new CaseInsensitiveString("ancestor")) .getExternalArtifactConfigs().get(0).getConfiguration(); assertThat(ancestorPluggablePublishAftifactConfigAfterEncryption.getProperty("Image").getValue(), is("SECRET")); assertThat(ancestorPluggablePublishAftifactConfigAfterEncryption.getProperty("Image").getEncryptedValue(), is(new GoCipher().encrypt("SECRET"))); assertThat(ancestorPluggablePublishAftifactConfigAfterEncryption.getProperty("Image").getConfigValue(), is(CoreMatchers.nullValue())); }
Source:
<code>public void testIsWithinHour() { Calendar timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); ______TS("Time within past hour"); timeCalendar.add(Calendar.MINUTE, -10); assertTrue(TimeHelper.isWithinHour(timeCalendar.getTime(), Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime())); ______TS("End time not within past hour"); timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); timeCalendar.add(Calendar.MINUTE, -70); assertFalse(TimeHelper.isWithinHour(timeCalendar.getTime(), Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime())); timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); timeCalendar.add(Calendar.MINUTE, 10); assertFalse(TimeHelper.isWithinHour(timeCalendar.getTime(), Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime())); timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); timeCalendar.add(Calendar.MINUTE, 10); assertFalse(TimeHelper.isWithinHour(timeCalendar.getTime(), timeCalendar.getTime())); ______TS("Session ended but grace time left"); int gracePeriod = 15; timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); timeCalendar.add(Calendar.MINUTE, -10); assertFalse(TimeHelper.isWithinHour(new Date(timeCalendar.getTime().getTime() + gracePeriod * 60000), <START> Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime())); <END> }</code><technical_language>For this instances this line, align [C]alendar [T]imeHelper</technical_language>

Target:
public void testIsWithinHour() { Calendar timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); ______TS("Time within past hour"); timeCalendar.add(Calendar.MINUTE, -10); assertTrue(TimeHelper.isWithinPastHour(timeCalendar.getTime(), Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime())); ______TS("End time not within past hour"); timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); timeCalendar.add(Calendar.MINUTE, -70); assertFalse(TimeHelper.isWithinPastHour(timeCalendar.getTime(), Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime())); timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); timeCalendar.add(Calendar.MINUTE, 10); assertFalse(TimeHelper.isWithinPastHour(timeCalendar.getTime(), Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime())); timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); timeCalendar.add(Calendar.MINUTE, 10); assertFalse(TimeHelper.isWithinPastHour(timeCalendar.getTime(), timeCalendar.getTime())); ______TS("Session ended but grace time left"); int gracePeriod = 15; timeCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); timeCalendar.add(Calendar.MINUTE, -10); assertFalse(TimeHelper.isWithinPastHour(new Date(timeCalendar.getTime().getTime() + gracePeriod * 60000), Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime())); }
Source:
<code><START> private static List<Rule> getRules(VElement renderable) { <END> final List<Rule> rules = new ArrayList<Rule>(); for (final VAttachment attachment : renderable.getAttachments()) { if (Rule.class.isInstance(attachment)) { final Rule rule = (Rule) attachment; rules.add(rule); } } return rules; }</code><technical_language>show enable rule account, of type (so is generic)</technical_language>

Target:
private static List<Rule> getRules(VElement renderable) { final HashMap<Class<? extends Rule>, Rule> rules = new HashMap<Class<? extends Rule>, Rule>(); for (final VAttachment attachment : renderable.getAttachments()) { if (Rule.class.isInstance(attachment)) { final Rule rule = (Rule) attachment; if (!rules.containsKey(rule.getClass())) { rules.put(rule.getClass(), rule); } } } return new ArrayList<Rule>(rules.values()); }
Source:
<code>public boolean process(final HttpServletRequest request, final HttpServletResponse response) { <START> if (isTokenRequest(request)) { <END> recordSession(request); } else if (isBackChannelLogoutRequest(request)) { destroySession(request); return false; } else if (isFrontChannelLogoutRequest(request)) { destroySession(request); final String redirectionUrl = computeRedirectionToServer(request); if (redirectionUrl != null) { CommonUtils.sendRedirect(response, redirectionUrl); } return false; } else { logger.trace("Ignoring URI {}", request.getRequestURI()); } return true; }</code><technical_language>is preferrable nest of if/else if return. easier follow way</technical_language>

Target:
public boolean process(final HttpServletRequest request, final HttpServletResponse response) { if (isTokenRequest(request)) { logger.trace("Received a token request"); recordSession(request); return true; } else if (isBackChannelLogoutRequest(request)) { logger.trace("Received a back channel logout request"); destroySession(request); return false; } else if (isFrontChannelLogoutRequest(request)) { logger.trace("Received a front channel logout request"); destroySession(request); final String redirectionUrl = computeRedirectionToServer(request); if (redirectionUrl != null) { CommonUtils.sendRedirect(response, redirectionUrl); } return false; } else { logger.trace("Ignoring URI for logout: {}", request.getRequestURI()); return true; } }
Source:
<code>public boolean isIdenticalTo(final PlaylistInfo info) { <START> boolean returnMe; <END> if (!TextUtils.isEmpty(getUploader())) { returnMe = getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && getThumbnailUrl().equals(info.getThumbnailUrl()) && getUploader().equals(info.getUploaderName()); } else { returnMe = getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && getThumbnailUrl().equals(info.getThumbnailUrl()); } return returnMe; }</code><technical_language>variable returnMe is useless replaced a simple return is assigned (lines 79 84)</technical_language>

Target:
public boolean isIdenticalTo(final PlaylistInfo info) { return getServiceId() == info.getServiceId() && getStreamCount() == info.getStreamCount() && TextUtils.equals(getName(), info.getName()) && TextUtils.equals(getUrl(), info.getUrl()) && TextUtils.equals(getThumbnailUrl(), info.getThumbnailUrl()) && TextUtils.equals(getUploader(), info.getUploaderName()); }
Source:
<code>private ConcurrentLinkedQueue<CacheEventWrapper> getEventQueue (K key) { long mapKeyForQueue = key.hashCode() % NUMBER_OF_EVENT_QUEUES; <START> keyBasedEventQueueMap.putIfAbsent(mapKeyForQueue, new ConcurrentLinkedQueue<CacheEventWrapper>()); <END> return keyBasedEventQueueMap.get(mapKeyForQueue); }</code><technical_language>Initialise in constructor</technical_language>

Target:
private ConcurrentLinkedQueue<CacheEventWrapper> getEventQueue (K key) { int mapKeyForQueue = Math.abs(key.hashCode() % eventQueueCount); return keyBasedEventQueueMap.get(mapKeyForQueue); }
Source:
<code>public static void startUpgrade(final Context context) { final Intent intent = new Intent(context, UpgradeWalletService.class); <START> if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) <END> context.startService(intent); else context.startForegroundService(intent); }</code><technical_language>This if block replaced ContextCompat.startForegroundService(context, intent)</technical_language>

Target:
public static void startUpgrade(final Context context) { ContextCompat.startForegroundService(context, new Intent(context, UpgradeWalletService.class)); }
Source:
<code>private void pathInForeground(final String path) throws Exception { RetryLoop.callWithRetry(client.getZookeeperClient(), new Callable<Void>() { @Override public Void call() throws Exception { ZooKeeper zkClient = client.getZooKeeper(); <START> if(watcher == null) <END> { zkClient.removeAllWatches(path, watcherType, local); } else { zkClient.removeWatches(path, watcher, watcherType, local); } return null; } }); }</code><technical_language>Please review. if watcher is null, removeAllWatches is done. If null, removeWatches</technical_language>

Target:
private void pathInForeground(final String path) throws Exception { if(local) { ZooKeeper zkClient = client.getZooKeeper(); if(watcher == null) { zkClient.removeAllWatches(path, watcherType, local); } else { zkClient.removeWatches(path, watcher, watcherType, local); } } else { RetryLoop.callWithRetry(client.getZookeeperClient(), new Callable<Void>() { @Override public Void call() throws Exception { try { ZooKeeper zkClient = client.getZookeeperClient().getZooKeeper(); if(watcher == null) { zkClient.removeAllWatches(path, watcherType, local); } else { zkClient.removeWatches(path, watcher, watcherType, local); } } catch(Exception e) { if( RetryLoop.isRetryException(e) && guaranteed ) { client.getFailedRemoveWatcherManager().addFailedOperation(new FailedRemoveWatchManager.FailedRemoveWatchDetails(path, watcher)); throw e; } else if(e instanceof KeeperException.NoWatcherException && quietly) { } else { throw e; } } return null; } }); } }
Source:
<code>private ArrayNode createTags(ILoggingEvent event) { ArrayNode node = null; final Marker marker = event.getMarker(); if (marker != null) { node = MAPPER.createArrayNode(); <START> if (marker.getName() != "JSON") { <END> node.add(marker.getName()); } if (marker.hasReferences()) { final Iterator<?> i = event.getMarker().iterator(); while (i.hasNext()) { Marker next = (Marker) i.next(); if (marker.getName() != "JSON") { node.add(next.getName()); } } } } return node; }</code><technical_language>equals compare strings</technical_language>

Target:
private ArrayNode createTags(ILoggingEvent event) { ArrayNode node = null; final Marker marker = event.getMarker(); if (marker != null) { node = MAPPER.createArrayNode(); if (!marker.getName().equals("JSON")) { node.add(marker.getName()); } if (marker.hasReferences()) { final Iterator<?> i = event.getMarker().iterator(); while (i.hasNext()) { Marker next = (Marker) i.next(); if (!marker.getName().equals("JSON")) { node.add(next.getName()); } } } } return node; }
Source:
<code>public List<String> call(ApiCaller ac, Deserializer parms ) throws PerunException { <START> return cz.metacentrum.perun.core.api.AuthzResolver.getGroupRoleNames(ac.getSession(), ac.getGroupById(parms.readInt("group"))); } <END></code><technical_language>Closing curly-bracket new line</technical_language>

Target:
public List<String> call(ApiCaller ac, Deserializer parms) throws PerunException { return cz.metacentrum.perun.core.api.AuthzResolver.getPrincipalRoleNames(ac.getSession()); }
Source:
<code>private void findRolesForUrl(BlackboardArtifact artifact, RoleProcessor roleProcessor) throws TskCoreException { BlackboardAttribute urlAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL)); if (urlAttr == null) { return; } BlackboardAttribute domainAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN)); if (domainAttr == null) { return; } <START> String url = urlAttr.getValueString(); <END> String domain = domainAttr.getValueString(); findMyBbRole(url, domain, artifact, roleProcessor); findPhpBbRole(url, domain, artifact, roleProcessor); findJoomlaRole(url, domain, artifact, roleProcessor); findWordPressRole(url, domain, artifact, roleProcessor); }</code><technical_language>this lower-cased contains checks for lower-cased strings? is a reason this case sensitive</technical_language>

Target:
private void findRolesForUrl(BlackboardArtifact artifact, RoleProcessor roleProcessor) throws TskCoreException { BlackboardAttribute urlAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL)); if (urlAttr == null) { return; } BlackboardAttribute domainAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN)); if (domainAttr == null) { return; } String url = urlAttr.getValueString().toLowerCase(); String domain = domainAttr.getValueString().toLowerCase(); findMyBbRole(url, domain, artifact, roleProcessor); findPhpBbRole(url, domain, artifact, roleProcessor); findJoomlaRole(url, domain, artifact, roleProcessor); findWordPressRole(url, domain, artifact, roleProcessor); }
Source:
<code>private Object transformValue(int sqlColumnType, Object original) throws SQLException { if (original != null) { switch (sqlColumnType) { case Types.SMALLINT: case Types.TINYINT: <START> if (original.getClass() == Short.class) { <END> return ((Short) original).intValue(); } else { break; } case Types.NUMERIC: case Types.DECIMAL: return ((BigDecimal) original).doubleValue(); case Types.DATE: return ((Date) original).getTime(); case Types.TIME: return ((Time) original).getTime(); case Types.TIMESTAMP: return ((Timestamp) original).getTime(); case Types.BLOB: Object toReturn; Blob blob = (Blob) original; try { toReturn = blob.getBytes(1, (int) blob.length()); } finally { blob.free(); } return toReturn; case Types.CLOB: String s; StringBuilder sbf = new StringBuilder(); Clob clob = (Clob) original; try { try (BufferedReader br = new BufferedReader(clob.getCharacterStream(1, (int) clob.length()))) { if ((s = br.readLine()) != null) { sbf.append(s); } while ((s = br.readLine()) != null) { sbf.append(System.getProperty("line.separator")); sbf.append(s); } } } catch (IOException e) { throw new SQLException(e); } finally { clob.free(); } return sbf.toString(); } } return original; }</code><technical_language>able do ((Number) original).intValue() instead of checking class. a more robust in case a silly jdbc driver numbers Doubles weird that</technical_language>

Target:
private Object transformValue(int sqlColumnType, Object original) throws SQLException { if (original != null) { switch (sqlColumnType) { case Types.SMALLINT: case Types.TINYINT: return ((Number) original).intValue(); case Types.NUMERIC: case Types.DECIMAL: return ((BigDecimal) original).doubleValue(); case Types.DATE: return ((Date) original).getTime(); case Types.TIME: return ((Time) original).getTime(); case Types.TIMESTAMP: return ((Timestamp) original).getTime(); case Types.BLOB: Object toReturn; Blob blob = (Blob) original; try { toReturn = blob.getBytes(1, (int) blob.length()); } finally { blob.free(); } return toReturn; case Types.CLOB: String s; StringBuilder sbf = new StringBuilder(); Clob clob = (Clob) original; try { try (BufferedReader br = new BufferedReader(clob.getCharacterStream(1, (int) clob.length()))) { if ((s = br.readLine()) != null) { sbf.append(s); } while ((s = br.readLine()) != null) { sbf.append(System.getProperty("line.separator")); sbf.append(s); } } } catch (IOException e) { throw new SQLException(e); } finally { clob.free(); } return sbf.toString(); } } return original; }
Source:
<code>public MembershipType receiveMembership(String loginName){ <START> setMembershipStartDate(); <END> if(Calendar.getInstance().getTime().getTime() < membershipStartDate.getTime()){ return MembershipType.NOT_TO_THE_TIME; } if(loginName == null || loginName.equals("")){ return MembershipType.NOT_TO_LOGIN; } String identityNumber = userMembershipMapper.findAccountIdentityNumberByLoginName(loginName); if(identityNumber == null || identityNumber.equals("0")){ return MembershipType.NOT_TO_REGISTER; } if(CollectionUtils.isNotEmpty(userMembershipMapper.findByLoginName(loginName))){ return MembershipType.ALREADY_RECEIVE; } long investAmount = userMembershipMapper.sumSuccessInvestAmountByLoginName(loginName); Date registerTime = userMembershipMapper.findAccountRegisterTimeByLoginName(loginName); if(registerTime != null && registerTime.getTime() < membershipStartDate.getTime() && investAmount < 1000){ return MembershipType.ALREADY_REGISTER_NOT_INVEST_1000; } if(registerTime != null && registerTime.getTime() < membershipStartDate.getTime() && investAmount >= 1000){ createUserMembershipModel(loginName, MembershipLevel.V5.getLevel()); return MembershipType.ALREADY_REGISTER_ALREADY_INVEST_1000; } return MembershipType.AFTER_START_ACTIVITY_REGISTER; }</code><technical_language>remove</technical_language>

Target:
public GivenMembership receiveMembership(String loginName){ if(DateTime.parse(heroRankingActivityPeriod.get(0),DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss")).toDate().after(DateTime.now().toDate())){ return GivenMembership.NO_TIME; } if(DateTime.parse(heroRankingActivityPeriod.get(1),DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss")).toDate().before(DateTime.now().toDate())){ return GivenMembership.END_TIME; } if(loginName == null || loginName.equals("")){ return GivenMembership.NO_LOGIN; } if(userMembershipMapper.findAccountIdentityNumberByLoginName(loginName) == 0){ return GivenMembership.NO_REGISTER; } if(userMembershipMapper.findByLoginNameByType(loginName,UserMembershipType.GIVEN) != null){ return GivenMembership.ALREADY_RECEIVED; } long investAmount = userMembershipMapper.sumSuccessInvestAmountByLoginName(loginName); Date registerTime = userMembershipMapper.findAccountRegisterTimeByLoginName(loginName); if(registerTime != null && DateTime.parse(heroRankingActivityPeriod.get(0),DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss")).toDate().after(registerTime) && investAmount < 100000){ return GivenMembership.ALREADY_REGISTER_NOT_INVEST_1000; } if(registerTime != null && DateTime.parse(heroRankingActivityPeriod.get(0),DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss")).toDate().after(registerTime) && investAmount >= 100000){ createUserMembershipModel(loginName, MembershipLevel.V5.getLevel()); return GivenMembership.ALREADY_REGISTER_ALREADY_INVEST_1000; } return GivenMembership.AFTER_START_ACTIVITY_REGISTER; }
Source:
<code>private static HaxeGenericResolver findGenericResolverFromVariable(HaxeCallExpression expr) { <START> PsiElement[] children = expr.getExpression().getChildren(); Optional<HaxeReference> first = Stream.of(children) .filter(c -> c instanceof HaxeReference) .map(c -> (HaxeReference)c) .findFirst(); <END> if(first.isPresent()) { HaxeReference expression = first.get(); HaxeClassResolveResult resolveResult = expression.resolveHaxeClass(); SpecificHaxeClassReference reference = resolveResult.getSpecificClassReference(expression.getElement(), null); SpecificHaxeClassReference finalReference = getUnderlyingClassIfAbstractNull(reference); return finalReference.getGenericResolver(); } return null; }</code><technical_language>This is soooooo slower UsefulPsiTreeUtil.getChildOfType(expr, HaxeReference.class);. starting wish static extensions in Java. time Manifold (http://manifold.systems) in this project</technical_language>

Target:
private static HaxeGenericResolver findGenericResolverFromVariable(HaxeCallExpression expr) { HaxeReference[] type = UsefulPsiTreeUtil.getChildrenOfType(expr.getExpression(), HaxeReference.class, null); if(type!= null && type.length> 0) { HaxeReference expression = type[0]; HaxeClassResolveResult resolveResult = expression.resolveHaxeClass(); SpecificHaxeClassReference reference = resolveResult.getSpecificClassReference(expression.getElement(), null); SpecificHaxeClassReference finalReference = getUnderlyingClassIfAbstractNull(reference); return finalReference.getGenericResolver(); } return null; }
Source:
<code>public static void showSpectraIdentificationDialog(final Scan scan, final SpectraPlot spectraPlot) { <START> final SpectraIdentificationSpectralDatabaseParameters parameters = <END> new SpectraIdentificationSpectralDatabaseParameters(); if (parameters.showSetupDialog(scan, MZmineCore.getDesktop().getMainWindow(), true) == ExitCode.OK) { MZmineCore.getTaskController().addTask(new SpectraIdentificationSpectralDatabaseTask( parameters.cloneParameterSet(), scan, spectraPlot)); } }</code><technical_language>parameters remembered saved MZmine exit</technical_language>

Target:
public static void showSpectraIdentificationDialog(final Scan scan, final SpectraPlot spectraPlot) { final SpectraIdentificationSpectralDatabaseParameters parameters = (SpectraIdentificationSpectralDatabaseParameters) MZmineCore.getConfiguration() .getModuleParameters(SpectraIdentificationSpectralDatabaseModule.class); if (parameters.showSetupDialog(scan, MZmineCore.getDesktop().getMainWindow(), true) == ExitCode.OK) { MZmineCore.getTaskController().addTask(new SpectraIdentificationSpectralDatabaseTask( parameters.cloneParameterSet(), scan, spectraPlot)); } }
Source:
<code>public static String commaSeparatedNames(List<Field> fieldsToJoin, String prefix, boolean csvOutput) { return fieldsToJoin.stream() .map(f -> { <START> String column = prefix != null END> ? prefix + f.name : f.name; if (csvOutput) { if (DoubleField.class.isInstance(f) && ((DoubleField) f).getOutputPrecision() > 0) { column = String.format( "round(%s::DECIMAL, %d) as %s", column, ((DoubleField) f).getOutputPrecision(), f.name ); } else if (TimeField.class.isInstance(f)) { column = String.format( "TO_CHAR((%s || ' second')::interval, 'HH24:MI:SS') as %s", column, f.name ); } } return column; }) .collect(Collectors.joining(", ")); }</code><technical_language>I recommend putting boolean condition in parentheses for readability</technical_language>

Target:
public static String commaSeparatedNames(List<Field> fieldsToJoin, String prefix, boolean csvOutput) { return fieldsToJoin.stream() .map(f -> f.getColumnExpression(prefix, csvOutput)) .collect(Collectors.joining(", ")); }
Source:
<code><START> public boolean validateAndSetClusterQuota(QuotaConsumptionParametersWrapper parameters) { <END> List<QuotaVdsGroupConsumptionParameter> vdsGroupConsumptionParameters = filterQuotaVdsGroupConsumptionParameter(parameters.getParameters()); synchronized (storagePoolQuotaMap.get(parameters.getAuditLogable().getStoragePool().getId())) { for (QuotaVdsGroupConsumptionParameter parameter : vdsGroupConsumptionParameters) { Quota quota = parameter.getQuota(); QuotaVdsGroup quotaVdsGroup = null; if (quota.getGlobalQuotaVdsGroup() != null) { quotaVdsGroup = quota.getGlobalQuotaVdsGroup(); } else { for (QuotaVdsGroup vdsGroup : quota.getQuotaVdsGroups()) { if (vdsGroup.getVdsGroupId().equals(parameter.getVdsGroupId())) { quotaVdsGroup = vdsGroup; break; } } } if (quotaVdsGroup == null) { parameters.getCanDoActionMessages().add(VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID.toString()); return false; } boolean success = checkQuotaClusterLimits(parameters.getAuditLogable().getStoragePool().getQuotaEnforcementType(), quota, quotaVdsGroup, parameter.getRequestedMemory(), parameter.getRequestedCpu(), parameters.getCanDoActionMessages(), parameters.getAuditLogable()); if (!success) { return false; } } } return true; }</code><technical_language>Public method, is readWriteLock</technical_language>

Target:
public boolean validateAndSetClusterQuota(QuotaConsumptionParametersWrapper parameters) { List<QuotaVdsGroupConsumptionParameter> vdsGroupConsumptionParameters = filterQuotaVdsGroupConsumptionParameter(parameters.getParameters()); Pair<AuditLogType, AuditLogableBase> auditLogPair = new Pair<AuditLogType, AuditLogableBase>(); auditLogPair.setSecond(parameters.getAuditLogable()); lock.readLock().lock(); try { if (storagePoolQuotaMap.get(parameters.getStoragePoolId()) == null) { return false; } synchronized (storagePoolQuotaMap.get(parameters.getStoragePoolId())) { for (QuotaVdsGroupConsumptionParameter parameter : vdsGroupConsumptionParameters) { Quota quota = parameter.getQuota(); QuotaVdsGroup quotaVdsGroup = null; if (quota.getGlobalQuotaVdsGroup() != null) { quotaVdsGroup = quota.getGlobalQuotaVdsGroup(); } else { for (QuotaVdsGroup vdsGroup : quota.getQuotaVdsGroups()) { if (vdsGroup.getVdsGroupId().equals(parameter.getVdsGroupId())) { quotaVdsGroup = vdsGroup; break; } } } if (quotaVdsGroup == null) { parameters.getCanDoActionMessages() .add(VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID.toString()); return false; } boolean success = checkQuotaClusterLimits(parameters.getAuditLogable() .getStoragePool() .getQuotaEnforcementType(), quota, quotaVdsGroup, parameter.getRequestedMemory(), parameter.getRequestedCpu(), parameters.getCanDoActionMessages(), auditLogPair); if (!success) { return false; } } } } finally { lock.readLock().unlock(); quotaManagerAuditLogger.auditLog(auditLogPair.getSecond(), auditLogPair.getFirst()); } return true; }
Source:
<code>public void pressOKTest() { onLegoSensorPortConfigDialog().performClickOnOK(); <START> onLegoSensorPortConfigDialog(); <END> }</code><technical_language>please checks explicitely. onView(withId(R.id.dfghjkl)) work in espresso doesnt do anything. nicer if add explicite statement youre checking here. onLegoSensorPortConfigDialog() .checkDialogVisible()</technical_language>

Target:
public void pressOKTest() { onBrickAtPosition(1).onChildView(withId(R.id.brick_change_size_by_edit_text)).perform(click()); openLegoSensorPortConfigDialog(); onLegoSensorPortConfigDialog(NXT_SENSOR_TOUCH) .checkDialogVisible() .performClickOnOK() .checkDialogVisible(); }
Source:
<code>private void prepareParameters() { Map<Object, Integer> weights = new <START> HashMap(); <END> getParameters().setOperationsJobWeight(weights); int createWeight = Long.valueOf(Math.round(getParameters().getJobWeight() / 10d)).intValue(); weights.put(CopyStage.DEST_CREATION, createWeight); weights.put(CopyStage.DATA_COPY, getParameters().getJobWeight() - createWeight); }</code><technical_language><>()</technical_language>

Target:
private void prepareParameters() { Map<String, Integer> weights = new HashMap<>(); getParameters().setOperationsJobWeight(weights); if (getParameters().getJobWeight() != null) { int createWeight = Long.valueOf(Math.round(getParameters().getJobWeight() / 10d)).intValue(); weights.put(CopyStage.DEST_CREATION.name(), createWeight); weights.put(CopyStage.DATA_COPY.name(), getParameters().getJobWeight() - createWeight); } }
Source:
<code>public void testAMeetingCannotBeCreatedWithoutSubject() { ExcelReader excelReader = new ExcelReader(EXCEL_INPUT_DATA); List<Map<String, String>> meetingData = excelReader.getMapValues("MeetingData"); String organizer = meetingData.get(0).get("Organizer"); String startTime = meetingData.get(0).get("Start time"); String endTime = meetingData.get(0).get("End time"); String attendee = meetingData.get(0).get("Attendee"); String body = meetingData.get(0).get("Body"); HomeTabletPage homeTabletPage = new HomeTabletPage(); SchedulePage schedulePage = homeTabletPage.clickScheduleBtn(); schedulePage.setOrganizerTxtBox(organizer) <START> .setStartTimeDate(startTime) <END> .setEndTimeDate(endTime) .setAttendeeTxtBoxPressingEnter(attendee) .setBodyTxtBox(body) .clickCreateBtn(); Assert.assertTrue(schedulePage.isErrorSubjectLblDisplayed()); }</code><technical_language>Please try omitted steps necessary...review this in of TCs</technical_language>

Target:
public void testAMeetingCannotBeCreatedWithoutSubject() { ExcelReader excelReader = new ExcelReader(EXCEL_INPUT_DATA); List<Map<String, String>> meetingData = excelReader.getMapValues("MeetingData"); String organizer = meetingData.get(0).get("Organizer"); String attendee = meetingData.get(0).get("Attendee"); String body = meetingData.get(0).get("Body"); HomeTabletPage homeTabletPage = new HomeTabletPage(); SchedulePage schedulePage = homeTabletPage.clickScheduleBtn(); schedulePage.setOrganizerTxtBox(organizer) .setAttendeeTxtBoxPressingEnter(attendee) .setBodyTxtBox(body) .clickCreateBtn(); Assert.assertTrue(schedulePage.isErrorSubjectLblDisplayed()); }
Source:
<code>public void appendsServerAddressTagIfClientLogIsPresent() { Span span = span("foo"); <START> span.logEvent(Constants.CLIENT_RECV); <END> Spans spans = new Spans(this.host, Collections.singletonList(span)); Iterator<zipkin.Span> result = new SamplingZipkinSpanIterator( Sampler.create(1.0f), spans); assertThat(result) .hasSize(1) .flatExtracting(input1 -> input1.binaryAnnotations) .filteredOn("key", Constants.SERVER_ADDR) .extracting(input -> input.value) .contains("myservice".getBytes(Charset.forName("UTF-8"))); }</code><technical_language>switch tests s/CLIENT_RECV/CLIENT_SEND more sense (because error a RECV annotation)</technical_language>

Target:
public void appendsServerAddressTagIfClientLogIsPresent() { Span span = span("foo"); span.logEvent(Constants.CLIENT_SEND); Spans spans = new Spans(this.host, Collections.singletonList(span)); Iterator<zipkin.Span> result = new SamplingZipkinSpanIterator( Sampler.create(1.0f), spans); assertThat(result) .hasSize(1) .flatExtracting(input1 -> input1.binaryAnnotations) .filteredOn("key", Constants.SERVER_ADDR) .extracting(input -> input.endpoint.serviceName) .contains("myservice"); }
Source:
<code>private void addCommonSchema() { <START> if (!this.name.equals(SCIMConstants.COMMON)) { <END> List<AttributeSchema> commonAttributeSchemas = SCIMSchemaDefinitions.SCIM_COMMON_SCHEMA.getAttributesList(); for (AttributeSchema commonAttributeSchema : commonAttributeSchemas) { this.attributeSchemas.add(commonAttributeSchema); } } }</code><technical_language>change order of equals checking well</technical_language>

Target:
private void addCommonSchema() { if (!(SCIMConstants.COMMON.equals(this.name))) { List<AttributeSchema> commonAttributeSchemas = SCIMSchemaDefinitions.SCIM_COMMON_SCHEMA.getAttributesList(); for (AttributeSchema commonAttributeSchema : commonAttributeSchemas) { this.attributeSchemas.add(commonAttributeSchema); } } }