auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static Iterator<Pair<byte[],List<KeyValue>>> getUncommittedDataIterator(Connection conn, boolean includeMutableIndexes) throws SQLException { final PhoenixConnection pconn = conn.unwrap(PhoenixConnection.class); <START> final Iterator<Pair<byte[],List<Mutation>>> iterator = pconn.getMutationState().toMutations(includeMutableIndexes, null); <END> return new Iterator<Pair<byte[],List<KeyValue>>>() { @Override public boolean hasNext() { return iterator.hasNext(); } @Override public Pair<byte[], List<KeyValue>> next() { Pair<byte[],List<Mutation>> pair = iterator.next(); List<KeyValue> keyValues = Lists.newArrayListWithExpectedSize(pair.getSecond().size() * 5); for (Mutation mutation : pair.getSecond()) { for (List<Cell> keyValueList : mutation.getFamilyCellMap().values()) { for (Cell keyValue : keyValueList) { keyValues.add(org.apache.hadoop.hbase.KeyValueUtil.ensureKeyValue(keyValue)); } } } Collections.sort(keyValues, pconn.getKeyValueBuilder().getKeyValueComparator()); return new Pair<byte[], List<KeyValue>>(pair.getFirst(),keyValues); } @Override public void remove() { throw new UnsupportedOperationException(); } }; }</code><technical_language>Overload toMutations if null required here</technical_language>

Target:
public static Iterator<Pair<byte[],List<KeyValue>>> getUncommittedDataIterator(Connection conn, boolean includeMutableIndexes) throws SQLException { final PhoenixConnection pconn = conn.unwrap(PhoenixConnection.class); final Iterator<Pair<byte[],List<Mutation>>> iterator = pconn.getMutationState().toMutations(includeMutableIndexes); return new Iterator<Pair<byte[],List<KeyValue>>>() { @Override public boolean hasNext() { return iterator.hasNext(); } @Override public Pair<byte[], List<KeyValue>> next() { Pair<byte[],List<Mutation>> pair = iterator.next(); List<KeyValue> keyValues = Lists.newArrayListWithExpectedSize(pair.getSecond().size() * 5); for (Mutation mutation : pair.getSecond()) { for (List<Cell> keyValueList : mutation.getFamilyCellMap().values()) { for (Cell keyValue : keyValueList) { keyValues.add(org.apache.hadoop.hbase.KeyValueUtil.ensureKeyValue(keyValue)); } } } Collections.sort(keyValues, pconn.getKeyValueBuilder().getKeyValueComparator()); return new Pair<byte[], List<KeyValue>>(pair.getFirst(),keyValues); } @Override public void remove() { throw new UnsupportedOperationException(); } }; }
Source:
<code><START> public void testNotificationWillShowInForegroundHandler_workTimeLongerThanTimeout() throws Exception { <END> startNotificationExtensionService("com.test.onesignal.GenerateNotificationRunner$" + "NotificationExtensionService_workTimeLongerThanTimeout"); OneSignal.setAppId("b2f7f966-d8cc-11e4-bed1-df8f05be55ba"); OneSignal.setAppContext(blankActivity); OneSignal.setNotificationWillShowInForegroundHandler(new OneSignal.AppNotificationWillShowInForegroundHandler() { @Override public void notificationWillShowInForeground(final OSNotificationGenerationJob.AppNotificationGenerationJob notificationJob) { callbackCounter++; lastAppnotificationJob = notificationJob; try { Thread.sleep(35_000L); notificationJob.complete(); } catch (InterruptedException e) { e.printStackTrace(); } } }); threadAndTaskWait(); blankActivityController.resume(); threadAndTaskWait(); ShadowTimeoutHandler.setMockDelayMillis(1); FCMBroadcastReceiver_processBundle(blankActivity, getBaseNotifBundle()); threadAndTaskWait(); assertNotNull(lastExtnotificationJob); assertNotNull(lastAppnotificationJob); assertEquals(OneSignal.OSNotificationDisplay.NOTIFICATION, lastAppnotificationJob.getNotificationDisplayOption()); assertEquals(2, callbackCounter); assertNotificationDbRecords(1); }</code><technical_language>This test is ~35 seconds complete before. I investigated this a bit is due Thread.sleep in notificationWillShowInForeground in com.test.onesignal.GenerateNotificationRunner$NotificationExtensionService_workTimeLongerThanTimeout class interrupted. other app specific notificationWillShowInForeground is interrupted correctly however</technical_language>

Target:
public void testNotificationWillShowInForegroundHandler_workTimeLongerThanTimeout() throws Exception { OneSignal.setLogLevel(OneSignal.LOG_LEVEL.DEBUG, OneSignal.LOG_LEVEL.NONE); startNotificationExtensionService("com.test.onesignal.GenerateNotificationRunner$" + "NotificationExtensionService_workTimeLongerThanTimeout"); OneSignal.setAppId("b2f7f966-d8cc-11e4-bed1-df8f05be55ba"); OneSignal.setAppContext(blankActivity); OneSignal.setNotificationWillShowInForegroundHandler(new OneSignal.AppNotificationWillShowInForegroundHandler() { @Override public void notificationWillShowInForeground(final OSNotificationGenerationJob.AppNotificationGenerationJob notificationJob) { callbackCounter++; lastAppnotificationJob = notificationJob; try { Thread.sleep(3_000L); notificationJob.complete(); } catch (InterruptedException e) { e.printStackTrace(); } } }); threadAndTaskWait(); blankActivityController.resume(); threadAndTaskWait(); ShadowTimeoutHandler.setMockDelayMillis(1); FCMBroadcastReceiver_processBundle(blankActivity, getBaseNotifBundle()); threadAndTaskWait(); assertNotNull(lastExtnotificationJob); assertNotNull(lastAppnotificationJob); assertEquals(OneSignal.OSNotificationDisplay.NOTIFICATION, lastAppnotificationJob.getNotificationDisplayOption()); assertEquals(2, callbackCounter); assertNotificationDbRecords(1); }
Source:
<code>private void removeQueues(Stream<String> queueNames) { if (isRunning()) { synchronized (this.consumersMonitor) { queueNames.forEach(queue -> { List<SimpleConsumer> consumersForQueue = this.consumersByQueue.remove(queue); <START> if (consumersForQueue != null) { <END> consumersForQueue.stream().forEach(consumer -> { try { consumer.getChannel().basicCancel(consumer.getConsumerTag()); this.consumers.remove(consumer); } catch (IOException e) { logger.error("Failed to cancel consumer: " + consumer, e); } }); } }); } } }</code><technical_language>filter(consumers -> consumers != null)? streams :smile:</technical_language>

Target:
private void removeQueues(Stream<String> queueNames) { if (isRunning()) { synchronized (this.consumersMonitor) { queueNames.map(this.consumersByQueue::remove) .filter(consumer -> consumer != null) .flatMap(Collection::stream) .forEach(consumer -> { try { consumer.getChannel().basicCancel(consumer.getConsumerTag()); this.consumers.remove(consumer); } catch (IOException e) { logger.error("Failed to cancel consumer: " + consumer, e); } }); } } }
Source:
<code>private Map<String, byte[]> getPropagatedVariables(SchedulerDBManager dbManager, EligibleTaskDescriptor eligibleTaskDescriptor, InternalJob job, InternalTask task) throws UnknownTaskException { Map<String, byte[]> variables = new HashMap<>(); if (job.getType() == JobType.TASKSFLOW && eligibleTaskDescriptor != null) { try{ TaskResultImpl taskResult = (TaskResultImpl) dbManager.loadTasksResults(job.getId(), Collections.singletonList(task.getId())).get(task.getId()); variables.putAll(taskResult.getPropagatedVariables()); <START> } catch (DatabaseManagerException exception) { <END> int numberOfParentTasks = eligibleTaskDescriptor.getParents().size(); if ((numberOfParentTasks > 0) && task.handleResultsArguments()) { variables = extractTaskResultsAndMergeIntoMap(dbManager, eligibleTaskDescriptor, job); } else { variables = extractJobVariables(job); } } } return variables; }</code><technical_language>![MAJOR](<LINK_0> log rethrow this exception. [![rule](<LINK_2>](<LINK_1></technical_language>

Target:
private Map<String, byte[]> getPropagatedVariables(SchedulerDBManager dbManager, EligibleTaskDescriptor eligibleTaskDescriptor, InternalJob job, InternalTask task) throws UnknownTaskException { Map<String, byte[]> variables = new HashMap<>(); if (job.getType() == JobType.TASKSFLOW && eligibleTaskDescriptor != null) { try{ TaskResultImpl taskResult = (TaskResultImpl) dbManager.loadTasksResults(job.getId(), Collections.singletonList(task.getId())).get(task.getId()); variables.putAll(taskResult.getPropagatedVariables()); } catch (DatabaseManagerException exception) { tlogger.info(task.getId(), exception.getMessage()); int numberOfParentTasks = eligibleTaskDescriptor.getParents().size(); if ((numberOfParentTasks > 0) && task.handleResultsArguments()) { variables = extractTaskResultsAndMergeIntoMap(dbManager, eligibleTaskDescriptor, job); } else { variables = extractJobVariables(job); } } } return variables; }
Source:
<code>public int hashCode() { <START> return Objects.hash(getElementUUID(), getCode(), type, getMessage()); <END> }</code><technical_language>HashUtil</technical_language>

Target:
public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(getElementUUID()), Objects.hashCode(getCode()), Objects.hashCode(type), Objects.hashCode(getMessage()), Objects.hashCode(getMessageKey()), Objects.hashCode(getMessageArguments())); }
Source:
<code>public String toString() { <START> return wrapped.toString(); <END> }</code><technical_language>clear is CopyThreadLocalRunnable? return "CopyThreadLocalRunnable{" + wrapped.toString(); + "}" WDYT</technical_language>

Target:
public String toString() { return "CopyThreadLocalRunnable{ " + wrapped.toString() + " }"; }
Source:
<code>public void fold(ColumnValueSelector selector) { <START> if (firstString == null) { <END> firstString = (String) selector.getObject(); } }</code><technical_language>this is check reset() is called not. But, firstValue null reset() is called selector.getObject() return null. I need a flag isReset check this</technical_language>

Target:
public void fold(ColumnValueSelector selector) { if (!isReset) { firstString = (String) selector.getObject(); isReset = true; } }
Source:
<code>protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml) { xml.attribute("cid", bobHash.toCid()); if (bobData != null) { xml.attribute("max-age", String.valueOf(bobData.getMaxAge())); xml.attribute("type", bobData.getType()); xml.rightAngleBracket(); try { xml.escape(new String(bobData.getContent(), "UTF-8")); } catch (UnsupportedEncodingException e) { <START> } <END> } else { xml.setEmptyElement(); } return xml; }</code><technical_language>Neva eva swallow exceptions. Never. I BobData a e.g. getStringContent() method byte[] String transformation throws ISE if UTF-8 is supported</technical_language>

Target:
protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml) { xml.attribute("cid", bobHash.toCid()); if (bobData != null) { xml.attribute("max-age", String.valueOf(bobData.getMaxAge())); xml.attribute("type", bobData.getType()); xml.rightAngleBracket(); xml.escape(bobData.getBase64Encoded()); } else { xml.setEmptyElement(); } return xml; }
Source:
<code>private void prepareAddOffsetsToTxnResponse(final Errors error, final String consumerGroupId, final long producerId, final short producerEpoch) { client.prepareResponse(body -> { AddOffsetsToTxnRequest addOffsetsToTxnRequest = (AddOffsetsToTxnRequest) body; assertEquals(consumerGroupId, addOffsetsToTxnRequest.data.groupId()); assertEquals(transactionalId, addOffsetsToTxnRequest.data.transactionalId()); assertEquals(producerId, addOffsetsToTxnRequest.data.producerId()); assertEquals(producerEpoch, addOffsetsToTxnRequest.data.producerEpoch()); return true; }, new AddOffsetsToTxnResponse( new AddOffsetsToTxnResponseData() <START> .setThrottleTimeMs(0) <END> .setErrorCode(error.code())) ); }</code><technical_language>Throttle time defaults 0, this is required</technical_language>

Target:
private void prepareAddOffsetsToTxnResponse(final Errors error, final String consumerGroupId, final long producerId, final short producerEpoch) { client.prepareResponse(body -> { AddOffsetsToTxnRequest addOffsetsToTxnRequest = (AddOffsetsToTxnRequest) body; assertEquals(consumerGroupId, addOffsetsToTxnRequest.data.groupId()); assertEquals(transactionalId, addOffsetsToTxnRequest.data.transactionalId()); assertEquals(producerId, addOffsetsToTxnRequest.data.producerId()); assertEquals(producerEpoch, addOffsetsToTxnRequest.data.producerEpoch()); return true; }, new AddOffsetsToTxnResponse( new AddOffsetsToTxnResponseData() .setErrorCode(error.code())) ); }
Source:
<code>public PermissionSubject(Guid objectId, VdcObjectType objectType, ActionGroup actionGroup) { <START> this(objectId, objectType, actionGroup, null); <END> }</code><technical_language>places this ctor, message null</technical_language>

Target:
public PermissionSubject(Guid objectId, VdcObjectType objectType, ActionGroup actionGroup) { this(objectId, objectType, actionGroup, VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION); }
Source:
<code>public PaymentUpdate map(int index, ResultSet r, StatementContext ctx) throws SQLException { return PaymentUpdate.create( r.getString("external_id"), r.getString("status"), r.getString("error_message") <START> ); <END> }</code><technical_language>I error_msg is name of column</technical_language>

Target:
public PaymentUpdate map(int index, ResultSet r, StatementContext ctx) throws SQLException { return PaymentUpdate.create( r.getString("external_id"), r.getString("status"), r.getString("error_msg") ); }
Source:
<code>private boolean isMigrationSucceeded() { return dbVm.getStatus() == VMStatus.MigratingTo && (vdsmVm.getVmDynamic().getStatus().isRunning() <START> || vdsmVm.getVmDynamic().getStatus() == VMStatus.Paused); <END> }</code><technical_language>saving-state restoring-state reported MigratingTo, I guess simply change isRunning isRunningOrPaused</technical_language>

Target:
private boolean isMigrationSucceeded() { return dbVm.getStatus() == VMStatus.MigratingTo && vdsmVm.getVmDynamic().getStatus().isRunningOrPaused(); }
Source:
<code>TextLayout getTextLayout(int lineIndex) { if (lineSpacingProvider == null) { return getTextLayout(lineIndex, styledText.getOrientation(), styledText.getWrapWidth(), styledText.lineSpacing); } int newLineSpacing = styledText.lineSpacing; Integer spacing = lineSpacingProvider.getLineSpacing(lineIndex); <START> if (spacing != null) { <END> newLineSpacing = spacing; } if (isSameLineSpacing(lineIndex, newLineSpacing)) { return getTextLayout(lineIndex, styledText.getOrientation(), styledText.getWrapWidth(), newLineSpacing); } TextLayout layout = getTextLayout(lineIndex, styledText.getOrientation(), styledText.getWrapWidth(), styledText.lineSpacing); if (layout.getSpacing() != newLineSpacing) { layout.setSpacing(newLineSpacing); if (lineSpacingComputing) { return layout; } try { lineSpacingComputing = true; styledText.resetCache(lineIndex, styledText.getLineCount()); styledText.setVariableLineHeight(); styledText.setCaretLocation(); styledText.redraw(); } finally { lineSpacingComputing = false; } } return layout; }</code><technical_language>User accidentally pass negative values, lead IllegalArgumentException, native values below: if (spacing != null && spacing.intValue() >= 0)</technical_language>

Target:
TextLayout getTextLayout(int lineIndex) { if (lineSpacingProvider == null) { return getTextLayout(lineIndex, styledText.getOrientation(), styledText.getWrapWidth(), styledText.lineSpacing); } int newLineSpacing = styledText.lineSpacing; Integer spacing = lineSpacingProvider.getLineSpacing(lineIndex); if (spacing != null && spacing.intValue() >= 0) { newLineSpacing = spacing; } if (isSameLineSpacing(lineIndex, newLineSpacing)) { return getTextLayout(lineIndex, styledText.getOrientation(), styledText.getWrapWidth(), newLineSpacing); } TextLayout layout = getTextLayout(lineIndex, styledText.getOrientation(), styledText.getWrapWidth(), styledText.lineSpacing); if (layout.getSpacing() != newLineSpacing) { layout.setSpacing(newLineSpacing); if (lineSpacingComputing) { return layout; } try { lineSpacingComputing = true; styledText.resetCache(lineIndex, styledText.getLineCount()); styledText.setVariableLineHeight(); styledText.setCaretLocation(); styledText.redraw(); } finally { lineSpacingComputing = false; } } return layout; }
Source:
<code><START> private boolean computeMerged() { <END> if (!merged.contains(revision)) { while (mergedPos > 0) { CommitInfo c = changes.get(mergedPos).commit(); JsArrayString b = changes.get(mergedPos).branches(); if (b.get(0) != null) { merged.add(c.commit()); } mergedPos--; } return true; } return false; }</code><technical_language>I see, this method is called line 244, return is checked. If return is used, method return void</technical_language>

Target:
private void computeMerged() { if (!merged.contains(revision)) { while (mergedPos > 0) { CommitInfo c = changes.get(mergedPos).commit(); JsArrayString b = changes.get(mergedPos).branches(); if (b.get(0) != null) { merged.add(c.commit()); } mergedPos--; } } }
Source:
<code>private void extractZip(Path tempZipPath) throws IOException { <START> ZipFile zip = new ZipFile(tempZipPath.toFile()); <END> zip.stream().forEach(entry -> { try { String path = COMPONENTS_DIR + File.separator + entry.getName(); if (!entry.isDirectory()) { storageManager.saveFile(path, PROTECTED_RESOURCE, zip.getInputStream(entry)); } else if (!storageManager.exists(path, PROTECTED_RESOURCE)) { storageManager.createDirectory(path, PROTECTED_RESOURCE); } } catch (ApsSystemException | IOException ex) { logger.error("Error while extracting zip file", ex); throw new InstallationException("Unable to extract zip file", ex); } }); }</code><technical_language>This zip file needs closing, try resources</technical_language>

Target:
private void extractZip(Path tempZipPath) throws IOException { try (ZipFile zip = new ZipFile(tempZipPath.toFile())) { for (ZipEntry entry : Collections.list(zip.entries())) { String path = COMPONENTS_DIR + File.separator + entry.getName(); if (!entry.isDirectory()) { storageManager.saveFile(path, PROTECTED_RESOURCE, zip.getInputStream(entry)); } else if (!storageManager.exists(path, PROTECTED_RESOURCE)) { storageManager.createDirectory(path, PROTECTED_RESOURCE); } } } catch (ApsSystemException | IOException ex) { logger.error("Error while extracting zip file", ex); throw new InstallationException("Unable to extract zip file", ex); } }
Source:
<code>public void onMessage(Session session, String message) { <START> if (securityTokenHolder.getRealmTokenMap().size() == 0) { <END> onError(session, new SecureWebSocketException("User not logged in.", message)); } else { runWithUser( session, () -> { try { ws.onMessage(session, message); } catch (IOException e) { LOGGER.error("Failed to receive ws message.", e); } }); } }</code><technical_language>securityTokenHolder.getRealmTokenMap().size() == 0 is in places. extracting a predicate method boolean isMissingTokens(ecurityTokenHolder securityTokenHolder)</technical_language>

Target:
public void onMessage(Session session, String message) { if (isUserLoggedIn()) { runWithUser( session, () -> { try { ws.onMessage(session, message); } catch (IOException e) { LOGGER.error("Failed to receive ws message.", e); } }); } else { onError(session, new WebSocketAuthenticationException("User not logged in.", message)); } }
Source:
<code>public static synchronized DiffRepository lookup( Class clazz, DiffRepository baseRepository, Filter filter) { DiffRepository diffRepository = MAP_CLASS_TO_REPOSITORY.get(clazz); if (diffRepository == null) { final URL refFile = findFile(clazz, ".xml"); final File logFile = new File( Sources.of(refFile).file().getAbsolutePath() <START> .replace(".xml", "_surefire.xml")); <END> diffRepository = new DiffRepository(refFile, logFile, baseRepository, filter); MAP_CLASS_TO_REPOSITORY.put(clazz, diffRepository); } return diffRepository; }</code><technical_language>I suggest a human-understandable naming. For instance: ${name}.actual.xml. Is file actual output? WDYT? Frankly speaking, is puzzling xml file is called a log file, if works cares</technical_language>

Target:
public static synchronized DiffRepository lookup( Class clazz, DiffRepository baseRepository, Filter filter) { DiffRepository diffRepository = MAP_CLASS_TO_REPOSITORY.get(clazz); if (diffRepository == null) { final URL refFile = findFile(clazz, ".xml"); final String refFilePath = Sources.of(refFile).file().getAbsolutePath(); final File logFile = new File(refFilePath.replace(".xml", "_actual.xml")); assert !refFilePath.equals(logFile.getAbsolutePath()); diffRepository = new DiffRepository(refFile, logFile, baseRepository, filter); MAP_CLASS_TO_REPOSITORY.put(clazz, diffRepository); } return diffRepository; }
Source:
<code>public void registerAttributes(ManagementResourceRegistration resourceRegistration) { <START> super.registerAttributes(resourceRegistration); <END> }</code><technical_language>need declare method calls super</technical_language>

Target:
public void registerAttributes(ManagementResourceRegistration resourceRegistration) { super.registerAttributes(resourceRegistration); for (AttributeDefinition attr : STRONG_ATTRIBUTES) { resourceRegistration.registerReadOnlyAttribute(attr, null); } }
Source:
<code>public void testMapperForDelegatesToRegistry() { ColumnMapper<?> mapper = new FooMapper(); JdbiConfig config = new JdbiConfig(); config.mappingRegistry.addColumnMapper(mapper); final StatementContext context = new StatementContext(config); <START> assertThat(context.findColumnMapperFor(Foo.class).get()).isEqualTo(mapper); <END> }</code><technical_language>Assertions Optional<T> variant use: assertThat(context.findColumnMapperFor(Foo.class)).hasValue(mapper);</technical_language>

Target:
public void testMapperForDelegatesToRegistry() { ColumnMapper<?> mapper = new FooMapper(); JdbiConfig config = new JdbiConfig(); config.mappingRegistry.addColumnMapper(mapper); final StatementContext context = new StatementContext(config); assertThat(context.findColumnMapperFor(Foo.class)).contains(mapper); }
Source:
<code>@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setPeerClassLoadingEnabled(peerClassLoadingEnabled()); if (!igniteInstanceName.equals(NO_CACHE_IGNITE_INSTANCE_NAME)) { CacheConfiguration cacheCfg = defaultCacheConfiguration(); cacheCfg.setCacheMode(cacheMode()); cacheCfg.setAtomicityMode(atomicityMode()); cacheCfg.setLoadPreviousValue(true); cacheCfg.setRebalanceMode(ASYNC); cacheCfg.setWriteSynchronizationMode(FULL_SYNC); cacheCfg.setNearConfiguration(nearConfiguration()); if (atomicityMode() != TRANSACTIONAL_SNAPSHOT) { cacheCfg.setCacheStoreFactory(new StoreFactory()); cacheCfg.setReadThrough(true); cacheCfg.setWriteThrough(true); } else cacheCfg.setIndexedTypes(Integer.class, Integer.class); cfg.setCacheConfiguration(cacheCfg); } else cfg.setClientMode(true); <START> cfg.setIncludeEventTypes(org.apache.ignite.events.EventType.EVTS_ALL); <END> ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); return cfg; }</code><technical_language>This simplified EVTS_ALL import static, right</technical_language>

Target:
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setPeerClassLoadingEnabled(peerClassLoadingEnabled()); if (!igniteInstanceName.equals(NO_CACHE_IGNITE_INSTANCE_NAME)) { CacheConfiguration cacheCfg = defaultCacheConfiguration(); cacheCfg.setCacheMode(cacheMode()); cacheCfg.setAtomicityMode(atomicityMode()); cacheCfg.setLoadPreviousValue(true); cacheCfg.setRebalanceMode(ASYNC); cacheCfg.setWriteSynchronizationMode(FULL_SYNC); cacheCfg.setNearConfiguration(nearConfiguration()); if (atomicityMode() != TRANSACTIONAL_SNAPSHOT) { cacheCfg.setCacheStoreFactory(new StoreFactory()); cacheCfg.setReadThrough(true); cacheCfg.setWriteThrough(true); } else cacheCfg.setIndexedTypes(Integer.class, Integer.class); cfg.setCacheConfiguration(cacheCfg); } else cfg.setClientMode(true); cfg.setIncludeEventTypes(EVTS_ALL); ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); return cfg; }
Source:
<code>public List<T> peek(final int max) { try { final List<T> entries = new ArrayList<T>(max); queueFile.forEach(new QueueFile.ElementReader() { int count; <START> @Override <END> public boolean read(InputStream in, int length) throws IOException { byte[] data = new byte[length]; in.read(data, 0, length); entries.add(converter.from(data)); return ++count < max; } }); return entries; } catch (IOException e) { throw new FileException("Failed to peek.", e, file); } }</code><technical_language>Empty line before. Annotation line method declaration</technical_language>

Target:
public List<T> peek(final int max) { try { final List<T> entries = new ArrayList<T>(max); queueFile.forEach(new QueueFile.ElementVisitor() { int count; @Override public boolean read(InputStream in, int length) throws IOException { byte[] data = new byte[length]; in.read(data, 0, length); entries.add(converter.from(data)); return ++count < max; } }); return unmodifiableList(entries); } catch (IOException e) { throw new FileException("Failed to peek.", e, file); } }
Source:
<code>public LabelTypes getLabelTypes() { <START> if (labelTypes == null) { <END> synchronized (this) { if (labelTypes != null) { return labelTypes; } Map<String, LabelType> types = Maps.newLinkedHashMap(); for (LabelType type : dbLabelTypes.getLabelTypes()) { types.put(type.getName(), type); } List<ProjectState> projects = Lists.newArrayList(tree()); Collections.reverse(projects); for (ProjectState s : projects) { for (LabelType type : s.getConfig().getLabelSections()) { types.put(type.getName(), type); } } List<LabelType> all = Lists.newArrayListWithCapacity(types.size()); for (LabelType type : types.values()) { if (!type.getValues().isEmpty()) { all.add(type); } } labelTypes = new LabelTypes(Collections.unmodifiableList(all)); } } return labelTypes; }</code><technical_language>a double checked locking this I (sometimes) try avoid reading field twice, e.g.: LabelTypes lt = labelTypes; if (lt == null) { ... lt = theNewThing; labelTypes = lt; } return lt;</technical_language>

Target:
public LabelTypes getLabelTypes() { Map<String, LabelType> types = Maps.newLinkedHashMap(); for (LabelType type : dbLabelTypes.getLabelTypes()) { types.put(type.getName(), type); } List<ProjectState> projects = Lists.newArrayList(tree()); Collections.reverse(projects); for (ProjectState s : projects) { for (LabelType type : s.getConfig().getLabelSections()) { types.put(type.getName(), type); } } List<LabelType> all = Lists.newArrayListWithCapacity(types.size()); for (LabelType type : types.values()) { if (!type.getValues().isEmpty()) { all.add(type); } } return new LabelTypes(Collections.unmodifiableList(all)); }
Source:
<code><START> void unbindResource(OsgiVaadinStaticResource resource) { <END> Delegate registration = resourceToDelegate.remove(resource); if (registration != null && httpService != null) { httpService.unregister(registration.alias); } }</code><technical_language>This method is called in this PR</technical_language>

Target:
void unbindResource(OsgiVaadinStaticResource resource) { httpService.unregister(resource.getAlias()); }
Source:
<code>public DefaultEventGateway build() { <START> validate(); <END> return new DefaultEventGateway(this); }</code><technical_language>For consistency, suggest validate() call here, in AbstractEventGateway</technical_language>

Target:
public DefaultEventGateway build() { return new DefaultEventGateway(this); }
Source:
<code><START> protected EntryLoggerAllocator getEntryLoggerAllocator() { <END> return entryLoggerAllocator; }</code><technical_language>nit: remove protected this method package private, test class in package</technical_language>

Target:
EntryLoggerAllocator getEntryLoggerAllocator() { return entryLoggerAllocator; }
Source:
<code>public DataLagMonitor(SystemConfiguration sysConfig, MetricService metricService, MailService mailService) { _metricService = metricService; _mailService = mailService; <START> _dataLagQueryExpression = sysConfig.getValue(com.salesforce.dva.argus.system.SystemConfiguration.Property.DATA_LAG_QUERY_EXPRESSION); <END> _dataLagThreshold = Long.valueOf(sysConfig.getValue(com.salesforce.dva.argus.system.SystemConfiguration.Property.DATA_LAG_QUERY_EXPRESSION)); _dataLagNotificationEmailId = sysConfig.getValue(com.salesforce.dva.argus.system.SystemConfiguration.Property.DATA_LAG_NOTIFICATION_EMAIL_ADDRESS); _hostName = sysConfig.getHostname(); }</code><technical_language>In addition checking if golden metric is present, robin Kafka, evaluate if Kafka lag measurement a partition is needed. If lag increases 1 partition notified tracking "golden metric" SUM UNION validate, commit client connected 1 tsdb daemon - bring tsdb daemon - bring commit client</technical_language>

Target:
public DataLagMonitor(SystemConfiguration sysConfig, MetricService metricService, MailService mailService) { _metricService = metricService; _mailService = mailService; _dataLagQueryExpression = sysConfig.getValue(com.salesforce.dva.argus.system.SystemConfiguration.Property.DATA_LAG_QUERY_EXPRESSION); _dataLagThreshold = Long.valueOf(sysConfig.getValue(com.salesforce.dva.argus.system.SystemConfiguration.Property.DATA_LAG_THRESHOLD)); _dataLagNotificationEmailId = sysConfig.getValue(com.salesforce.dva.argus.system.SystemConfiguration.Property.DATA_LAG_NOTIFICATION_EMAIL_ADDRESS); _hostName = sysConfig.getHostname(); _logger.info("Data lag monitor initialized"); }
Source:
<code>public void editingLocalCss_002_UserWithoudAdminRightsHasNoEditOption() { WikiBasePageObject wiki = new WikiBasePageObject(driver, Global.DOMAIN); wiki.openWikiPage(); CommonFunctions.logInCookie(Properties.userName, Properties.password); wiki.openArticle(this.mediaWikiCss); <START> wiki.waitForElementNotPresent(this.editButtonSelector); <END> }</code><technical_language>move waits page object class</technical_language>

Target:
public void editingLocalCss_002_UserWithoudAdminRightsHasNoEditOption() { WikiBasePageObject wiki = new WikiBasePageObject(driver, Global.DOMAIN); wiki.openWikiPage(); CommonFunctions.logInCookie(Properties.userName, Properties.password); wiki.openArticle(URLsContent.mediaWikiCss); wiki.verifyEditButtonNotPresent(); }
Source:
<code>private boolean assigneeSatisfies(IModel model, TurboIssue issue) { if (!content.isPresent()) return false; Optional<TurboUser> assignee = model.getAssigneeOfIssue(issue); if (!assignee.isPresent()) return false; <START> List<TurboUser> usersOfRepo = model.getUsersOfRepo(issue.getRepoId()); <END> boolean shouldWarnUser = !usersOfRepo.stream() .filter(user -> user.getLoginName().contains(content.get().toLowerCase()) || user.getRealName().contains(content.get().toLowerCase())) .findAny() .isPresent(); if (shouldWarnUser) { throw new SemanticException(String.format("Cannot find username containing %s in %s%n", content.get(), issue.getRepoId())); } String content = this.content.get().toLowerCase(); String login = assignee.get().getLoginName() == null ? "" : assignee.get().getLoginName().toLowerCase(); String name = assignee.get().getRealName() == null ? "" : assignee.get().getRealName().toLowerCase(); return login.contains(content) || name.contains(content); }</code><technical_language>This bit factored out MultiModel, reused below</technical_language>

Target:
private boolean assigneeSatisfies(IModel model, TurboIssue issue) { if (!content.isPresent()) return false; Optional<TurboUser> assignee = model.getAssigneeOfIssue(issue); if (!assignee.isPresent()) return false; enforceUserInRepoCondition(model, issue.getRepoId(), content.get()); String content = this.content.get().toLowerCase(); String login = assignee.get().getLoginName() == null ? "" : assignee.get().getLoginName().toLowerCase(); String name = assignee.get().getRealName() == null ? "" : assignee.get().getRealName().toLowerCase(); return login.contains(content) || name.contains(content); }
Source:
<code>private void createApplicationDistribution() throws IOException { File distFile = new File(this.buildDirectory, this.project.getArtifactId() + "-" + this.project .getVersion() + "." + fileExtension.extensionName); AbstractArchiver archiver; if (fileExtension == ApplicationDistributionExtensions.zip) { archiver = new ZipArchiver(); } else { TarArchiver tarArchiver = new TarArchiver(); TarArchiver.TarCompressionMethod tarCompressionMethod = new TarArchiver.TarCompressionMethod(); tarCompressionMethod.setValue("gzip"); tarArchiver.setCompression(tarCompressionMethod); archiver = tarArchiver; } archiver.enableLogging(new PlexusLoggerWrapper(getLog())); <START> archiver.addDirectory(getWisdomRootDirectory(), "wisdom", new String[0], new String[]{ <END> "*-cache/**", "logs/**"}); archiver.setDestFile(distFile); archiver.createArchive(); if (attachDistribution) { projectHelper.attachArtifact(project, fileExtension.extensionName, distFile); } }</code><technical_language>this change structure of zip file</technical_language>

Target:
private void createApplicationDistribution() throws IOException { File distFile = new File(this.buildDirectory, this.project.getArtifactId() + "-" + this.project .getVersion() + "." + fileExtension.extensionName); AbstractArchiver archiver; if (fileExtension == ApplicationDistributionExtensions.zip) { archiver = new ZipArchiver(); } else { TarArchiver tarArchiver = new TarArchiver(); TarArchiver.TarCompressionMethod tarCompressionMethod = new TarArchiver.TarCompressionMethod(); tarCompressionMethod.setValue("gzip"); tarArchiver.setCompression(tarCompressionMethod); archiver = tarArchiver; } archiver.enableLogging(new PlexusLoggerWrapper(getLog())); archiver.addDirectory(getWisdomRootDirectory(), new String[0], new String[]{ "*-cache/**", "logs/**"}); archiver.setDestFile(distFile); archiver.createArchive(); if (attachDistribution) { projectHelper.attachArtifact(project, fileExtension.extensionName, distFile); } }
Source:
<code>public void uninstall() { StyledText text= this.fViewer.getTextWidget(); if (text != null && !text.isDisposed()) { text.removeMouseListener(this.fMouseTracker); text.removeMouseTrackListener(this.fMouseTracker); text.removeMouseMoveListener(this.fMouseTracker); } if (fViewer != null) { <START> ((ITextViewerExtension4) fViewer).removeTextPresentationListener(updateStylesWidth); <END> fViewer.removeViewportListener(visibleLines); } fViewer= null; fPainter= null; }</code><technical_language>check provided viewer type ITextViewerExtension4</technical_language>

Target:
public void uninstall() { StyledText text= this.fViewer.getTextWidget(); if (text != null && !text.isDisposed()) { text.removeMouseListener(this.fMouseTracker); text.removeMouseTrackListener(this.fMouseTracker); text.removeMouseMoveListener(this.fMouseTracker); } if (fViewer != null) { if (fViewer instanceof ITextViewerExtension4) { ((ITextViewerExtension4) fViewer).removeTextPresentationListener(updateStylesWidth); } fViewer.removeViewportListener(visibleLines); } fViewer= null; fPainter= null; }
Source:
<code>public Response addProvider(@Context HttpServletRequest request, NuxeoOAuth2ServiceProvider provider) throws IOException, RestOperationException { <START> if (!((NuxeoPrincipal)getContext().getCoreSession().getPrincipal()).isAdministrator()) { <END> return Response.status(Status.FORBIDDEN).build(); } Framework.doPrivileged(() -> { OAuth2ServiceProviderRegistry registry = Framework.getService(OAuth2ServiceProviderRegistry.class); registry.addProvider(provider.getServiceName(), provider.getDescription(), provider.getTokenServerURL(), provider.getAuthorizationServerURL(), provider.getUserAuthorizationURL(), provider.getClientId(), provider.getClientSecret(), provider.getScopes(), provider.isEnabled()); }); return Response.ok(getProvider(provider.getServiceName())).build(); }</code><technical_language>Space cast (several occurrences in this file)</technical_language>

Target:
public Response addProvider(@Context HttpServletRequest request, NuxeoOAuth2ServiceProvider provider) throws IOException, RestOperationException { checkPermission(); Framework.doPrivileged(() -> { OAuth2ServiceProviderRegistry registry = Framework.getService(OAuth2ServiceProviderRegistry.class); registry.addProvider(provider.getServiceName(), provider.getDescription(), provider.getTokenServerURL(), provider.getAuthorizationServerURL(), provider.getUserAuthorizationURL(), provider.getClientId(), provider.getClientSecret(), provider.getScopes(), provider.isEnabled()); }); return Response.ok(getProvider(provider.getServiceName())).build(); }
Source:
<code>public OkHttpClient build() { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.proxy(proxy); if (connectTimeoutMs >= 0) { builder.connectTimeout(connectTimeoutMs, TimeUnit.MILLISECONDS); } if (readTimeoutMs >= 0) { builder.readTimeout(readTimeoutMs, TimeUnit.MILLISECONDS); } if (proxyLogin != null) { <START> + builder.proxyAuthenticator((route, response) -> { <END> + Request.Builder newRequest = response.request().newBuilder(); + return newRequest.header("Proxy-Authorization", Credentials.basic(proxyLogin, nullToEmpty(proxyPassword))).build(); + }); + } builder.addInterceptor(this::completeHeaders); ConnectionSpec tls = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) .allEnabledTlsVersions() .allEnabledCipherSuites() .supportsTlsExtensions(true) .build(); builder.connectionSpecs(asList(tls, ConnectionSpec.CLEARTEXT)); X509TrustManager trustManager = sslTrustManager != null ? sslTrustManager : systemDefaultTrustManager(); SSLSocketFactory sslFactory = sslSocketFactory != null ? sslSocketFactory : systemDefaultSslSocketFactory(trustManager); builder.sslSocketFactory(sslFactory, trustManager); return builder.build(); }</code><technical_language>Merge issue</technical_language>

Target:
public OkHttpClient build() { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.proxy(proxy); if (connectTimeoutMs >= 0) { builder.connectTimeout(connectTimeoutMs, TimeUnit.MILLISECONDS); } if (readTimeoutMs >= 0) { builder.readTimeout(readTimeoutMs, TimeUnit.MILLISECONDS); } if (proxyLogin != null) { builder.proxyAuthenticator((route, response) -> { Request.Builder newRequest = response.request().newBuilder(); return newRequest.header("Proxy-Authorization", Credentials.basic(proxyLogin, nullToEmpty(proxyPassword))).build(); }); } builder.addInterceptor(this::completeHeaders); ConnectionSpec tls = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) .allEnabledTlsVersions() .allEnabledCipherSuites() .supportsTlsExtensions(true) .build(); builder.connectionSpecs(asList(tls, ConnectionSpec.CLEARTEXT)); X509TrustManager trustManager = sslTrustManager != null ? sslTrustManager : systemDefaultTrustManager(); SSLSocketFactory sslFactory = sslSocketFactory != null ? sslSocketFactory : systemDefaultSslSocketFactory(trustManager); builder.sslSocketFactory(sslFactory, trustManager); return builder.build(); }
Source:
<code>public AbfsRestOperation createPath(final String path, final boolean isFile, final boolean overwrite, final String permission, final String umask) throws AzureBlobFileSystemException { final List<AbfsHttpHeader> requestHeaders = createDefaultHeaders(); if (!overwrite) { requestHeaders.add(new AbfsHttpHeader(IF_NONE_MATCH, AbfsHttpConstants.STAR)); } if (permission != null && !permission.isEmpty()) { requestHeaders.add(new AbfsHttpHeader(HttpHeaderConfigurations.X_MS_PERMISSIONS, permission)); } if (umask != null && !umask.isEmpty()) { requestHeaders.add(new AbfsHttpHeader(HttpHeaderConfigurations.X_MS_UMASK, umask)); } final AbfsUriQueryBuilder abfsUriQueryBuilder = createDefaultUriQueryBuilder(); abfsUriQueryBuilder.addQuery(QUERY_PARAM_RESOURCE, isFile ? FILE : DIRECTORY); if (authType == AuthType.SAS) { <START> String operation = isFile ? SASTokenProvider.CREATEFILE_OPERATION : SASTokenProvider.MKDIR_OPERATION; <END> appendSASTokenToQuery(path, operation, abfsUriQueryBuilder); } final URL url = createRequestUrl(path, abfsUriQueryBuilder.toString()); final AbfsRestOperation op = new AbfsRestOperation( AbfsRestOperationType.CreatePath, this, HTTP_METHOD_PUT, url, requestHeaders); op.execute(); return op; }</code><technical_language>prefer String operation = isFile ? SASTokenProvider.CREATEFILE_OPERATION : SASTokenProvider.MKDIR_OPERATION;</technical_language>

Target:
public AbfsRestOperation createPath(final String path, final boolean isFile, final boolean overwrite, final String permission, final String umask) throws AzureBlobFileSystemException { final List<AbfsHttpHeader> requestHeaders = createDefaultHeaders(); if (!overwrite) { requestHeaders.add(new AbfsHttpHeader(IF_NONE_MATCH, AbfsHttpConstants.STAR)); } if (permission != null && !permission.isEmpty()) { requestHeaders.add(new AbfsHttpHeader(HttpHeaderConfigurations.X_MS_PERMISSIONS, permission)); } if (umask != null && !umask.isEmpty()) { requestHeaders.add(new AbfsHttpHeader(HttpHeaderConfigurations.X_MS_UMASK, umask)); } final AbfsUriQueryBuilder abfsUriQueryBuilder = createDefaultUriQueryBuilder(); abfsUriQueryBuilder.addQuery(QUERY_PARAM_RESOURCE, isFile ? FILE : DIRECTORY); String operation = isFile ? SASTokenProvider.CREATEFILE_OPERATION : SASTokenProvider.MKDIR_OPERATION; appendSASTokenToQuery(path, operation, abfsUriQueryBuilder); final URL url = createRequestUrl(path, abfsUriQueryBuilder.toString()); final AbfsRestOperation op = new AbfsRestOperation( AbfsRestOperationType.CreatePath, this, HTTP_METHOD_PUT, url, requestHeaders); op.execute(); return op; }
Source:
<code>public void clearRedisCache() { Jedis jedis = new Jedis(host, port); <START> jedis.flushAll(); <END> jedis.disconnect(); }</code><technical_language><LINK_0> public String flushAll() Delete keys of existing databases, currently selected one. This command fails. by: flushAll in interface BasicCommands Returns: Status code reply</technical_language>

Target:
public void clearRedisCache() { Jedis jedis = new Jedis(host, port); String response = jedis.flushAll(); if (!response.equals("OK")) { logger.warn("Unexpected response from redis flushAll command: " + response); } jedis.disconnect(); }
Source:
<code>private static boolean canInspect(GoReferenceExpression o, @Nullable GoReceiver receiver) { if (receiver == null) return false; GoType resolveType = receiver.getType(); if (resolveType == null) return false; PsiElement parent = o.getParent(); if (resolveType instanceof GoPointerType) { if (parent instanceof GoUnaryExpr) { if (((GoUnaryExpr)parent).getMul() != null) return false; } } GoType underlyingType = resolveType.getUnderlyingType(); <START> if (underlyingType instanceof GoChannelType || <END> underlyingType instanceof GoArrayOrSliceType ) { return false; } return true; }</code><technical_language>if () { return false } else { return true } strange</technical_language>

Target:
private static boolean canInspect(GoReferenceExpression o, @Nullable GoReceiver receiver) { if (receiver == null) return false; GoType resolveType = receiver.getType(); if (resolveType == null) return false; PsiElement parent = o.getParent(); if (resolveType instanceof GoPointerType) { if (parent instanceof GoUnaryExpr) { if (((GoUnaryExpr)parent).getMul() != null) return false; } } GoType underlyingType = resolveType.getUnderlyingType(); return !(underlyingType instanceof GoChannelType || underlyingType instanceof GoArrayOrSliceType || underlyingType instanceof GoMapType); }
Source:
<code>public EventHubSpout( final EventHubSpoutConfig spoutConfig, final IStateStore store, final IPartitionManagerFactory pmFactory, final IEventHubReceiverFactory recvFactory) { this.eventHubConfig = spoutConfig; this.checkpointIntervalInSeconds = spoutConfig.getCheckpointIntervalInSeconds(); <START> this.lastCheckpointTime = System.currentTimeMillis(); <END> stateStore = store; this.pmFactory = pmFactory; if (this.pmFactory == null) { this.pmFactory = new IPartitionManagerFactory() { private static final long serialVersionUID = -3134660797825594845L; @Override public IPartitionManager create(EventHubConfig ehConfig, String partitionId, IStateStore stateStore, IEventHubReceiver receiver) { return new PartitionManager(spoutConfig, partitionId, stateStore, receiver); } }; } this.recvFactory = recvFactory; if (this.recvFactory == null) { this.recvFactory = new IEventHubReceiverFactory() { private static final long serialVersionUID = 7215384402396274196L; @Override public IEventHubReceiver create(EventHubConfig spoutConfig, String partitionId) { return new EventHubReceiverImpl(spoutConfig, partitionId); } }; } }</code><technical_language>Nit: easier time testing this if Time.currentTimeMillis (Storm's time simulation) instead</technical_language>

Target:
public EventHubSpout( final EventHubSpoutConfig spoutConfig, final IStateStore store, final IPartitionManagerFactory pmFactory, final IEventHubReceiverFactory recvFactory) { this.eventHubConfig = spoutConfig; this.checkpointIntervalInSeconds = spoutConfig.getCheckpointIntervalInSeconds(); this.lastCheckpointTime = System.currentTimeMillis(); this.stateStore = store; this.pmFactory = pmFactory == null ? new PartitionManagerFactory() : pmFactory; this.recvFactory = recvFactory == null ? new EventHubReceiverFactory() : recvFactory; this.eventHubPath = String.join("/", spoutConfig.getTargetAddress(), spoutConfig.getEntityPath()); }
Source:
<code><START> public void setFiles(ArrayList<Uri> files) { <END> this.files = files; }</code><technical_language>This done in constructor. member final</technical_language>

Target:
public void setFiles(ArrayList<Uri> files) { mFiles = files; }
Source:
<code><START> protected void createFieldEditors() { <END> Composite main = getFieldEditorParent(); Group initialGroup = new Group(main, SWT.SHADOW_ETCHED_IN); initialGroup.setText(UIText.DialogsPreferencePage_InitialGroupHeader); GridDataFactory.fillDefaults().grab(true, false).span(GROUP_SPAN, 1) .applyTo(initialGroup); addField(new BooleanFieldEditor( UIPreferences.SHOW_INITIAL_CONFIG_DIALOG, UIText.DialogsPreferencePage_ShowInitialConfigCheckbox, initialGroup)); updateMargins(initialGroup); Group confirmGroup = new Group(main, SWT.SHADOW_ETCHED_IN); GridDataFactory.fillDefaults().grab(true, false).span(GROUP_SPAN, 1) .applyTo(confirmGroup); confirmGroup .setText(UIText.DialogsPreferencePage_HideConfirmationGroupHeader); addField(new BooleanFieldEditor(UIPreferences.REBASE_HIDE_CONFIRM, UIText.DialogsPreferencePage_RebaseCheckbox, confirmGroup)); addField(new ComboFieldEditor(UIPreferences.SHOW_DETACHED_HEAD_WARNING, UIText.DialogsPreferencePage_DetachedHeadCombo, TOGGLE_OPTIONS, confirmGroup)); addField(new ComboFieldEditor(UIPreferences.SHOW_HOME_DIR_WARNING, UIText.DialogsPreferencePage_HomeDirWarning, TOGGLE_OPTIONS, confirmGroup)); updateMargins(confirmGroup); }</code><technical_language>I propose change this page group named "Show confirmation dialogs" options provided checkboxes. I order list follows: "Show confirmation dialogs" - Initial configuration - Home directory warning (Windows only) - Rebase confirmation - Detached Head warning I this easier understand</technical_language>

Target:
protected void createFieldEditors() { Composite main = getFieldEditorParent(); Group confirmGroup = new Group(main, SWT.SHADOW_ETCHED_IN); GridDataFactory.fillDefaults().grab(true, false).span(GROUP_SPAN, 1) .applyTo(confirmGroup); confirmGroup .setText(UIText.DialogsPreferencePage_HideConfirmationGroupHeader); GridDataFactory.fillDefaults().grab(true, false).span(GROUP_SPAN, 1) .applyTo(confirmGroup); addField(new BooleanFieldEditor( UIPreferences.SHOW_INITIAL_CONFIG_DIALOG, UIText.DialogsPreferencePage_ShowInitialConfigCheckbox, confirmGroup)); addField(new BooleanFieldEditor(UIPreferences.SHOW_REBASE_CONFIRM, UIText.DialogsPreferencePage_RebaseCheckbox, confirmGroup)); addField(new BooleanFieldEditor( UIPreferences.SHOW_DETACHED_HEAD_WARNING, UIText.DialogsPreferencePage_DetachedHeadCombo, confirmGroup)); addField(new BooleanFieldEditor(UIPreferences.SHOW_HOME_DIR_WARNING, UIText.DialogsPreferencePage_HomeDirWarning, confirmGroup)); updateMargins(confirmGroup); }