auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private <T extends Plugin> List<T> loadInternal(@NonNull Class<T> clazz, Predicate<T> shouldLoadPredicate) { List<T> plugins = new ArrayList<>(); final ServiceLoader<T> serviceLoader = ServiceLoader.load(clazz, getClass().getClassLoader()); if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "ServicePluginLoader loading services from ServiceLoader : " + serviceLoader); for (final Iterator<T> iterator = serviceLoader.iterator(); iterator.hasNext(); ) { try { final T plugin = iterator.next(); if (ACRA.DEV_LOGGING) ACRA.log.d(ACRA.LOG_TAG, "Found plugin : " + plugin); if (shouldLoadPredicate.apply(plugin)) { if (ACRA.DEV_LOGGING) ACRA.log.d(ACRA.LOG_TAG, "Loaded " + clazz.getSimpleName() + " of type " + plugin.getClass().getName()); plugins.add(plugin); } else { if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "Ignoring disabled " + clazz.getSimpleName() + " of type " + plugin.getClass().getSimpleName()); } } catch (ServiceConfigurationError e) { ACRA.log.e(ACRA.LOG_TAG, "Unable to load " + clazz.getSimpleName(), e); } } if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "Found services (" + plugins + ") for class : " + clazz); return plugins; }

Target:
private <T extends Plugin> List<T> loadInternal(@NonNull Class<T> clazz, Predicate<T> shouldLoadPredicate) { List<T> plugins = new ArrayList<>(); final ServiceLoader<T> serviceLoader = ServiceLoader.load(clazz, getClass().getClassLoader()); if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "ServicePluginLoader loading services from ServiceLoader : " + serviceLoader); for (final Iterator<T> iterator = serviceLoader.iterator(); iterator.hasNext(); ) { try { final T plugin = iterator.next(); if (shouldLoadPredicate.apply(plugin)) { if (ACRA.DEV_LOGGING) ACRA.log.d(ACRA.LOG_TAG, "Loaded " + clazz.getSimpleName() + " of type " + plugin.getClass().getName()); plugins.add(plugin); } else { if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "Ignoring disabled " + clazz.getSimpleName() + " of type " + plugin.getClass().getSimpleName()); } } catch (ServiceConfigurationError e) { ACRA.log.e(ACRA.LOG_TAG, "Unable to load " + clazz.getSimpleName(), e); } } if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "Found services (" + plugins + ") for class : " + clazz); return plugins; }
Source:
protected @NonNull ITmfStateProvider createStateProvider() { ITmfTrace trace = getTrace(); if (!(trace instanceof LttngKernelTrace)) { throw new IllegalStateException("LttngKernelStateSystemModule: trace should be of type LttngKernelTrace"); } return new LttngKernelStateProvider((LttngKernelTrace) trace); }

Target:
protected @NonNull ITmfStateProvider createStateProvider() { return new LttngKernelStateProvider(getTrace()); }
Source:
public void writeRecord(E record) throws IOException { if (currentBuffer == null) { this.currentBuffer = this.dispatcher.take(SortStage.READ); if (!currentBuffer.getBuffer().isEmpty()) { throw new IOException("New buffer is not empty."); } } InMemorySorter<E> sorter = currentBuffer.getBuffer(); long occupancyPreWrite = sorter.getOccupancy(); if (!sorter.write(record)) { long recordSize = sorter.getCapacity() - occupancyPreWrite; signalSpillingIfNecessary(recordSize); boolean isLarge = occupancyPreWrite == 0; if (isLarge) { writeLarge(record, sorter); this.currentBuffer.getBuffer().reset(); } else { this.dispatcher.send(SortStage.SORT, currentBuffer); this.currentBuffer = null; writeRecord(record); } } else { long recordSize = sorter.getOccupancy() - occupancyPreWrite; signalSpillingIfNecessary(recordSize); } }

Target:
public void writeRecord(E record) throws IOException, InterruptedException { if (currentBuffer == null) { this.currentBuffer = this.dispatcher.take(SortStage.READ); if (!currentBuffer.getBuffer().isEmpty()) { throw new IOException("New buffer is not empty."); } } InMemorySorter<E> sorter = currentBuffer.getBuffer(); long occupancyPreWrite = sorter.getOccupancy(); if (!sorter.write(record)) { long recordSize = sorter.getCapacity() - occupancyPreWrite; signalSpillingIfNecessary(recordSize); boolean isLarge = occupancyPreWrite == 0; if (isLarge) { writeLarge(record, sorter); this.currentBuffer.getBuffer().reset(); } else { this.dispatcher.send(SortStage.SORT, currentBuffer); this.currentBuffer = null; writeRecord(record); } } else { long recordSize = sorter.getOccupancy() - occupancyPreWrite; signalSpillingIfNecessary(recordSize); } }
Source:
public InterfaceConfiguration getInterfaceConfig(String iface) { mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); final InterfaceConfigurationParcel result; try { result = mNetdService.interfaceGetCfg(iface); } catch (RemoteException | ServiceSpecificException e) { throw new IllegalStateException(e); } InterfaceConfiguration cfg; try { cfg = new InterfaceConfiguration(); cfg.setHardwareAddress(result.hwAddr); InetAddress addr = null; try { addr = NetworkUtils.numericToInetAddress(result.addr); } catch (IllegalArgumentException iae) { Slog.e(TAG, "Failed to parse ipaddr", iae); } cfg.setLinkAddress(new LinkAddress(addr, result.prefixLength)); for (String flag : result.flags) { cfg.setFlag(flag); } } catch (NoSuchElementException nsee) { throw new IllegalStateException("Invalid response from binder"); } return cfg; }

Target:
public InterfaceConfiguration getInterfaceConfig(String iface) { mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); final InterfaceConfigurationParcel result; try { result = mNetdService.interfaceGetCfg(iface); } catch (RemoteException | ServiceSpecificException e) { throw new IllegalStateException(e); } try { final InterfaceConfiguration cfg = InterfaceConfiguration.fromParcel(result); return cfg; } catch (IllegalArgumentException iae) { throw new IllegalStateException("Failed to parse ipaddr", iae); } }
Source:
public void setFanSpeed(final int fanSpeed) { mDataStore.setFanSpeed(fanSpeed); final AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() { int newFanSpeed; protected Void doInBackground(Void... unused) { if (mHvacManager != null) { int zone = SEAT_ALL; try { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Setting fanspeed to: " + fanSpeed); } mHvacManager.setIntProperty( CarHvacManager.ID_ZONED_FAN_SPEED_SETPOINT, zone, fanSpeed); newFanSpeed = mHvacManager.getIntProperty( CarHvacManager.ID_ZONED_FAN_SPEED_SETPOINT, zone); } catch (android.car.CarNotConnectedException e) { Log.e(TAG, "Car not connected in setFanSpeed"); } catch (IllegalStateException e) { Log.e(TAG, "IllegalStateException: Car can not setFanSpeed in current state: power off"); } } return null; } @Override protected void onPostExecute(final Void result) { Log.e(TAG, "postExecute new fanSpeed: " + newFanSpeed); } }; task.execute(); }

Target:
public void setFanSpeed(final int fanSpeed) { mDataStore.setFanSpeed(fanSpeed); final AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() { int newFanSpeed; protected Void doInBackground(Void... unused) { if (mHvacManager != null) { int zone = SEAT_ALL; try { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Setting fanspeed to: " + fanSpeed); } mHvacManager.setIntProperty( CarHvacManager.ID_ZONED_FAN_SPEED_SETPOINT, zone, fanSpeed); newFanSpeed = mHvacManager.getIntProperty( CarHvacManager.ID_ZONED_FAN_SPEED_SETPOINT, zone); } catch (android.car.CarNotConnectedException e) { Log.e(TAG, "Car not connected in setFanSpeed"); } catch (IllegalStateException e) { Log.e(TAG, "Car is in illegal state when setFanSpeed"); } } return null; } @Override protected void onPostExecute(final Void result) { Log.e(TAG, "postExecute new fanSpeed: " + newFanSpeed); } }; task.execute(); }
Source:
public ChallangeResponse getChallangeResponseFromHeader(final String challangeHeaderValue, final String endpoint) throws UnsupportedEncodingException, UnexpectedServerResponseException { ChallangeRequest request = getChallangeRequestFromHeader(challangeHeaderValue); request.mSubmitUrl = endpoint; return getDeviceCertResponse(request); }

Target:
public ChallangeResponse getChallangeResponseFromHeader(final String challangeHeaderValue, final String endpoint) throws UnsupportedEncodingException, AuthenticationServerProtocolException { ChallangeRequest request = getChallangeRequestFromHeader(challangeHeaderValue); request.mSubmitUrl = endpoint; return getDeviceCertResponse(request); }
Source:
Map<byte[], List<byte[]>> findRegionsToForceFlush() throws IOException { Map<byte[], List<byte[]>> regions = null; int logCount = getNumRolledLogFiles(); if (logCount > this.maxLogs && logCount > 0) { Map.Entry<Path, WalProps> firstWALEntry = this.walFile2Props.firstEntry(); regions = this.sequenceIdAccounting.findLower(firstWALEntry.getValue().encodedName2HighestSequenceId); } if (regions != null) { List<String> listForPrint = new ArrayList(); for (Map.Entry<byte[], List<byte[]>> r : regions.entrySet()) { StringBuffer families = new StringBuffer(); for (int i = 0; i < r.getValue().size(); i++) { if (i > 0) { families.append("|"); } families.append(Bytes.toString(r.getValue().get(i))); } listForPrint.add(Bytes.toStringBinary(r.getKey()) + "[" + families.toString() + "]"); } LOG.info("Too many WALs; count=" + logCount + ", max=" + this.maxLogs + "; forcing flush partial stores of " + regions.size() + " region(s): " + StringUtils.join(",", listForPrint)); } return regions; }

Target:
Map<byte[], List<byte[]>> findRegionsToForceFlush() throws IOException { Map<byte[], List<byte[]>> regions = null; int logCount = getNumRolledLogFiles(); if (logCount > this.maxLogs && logCount > 0) { Map.Entry<Path, WalProps> firstWALEntry = this.walFile2Props.firstEntry(); regions = this.sequenceIdAccounting.findLower(firstWALEntry.getValue().encodedName2HighestSequenceId); } if (regions != null) { List<String> listForPrint = new ArrayList(); for (Map.Entry<byte[], List<byte[]>> r : regions.entrySet()) { StringBuilder families = new StringBuilder(); for (int i = 0; i < r.getValue().size(); i++) { if (i > 0) { families.append(","); } families.append(Bytes.toString(r.getValue().get(i))); } listForPrint.add(Bytes.toStringBinary(r.getKey()) + "[" + families.toString() + "]"); } LOG.info("Too many WALs; count=" + logCount + ", max=" + this.maxLogs + "; forcing (partial) flush of " + regions.size() + " region(s): " + StringUtils.join(",", listForPrint)); } return regions; }
Source:
public void deleteAuthorizationSuccessTest() throws Exception { short[] accountIds = {-1, Utils.getRandomShort(TestUtils.RANDOM), -1}; short[] containerIds = {-1, -1, Utils.getRandomShort(TestUtils.RANDOM)}; for (int i = 0; i < accountIds.length; i++) { MockId mockId = putSingleBlob(UtilsTest.getRandomString(10), accountIds[i], containerIds[i]); MessageInfo info = new MessageInfo(mockId, DELETE_RECORD_SIZE, Utils.getRandomShort(TestUtils.RANDOM), Utils.getRandomShort(TestUtils.RANDOM), System.currentTimeMillis()); MessageWriteSet writeSet = new MockMessageWriteSet(Collections.singletonList(info), Collections.singletonList(ByteBuffer.allocate(DELETE_RECORD_SIZE))); store.delete(writeSet); verifyDeleteFailure(mockId, StoreErrorCodes.ID_Deleted); } }

Target:
public void deleteAuthorizationSuccessTest() throws Exception { short[] accountIds = {-1, Utils.getRandomShort(TestUtils.RANDOM), -1}; short[] containerIds = {-1, -1, Utils.getRandomShort(TestUtils.RANDOM)}; for (int i = 0; i < accountIds.length; i++) { MockId mockId = put(1, PUT_RECORD_SIZE, Utils.Infinite_Time, accountIds[i], containerIds[i]).get(0); delete( new MockId(mockId.getID(), Utils.getRandomShort(TestUtils.RANDOM), Utils.getRandomShort(TestUtils.RANDOM))); verifyDeleteFailure(mockId, StoreErrorCodes.ID_Deleted); } }
Source:
public void insert(MUIElement toInsert, MUIElement relTo, int swtSide, float ratio) { int pct = (int) (ratio * 10000); insert(toInsert, relTo, swtSide, pct); }

Target:
private void insert(MUIElement toInsert, MUIElement relTo, int swtSide, float ratio) { int pct = (int) (ratio * 10000); insert(toInsert, relTo, swtSide, pct); }
Source:
protected SamLocusIterator getLocusIterator(final SamReader in) { if(INTERVALS != null){ IOUtil.assertFileIsReadable(INTERVALS); return new SamLocusIterator(in, IntervalList.fromFile(INTERVALS)); } return new SamLocusIterator(in); }

Target:
protected SamLocusIterator getLocusIterator(final SamReader in) { return (INTERVALS != null) ? new SamLocusIterator(in, IntervalList.fromFile(INTERVALS)) : new SamLocusIterator(in); }
Source:
public void doFilter(RefUpdatedEvent hook) throws IOException { String gitComment = getComment(hook.refUpdate.project, hook.refUpdate.newRev); log.debug("Git commit " + hook.refUpdate.newRev + ": " + gitComment); URL gitUrl = getGitUrl(hook); if (gitUrl == null) { return; } String[] issues = getIssueIds(gitComment); for (String issue : issues) { log.debug("Adding GitWeb URL " + gitUrl + " to issue " + issue); its.addRelatedLink(issue, gitUrl, "Git: " + hook.refUpdate.newRev); } }

Target:
public void doFilter(RefUpdatedEvent hook) throws IOException { String gitComment = getComment(hook.refUpdate.project, hook.refUpdate.newRev); log.debug("Git commit " + hook.refUpdate.newRev + ": " + gitComment); URL gitUrl = getGitUrl(hook); if (gitUrl != null) { String[] issues = getIssueIds(gitComment); for (String issue : issues) { log.debug("Adding GitWeb URL " + gitUrl + " to issue " + issue); its.addRelatedLink(issue, gitUrl, "Git: " + hook.refUpdate.newRev); } } }
Source:
public SimpleRangeStats getRangeStatsOfAllRanges(final RangeFacetExpression<T> facetExpression) { final String facetResultPath = facetExpression.resultPath(); final boolean facetIsOfTypeAllRanges = Optional.ofNullable(facetExpression.value()) .map(v -> v.trim().equals(":range(* to \"0\"),(\"0\" to *)")) .orElse(false); if (facetIsOfTypeAllRanges) { final RangeFacetResult facetResult = getRangeFacetResult(facetResultPath); return getSimpleRangeStats(facetResult.getRanges()); } else { throw new ClassCastException("Facet result is not of type RangeFacetResult for all ranges, i.e. (* to \"0\"),(\"0\" to *): " + facetResultPath); } }

Target:
public SimpleRangeStats getRangeStatsOfAllRanges(final RangeFacetExpression<T> facetExpression) { final String facetResultPath = facetExpression.resultPath(); final boolean facetIsOfTypeAllRanges = Optional.ofNullable(facetExpression.value()) .map(v -> v.trim().equals(":range(* to \"0\"),(\"0\" to *)")) .orElse(false); if (facetIsOfTypeAllRanges) { final RangeFacetResult facetResult = getRangeFacetResult(facetResultPath); return getSimpleRangeStats(facetResult.getRanges()); } else { throw new IllegalArgumentException("Facet result is not of type RangeFacetResult for all ranges, i.e. (* to \"0\"),(\"0\" to *): " + facetResultPath); } }
Source:
protected void performDefaults() { for (String[] element : fAppearanceColorListModel) { String key = element[1]; PreferenceConverter.setValue(getPreferenceStore(), key, PreferenceConverter.getDefaultColor(getPreferenceStore(), key)); } handleAppearanceColorListSelection(); super.performDefaults(); }

Target:
protected void performDefaults() { for (String[] colorModel : fAppearanceColorListModel) { String key = colorModel[1]; PreferenceConverter.setValue(getPreferenceStore(), key, PreferenceConverter.getDefaultColor(getPreferenceStore(), key)); } handleAppearanceColorListSelection(); super.performDefaults(); }
Source:
public void completeIntent(Plugin plugin) { Preconditions.checkState( intents.containsKey( plugin ) && intents.get( plugin ).get() != 0, "Plugin %s has not registered intents for event %s", plugin, this ); if ( intents.get( plugin ).decrementAndGet() == 0 ) { if ( fired.get() ) { if ( latch.decrementAndGet() == 0 ) { done.done( (T) this, null ); } } else { latch.decrementAndGet(); } } }

Target:
public void completeIntent(Plugin plugin) { AtomicInteger intentCount = intents.get( plugin ); Preconditions.checkState( intentCount != null && intentCount.get() > 0, "Plugin %s has not registered intents for event %s", plugin, this ); intentCount.decrementAndGet(); if ( fired.get() ) { if ( latch.decrementAndGet() == 0 ) { done.done( (T) this, null ); } } else { latch.decrementAndGet(); } }
Source:
private static String generateRandomStringWithLength(int length) { byte[] array = new byte[length]; ThreadLocalRandom.current().nextBytes(array); return new String(array, Charset.forName("UTF-8")); }

Target:
private static String generateRandomStringWithLength(int length) { byte[] array = new byte[length]; ThreadLocalRandom.current().nextBytes(array); return new String(array, UTF_8); }
Source:
protected Optional<Producer<K, V>> maybeGetKafkaProducer(DatastreamTask task) { Producer<K, V> producer = _kafkaProducer; if (producer == null) { producer = initializeProducer(task); } return Optional.ofNullable(producer); }

Target:
private Optional<Producer<K, V>> maybeGetKafkaProducer(DatastreamTask task) { Producer<K, V> producer = _kafkaProducer; if (producer == null) { producer = initializeProducer(task); } return Optional.ofNullable(producer); }
Source:
private static ResourceMapping[] getResourceMappings(IResource[] resources) { List<ResourceMapping> result = new ArrayList<ResourceMapping>(); for (IResource resource : resources) { result.add(getResourceMapping(resource)); } return result.toArray(new ResourceMapping[result.size()]); }

Target:
private static ResourceMapping[] getResourceMappings(IResource[] resources) { List<ResourceMapping> result = new ArrayList<ResourceMapping>(); for (IResource resource : resources) result.add(getResourceMapping(resource)); return result.toArray(new ResourceMapping[result.size()]); }
Source:
protected String getFilterString() { String filterString = super.getFilterString(); if (filterString.indexOf("*") != 0 && filterString.indexOf("?") != 0 && filterString.indexOf(".") != 0) { filterString = "*" + filterString; } return filterString; }

Target:
protected String getFilterString() { String filterString = super.getFilterString(); if (!filterText.getText().equals(initialText) && filterString.indexOf("*") != 0 && filterString.indexOf("?") != 0 && filterString.indexOf(".") != 0) { filterString = "*" + filterString; } return filterString; }
Source:
private void checkLocationServiceStatus() { LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); boolean gps = false; boolean network = false; try{ gps = lm.isProviderEnabled(LocationManager.GPS_PROVIDER); }catch(Exception ex){ } try{ network = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER); }catch(Exception ex){ } if (!gps && !network) { promptLocationService(); } }

Target:
private void checkLocationServiceStatus() { LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); boolean gps = lm.isProviderEnabled(LocationManager.GPS_PROVIDER); boolean network = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER); if (!gps && !network) { promptLocationService(); } }
Source:
public boolean add(Node<A, S> node) { while(stateNodeMap.containsKey(node.state())) { Node<A,S> toDelete = (stateNodeMap.get(node.state())).higher(node); if(toDelete == null) { break; } remove(toDelete); } boolean inserted = queue.add(node); if (inserted) { addToStateNodeMap(node.state(), node); } return inserted; }

Target:
public boolean add(Node<A, S> node) { removeNodesOfLowerPriority(node); if(contains(node)) { incrementCount(node); return true; } boolean inserted = queue.add(node); if (inserted) { incrementCount(node); inserted = addToStateNodeMap(node.state(), node); } return inserted; }
Source:
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String tenant = null; HttpServletRequest req = (HttpServletRequest) request; HttpSession session = req.getSession(); String studyOid = req.getHeader("studyOid"); if (StringUtils.isEmpty(studyOid)) { tenant = getRequestSchema(req, session); if (StringUtils.isEmpty(tenant)) { if (req.getAttribute(CURRENT_TENANT_ID) != null) { tenant = (String) req.getAttribute(CURRENT_TENANT_ID); } else if (session != null && session.getAttribute(CURRENT_TENANT_ID) != null) { tenant = (String) session.getAttribute(CURRENT_TENANT_ID); } } } else { request.setAttribute("studyOid", studyOid); } if (StringUtils.isEmpty(tenant)) { tenant = defaultTenant; } req.setAttribute(tenantKey, tenant); if (session != null) { session.setAttribute(tenantKey, tenant); } request.setAttribute("enableEmbeddedReports", CoreResources.getField("insight.enableEmbeddedReports")); chain.doFilter(req, response); }

Target:
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String tenant = null; HttpServletRequest req = (HttpServletRequest) request; HttpSession session = req.getSession(); String studyOid = req.getHeader("studyOid"); if (StringUtils.isEmpty(studyOid)) { tenant = getRequestSchema(req, session); if (StringUtils.isEmpty(tenant)) { if (req.getAttribute(CURRENT_TENANT_ID) != null) { tenant = (String) req.getAttribute(CURRENT_TENANT_ID); } else if (session != null && session.getAttribute(CURRENT_TENANT_ID) != null) { tenant = (String) session.getAttribute(CURRENT_TENANT_ID); } } } else { request.setAttribute("studyOid", studyOid); } if (StringUtils.isEmpty(tenant)) { tenant = defaultTenant; } req.setAttribute(tenantKey, tenant); if (session != null) { session.setAttribute(tenantKey, tenant); } request.setAttribute("enableEmbeddedReports", CoreResources.getField("enableEmbeddedReports")); chain.doFilter(req, response); }
Source:
public void scrollToElement(WebElement element, int offset) { js.executeScript( "window.scroll(0, " + (element.getLocation().getY() - offset) + ");" ); }

Target:
public void scrollToElement(WebElement element, int offset) { int elementPosition = element.getLocation().getY() - offset; js.executeScript( "window.scroll(0,arguments[0])", elementPosition ); }
Source:
public static boolean validate(final String rule) throws InvalidParameterValueException { if (Strings.isNullOrEmpty(rule) || !rule.matches(ALLOWED_PATTERN)) { throw new InvalidParameterValueException("Invalid rule provided. Only API names and wildcards are allowed."); } return true; }

Target:
private static boolean validate(final String rule) { if (Strings.isNullOrEmpty(rule) || !ALLOWED_PATTERN.matcher(rule).matches()) { throw new InvalidParameterValueException("Only API names and wildcards are allowed, invalid rule provided: " + rule); } return true; }
Source:
public List<MetricFamilySamples> collect() { ArrayList<MetricFamilySamples> samples = new ArrayList<MetricFamilySamples>(); for (PublicMetrics publicMetrics : this.publicMetrics) { for (Metric<?> metric : publicMetrics.metrics()) { String name = Collector.sanitizeMetricName(metric.getName()); double value = metric.getValue().doubleValue(); MetricFamilySamples metricFamilySamples = new MetricFamilySamples( name, Type.GAUGE, name, Collections.singletonList( new MetricFamilySamples.Sample( name, new ArrayList<String>(), new ArrayList<String>(), value) ) ); samples.add(metricFamilySamples); } } return samples; }

Target:
public List<MetricFamilySamples> collect() { ArrayList<MetricFamilySamples> samples = new ArrayList<MetricFamilySamples>(); for (PublicMetrics publicMetrics : this.publicMetrics) { for (Metric<?> metric : publicMetrics.metrics()) { String name = Collector.sanitizeMetricName(metric.getName()); double value = metric.getValue().doubleValue(); MetricFamilySamples metricFamilySamples = new MetricFamilySamples( name, Type.GAUGE, name, Collections.singletonList( new MetricFamilySamples.Sample(name, Collections.<String>emptyList(), Collections.<String>emptyList(), value))); samples.add(metricFamilySamples); } } return samples; }
Source:
public void before() throws IOException { conf = new Configuration(); shell = new FsShell(conf); lfs = FileSystem.getLocal(conf); testRootDir = lfs.makeQualified(new Path(GenericTestUtils.getTempPath( "testFsShellCopy"))); if (lfs.exists(testRootDir)) { lfs.delete(testRootDir, true); } lfs.mkdirs(testRootDir); lfs.setWorkingDirectory(testRootDir); dstPath = new Path(testRootDir, "dstFile"); lfs.create(dstPath).close(); Random random = new Random(); for (int i = 0; i < 10; i++) { OutputStream out = lfs.create(new Path(testRootDir, "file-" + i)); out.write(random.nextInt()); out.close(); } }

Target:
public void before() throws IOException { conf = new Configuration(); shell = new FsShell(conf); lfs = FileSystem.getLocal(conf); testRootDir = lfs.makeQualified(new Path(GenericTestUtils.getTempPath( "testFsShellCopy"))); lfs.delete(testRootDir, true); lfs.mkdirs(testRootDir); lfs.setWorkingDirectory(testRootDir); dstPath = new Path(testRootDir, "dstFile"); lfs.create(dstPath).close(); Random random = new Random(); for (int i = 0; i < 10; i++) { OutputStream out = lfs.create(new Path(testRootDir, String.format("file-%02d", i))); out.write(random.nextInt()); out.close(); } }
Source:
private static Caching create(String name, int ttl, List<CachingRule> rules) { return builder().name(name).ttl(ttl).rules(rules).build(); }

Target:
static Caching create(String name, int ttl, List<CachingRule> rules) { return builder().name(name).ttl(ttl).rules(rules).build(); }
Source:
public void setBounds(int x, int y, int width, int height) { Dimension previousSize = getSize(); super.setBounds(x, y, width, height); Dimension currentSize = getSize(); synchronized (myGraphicsLayoutRendererLock) { if (myGraphicsLayoutRenderer != null && !currentSize.equals(previousSize)) { myGraphicsLayoutRenderer.setSize(width, (myCurrentWidth < width) ? 1 : height); myCurrentWidth = width; } } }

Target:
public void setBounds(int x, int y, int width, int height) { Dimension previousSize = getSize(); super.setBounds(x, y, width, height); Dimension currentSize = getSize(); synchronized (myGraphicsLayoutRendererLock) { if (myGraphicsLayoutRenderer != null && !currentSize.equals(previousSize)) { myGraphicsLayoutRenderer.setSize(width, 1); } } }
Source:
public IAnswerData getAnswer(){ if(monthTxt.getText().toString().equals("") || dayTxt.getText().toString().equals("") || yearTxt.getText().toString().equals("")){ setFocus(getContext()); return new InvalidData(Localization.get("empty.fields"), new DateData(selectedDate.getTime())); } if(Integer.parseInt(yearTxt.getText().toString()) < MIN_YEAR){ setFocus(getContext()); return new InvalidData(Localization.get("low.year"), new DateData(selectedDate.getTime())); } if(!monthList.contains(monthTxt.getText().toString())){ setFocus(getContext()); return new InvalidData(Localization.get("invalid.month"), new DateData(selectedDate.getTime())); } if(Integer.parseInt(dayTxt.getText().toString()) > selectedDate.getActualMaximum(Calendar.DAY_OF_MONTH)){ setFocus(getContext()); return new InvalidData(Localization.get("high.date") + String.valueOf(selectedDate.getActualMaximum(Calendar.DAY_OF_MONTH)), new DateData(selectedDate.getTime())); } if(Integer.parseInt(yearTxt.getText().toString()) > maxYear){ setFocus(getContext()); return new InvalidData(Localization.get("high.year") + String.valueOf(maxYear), new DateData(selectedDate.getTime())); } return super.getAnswer(); }

Target:
public IAnswerData getAnswer(){ setFocus(getContext()); String month = (String) monthSpinner.getSelectedItem(); String day = dayText.getText().toString(); String year = yearText.getText().toString(); if(month.isEmpty() && day.isEmpty() && year.isEmpty()){ return null; } if(month.isEmpty() || day.isEmpty() || year.isEmpty()){ return new InvalidDateData(Localization.get("calendar.empty.fields"), new DateData(calendar.getTime()), day, month, year); } if(Integer.parseInt(year) < MINYEAR){ return new InvalidDateData(Localization.get("calendar.low.year"), new DateData(calendar.getTime()), day, month, year); } if(Integer.parseInt(day) > calendar.getActualMaximum(Calendar.DAY_OF_MONTH)){ return new InvalidDateData(Localization.get("calendar.high.date") + " " + String.valueOf(calendar.getActualMaximum(Calendar.DAY_OF_MONTH)), new DateData(calendar.getTime()), day, month, year); } if(Integer.parseInt(day)< 1){ return new InvalidDateData(Localization.get("calendar.low.date"), new DateData(calendar.getTime()), day, month, year); } if(Integer.parseInt(year) > maxYear){ return new InvalidDateData(Localization.get("calendar.high.year") + " " + String.valueOf(maxYear), new DateData(calendar.getTime()), day, month, year); } return super.getAnswer(); }
Source:
public void setRunningForecastsToFailed(String jobId, ActionListener<Boolean> listener) { QueryBuilder forecastQuery = QueryBuilders.boolQuery() .filter(QueryBuilders.termQuery(Result.RESULT_TYPE.getPreferredName(), ForecastRequestStats.RESULT_TYPE_VALUE)) .filter(QueryBuilders.termQuery(Job.ID.getPreferredName(), jobId)) .filter(QueryBuilders.termsQuery(ForecastRequestStats.STATUS.getPreferredName(), ForecastRequestStats.ForecastRequestStatus.SCHEDULED.toString(), ForecastRequestStats.ForecastRequestStatus.STARTED.toString())); UpdateByQueryRequest request = new UpdateByQueryRequest(AnomalyDetectorsIndex.resultsWriteAlias(jobId)) .setQuery(forecastQuery) .setIndicesOptions(IndicesOptions.lenientExpandOpen()) .setAbortOnVersionConflict(false) .setMaxRetries(3) .setRefresh(true) .setScript(new Script("ctx._source.forecast_status='failed'")); client.execute(UpdateByQueryAction.INSTANCE, request, ActionListener.wrap( response -> { LOGGER.info("[{}] set forecasts to failed", jobId, response.getUpdated()); if (response.getBulkFailures().size() > 0) { LOGGER.warn( "[{}] failed to set forecasts to failed. Bulk failures experienced {}", jobId, response.getTotal() - response.getUpdated(), response.getBulkFailures().stream().map(BulkItemResponse.Failure::getMessage).collect(Collectors.toList()) ); } listener.onResponse(true); }, listener::onFailure )); }

Target:
public void setRunningForecastsToFailed(String jobId, ActionListener<Boolean> listener) { QueryBuilder forecastQuery = QueryBuilders.boolQuery() .filter(QueryBuilders.termQuery(Result.RESULT_TYPE.getPreferredName(), ForecastRequestStats.RESULT_TYPE_VALUE)) .filter(QueryBuilders.termQuery(Job.ID.getPreferredName(), jobId)) .filter(QueryBuilders.termsQuery(ForecastRequestStats.STATUS.getPreferredName(), ForecastRequestStats.ForecastRequestStatus.SCHEDULED.toString(), ForecastRequestStats.ForecastRequestStatus.STARTED.toString())); UpdateByQueryRequest request = new UpdateByQueryRequest(AnomalyDetectorsIndex.resultsWriteAlias(jobId)) .setQuery(forecastQuery) .setIndicesOptions(IndicesOptions.lenientExpandOpen()) .setAbortOnVersionConflict(false) .setMaxRetries(3) .setRefresh(true) .setScript(new Script("ctx._source.forecast_status='failed';" + "ctx._source.forecast_messages=['" + JOB_FORECAST_NATIVE_PROCESS_KILLED + "']")); client.execute(UpdateByQueryAction.INSTANCE, request, ActionListener.wrap( response -> { LOGGER.info("[{}] set forecasts to failed", jobId, response.getUpdated()); if (response.getBulkFailures().size() > 0) { LOGGER.warn( "[{}] failed to set forecasts to failed. Bulk failures experienced {}", jobId, response.getTotal() - response.getUpdated(), response.getBulkFailures().stream().map(BulkItemResponse.Failure::getMessage).collect(Collectors.toList()) ); } listener.onResponse(true); }, listener::onFailure )); }
Source:
@Deprecated public void setSkipBroker(boolean skip) { mSkipBroker = skip; }

Target:
@Deprecated public void setSkipBroker(boolean skip) { mUseBroker = !skip; }
Source:
public String getStringValue() { throw throwUnsupportedOperationException(); }

Target:
public String getStringValue() { throw createUnsupportedOperationException(); }
Source:
public void execute() { new StoredList.UserInterface(getContext()).promptForListSelection(R.string.cache_menu_move_list, new Action1<Integer>() { @Override public void call(final Integer newListId) { MoveToListCommand.this.newListId = newListId; final String newListName = StoredList.getListById(newListId).getTitle(); MoveToListCommand.super.setProgressMessage(String.format(getContext().getString(R.string.command_move_caches_progress), newListName)); MoveToListCommand.super.execute(); } }, true, currentListId); }

Target:
public void execute() { new StoredList.UserInterface(getContext()).promptForListSelection(R.string.cache_menu_move_list, new Action1<Integer>() { @Override public void call(final Integer newListId) { MoveToListCommand.this.newListId = newListId; final String newListName = StoredList.getListById(newListId).getTitle(); MoveToListCommand.super.setProgressMessage(getContext().getString(R.string.command_move_caches_progress, newListName)); MoveToListCommand.super.execute(); } }, true, currentListId); }
Source:
public void smokeTestSmileSupport() throws Exception { try (DistributedQueryRunner queryRunner = TpchQueryRunnerBuilder.builder() .setSingleExtraProperty("experimental.internal-communication.binary-transport-enabled", "true") .build()) { queryRunner.execute("SELECT * FROM lineitem LIMIT 10"); } }

Target:
public void smokeTestSmileSupport() throws Exception { try (DistributedQueryRunner queryRunner = TpchQueryRunnerBuilder.builder() .setSingleExtraProperty("experimental.internal-communication.binary-transport-enabled", "true") .build()) { queryRunner.execute("SELECT sum(l.extendedprice * l.discount) AS revenue " + "FROM lineitem l WHERE" + " l.shipdate >= DATE '1994-01-01'" + " AND l.shipdate < DATE '1994-01-01' + INTERVAL '1' YEAR" + " AND l.discount BETWEEN .06 - 0.01 AND .06 + 0.01" + " AND l.quantity < 24"); } }
Source:
public void removeFirstNode() { List<String> changes = new LinkedList<>(); String code = "class A { int a; int b; int c; int d; int e; }"; CompilationUnit cu = JavaParser.parse(code); ClassOrInterfaceDeclaration cd = cu.getClassByName("A").get(); cd.getMembers().register(createObserver(changes)); cd.getMembers().removeFirst(); assertEquals(Arrays.asList("'int a;' REMOVAL in list at 0"), changes); assertEquals(cd.getMembers().size(), 4); for (int i = 3; i >= 0; i--) { assertTrue(cd.getMembers().removeFirst()); assertEquals(cd.getMembers().size(), i); } assertFalse(cd.getMembers().removeFirst()); assertEquals(cd.getMembers().size(), 0); }

Target:
public void removeFirstNode() { List<String> changes = new LinkedList<>(); String code = "class A { int a; int b; int c; int d; int e; }"; CompilationUnit cu = JavaParser.parse(code); ClassOrInterfaceDeclaration cd = cu.getClassByName("A").get(); cd.getMembers().register(createObserver(changes)); cd.getMembers().removeFirst(); assertEquals(Arrays.asList("'int a;' REMOVAL in list at 0"), changes); assertEquals(cd.getMembers().size(), 4); for (int i = 3; i >= 0; i--) { assertTrue(cd.getMembers().removeFirst() != null); assertEquals(cd.getMembers().size(), i); } assertEquals(cd.getMembers().size(), 0); }
Source:
public void pingConnection() { Button testConnectionButton = new PushButton("Test Connection"); testConnectionButton.click(); new WaitUntil(new ShellWithTextIsAvailable("Success")); new PushButton("OK").click(); }

Target:
public void pingConnection() { Button testConnectionButton = new PushButton("Test Connection"); testConnectionButton.click(); new WaitUntil(new ShellWithTextIsAvailable("Success")); new OkButton().click(); }
Source:
public static AbstractFileOutputOperator checkpoint(AbstractFileOutputOperator writer, long windowId) { if (windowId >= 0) { writer.beforeCheckpoint(windowId); } Kryo kryo = new Kryo(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); Output loutput = new Output(bos); kryo.writeObject(loutput, writer); loutput.close(); Input lInput = new Input(bos.toByteArray()); @SuppressWarnings("unchecked") AbstractFileOutputOperator checkPointedWriter = kryo.readObject(lInput, writer.getClass()); lInput.close(); return checkPointedWriter; }

Target:
public static AbstractFileOutputOperator checkpoint(AbstractFileOutputOperator writer, long windowId) { if (windowId >= Stateless.WINDOW_ID) { writer.beforeCheckpoint(windowId); } Kryo kryo = new Kryo(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); Output loutput = new Output(bos); kryo.writeObject(loutput, writer); loutput.close(); Input lInput = new Input(bos.toByteArray()); @SuppressWarnings("unchecked") AbstractFileOutputOperator checkPointedWriter = kryo.readObject(lInput, writer.getClass()); lInput.close(); return checkPointedWriter; }
Source:
public ActivityCalendar(final String calendarName, final Date activatePassiveCalendarTime, final List<SeasonProfile> seasonProfileList) { super(); this.calendarName = calendarName; this.activatePassiveCalendarTime = new Date(activatePassiveCalendarTime.getTime()); this.seasonProfileList = new ArrayList<>(seasonProfileList); }

Target:
public ActivityCalendar(final String calendarName, final Date activatePassiveCalendarTime, final List<SeasonProfile> seasonProfileList) { this.calendarName = calendarName; this.activatePassiveCalendarTime = new Date(activatePassiveCalendarTime.getTime()); this.seasonProfileList = new ArrayList<>(seasonProfileList); }
Source:
public void setAccumuloUser(String user) { Preconditions.checkNotNull(user); set("sc.cloudbase.username", user); }

Target:
public void setAccumuloUser(String user) { Preconditions.checkNotNull(user); set(CLOUDBASE_USER, user); }
Source:
public ResolveOrFetchResult<Item> resolveOrFetchItem(Iterable<Broadcast> broadcasts) throws NitroException { if (Iterables.isEmpty(broadcasts)) { return ResolveOrFetchResult.empty(); } Iterable<PidReference> episodeRefs = toEpisodeRefs(broadcasts); ImmutableSet<String> itemUris = toItemUris(episodeRefs); ResolvedContent resolvedItems = resolve(itemUris); Set<PidReference> toFetch = Sets.newHashSet(); for (PidReference pidReference : episodeRefs) { Maybe<Identified> maybeId = resolvedItems.asMap().get(toItemUri(pidReference)); if (!maybeId.hasValue() || fullFetchPermitted.apply((Item)maybeId.requireValue())) { log.trace("Will fetch item with PID reference Nitro", pidReference.getPid()); toFetch.add(pidReference); } } Iterator<List<Item>> fetchedItemListIterator = contentAdapter .fetchEpisodes(toFetch) .iterator(); ImmutableSet.Builder<Item> fetchedItemSet = ImmutableSet.builder(); while (fetchedItemListIterator.hasNext()) { List<Item> itemList = fetchedItemListIterator.next(); for (Item item : itemList) { fetchedItemSet.add(item); } } return mergeItemsWithExisting( fetchedItemSet.build(), ImmutableSet.copyOf( Iterables.filter(resolvedItems.getAllResolvedResults(), Item.class) ) ); }

Target:
public ResolveOrFetchResult<Item> resolveOrFetchItem(Iterable<Broadcast> broadcasts) throws NitroException { if (Iterables.isEmpty(broadcasts)) { return ResolveOrFetchResult.empty(); } Iterable<PidReference> episodeRefs = toEpisodeRefs(broadcasts); ImmutableSet<String> itemUris = toItemUris(episodeRefs); ResolvedContent resolvedItems = resolve(itemUris); Set<PidReference> toFetch = Sets.newHashSet(); for (PidReference pidReference : episodeRefs) { Maybe<Identified> maybeId = resolvedItems.asMap().get(toItemUri(pidReference)); if (!maybeId.hasValue() || fullFetchPermitted.apply((Item)maybeId.requireValue())) { log.trace("Will fetch item with PID reference Nitro", pidReference.getPid()); toFetch.add(pidReference); } } Iterable<List<Item>> fetchedItems = contentAdapter.fetchEpisodes(toFetch); ImmutableSet<Item> fetchedItemSet = ImmutableSet.copyOf( Iterables.concat( fetchedItems ) ); return mergeItemsWithExisting( fetchedItemSet, ImmutableSet.copyOf( Iterables.filter(resolvedItems.getAllResolvedResults(), Item.class) ) ); }
Source:
private static String getLanguageLevelOption(LanguageLevel level) { return level.getCompilerComplianceDefaultOption(); }

Target:
private static String getLanguageLevelOption(LanguageLevel level) { return JpsJavaSdkType.complianceOption(level.toJavaVersion()); }
Source:
protected StyledString getStyledTextFor(Repository repository) throws IOException { File directory = repository.getDirectory(); StyledString string = new StyledString(); if (!repository.isBare()) string.append(directory.getParentFile().getName()); else string.append(directory.getName()); string.append( " - " + directory.getAbsolutePath(), StyledString.QUALIFIER_STYLER); String branch = repository.getBranch(); if (repository.getRepositoryState() != RepositoryState.SAFE) branch += " - " + repository.getRepositoryState().getDescription(); string.append(" [" + branch + "]", StyledString.DECORATIONS_STYLER); return string; }

Target:
protected StyledString getStyledTextFor(Repository repository) throws IOException { File directory = repository.getDirectory(); StyledString string = new StyledString(); if (!repository.isBare()) string.append(directory.getParentFile().getName()); else string.append(directory.getName()); string.append(" - ", StyledString.QUALIFIER_STYLER); string.append(directory.getAbsolutePath(), StyledString.QUALIFIER_STYLER); String branch = repository.getBranch(); string.append(" "); string.append("[", StyledString.DECORATIONS_STYLER); string.append(branch, StyledString.DECORATIONS_STYLER); RepositoryState repositoryState = repository.getRepositoryState(); if (repositoryState != RepositoryState.SAFE) { string.append(" - ", StyledString.DECORATIONS_STYLER); string.append(repositoryState.getDescription(), StyledString.DECORATIONS_STYLER); } string.append("]", StyledString.DECORATIONS_STYLER); return string; }
Source:
public void interpretUrl() { try { this.url = changeVariable.interpretString(sprite); } catch (InterpretationException interpretationException) { Log.d(getClass().getSimpleName(), "Couldn't interpret formula", interpretationException); } }

Target:
public void interpretUrl() { try { url = formula.interpretString(sprite); } catch (InterpretationException interpretationException) { Log.d(getClass().getSimpleName(), "Couldn't interpret formula", interpretationException); } }
Source:
public void setMemberIds_shouldSupportLargeCohorts() { int cohortSize = 100000; Cohort c = new Cohort(); Set<Integer> ids = new HashSet<>(); for (int i=0; i<cohortSize; i++) { ids.add(i); } long startTime = System.currentTimeMillis(); c.setMemberIds(ids); long endTime = System.currentTimeMillis(); double secondsToSet = (endTime - startTime)/1000; Assertions.assertTrue(secondsToSet < 5, "Setting cohort of size " + cohortSize + " took " + secondsToSet + " seconds"); }

Target:
public void setMemberIds_shouldSupportLargeCohorts() { int cohortSize = 100000; Cohort c = new Cohort(); Set<Integer> ids = new HashSet<>(); for (int i=0; i<cohortSize; i++) { ids.add(i); } long startTime = System.currentTimeMillis(); c.setMemberIds(ids); long endTime = System.currentTimeMillis(); double secondsToSet = (endTime - startTime)/1000; assertTrue(secondsToSet < 5, "Setting cohort of size " + cohortSize + " took " + secondsToSet + " seconds"); }
Source:
public void test_without_jsr305() { Collection<File> classpath = JavaCheckVerifier.classpathFromDirectory("target/test-jars").stream() .filter(file -> !(file.getName().startsWith("jsr305-") || file.getName().startsWith("annotations-"))) .collect(Collectors.toList()); JavaCheckVerifier.verify("src/test/files/se/ConditionAlwaysTrueOrFalseWithoutJSR305.java", new BooleanGratuitousExpressionsCheck(), classpath); }

Target:
public void test_without_jsr305() { List<File> classpath = FileUtils.listFiles(new File("target/test-jars"), new String[] {"jar"}, true).stream() .filter(file -> file.getName().startsWith("spring-core-") || file.getName().startsWith("spring-web-")) .collect(Collectors.toList()); classpath.add(new File("target/test-classes")); JavaCheckVerifier.verify("src/test/files/se/SpringNullableAndNonNullAnnotationsWithoutJSR305.java", new BooleanGratuitousExpressionsCheck(), classpath); }
Source:
private void initializeHandler(Thing thing) { if (!isHandlerRegistered(thing)) { return; } Lock lock = getLockForThing(thing.getUID()); try { lock.lock(); if (ThingHandlerHelper.isHandlerInitialized(thing)) { logger.debug("Attempt to initialize the already initialized thing '{}' will be ignored.", thing.getUID()); return; } if (isInitializing(thing)) { logger.debug("Attempt to initialize a handler twice for thing '{}' at the same time will be ignored.", thing.getUID()); return; } ThingHandler handler = thing.getHandler(); if (handler == null) { throw new IllegalStateException("Handler should not be null here"); } else { if (handler.getThing() != thing) { logger.debug("The model of is inconsistent [thing.getHandler().getThing() != thing]", thing.getUID()); } } ThingType thingType = getThingType(thing); applyDefaultConfiguration(thing, thingType); if (isThingDisabled(thing)) { setDisabled(thing, true); } else { if (isInitializable(thing, thingType)) { setThingStatus(thing, buildStatusInfo(ThingStatus.INITIALIZING, ThingStatusDetail.NONE)); doInitializeHandler(thing.getHandler()); } else { logger.debug("Thing '{}' not initializable, check required configuration parameters.", thing.getUID()); setThingStatus(thing, buildStatusInfo(ThingStatus.UNINITIALIZED, ThingStatusDetail.HANDLER_CONFIGURATION_PENDING)); } } } finally { lock.unlock(); } }

Target:
private void initializeHandler(Thing thing) { if (storage != null && storage.containsKey(thing.getUID().getAsString()) && !storage.get(thing.getUID().getAsString())) { logger.debug("Thing '{}' will not be initialized. It is marked as disabled.", thing.getUID()); return; } if (!isHandlerRegistered(thing)) { return; } Lock lock = getLockForThing(thing.getUID()); try { lock.lock(); if (ThingHandlerHelper.isHandlerInitialized(thing)) { logger.debug("Attempt to initialize the already initialized thing '{}' will be ignored.", thing.getUID()); return; } if (isInitializing(thing)) { logger.debug("Attempt to initialize a handler twice for thing '{}' at the same time will be ignored.", thing.getUID()); return; } ThingHandler handler = thing.getHandler(); if (handler == null) { throw new IllegalStateException("Handler should not be null here"); } else { if (handler.getThing() != thing) { logger.warn("The model of is inconsistent [thing.getHandler().getThing() != thing]", thing.getUID()); } } ThingType thingType = getThingType(thing); applyDefaultConfiguration(thing, thingType); if (isInitializable(thing, thingType)) { setThingStatus(thing, buildStatusInfo(ThingStatus.INITIALIZING, ThingStatusDetail.NONE)); doInitializeHandler(thing.getHandler()); } else { logger.debug("Thing '{}' not initializable, check required configuration parameters.", thing.getUID()); setThingStatus(thing, buildStatusInfo(ThingStatus.UNINITIALIZED, ThingStatusDetail.HANDLER_CONFIGURATION_PENDING)); } } finally { lock.unlock(); } }
Source:
public S3Exception(S3ErrorCode error) { this(error, error.getMessage(), (Throwable) null, ImmutableMap.<String, String>of()); }

Target:
S3Exception(S3ErrorCode error) { this(error, error.getMessage(), (Throwable) null, ImmutableMap.<String, String>of()); }