auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void addSampleDataButtons(IToolBarManager toolBarManager) { loadDataButton = new Action() { @Override public void run() { super.run(); loadSampleData(); } }; final String loadDataImagePath = "icons/loadData.png"; loadDataButton.setImageDescriptor(ImageDescriptor.createFromURL(Activator.getDefault() .getBundle() .getResource(loadDataImagePath))); <START> loadDataButton.setText("Import Sample Data"); <END> loadDataButton.setEnabled(true); exportDataButton = new Action() { @Override public void run() { super.run(); exportSampleData(); } }; final String exportDataImagePath = "icons/exportData.png"; exportDataButton.setImageDescriptor(ImageDescriptor.createFromURL(Activator.getDefault() .getBundle() .getResource(exportDataImagePath))); exportDataButton.setText("Export Sample Data"); exportDataButton.setEnabled(true); cleanDataButton = new Action() { @Override public void run() { super.run(); sampleData = null; preView.cleanSampleData(); render(); } }; final String cleanDataImagePath = "icons/cleanData.png"; cleanDataButton.setImageDescriptor(ImageDescriptor.createFromURL(Activator.getDefault() .getBundle() .getResource(cleanDataImagePath))); cleanDataButton.setText("Clear Sample Data"); cleanDataButton.setEnabled(true); toolBarManager.add(cleanDataButton); toolBarManager.add(loadDataButton); toolBarManager.add(exportDataButton); }</code><technical_language>String externalized</technical_language>

Target:
private void addSampleDataButtons(IToolBarManager toolBarManager) { loadDataButton = new Action() { @Override public void run() { super.run(); loadSampleData(); } }; final String loadDataImagePath = "icons/loadData.png"; loadDataButton.setImageDescriptor(ImageDescriptor.createFromURL(Activator.getDefault() .getBundle() .getResource(loadDataImagePath))); loadDataButton.setText(Messages.PreviewView_ImportSampleDataButton); loadDataButton.setEnabled(true); exportDataButton = new Action() { @Override public void run() { super.run(); exportSampleData(); } }; final String exportDataImagePath = "icons/exportData.png"; exportDataButton.setImageDescriptor(ImageDescriptor.createFromURL(Activator.getDefault() .getBundle() .getResource(exportDataImagePath))); exportDataButton.setText(Messages.PreviewView_ExportSampleDataButton); exportDataButton.setEnabled(true); cleanDataButton = new Action() { @Override public void run() { super.run(); sampleData = null; preView.cleanSampleData(); render(); } }; final String cleanDataImagePath = "icons/cleanData.png"; cleanDataButton.setImageDescriptor(ImageDescriptor.createFromURL(Activator.getDefault() .getBundle() .getResource(cleanDataImagePath))); cleanDataButton.setText(Messages.PreviewView_ClearSampleDataButton); cleanDataButton.setEnabled(true); toolBarManager.add(cleanDataButton); toolBarManager.add(loadDataButton); toolBarManager.add(exportDataButton); }
Source:
<code>public void toUpper() { assertThat( value.apply( "HELLO" ).toUpper(), equalTo( value.apply( "HELLO" ) ) ); assertThat( value.apply( "Hello" ).toUpper(), equalTo( value.apply( "HELLO" ) ) ); <START> assertThat( value.apply( "hello" ).toUpper(), equalTo( value.apply( "HELLO" ) ) ); <END> }</code><technical_language>empty string</technical_language>

Target:
public void toUpper() { assertThat( value.apply( "HELLO" ).toUpper(), equalTo( value.apply( "HELLO" ) ) ); assertThat( value.apply( "Hello" ).toUpper(), equalTo( value.apply( "HELLO" ) ) ); assertThat( value.apply( "hello" ).toUpper(), equalTo( value.apply( "HELLO" ) ) ); assertThat( value.apply( "" ).toUpper(), equalTo( value.apply( "" ) ) ); }
Source:
<code>public void connect_timeout_override_changes_how_long_it_takes_for_a_connection_to_timeout() { Client client = createStandardClient(); assertThatGetConnectonTimeoutForTarget( client.target(URI_THAT_CANNOT_BE_CONNECTED_TO) <START> ).isLessThan(DEFAULT_CONNECT_TIMEOUT + 300); <END> assertThatGetConnectonTimeoutForTarget( client.target(URI_THAT_CANNOT_BE_CONNECTED_TO) .property(ClientProperties.CONNECT_TIMEOUT, DEFAULT_CONNECT_TIMEOUT + 400) ).isGreaterThan(DEFAULT_CONNECT_TIMEOUT + 400); }</code><technical_language>Sorry, I understand number 300 is taken. Is some dependency? Also, this assertion isGreaterThan(DEFAULT_CONNECT_TIMEOUT);</technical_language>

Target:
public void connect_timeout_override_changes_how_long_it_takes_for_a_connection_to_timeout() { assertThatGetConnectonTimeoutForTarget( client.target(URI_THAT_TIMESOUT_ON_CONNECTION_ATTEMPT) ).isLessThan(DEFAULT_CONNECT_TIMEOUT_IN_MILLIS + ERROR_MARGIN_IN_MILLIS); assertThatGetConnectonTimeoutForTarget( client.target(URI_THAT_TIMESOUT_ON_CONNECTION_ATTEMPT) .property(ClientProperties.CONNECT_TIMEOUT, DEFAULT_CONNECT_TIMEOUT_IN_MILLIS + INCREASE_IN_MILLIS + ERROR_MARGIN_IN_MILLIS) ).isGreaterThan(DEFAULT_CONNECT_TIMEOUT_IN_MILLIS + INCREASE_IN_MILLIS + ERROR_MARGIN_IN_MILLIS); }
Source:
<code>private static boolean isObject(Type type) { <START> return type.isSubtypeOf("java.lang.Object"); <END> }</code><technical_language>in this case negation of "isPrimitive" method : more efficient closer definition of achieve</technical_language>

Target:
private static boolean isObject(Type type) { return !type.isPrimitive() && !type.isUnknown(); }
Source:
<code>private void init() { Fabric.with(this, new Crashlytics()); LocationMemory.getInstance().init(getApplicationContext()); TypefaceCache.getInstance().init(getApplicationContext()); D2.init(this); FlowConfig flowConfig = new FlowConfig .Builder(this) .addDatabaseHolder(EyeSeeTeaGeneratedDatabaseHolder.class) .build(); FlowManager.init(flowConfig); SdkQueries.createDBIndexes(); PostMigration.launchPostMigration(); if (!BuildConfig.multiuser) { Log.i(TAG, "Pull on SplashScreen ..."); PullController pullController = new PullController(getApplication().getApplicationContext()); PullUseCase pullUseCase = new PullUseCase(pullController); <START> pullUseCase.execute(false, new PullUseCase.Callback() { <END> @Override public void onComplete() { } @Override public void onStep(PullStep step) { Log.d(this.getClass().getSimpleName(), step.toString()); } @Override public void onError(String message) { Log.e(this.getClass().getSimpleName(), message); } @Override public void onNetworkError() { Log.e(this.getClass().getSimpleName(), "Network Error"); } }); } }</code><technical_language>@idelcano here, execute method of pull parameter isDemo equal true if execute pull server</technical_language>

Target:
private void init() { Fabric.with(this, new Crashlytics()); LocationMemory.getInstance().init(getApplicationContext()); TypefaceCache.getInstance().init(getApplicationContext()); D2.init(this); FlowConfig flowConfig = new FlowConfig .Builder(this) .addDatabaseHolder(EyeSeeTeaGeneratedDatabaseHolder.class) .build(); FlowManager.init(flowConfig); SdkQueries.createDBIndexes(); PostMigration.launchPostMigration(); if (!BuildConfig.multiuser) { Log.i(TAG, "Pull on SplashScreen ..."); PullController pullController = new PullController( getApplication().getApplicationContext()); PullUseCase pullUseCase = new PullUseCase(pullController); pullUseCase.execute(true, new PullUseCase.Callback() { @Override public void onComplete() { } @Override public void onStep(PullStep step) { Log.d(this.getClass().getSimpleName(), step.toString()); } @Override public void onError(String message) { Log.e(this.getClass().getSimpleName(), message); } @Override public void onNetworkError() { Log.e(this.getClass().getSimpleName(), "Network Error"); } }); } }
Source:
<code>public ResponseHeader(Struct struct, short headerVersion) { <START> this.data = new ResponseHeaderData(struct, headerVersion); <END> this.headerVersion = headerVersion; }</code><technical_language>nit: chain c'tors consolidate code. easy do validation in case a need arise in future</technical_language>

Target:
public ResponseHeader(Struct struct, short headerVersion) { this(new ResponseHeaderData(struct, headerVersion), headerVersion); }
Source:
<code>public void setValue(String value) { <START> setValue(value != null ? value.replace("L", "32") : value, false); END> } @Override public String getValue() { return selectedItemsString != null ? selectedItemsString.replace("32", "L") : selectedItemsString; } private void setSelectedValue() { selectedItemsString = null; for(String item : selectedItems) { if (selectedItemsString == null) { selectedItemsString = item; } else { selectedItemsString = selectedItemsString.concat(","); selectedItemsString = selectedItemsString.concat(item); } } ValueChangeEvent.fire(this, getValue()); } public void setEnabled(boolean enabled) { } }</code><technical_language>LAST_DAY ? is L</technical_language>

Target:
public void setValue(String value) { setValue(value != null ? value.replace("L", Integer.toString(LAST_DAY)) : value, false); }
Source:
<code>@Bean @Primary KnownTypeQueryExecutor queryExecutor() { MongoLookupEntryStore lookupStore = new MongoLookupEntryStore(mongo.collection("lookup"), new NoLoggingPersistenceAuditLog(), readPreference); KnownTypeContentResolver mongoContentResolver = new MongoContentResolver(mongo, lookupStore); KnownTypeContentResolver cassandraContentResolver = new CassandraKnownTypeContentResolver(cassandra); <START> DefaultEquivalentContentResolver defaultEquivalentContentResolver = <END> new DefaultEquivalentContentResolver( mongoContentResolver, lookupStore ); KnownTypeQueryExecutor queryExecutor = new LookupResolvingQueryExecutor( cassandraContentResolver, defaultEquivalentContentResolver, lookupStore, cassandraEnabled ); queryExecutor = new UriFetchingQueryExecutor(localOrRemoteFetcher, queryExecutor, equivUpdater, ImmutableSet.of(FACEBOOK)); queryExecutor = new CurieResolvingQueryExecutor(queryExecutor); queryExecutor = new FilterActivelyPublishedOnlyQueryExecutor(queryExecutor); queryExecutor = new MergeOnOutputQueryExecutor(queryExecutor); queryExecutor = new FilterScheduleOnlyQueryExecutor(queryExecutor); return Boolean.parseBoolean(applicationsEnabled) ? new ApplicationConfigurationQueryExecutor(queryExecutor) : queryExecutor; }</code><technical_language>tabs (actually a lot of file - fix lot?)</technical_language>

Target:
KnownTypeQueryExecutor queryExecutor() { MongoLookupEntryStore lookupStore = new MongoLookupEntryStore( mongo.collection("lookup"), new NoLoggingPersistenceAuditLog(), readPreference ); KnownTypeContentResolver mongoContentResolver = new MongoContentResolver(mongo, lookupStore); KnownTypeContentResolver cassandraContentResolver = new CassandraKnownTypeContentResolver(cassandra); DefaultEquivalentContentResolver defaultEquivalentContentResolver = new DefaultEquivalentContentResolver(mongoContentResolver, lookupStore); KnownTypeQueryExecutor queryExecutor = new LookupResolvingQueryExecutor( cassandraContentResolver, defaultEquivalentContentResolver, lookupStore, cassandraEnabled ); queryExecutor = new UriFetchingQueryExecutor (localOrRemoteFetcher, queryExecutor, equivUpdater, ImmutableSet.of(FACEBOOK)); queryExecutor = new CurieResolvingQueryExecutor(queryExecutor); queryExecutor = new FilterActivelyPublishedOnlyQueryExecutor(queryExecutor); queryExecutor = new MergeOnOutputQueryExecutor(queryExecutor); queryExecutor = new FilterScheduleOnlyQueryExecutor(queryExecutor); return Boolean.parseBoolean(applicationsEnabled) ? new ApplicationConfigurationQueryExecutor(queryExecutor) : queryExecutor; }
Source:
<code>public FulltextProviderImpl( GraphDatabaseService db, Log log, AvailabilityGuard availabilityGuard, JobScheduler scheduler, TransactionIdStore transactionIdStore, FileSystemAbstraction fileSystem, File storeDir, String analyzerClassName ) { this.db = db; this.log = log; this.transactionIdStore = transactionIdStore; JobScheduler jobScheduler = scheduler; applier = new FulltextUpdateApplier( log, availabilityGuard, scheduler ); applier.start(); factory = new FulltextFactory( fileSystem, storeDir, analyzerClassName ); writableNodeIndices = new Map[]{new ConcurrentHashMap<>(), new ConcurrentHashMap<>()}; writableRelationshipIndices = new Map[]{new ConcurrentHashMap<>(), new ConcurrentHashMap<>()}; configurationLock = new ReentrantReadWriteLock( true ); flipper = true; flipperJob = jobScheduler.schedule( FLIPPER, () -> { boolean isAvailable; do { isAvailable = availabilityGuard.isAvailable( 100 ); } while ( !isAvailable && !availabilityGuard.isShutdown() ); while ( flipper ) { try { flip(); } catch ( IOException e ) { <START> e.printStackTrace(); <END> } } } ); }</code><technical_language>write log instead</technical_language>

Target:
public FulltextProviderImpl( GraphDatabaseService db, Log log, AvailabilityGuard availabilityGuard, JobScheduler scheduler, TransactionIdStore transactionIdStore, FileSystemAbstraction fileSystem, File storeDir, String analyzerClassName ) { this.db = db; this.log = log; this.transactionIdStore = transactionIdStore; JobScheduler jobScheduler = scheduler; applier = new FulltextUpdateApplier( log, availabilityGuard, scheduler ); applier.start(); factory = new FulltextFactory( fileSystem, storeDir, analyzerClassName ); writableNodeIndices = new Map[]{new ConcurrentHashMap<>(), new ConcurrentHashMap<>()}; writableRelationshipIndices = new Map[]{new ConcurrentHashMap<>(), new ConcurrentHashMap<>()}; configurationLock = new ReentrantReadWriteLock( true ); flipperJob = jobScheduler.schedule( FLIPPER, () -> { boolean isAvailable; do { isAvailable = availabilityGuard.isAvailable( 100 ); } while ( !isAvailable && !availabilityGuard.isShutdown() ); while ( !closed ) { try { flip(); } catch ( IOException e ) { log.error( "Unable to flip fulltext index", e ); } } } ); }
Source:
<code>protected NuxeoOAuth2Token readEntity(JsonNode jn) throws IOException { String cliendId = getStringField(jn, "clientId"); NuxeoOAuth2Token token = new NuxeoOAuth2Token(0, cliendId); token.setServiceName(getStringField(jn, "serviceName")); token.setNuxeoLogin(getStringField(jn, "nuxeoLogin")); token.setServiceLogin(getStringField(jn, "serviceLogin")); SimpleDateFormat dateFormat = new SimpleDateFormat(NuxeoOAuth2TokenWriter.DATE_FORMAT); Calendar cal = Calendar.getInstance(); try { cal.setTime(dateFormat.parse(getStringField(jn, "creationDate"))); } catch (ParseException e) { cal = null; } token.setCreationDate(cal); token.setIsShared(getBooleanField(jn, "isShared")); List<String> sharedWith = getStringListField(jn, "sharedWith"); <START> token.setSharedWith(sharedWith == null ? "" : StringUtils.join(sharedWith, ",")); <END> return token; }</code><technical_language>String.join(",", sharedWith)</technical_language>

Target:
protected NuxeoOAuth2Token readEntity(JsonNode jn) throws IOException { String cliendId = getStringField(jn, "clientId"); NuxeoOAuth2Token token = new NuxeoOAuth2Token(0, cliendId); token.setServiceName(getStringField(jn, "serviceName")); token.setNuxeoLogin(getStringField(jn, "nuxeoLogin")); token.setServiceLogin(getStringField(jn, "serviceLogin")); SimpleDateFormat dateFormat = new SimpleDateFormat(NuxeoOAuth2TokenWriter.DATE_FORMAT); Calendar cal = Calendar.getInstance(); try { cal.setTime(dateFormat.parse(getStringField(jn, "creationDate"))); } catch (ParseException e) { cal = null; } token.setCreationDate(cal); token.setIsShared(getBooleanField(jn, "isShared")); List<String> sharedWith = getStringListField(jn, "sharedWith"); token.setSharedWith(sharedWith == null ? "" : String.join(",", sharedWith)); return token; }
Source:
<code>public void initializeDatastream(Datastream stream, List<Datastream> allDatastreams) throws DatastreamValidationException { LOG.info("validating datastream " + stream.toString()); try { MysqlSource source = MysqlSource.createFromUri(stream.getSource().getConnectionString()); if (source.getSourceType() != MysqlConnector.SourceType.MYSQLSERVER) { String msg = "Connector can only support datastreams of MYSQLSERVER source type"; LOG.error(msg); throw new DatastreamValidationException(msg); } if (!MysqlQueryUtils.checkTableExists(source, _defaultUserName, _defaultPassword)) { throw new DatastreamValidationException( String.format("Invalid datastream: Can't find table %s in db %s.", source.getDatabaseName(), source.getTableName())); } if (stream.getSource().hasPartitions() && stream.getSource().getPartitions() != 1) { String msg = "Mysql snapshot connector can only support single partition sources"; LOG.error(msg); throw new DatastreamValidationException(msg); <START> } <END> } catch (SourceNotValidException | SQLException e) { LOG.error("Received exception while validating the Mysql source", e); throw new DatastreamValidationException(e); } }</code><technical_language>check if snapshot exists</technical_language>

Target:
public void initializeDatastream(Datastream stream, List<Datastream> allDatastreams) throws DatastreamValidationException { LOG.info("validating datastream " + stream.toString()); try { MysqlSource source = MysqlSource.createFromUri(stream.getSource().getConnectionString()); if (source.getSourceType() != MysqlConnector.SourceType.MYSQLSERVER) { String msg = "Connector can only support datastreams of MYSQLSERVER source type"; LOG.error(msg); throw new DatastreamValidationException(msg); } if (!MysqlQueryUtils.checkTableExists(source, getUserNameFromDatastream(stream), getPasswordFromDatastream(stream))) { throw new DatastreamValidationException( String.format("Invalid datastream: Can't find table %s in db %s.", source.getDatabaseName(), source.getTableName())); } if (stream.getSource().hasPartitions() && stream.getSource().getPartitions() != 1) { String msg = "Mysql snapshot connector can only support single partition sources"; LOG.error(msg); throw new DatastreamValidationException(msg); } } catch (SourceNotValidException | SQLException e) { LOG.error("Received exception while validating the Mysql source", e); throw new DatastreamValidationException(e); } }
Source:
<code>private ItemStack getItemsToOutput(@Nonnull Material item) { if (Tag.LOGS.isTagged(item)) { <START> Optional<Material> planks = MaterialConverter.getPlanksFromLog(item); return new ItemStack(planks.get(), 8); <END> } else if (Tag.PLANKS.isTagged(item)) { return new ItemStack(Material.STICK, 4); } else { return null; } }</code><technical_language>call Optional#get() Optional#ifPresent() first</technical_language>

Target:
private ItemStack getItemsToOutput(@Nonnull Material item) { if (Tag.LOGS.isTagged(item)) { Optional<Material> planks = MaterialConverter.getPlanksFromLog(item); if (planks.isPresent()) { return new ItemStack(planks.get(), 8); } else { return null; } } else if (Tag.PLANKS.isTagged(item)) { return new ItemStack(Material.STICK, 4); } else { return null; } }
Source:
<code>public List<String> <START> validatePropertyTriple(Statement <END> propertyTriple) { List<String> invalid = new ArrayList<>(); String subject = propertyTriple.getSubject().stringValue(); if (!isValidTripleComponent(subject, VALID_NAMESPACES.statement(), "statement")) { invalid.add(subject); } String predicate = propertyTriple.getPredicate().stringValue(); if (!isValidTripleComponent(predicate, VALID_NAMESPACES.property(WikibaseUris.PropertyType.STATEMENT), "property")) { invalid.add(predicate); } Value object = propertyTriple.getObject(); if (object instanceof URI) { String objectString = object.stringValue(); if (!isValidTripleComponent(objectString, VALID_NAMESPACES.entity(), "item")) { if (objectString.startsWith(VALID_NAMESPACES.root() + "/")) { log.error("Probably a Wikidata term, but not an Item: {}", objectString); invalid.add(objectString); } else { int distance = computeNamespaceDistance(objectString, VALID_NAMESPACES.entity(), "item"); if (distance <= EDIT_DISTANCE_THRESHOLD) { log.error("Probably a typo: {}", objectString); invalid.add(objectString); } else { int responseCode = 200; try { responseCode = resolve(objectString); } catch (IOException ioe) { log.error("Not resolvable: Reason: {}", objectString, ioe.getClass().getSimpleName()); invalid.add(objectString); } if (responseCode >= 400) { log.error("Not resolvable: HTTP error code: {}", objectString, responseCode); invalid.add(objectString); } } } } } return invalid; }</code><technical_language>validation methods throw exception wrapping list of invalid objects return anything. This more obvious in error scenario simplify UploadServlet</technical_language>

Target:
public List<String> validatePropertyTriple(Statement propertyTriple) { List<String> invalid = new ArrayList<>(); String subject = propertyTriple.getSubject().stringValue(); if (!isValidTripleComponent(subject, VALID_NAMESPACES.statement(), "statement")) { invalid.add(subject); } String predicate = propertyTriple.getPredicate().stringValue(); if (!isValidTripleComponent(predicate, VALID_NAMESPACES.property(WikibaseUris.PropertyType.STATEMENT), "property")) { invalid.add(predicate); } Value object = propertyTriple.getObject(); if (object instanceof URI) { String objectString = object.stringValue(); if (!isValidTripleComponent(objectString, VALID_NAMESPACES.entity(), "item")) { if (objectString.startsWith(VALID_NAMESPACES.root() + "/")) { log.error("Probably a Wikidata term, but not an Item: {}", objectString); invalid.add(objectString); } else { int distance = computeNamespaceDistance(objectString, VALID_NAMESPACES.entity(), "item"); if (distance <= EDIT_DISTANCE_THRESHOLD) { log.error("Probably a typo: {}", objectString); invalid.add(objectString); } else { boolean isValidURL = validateURL(objectString); if (!isValidURL) { invalid.add(objectString); } } } } } return invalid; }
Source:
<code>private long reqSaveImages(@NonNull ReadingListPage page, @NonNull Iterable<String> urls) throws IOException, InterruptedException { int numOfImages = ((Collection<?>) urls).size(); long totalSize = 0; <START> if (numOfImages == 0) { WikipediaApp.getInstance().getBus().post(new PageDownloadEvent(MAX_PROGRESS, page)); <END> } else { int percentage = SECTIONS_PROGRESS; int updateRate = numOfImages / SECTIONS_PROGRESS; int urlCount = 0; for (String url : urls) { urlCount = updateRate == 0 ? urlCount : urlCount == updateRate ? 0 : urlCount + 1; if (savedPageSyncNotification.isSyncPaused() || savedPageSyncNotification.isSyncCanceled()) { throw new InterruptedException("Sync paused or cancelled."); } try { totalSize += reqSaveImage(page.wiki(), url); if (urlCount == updateRate) { WikipediaApp.getInstance().getBus().post(new PageDownloadEvent(++percentage, page)); } } catch (Exception e) { if (isRetryable(e)) { throw e; } } } } WikipediaApp.getInstance().getBus().post(new PageDownloadEvent(MAX_PROGRESS, page)); return totalSize; }</code><technical_language>This event this if block</technical_language>

Target:
private long reqSaveImages(@NonNull ReadingListPage page, @NonNull Iterable<String> urls) throws IOException, InterruptedException { int numOfImages = ((Collection<?>) urls).size(); long totalSize = 0; float percentage = SECTIONS_PROGRESS; float updateRate = (float) SECTIONS_PROGRESS / numOfImages; for (String url : urls) { if (savedPageSyncNotification.isSyncPaused() || savedPageSyncNotification.isSyncCanceled()) { throw new InterruptedException("Sync paused or cancelled."); } try { totalSize += reqSaveImage(page.wiki(), url); percentage += updateRate; page.downloadProgress((int) percentage); WikipediaApp.getInstance().getBus().post(new PageDownloadEvent(page)); } catch (Exception e) { if (isRetryable(e)) { throw e; } } } page.downloadProgress(MAX_PROGRESS); WikipediaApp.getInstance().getBus().post(new PageDownloadEvent(page)); return totalSize; }
Source:
<code>public String getDomain() { <START> return "gerrit"; <END> }</code><technical_language>[optional] this string declared public static final</technical_language>

Target:
public String getDomain() { return GERRIT_DOMAIN_NAME; }
Source:
<code>protected void flush() throws IOException { if (outputStream != null) { if (fileSystemWAL.fileContext.getDefaultFileSystem() instanceof LocalFs || fileSystemWAL.fileContext.getDefaultFileSystem() instanceof RawLocalFs) { close(); } else { <START> ((HdfsDataOutputStream)outputStream).hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH)); <END> } } }</code><technical_language>If I < 2.6.1 hadoop, this work? Is detect if outputSteams supports hsync parameter call this else default hsync</technical_language>

Target:
protected void flush() throws IOException { if (outputStream != null) { if (fileSystemWAL.fileContext.getDefaultFileSystem() instanceof LocalFs || fileSystemWAL.fileContext.getDefaultFileSystem() instanceof RawLocalFs) { close(); } else { Syncable syncableOutputStream = (Syncable)outputStream; syncableOutputStream.hflush(); syncableOutputStream.hsync(); } } }
Source:
<code>protected void execute(Context context) throws SQLException { MassUpdate massUpdate = context.prepareMassUpdate(); massUpdate.select("SELECT id " + "FROM loaded_templates " + "WHERE template_type = 'QUALITY_GATE'"); massUpdate.update("DELETE from loaded_templates WHERE id=?"); massUpdate.rowPluralName("delete loaded templates for quality gate"); massUpdate.execute((row, update) -> { <START> update.setLong(1, row.getLong(1)); <END> return true; }); }</code><technical_language>idea why, loaded_template entry quality gate removed box</technical_language>

Target:
protected void execute(Context context) throws SQLException { MassUpdate massUpdate = context.prepareMassUpdate(); massUpdate.select("SELECT id " + "FROM loaded_templates " + "WHERE template_type = ?") .setString(1, "QUALITY_GATE"); massUpdate.update("DELETE from loaded_templates WHERE id=?"); massUpdate.rowPluralName("delete loaded templates for quality gate"); massUpdate.execute((row, update) -> { update.setLong(1, row.getLong(1)); return true; }); }
Source:
<code>private void checkState() { if (parent == null && providers.isEmpty()) { throw new IllegalArgumentException( "A parent AuthenticationManager or a list " + "of AuthenticationProviders is required"); <START> } else if (providers.stream().anyMatch(Objects::isNull)) { <END> throw new IllegalArgumentException( "providers list cannot contain null values"); } }</code><technical_language>framework level, find Stream API is fast enough. please a for loop instead</technical_language>

Target:
private void checkState() { if (parent == null && providers.isEmpty()) { throw new IllegalArgumentException( "A parent AuthenticationManager or a list " + "of AuthenticationProviders is required"); } else if (CollectionUtils.contains(providers.iterator(), null)) { throw new IllegalArgumentException( "providers list cannot contain null values"); } }
Source:
<code>private int calculateDelay(final int retry) { int delay = this.retryDelay; if (this.exponentialBackoff) { <START> final double exponent = Math.pow(this.backoffMultiplier, retry); <END> delay *= exponent; } return delay; }</code><technical_language>If I do some nitpicking name, actual exponent is retry in this statement, variable called exponent is a factor (exponentialFactor if like)</technical_language>

Target:
private int calculateDelay(final int retry) { int delay = this.retryDelay; if (this.exponentialBackoff) { final double factor = Math.pow(this.backoffMultiplier, retry); delay *= factor; } return delay; }
Source:
<code>public AtomicReference<NodeMetadata> apply(AtomicReference<NodeAndNovaTemplateOptions> input) { checkState(nodeRunning.apply(input.get().getNodeMetadata()), "node never achieved state running %s", input.get().getNodeMetadata()); NodeMetadata node = input.get().getNodeMetadata().get(); String regionId = node.getLocation().getParent().getId(); FloatingIPApi floatingIpApi = novaApi.getFloatingIPApi(regionId).get(); Optional<Set<String>> poolNames = input.get().getNovaTemplateOptions().get().getFloatingIpPoolNames(); Optional<FloatingIP> ip = allocateFloatingIPForNode(floatingIpApi, poolNames, node.getId()); if (!ip.isPresent()) { RegionAndId regionAndId = RegionAndId.fromSlashEncoded(node.getId()); <START> novaApi.getServerApi(regionAndId.getRegion()).delete(regionAndId.getId()); <END> throw new InsufficientResourcesException("Failed to allocate a FloatingIP for node(" + node.getId() + ")"); } logger.debug(">> adding floatingIp(%s) to node(%s)", ip.get().getIp(), node.getId()); floatingIpApi.addToServer(ip.get().getIp(), node.getProviderId()); input.get().getNodeMetadata().set(NodeMetadataBuilder.fromNodeMetadata(node).publicAddresses(ImmutableSet.of(ip.get().getIp())).build()); floatingIpCache.asMap().putIfAbsent(RegionAndId.fromSlashEncoded(node.getId()), ImmutableList.of(ip.get())); return input.get().getNodeMetadata(); }</code><technical_language>do security group key pair cleanup</technical_language>

Target:
public AtomicReference<NodeMetadata> apply(AtomicReference<NodeAndNovaTemplateOptions> input) { checkState(nodeRunning.apply(input.get().getNodeMetadata()), "node never achieved state running %s", input.get().getNodeMetadata()); NodeMetadata node = input.get().getNodeMetadata().get(); String regionId = node.getLocation().getParent().getId(); FloatingIPApi floatingIpApi = novaApi.getFloatingIPApi(regionId).get(); Optional<Set<String>> poolNames = input.get().getNovaTemplateOptions().get().getFloatingIpPoolNames(); Optional<FloatingIP> ip = allocateFloatingIPForNode(floatingIpApi, poolNames, node.getId()); if (!ip.isPresent()) { cleanupServer.apply(node.getId()); throw new InsufficientResourcesException("Failed to allocate a FloatingIP for node(" + node.getId() + ")"); } logger.debug(">> adding floatingIp(%s) to node(%s)", ip.get().getIp(), node.getId()); floatingIpApi.addToServer(ip.get().getIp(), node.getProviderId()); input.get().getNodeMetadata().set(NodeMetadataBuilder.fromNodeMetadata(node).publicAddresses(ImmutableSet.of(ip.get().getIp())).build()); floatingIpCache.asMap().putIfAbsent(RegionAndId.fromSlashEncoded(node.getId()), ImmutableList.of(ip.get())); return input.get().getNodeMetadata(); }
Source:
<code>public void onConfirm(View v) { <START> HashMap<String, String> params = new HashMap<String, String>(); <END> for (int i = 0; i < TEXT_FIELDS.length; i++) { EditText input = (EditText) this.findViewById(TEXT_FIELDS[i]); if (input.isEnabled() && input.getText().toString().length() > 0) { String key = this.getString(EXTRAS[i]); params.put(key, input.getText().toString()); } } Intent intent = new Intent(); intent.putExtra(this.getString(R.string.filter_params_extra), params); this.setResult(RESULT_OK, intent); this.finish(); }</code><technical_language>This HashMap unnecessary call intent.putExtra() for value. Bundle stores "extras" in Intent is essentially a map</technical_language>

Target:
public void onConfirm(View v) { Intent intent = new Intent(); for (int i = 0; i < TEXT_FIELDS.length; i++) { EditText input = (EditText) this.findViewById(TEXT_FIELDS[i]); if (input.isEnabled() && input.getText().toString().length() > 0) { String key = this.getString(EXTRAS[i]); intent.putExtra(key, input.getText().toString()); } } this.setResult(RESULT_OK, intent); this.finish(); }
Source:
<code>protected void checkSalutation() { if (Strings.isFilled(salutation)) { <START> codeLists.getRequiredValue("salutations", salutation); <END> } }</code><technical_language>nicer create a verify in codelists exception is thown purpose side effect? code anyway(?)</technical_language>

Target:
protected void checkSalutation() { if (Strings.isFilled(salutation)) { codeLists.verifyValue("salutations", salutation); } }
Source:
<code><START> public void onProcessResourcePackStatus(CPacketResourcePackStatus packet, CallbackInfo ci) { <END> PacketThreadUtil.checkThreadAndEnqueue(packet, (INetHandlerPlayServer) this, this.playerEntity.getServerWorld()); }</code><technical_language>is need this injector public</technical_language>

Target:
private void onProcessResourcePackStatus(CPacketResourcePackStatus packet, CallbackInfo ci) { PacketThreadUtil.checkThreadAndEnqueue(packet, (INetHandlerPlayServer) this, this.player.getServerWorld()); }
Source:
<code>List<MetricFamilySamples> fromCounter(String dropwizardName, Counter counter) { String name = sanitizeMetricName(dropwizardName); MetricFamilySamples.Sample sample = sampleBuilder.createSample(dropwizardName, "", new ArrayList<String>(), new ArrayList<String>(), new Long(counter.getCount()).doubleValue()); <START> return Arrays.asList(new MetricFamilySamples(name, Type.GAUGE, getHelpMessage(dropwizardName, counter), Arrays.asList(sample))); <END> }</code><technical_language>Is metric name match timeseries name</technical_language>

Target:
MetricFamilySamples fromCounter(String dropwizardName, Counter counter) { MetricFamilySamples.Sample sample = sampleBuilder.createSample(dropwizardName, "", new ArrayList<String>(), new ArrayList<String>(), new Long(counter.getCount()).doubleValue()); return new MetricFamilySamples(sample.name, Type.GAUGE, getHelpMessage(dropwizardName, counter), Arrays.asList(sample)); }
Source:
<code>private static boolean checkImmutable(Class<?> type) { if (_ignoredClasses.containsKey(type)) return true; if (Modifier.isFinal(type.getModifiers())) { _ignoredClasses.put(type, Boolean.TRUE); return true; } if (_ignoredSuperClasses.size() > 0) { for (Class c = type; (c = c.getSuperclass()) != null;) { <START> if (_ignoredSuperClasses.containsKey(c)) <END> return true; } } return false; }</code><technical_language>add a cache</technical_language>

Target:
private static boolean checkImmutable(Class<?> type) { if (_ignoredClasses.containsKey(type)) return true; if (Modifier.isFinal(type.getModifiers())) { _ignoredClasses.put(type, Boolean.TRUE); return true; } if (_ignoredSuperClasses.size() > 0) { for (Class c = type; (c = c.getSuperclass()) != null;) { if (_ignoredSuperClasses.containsKey(c)) { _ignoredClasses.put(type, Boolean.TRUE); return true; } } } return false; }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof DnsResolverConfiguration)) { return false; } DnsResolverConfiguration that = (DnsResolverConfiguration) o; <START> return Objects.equals(getNameServers(), that.getNameServers()); <END> }</code><technical_language>'id' is part of equals</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof DnsResolverConfiguration)) { return false; } DnsResolverConfiguration that = (DnsResolverConfiguration) o; return Objects.equals(getId(), that.getId()) && Objects.equals(getNameServers(), that.getNameServers()); }
Source:
<code>public void createDatabase(Database database) { try { retry() .stopOn(AlreadyExistsException.class, InvalidObjectException.class, MetaException.class) .stopOnIllegalExceptions() .run("createDatabase", stats.getCreateDatabase().wrap(() -> { Optional<UgiAndDelegationToken> ut = withUGIAndToken(UserGroupInformation.getCurrentUser().getShortUserName()); if (ut.isPresent()) { <START> UserGroupInformationUtils.executeActionInDoAs(ut.get().ugi, () -> { <END> try (HiveMetastoreClient client = clientProvider.createMetastoreClientWithToken(ut.get().token.encodeToUrlString())) { client.createDatabase(database); } return null; }); } else { try (HiveMetastoreClient client = clientProvider.createMetastoreClient()) { client.createDatabase(database); } } return null; })); } catch (AlreadyExistsException e) { throw new SchemaAlreadyExistsException(database.getName()); } catch (TException e) { throw new PrestoException(HIVE_METASTORE_ERROR, e); } catch (Exception e) { throw propagate(e); } }</code><technical_language>static import executeActionInDoAs</technical_language>

Target:
public void createDatabase(Database database) { try { retry() .stopOn(AlreadyExistsException.class, InvalidObjectException.class, MetaException.class) .stopOnIllegalExceptions() .run("createDatabase", stats.getCreateDatabase().wrap(() -> wrapMetastoreCallable((HiveMetastoreClient client, ThriftHiveMetastoreStats stat) -> stat.getAlterDatabase().wrapCall(() -> { client.createDatabase(database); return null; })))); } catch (AlreadyExistsException e) { throw new SchemaAlreadyExistsException(database.getName()); } catch (TException e) { throw new PrestoException(HIVE_METASTORE_ERROR, e); } catch (Exception e) { throw propagate(e); } }
Source:
<code>private void receive() { new Thread(() -> { while (isActive) { DatagramPacket packet; byte[] buf = new byte[1024]; packet = new DatagramPacket(buf, buf.length); try { _socket.receive(packet); byte[] data = Arrays.copyOf(packet.getData(), packet.getLength()); ByteBuffer buffer = ByteBuffer.allocate(1024); buffer.order(ByteOrder.LITTLE_ENDIAN); buffer.put(data); buffer.rewind(); if (buffer.get() != 1) { return; } byte value = buffer.get(); Opcodes opcode = Opcodes.fromInteger(value); buffer.get(); switch (opcode) { case BROADCAST_POSITION_UPDATE: { <START> recievePositionUpdate(buffer); <END> } case BROADCAST_SCORE_UPDATE: { recieveScoreUpdate(buffer); } case BROADCAST_HEALTH_UPDATE: { recieveHealthUpdate(buffer); } default: break; } } catch (IOException e) { e.printStackTrace(); } } }).start(); }</code><technical_language>please name "readXX" do receive</technical_language>

Target:
private void receive() { new Thread(() -> { while (isActive) { DatagramPacket packet; byte[] buf = new byte[1024]; packet = new DatagramPacket(buf, buf.length); try { _socket.receive(packet); byte[] data = Arrays.copyOf(packet.getData(), packet.getLength()); ByteBuffer buffer = ByteBuffer.allocate(1024); buffer.order(ByteOrder.LITTLE_ENDIAN); buffer.put(data); buffer.rewind(); if (buffer.get() != 1) { return; } byte value = buffer.get(); Opcodes opcode = Opcodes.fromInteger(value); buffer.get(); switch (opcode) { case BROADCAST_POSITION_UPDATE: { readPositionUpdate(buffer); } case BROADCAST_SCORE_UPDATE: { readScoreUpdate(buffer); } case BROADCAST_HEALTH_UPDATE: { readHealthUpdate(buffer); } default: break; } } catch (IOException e) { e.printStackTrace(); } } }).start(); }
Source:
<code>void verify(SingleBackendCliTestRunner runner, TimestampService tss, long immutableTs, long prePunch, long postPunch, long lastFreshTs, boolean shouldTestImmutable) throws Exception; } @Test public void testWithoutFile() throws Exception { cliArgs.add("fetch"); if (isImmutable) { cliArgs.add("-i"); } cliArgs.add("-d"); runAndVerifyCli((runner, tss, immutableTs, prePunch, postPunch, lastFreshTs, shouldTestImmutable) -> { String output = runner.run(true, false); try { Scanner scanner = new Scanner(output); <START> scanner.nextLine(); END> long timestamp = getTimestampFromStdout(scanner); scanner.nextLine(); long wallClockTimestamp = getWallClockTimestamp(scanner); scanner.close(); if (shouldTestImmutable && isImmutable) { verifyImmutableTs(timestamp, immutableTs, prePunch, postPunch, lastFreshTs, tss.getFreshTimestamp(), wallClockTimestamp); } else { verifyFreshTs(timestamp, prePunch, postPunch, lastFreshTs, tss.getFreshTimestamp(), wallClockTimestamp); } } catch (RuntimeException e) { throw new RuntimeException("Failed " + e.getMessage() + " while processing result:\n" + output, e); } }); }</code><technical_language>instead check proper message is logged. Skipping is fine</technical_language>

Target:
void verify(SingleBackendCliTestRunner runner, TimestampService tss, long immutableTs, long prePunch, long postPunch, long lastFreshTs, boolean shouldTestImmutable) throws Exception; } @Test public void testWithoutFile() throws Exception { cliArgs.add("fetch"); if (isImmutable) { cliArgs.add("-i"); } cliArgs.add("-d"); runAndVerifyCli((runner, tss, immutableTs, prePunch, postPunch, lastFreshTs, shouldTestImmutable) -> { String output = runner.run(true, false); try { Scanner scanner = new Scanner(output); String shouldBeDeprecationLine = scanner.nextLine(); verifyDeprecation(shouldBeDeprecationLine); long timestamp = getTimestampFromStdout(scanner); scanner.nextLine(); long wallClockTimestamp = getWallClockTimestamp(scanner); scanner.close(); if (shouldTestImmutable && isImmutable) { verifyImmutableTs(timestamp, immutableTs, prePunch, postPunch, lastFreshTs, tss.getFreshTimestamp(), wallClockTimestamp); } else { verifyFreshTs(timestamp, prePunch, postPunch, lastFreshTs, tss.getFreshTimestamp(), wallClockTimestamp); } } catch (RuntimeException e) { throw new RuntimeException("Failed " + e.getMessage() + " while processing result:\n" + output, e); } }); }
Source:
<code>private void doInit(ExtMap input, ExtMap output) { try { this.ds = new DataSourceProvider(configuration).provide(); this.authorization = new Authorization(ds); this.tasks = new Tasks(ds, this.authorization); ExtensionUtils.checkDbVersion( ds.getConnection(), input.<ExtMap>get(Base.InvokeKeys.CONTEXT).<String>get(Base.ContextKeys.CONFIGURATION_FILE) ); output.put(Base.InvokeKeys.RESULT, Base.InvokeResult.SUCCESS); } catch (Exception ex) { LOG.debug("Exception", ex); output.put(Base.InvokeKeys.RESULT, Base.InvokeResult.FAILED); <START> output.put(Base.InvokeKeys.MESSAGE, ex.getMessage()); <END> } }</code><technical_language>again, regular exception handling? Authz.InvokeKeys.STATUS => Authz.Status.GENERAL_ERROR if command is FETCH_PRINCIPAL_RECORD QUERY_* (and for init/load exception)</technical_language>

Target:
private void doInit(ExtMap input, ExtMap output) throws SQLException, IOException { this.ds = new DataSourceProvider(configuration).provide(); this.authorization = new Authorization(ds); this.tasks = new Tasks(ds, this.authorization); ExtensionUtils.checkDbVersion( ds.getConnection(), input.<ExtMap>get(Base.InvokeKeys.CONTEXT).<String>get(Base.ContextKeys.CONFIGURATION_FILE) ); }
Source:
<code>public IOperation createOperation(VariableMap variableMap, OperationLogger logger) throws Exception { <START> String pairs = variableMap.getString("Porting RPCR ID Pairs"); <END> return new PortPairsOperation(logger, pairs); }</code><technical_language>argument getString supposed match displayName in xml? I suggest calling .trim() result of getString call a form of sanitization</technical_language>

Target:
public IOperation createOperation(VariableMap variableMap, OperationLogger logger) throws Exception { String pairs = variableMap.getString(PORT_NAME); return new PortPairsOperation(logger, pairs); }
Source:
<code>public void setClientOperations(final Client client) { ArgumentVerifier.assertNotNull(client, "Client"); <START> if(isRunning() && !clients.containsKey(client.getChannel()) && !client.isClosed() && client.getClientsSocketExecuter() == this) { <END> clients.putIfAbsent(client.getChannel(), client); } if(clients.containsKey(client.getChannel()) && !client.isClosed() && isRunning()) { if(client.getChannel().isConnectionPending()) { schedulerPool.execute(new AddToSelector(client, commonSelector, SelectionKey.OP_CONNECT)); } else if(client.canWrite() && client.canRead()) { schedulerPool.execute(new AddToSelector(client, commonSelector, SelectionKey.OP_WRITE|SelectionKey.OP_READ)); } else if (client.canRead()){ schedulerPool.execute(new AddToSelector(client, commonSelector, SelectionKey.OP_READ)); } else if (client.canWrite()){ schedulerPool.execute(new AddToSelector(client, commonSelector, SelectionKey.OP_WRITE)); } else { schedulerPool.execute(new AddToSelector(client, commonSelector, 0)); } commonSelector.wakeup(); } else if(client.isClosed()) { clients.remove(client.getChannel()); } }</code><technical_language>weird checking if contains key, a putIfAbsent call. do putIfAbsent check if returns existing reference (and if does, put failed)</technical_language>

Target:
public void setClientOperations(final Client client) { ArgumentVerifier.assertNotNull(client, "Client"); if(!clients.containsKey(client.getChannel()) || client.isClosed()) { clients.remove(client.getChannel()); return; } if(client.getChannel().isConnectionPending()) { schedulerPool.execute(new AddToSelector(client, commonSelector, SelectionKey.OP_CONNECT)); } else if(client.canWrite() && client.canRead()) { schedulerPool.execute(new AddToSelector(client, commonSelector, SelectionKey.OP_WRITE|SelectionKey.OP_READ)); } else if (client.canRead()){ schedulerPool.execute(new AddToSelector(client, commonSelector, SelectionKey.OP_READ)); } else if (client.canWrite()){ schedulerPool.execute(new AddToSelector(client, commonSelector, SelectionKey.OP_WRITE)); } else { schedulerPool.execute(new AddToSelector(client, commonSelector, 0)); } commonSelector.wakeup(); }
Source:
<code>public CloseableIterator<K> iterator() { return new RemovableCloseableIterator<>( <START> new CloseableIteratorMapper<>(retrieveEntries(null, batchSize), e -> (K) e.getKey()), <END> RemoteCacheImpl.this::remove); }</code><technical_language>some filter-converter drop values wire</technical_language>

Target:
public CloseableIterator<K> iterator() { return new RemovableCloseableIterator<>( new CloseableIteratorMapper<>(retrieveEntries( "org.infinispan.server.hotrod.HotRodServer$ToEmptyBytesKeyValueFilterConverter", batchSize), e -> (K) e.getKey()), RemoteCacheImpl.this::remove); }
Source:
<code>public boolean schemaExists() throws Exception { <START> final Connection db = getConnection(); <END> final String sql = "select * from " + this.table + " limit 1"; db.setAutoCommit(false); try (final PreparedStatement test = db.prepareStatement(sql)) { try (final ResultSet rs = test.executeQuery()) { rs.next(); } db.commit(); return true; } catch (Exception e) { db.rollback(); return false; } finally { db.setAutoCommit(true); } }</code><technical_language>this beginTransaction verifyConnection ? Similar in other class methods</technical_language>

Target:
public boolean schemaExists() throws Exception { final String sql = "select * from " + this.table + " limit 1"; beginTransaction(); try (final PreparedStatement test = getConnection().prepareStatement(sql)) { try (final ResultSet rs = test.executeQuery()) { rs.next(); } commitTransaction(); return true; } catch (Exception e) { rollbackTransaction(); return false; } }
Source:
<code>private void discoverGeoRepDataInCluster(VDSGroup cluster, String volumeName) { if (!supportsGlusterGeoRepFeature(cluster)) { return; } Map<String, GlusterGeoRepSession> sessionsMap = getSessionsFromCLI(cluster, volumeName); if (sessionsMap == null) { <START> log.debug("Error in retrieving sessions for cluster: from CLI, nothing to do", cluster.getName()); <END> return; } updateDiscoveredSessions(cluster, sessionsMap); }</code><technical_language>debug? if i run app in debug mode, ok i in this case</technical_language>

Target:
private void discoverGeoRepDataInCluster(VDSGroup cluster, String volumeName) { if (!supportsGlusterGeoRepFeature(cluster)) { return; } Map<String, GlusterGeoRepSession> sessionsMap = getSessionsFromCLI(cluster, volumeName); if (sessionsMap == null) { log.debug("No sessions retrieved for cluster: from CLI, nothing to do", cluster.getName()); return; } updateDiscoveredSessions(cluster, sessionsMap); }
Source:
<code>public FileFilter createFileFilter() { return new FileFilter() { @Override public boolean accept(File file) { String name = file.getName(); <START> return name.endsWith(".ex") || name.endsWith(".exs"); <END> } }; }</code><technical_language>[x] This [*_SOURCE_EXTENSION constants](<LINK_0> constants span more file, need moved a separate file theses files static import</technical_language>

Target:
public FileFilter createFileFilter() { return new FileFilter() { @Override public boolean accept(File file) { String name = file.getName(); return FileUtilRt.extensionEquals(name, ElixirBuilder.ELIXIR_SOURCE_EXTENSION) || FileUtilRt.extensionEquals(name, ElixirBuilder.ELIXIR_SCRIPT_EXTENSION); } }; }
Source:
<code>public void getLunConnectionsForFC() { LUNs lun = new LUNs(); <START> ArrayList<StorageServerConnections> connections = new ArrayList<StorageServerConnections>(); <END> lun.setLunConnections(connections); Map<StorageType, List<StorageServerConnections>> connectionsByType = StorageHelperBase.filterLUNsByStorageType(lun); assertTrue("Map of storage connections should be empty.", connectionsByType.isEmpty()); }</code><technical_language>this declared a List</technical_language>

Target:
public void getLunConnectionsForFC() { LUNs lun = new LUNs(); ArrayList<StorageServerConnections> connections = new ArrayList<StorageServerConnections>(); lun.setLunConnections(connections); Map<StorageType, List<StorageServerConnections>> connectionsByType = StorageHelperBase.filterConnectionsByStorageType(lun); assertTrue("Map of storage connections should be empty.", connectionsByType.isEmpty()); }