auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void swaptionStandard() { double prIrs1Std = IRS_R_1.accept(PRDC, MULTICURVE_STD); MultipleCurrencyAmount pvIrs1Std = IRS_R_1.accept(PVDC, MULTICURVE_STD); MultipleCurrencyAmount pvSwpt1StdSabr = SWPT_R_L_1.accept(PVSSC, MULTICURVE_STD_SABR); MultipleCurrencyAmount pvSwpt1StdNorm = SWPT_R_L_1.accept(PVNSC, MULTICURVE_STD_NORMAL); MultipleCurrencyParameterSensitivity pvcsIrs1Std = MQSBDC.fromInstrument(IRS_R_1, MULTICURVE_STD, BLOCK_STD).multipliedBy(BP1); MultipleCurrencyParameterSensitivity pvcsSwpt1StdSabr = MQSBSSC.fromInstrument(SWPT_R_L_1, MULTICURVE_STD_SABR, BLOCK_STD).multipliedBy(BP1); MultipleCurrencyParameterSensitivity pvcsSwpt1StdNorm = MQSBNSC.fromInstrument(SWPT_R_L_1, MULTICURVE_STD_NORMAL, BLOCK_STD).multipliedBy(BP1); double ivSwpt1StdSabr = METHOD_SWPT_SABR.impliedVolatility(SWPT_R_L_1, MULTICURVE_STD_SABR); double ivSwpt1StdNorm = METHOD_SWPT_NORMAL.impliedVolatility(SWPT_R_L_1, MULTICURVE_STD_NORMAL); PresentValueSABRSensitivityDataBundle pvvsSwpt1StdSabr = SWPT_R_L_1.accept(PVSSSSC, MULTICURVE_STD_SABR); PresentValueSwaptionSurfaceSensitivity pvvsSwpt1StdNorm = METHOD_SWPT_NORMAL.presentValueVolatilitySensitivity(SWPT_R_L_2, MULTICURVE_STD_NORMAL); int t = 0; }

Target:
public void swaptionStandard() { double prIrs1Std = IRS_R_1.accept(PRDC, MULTICURVE_STD); MultipleCurrencyAmount pvIrs1Std = IRS_R_1.accept(PVDC, MULTICURVE_STD); MultipleCurrencyAmount pvSwpt1StdSabr = SWPT_R_L_1.accept(PVSSC, MULTICURVE_STD_SABR); MultipleCurrencyAmount pvSwpt1StdNorm = SWPT_R_L_1.accept(PVNSC, MULTICURVE_STD_NORMAL); MultipleCurrencyParameterSensitivity pvcsIrs1Std = MQSBDC.fromInstrument(IRS_R_1, MULTICURVE_STD, BLOCK_STD).multipliedBy(BP1); MultipleCurrencyParameterSensitivity pvcsSwpt1StdSabr = MQSBSSC.fromInstrument(SWPT_R_L_1, MULTICURVE_STD_SABR, BLOCK_STD).multipliedBy(BP1); MultipleCurrencyParameterSensitivity pvcsSwpt1StdNorm = MQSBNSC.fromInstrument(SWPT_R_L_1, MULTICURVE_STD_NORMAL, BLOCK_STD).multipliedBy(BP1); double ivSwpt1StdSabr = METHOD_SWPT_SABR.impliedVolatility(SWPT_R_L_1, MULTICURVE_STD_SABR); double ivSwpt1StdNorm = METHOD_SWPT_NORMAL.impliedVolatility(SWPT_R_L_1, MULTICURVE_STD_NORMAL); PresentValueSABRSensitivityDataBundle pvvsSwpt1StdSabr = SWPT_R_L_1.accept(PVSSSSC, MULTICURVE_STD_SABR); PresentValueSwaptionSurfaceSensitivity pvvsSwpt1StdNorm = METHOD_SWPT_NORMAL.presentValueVolatilitySensitivity(SWPT_R_L_2, MULTICURVE_STD_NORMAL); }
Source:
public Map<String, String> getUnresolvedGenericInformation() { Set<Entry<String, String>> entries = this.unresolvedGenericInformation.entrySet(); Map<String, String> result = new HashMap<>(entries.size()); for (Entry<String, String> entry : entries) { result.put(entry.getKey(), entry.getValue()); } return result; }

Target:
public Map<String, String> getUnresolvedGenericInformation() { Set<Entry<String, String>> entries = this.unresolvedGenericInformation.entrySet(); Map<String, String> result = new LinkedHashMap<>(entries.size()); for (Entry<String, String> entry : entries) { result.put(entry.getKey(), entry.getValue()); } return result; }
Source:
public VersionTypeValidation validateWorkflowSet(String initialPath, String contents, Map<String, Pair<String, GenericFileType>> indexedFiles) { Map<String, String> validationMessageObject = new HashMap<>(); Yaml yaml = new Yaml(); List<String> files; boolean isValid = true; try { Map<String, Object> map = yaml.load(contents); Map<String, Object> serviceObject = (Map<String, Object>)map.get("service"); if (serviceObject == null) { validationMessageObject.put(initialPath, "Service key does not exist."); isValid = false; } else { files = (List<String>)serviceObject.get("files"); if (files == null) { validationMessageObject.put(initialPath, "Files key does not exist."); isValid = false; } } } catch (YAMLException | ClassCastException ex) { validationMessageObject.put(initialPath, ex.getMessage()); isValid = false; } VersionTypeValidation validation = new VersionTypeValidation(isValid, validationMessageObject); return validation; }

Target:
public VersionTypeValidation validateWorkflowSet(String initialPath, String contents, Map<String, Pair<String, GenericFileType>> indexedFiles) { Map<String, String> validationMessageObject = new HashMap<>(); Yaml yaml = new Yaml(); List<String> files; boolean isValid = true; try { Map<String, Object> map = yaml.load(contents); Map<String, Object> serviceObject = (Map<String, Object>)map.get("service"); if (serviceObject == null) { validationMessageObject.put(initialPath, "The key 'service' does not exist."); isValid = false; } else { files = (List<String>)serviceObject.get("files"); if (files == null) { validationMessageObject.put(initialPath, "The key 'files' does not exist."); isValid = false; } } } catch (YAMLException | ClassCastException ex) { validationMessageObject.put(initialPath, ex.getMessage()); isValid = false; } VersionTypeValidation validation = new VersionTypeValidation(isValid, validationMessageObject); return validation; }
Source:
public void acquireToken(Activity activity, String resource, String clientId, String redirectUri, String loginHint, PromptBehavior prompt, String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback) { redirectUri = checkInputParameters(resource, clientId, redirectUri, callback); final String requestId = Telemetry.registerNewRequest(); final APIEvent apiEvent = createApiEvent(mContext, clientId, requestId, EventStrings.ACQUIRE_TOKEN_5); apiEvent.setSilentRequestPromptBehavior(prompt.toString()); final AuthenticationRequest request = new AuthenticationRequest(mAuthority, resource, clientId, redirectUri, loginHint, prompt, extraQueryParameters, getRequestCorrelationId(), getExtendedLifetimeEnabled()); request.setUserIdentifierType(UserIdentifierType.LoginHint); request.setTelemetryRequestId(requestId); createAcquireTokenRequest(apiEvent).acquireToken(wrapActivity(activity), false, request, callback); }

Target:
public void acquireToken(Activity activity, String resource, String clientId, String redirectUri, String loginHint, PromptBehavior prompt, String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback) { if (checkPreRequirements(resource, clientId, callback)) { redirectUri = getRedirectUri(redirectUri); final String requestId = Telemetry.registerNewRequest(); final APIEvent apiEvent = createApiEvent(mContext, clientId, requestId, EventStrings.ACQUIRE_TOKEN_5); apiEvent.setSilentRequestPromptBehavior(prompt.toString()); apiEvent.setLoginHint(loginHint); final AuthenticationRequest request = new AuthenticationRequest(mAuthority, resource, clientId, redirectUri, loginHint, prompt, extraQueryParameters, getRequestCorrelationId(), getExtendedLifetimeEnabled()); request.setUserIdentifierType(UserIdentifierType.LoginHint); request.setTelemetryRequestId(requestId); createAcquireTokenRequest(apiEvent).acquireToken(wrapActivity(activity), false, request, callback); } }
Source:
private static Intent createBaseIntent(Context context) { Intent intent = new Intent(context, CustomTabsManagerActivity.class); return intent; }

Target:
private static Intent createBaseIntent(Context context) { return new Intent(context, CustomTabsManagerActivity.class); }
Source:
public void testMaxIdleRemovedOnAccess() throws InterruptedException, IOException { RemoteCacheManager client0 = client(0); RemoteCache<String, String> cache0 = client0.getCache(); String key = "someKey"; byte[] marshalledKey = client0.getMarshaller().objectToByteBuffer(key); Object keyStorage = cache(0).getAdvancedCache().getValueDataConversion().toStorage(marshalledKey); assertNull(cache0.put(key, "value1", -1, TimeUnit.SECONDS, 100, TimeUnit.MILLISECONDS)); for (Cache cache : caches()) { DataContainer dataContainer = cache.getAdvancedCache().getDataContainer(); assertNotNull(dataContainer.peek(keyStorage)); } Thread.sleep(150); assertNull(cache0.get(key)); for (Cache cache : caches()) { DataContainer dataContainer = cache.getAdvancedCache().getDataContainer(); assertNull(dataContainer.peek(keyStorage)); } }

Target:
public void testMaxIdleRemovedOnAccess() throws InterruptedException, IOException { RemoteCacheManager client0 = client(0); RemoteCache<String, String> remoteCache0 = client0.getCache(); String key = "someKey"; byte[] marshalledKey = client0.getMarshaller().objectToByteBuffer(key); Object keyStorage = cache(0).getAdvancedCache().getValueDataConversion().toStorage(marshalledKey); assertNull(remoteCache0.put(key, "value1", -1, TimeUnit.MILLISECONDS, 100, TimeUnit.MILLISECONDS)); for (Cache cache : caches()) { DataContainer dataContainer = cache.getAdvancedCache().getDataContainer(); assertNotNull(dataContainer.peek(keyStorage)); } incrementAllTimeServices(150, TimeUnit.MILLISECONDS); assertNull(remoteCache0.get(key)); for (Cache cache : caches()) { DataContainer dataContainer = cache.getAdvancedCache().getDataContainer(); assertNull(dataContainer.peek(keyStorage)); } }
Source:
protected Identifier loadFromDb(String identifier) throws DotDataException, DotStateException { if (identifier == null) { throw new DotStateException("identifier is null"); } DotConnect dc = new DotConnect(); dc.setSQL("select * from identifier where id = ?"); dc.addParam(identifier); List<Identifier> results = null; try { results = ConvertToPOJOUtil.convertDotConnectMapToIdentifier(dc.loadResults()); } catch (ParseException e) { throw new DotDataException(e); } if (results != null && results.size() > 0){ return results.get(0); } return null; }

Target:
protected Identifier loadFromDb(String identifier) throws DotDataException, DotStateException { if (identifier == null) { throw new DotStateException("identifier is null"); } DotConnect dc = new DotConnect(); dc.setSQL("select * from identifier where id = ?"); dc.addParam(identifier); List<Identifier> results = null; try { results = ConvertToPOJOUtil.convertDotConnectMapToIdentifier(dc.loadResults()); } catch (ParseException e) { throw new DotDataException(e); } return (results != null && !results.isEmpty())?results.get(0):null; }
Source:
public ImportWrapper(String fullname, String name, Node node, Class<?> type, boolean isStaticDemand) { this(fullname, name, node, isStaticDemand); if (type != null) { for (Method m : type.getMethods()) { allDemands.add(m.getName()); } for (Field f : type.getFields()) { allDemands.add(f.getName()); } int requiredMod = Modifier.STATIC; for (Field f : type.getDeclaredFields()) { if ((f.getModifiers() & requiredMod) == requiredMod) { allDemands.add(f.getName()); } } } }

Target:
public ImportWrapper(String fullname, String name, Node node, Class<?> type, boolean isStaticDemand) { this(fullname, name, node, isStaticDemand); if (type != null) { for (Method m : type.getMethods()) { allDemands.add(m.getName()); } for (Field f : type.getFields()) { allDemands.add(f.getName()); } for (Field f : type.getDeclaredFields()) { if (Modifier.isStatic(f.getModifiers())) { allDemands.add(f.getName()); } } } }
Source:
public SubscriptionMetrics loadMetrics(TopicName topicName, String subscriptionName) { String rateMetric = metricPath(topicName, subscriptionName); String timeouts = metricPathTimeouts(topicName, subscriptionName); String otherErrors = metricPathOtherErrors(topicName, subscriptionName); GraphiteMetrics metrics = graphiteClient.readMetrics(rateMetric); List<String> httpStatusCodes = allHttpStatusCodeClasses() .map(code -> metricPathHttpStatuses(topicName, subscriptionName, code)) .map(m -> graphiteClient.readMetrics(m) .metricValue(m)) .collect(Collectors.toList()); return SubscriptionMetrics.Builder.subscriptionMetrics() .withRate(metrics.metricValue(rateMetric)) .withDelivered(sharedCounter.getValue(zookeeperPaths.subscriptionMetricPath(topicName, subscriptionName, "delivered"))) .withDiscarded(sharedCounter.getValue(zookeeperPaths.subscriptionMetricPath(topicName, subscriptionName, "discarded"))) .withInflight(distributedCounter.getValue( zookeeperPaths.consumersPath(), zookeeperPaths.subscriptionMetricPathWithoutBasePath(topicName, subscriptionName, "inflight") )) .withHttpStatusCodesM1(httpStatusCodes) .withTimeoutsM1(graphiteClient.readMetrics(timeouts).metricValue(timeouts)) .withOtherErrorsM1(graphiteClient.readMetrics(otherErrors).metricValue(otherErrors)) .build(); }

Target:
public SubscriptionMetrics loadMetrics(TopicName topicName, String subscriptionName) { String rateMetric = metricPath(topicName, subscriptionName); String timeouts = metricPathTimeouts(topicName, subscriptionName); String otherErrors = metricPathOtherErrors(topicName, subscriptionName); String codes2xxPath = metricPathHttpStatuses(topicName, subscriptionName, "2xx"); String codes4xxPath = metricPathHttpStatuses(topicName, subscriptionName, "4xx"); String codes5xxPath = metricPathHttpStatuses(topicName, subscriptionName, "5xx"); GraphiteMetrics metrics = graphiteClient.readMetrics(codes2xxPath, codes4xxPath, codes5xxPath, rateMetric, timeouts, otherErrors); return SubscriptionMetrics.Builder.subscriptionMetrics() .withRate(metrics.metricValue(rateMetric)) .withDelivered(sharedCounter.getValue(zookeeperPaths.subscriptionMetricPath(topicName, subscriptionName, "delivered"))) .withDiscarded(sharedCounter.getValue(zookeeperPaths.subscriptionMetricPath(topicName, subscriptionName, "discarded"))) .withInflight(distributedCounter.getValue( zookeeperPaths.consumersPath(), zookeeperPaths.subscriptionMetricPathWithoutBasePath(topicName, subscriptionName, "inflight") )) .withCodes2xx(metrics.metricValue(codes2xxPath)) .withCodes4xx(metrics.metricValue(codes4xxPath)) .withCodes5xx(metrics.metricValue(codes5xxPath)) .withTimeouts(metrics.metricValue(timeouts)) .withOtherErrors(metrics.metricValue(otherErrors)) .build(); }
Source:
public void timeUnitNullFail() throws Exception { Timed<Integer> t1 = new Timed<Integer>(1, 5, null); }

Target:
public void timeUnitNullFail() throws Exception { new Timed<Integer>(1, 5, null); }
Source:
public void createParticipantNoExternalIdAddedDoesNothing() { BridgeUtils.setRequestContext(new RequestContext.Builder().build()); when(accountDao.constructAccount(STUDY, EMAIL, PHONE, null, PASSWORD)).thenReturn(account); StudyParticipant participant = withParticipant().withExternalId(null).build(); participantService.createParticipant(STUDY, participant, false); verify(accountDao).constructAccount(STUDY, EMAIL, PHONE, null, PASSWORD); verify(accountDao).createAccount(eq(STUDY), eq(account), any()); }

Target:
public void createParticipantNoExternalIdAddedDoesNothing() { BridgeUtils.setRequestContext(new RequestContext.Builder().build()); when(accountDao.constructAccount(STUDY, EMAIL, PHONE, null, PASSWORD)).thenReturn(account); StudyParticipant participant = withParticipant().withExternalId(null).build(); participantService.createParticipant(STUDY, participant, false); verify(accountDao).constructAccount(STUDY, EMAIL, PHONE, null, PASSWORD); verify(accountDao).createAccount(eq(STUDY), eq(account), any()); verify(externalIdService).commitAssignExternalId(null); }
Source:
private static <T> LoadingCache<ClassLoader, LoadingCache<String, T>> makeParentCache(final CacheFunction<T> function) { return CacheBuilder.newBuilder().weakKeys().build(new CacheLoader<ClassLoader,LoadingCache<String, T>>() { @Override public LoadingCache<String, T> load(final ClassLoader parentLoader) { return CacheBuilder.newBuilder(). expireAfterWrite(15, TimeUnit.MINUTES).build(new CacheLoader<String, T>() { @Override public T load(String name) { Thread t = Thread.currentThread(); String origName = t.getName(); t.setName(origName + " loading " + name); long start = System.nanoTime(); try { return function.compute(parentLoader, name); } finally { t.setName(origName); long ms = (System.nanoTime() - start) / 1000000; if (ms > 250) { LOGGER.log(Level.DEBUG, "took {0}ms to load/not load {1} from {2}", new Object[] {ms, name, parentLoader}); } } } }); } }); }

Target:
private static <T> LoadingCache<ClassLoader, LoadingCache<String, T>> makeParentCache(final CacheFunction<T> function) { return CacheBuilder.newBuilder().weakKeys().build(new CacheLoader<ClassLoader,LoadingCache<String, T>>() { @Override public LoadingCache<String, T> load(final ClassLoader parentLoader) { return CacheBuilder.newBuilder(). expireAfterWrite(15, TimeUnit.MINUTES).build(new CacheLoader<String, T>() { @Override public T load(String name) { Thread t = Thread.currentThread(); String origName = t.getName(); t.setName(origName + " loading " + name); long start = System.nanoTime(); try { return function.compute(parentLoader, name); } finally { t.setName(origName); long ms = (System.nanoTime() - start) / 1000000; if (ms > 250) { LOGGER.log(Level.FINE, "took {0}ms to load/not load {1} from {2}", new Object[] {ms, name, parentLoader}); } } } }); } }); }
Source:
protected void reIndexGeometry(HashMap<String,UpdatedTerrainPatch> updated, boolean useVariableLod) { UpdatedTerrainPatch utp = updated.get(getName()); if (utp != null && utp.isReIndexNeeded() ) { int pow = (int) Math.pow(2, utp.getNewLod()); boolean left = utp.getLeftLod() > utp.getNewLod(); boolean top = utp.getTopLod() > utp.getNewLod(); boolean right = utp.getRightLod() > utp.getNewLod(); boolean bottom = utp.getBottomLod() > utp.getNewLod(); IndexBuffer idxB; if (useVariableLod) idxB = geomap.writeIndexArrayLodVariable(pow, (int) Math.pow(2, utp.getRightLod()), (int) Math.pow(2, utp.getTopLod()), (int) Math.pow(2, utp.getLeftLod()), (int) Math.pow(2, utp.getBottomLod()), totalSize); else idxB = geomap.writeIndexArrayLodDiff(pow, right, top, left, bottom, totalSize); Buffer b; if (idxB.getBuffer() instanceof IntBuffer) b = idxB.getBuffer(); else b = idxB.getBuffer(); utp.setNewIndexBuffer(b); } }

Target:
protected void reIndexGeometry(HashMap<String,UpdatedTerrainPatch> updated, boolean useVariableLod) { UpdatedTerrainPatch utp = updated.get(getName()); if (utp != null && utp.isReIndexNeeded() ) { int pow = (int) Math.pow(2, utp.getNewLod()); boolean left = utp.getLeftLod() > utp.getNewLod(); boolean top = utp.getTopLod() > utp.getNewLod(); boolean right = utp.getRightLod() > utp.getNewLod(); boolean bottom = utp.getBottomLod() > utp.getNewLod(); IndexBuffer idxB; if (useVariableLod) idxB = geomap.writeIndexArrayLodVariable(pow, (int) Math.pow(2, utp.getRightLod()), (int) Math.pow(2, utp.getTopLod()), (int) Math.pow(2, utp.getLeftLod()), (int) Math.pow(2, utp.getBottomLod()), totalSize); else idxB = geomap.writeIndexArrayLodDiff(pow, right, top, left, bottom, totalSize); Buffer b = idxB.getBuffer(); utp.setNewIndexBuffer(b); } }
Source:
public final List<? extends Action> getAllActions() { List<Action> _actions = getActions(); boolean adding = false; synchronized (Actionable.class) { if (factoryCache == null) { @SuppressWarnings("rawtypes") final ExtensionList<TransientActionFactory> allFactories = ExtensionList.lookup(TransientActionFactory.class); factoryCache = CacheBuilder.newBuilder().build(new CacheLoader<Class<? extends Actionable>, Collection<? extends TransientActionFactory<?>>>() { @Override public Collection<? extends TransientActionFactory<?>> load(Class<? extends Actionable> implType) throws Exception { List<TransientActionFactory<?>> factories = new ArrayList<>(); for (TransientActionFactory<?> taf : allFactories) { if (taf.type().isAssignableFrom(implType)) { factories.add(taf); } } return factories; } }); allFactories.addListener(new ExtensionListListener() { @Override public void onChange() { factoryCache.invalidateAll(); } }); } } for (TransientActionFactory<?> taf : factoryCache.getUnchecked(getClass())) { Collection<? extends Action> additions; try { additions = createFor(taf); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Could not load actions from " + taf + " for " + this, e); continue; } if (!additions.isEmpty()) { if (!adding) { adding = true; _actions = new ArrayList<>(_actions); } _actions.addAll(additions); } } return Collections.unmodifiableList(_actions); }

Target:
public final List<? extends Action> getAllActions() { List<Action> _actions = getActions(); boolean adding = false; for (TransientActionFactory<?> taf : TransientActionFactory.factoriesFor(getClass(), Action.class)) { Collection<? extends Action> additions = createFor(taf); if (!additions.isEmpty()) { if (!adding) { adding = true; _actions = new ArrayList<>(_actions); } _actions.addAll(additions); } } return Collections.unmodifiableList(_actions); }
Source:
public void testLoadClassException() throws Exception { TemporaryFolder folder = new TemporaryFolder(); folder.create(); libFile = folder.newFile("libFile"); bootstrap.addFileUrl(libFile); bootstrap.addClassPathEntries(); ClassLoader cl = new URLClassLoader(classpath.toArray(new URL[classpath.size()])); assertNotNull(cl); cl.loadClass("simple.test.class"); }

Target:
public void testLoadClassException() throws Exception { ClassLoader cl = new URLClassLoader(new URL[0]); assertNotNull(cl); cl.loadClass("simple.test.class"); }
Source:
public EnumMap<IMetadata.LogUnitMetadataType, Object> getMetadataMap() { return ICorfuPayload.enumMapFromBuffer(serializedMetadataMap, LogUnitMetadataType.class); }

Target:
public EnumMap<LogUnitMetadataType, Object> getMetadataMap() { if (metadataMap == null) { throw new NullPointerException("MetaData Map is null"); } return metadataMap; }
Source:
public void performSingleTenantMultipleUserQueueTestCase() { int sendMessageCount = 200; int runTime = 40; int expectedMessageCount = 200; AndesClient adminReceivingClient = new AndesClient("receive", "127.0.0.1:5672", "topic:topictenant1.com/durableTenantTopic", "100", "false", Integer.toString(runTime), Integer.toString(expectedMessageCount), "1", "listener=true,ackMode=1,durable=true,subscriptionID=multitenant1,delayBetweenMsg=0,unsubscribeAfter=" + expectedMessageCount, "", "admin!topictenant1.com", "admin"); adminReceivingClient.startWorking(); AndesClient tenant1SendingClient = new AndesClient("send", "127.0.0.1:5672", "topic:topictenant1.com/durableTenantTopic", "100", "false", Integer.toString(runTime), Integer.toString(sendMessageCount), "1", "ackMode=1,delayBetweenMsg=0,stopAfter=" + sendMessageCount, "","topictenantuser1!topictenant1.com", "topictenantuser1"); tenant1SendingClient.startWorking(); boolean adminReceiveSuccess = AndesClientUtils.waitUntilMessagesAreReceived(adminReceivingClient, expectedMessageCount, runTime); boolean tenant1SendSuccess = AndesClientUtils.getIfSenderIsSuccess(tenant1SendingClient, sendMessageCount); Assert.assertTrue(tenant1SendSuccess, "Sending failed for tenant 1 user 1."); Assert.assertEquals(expectedMessageCount,adminReceivingClient.getReceivedTopicMessagecount()); Assert.assertTrue(adminReceiveSuccess, "Message receiving failed for durable topic subscriber of tenant 1."); }

Target:
public void performSingleTenantMultipleUserQueueTestCase() { int sendMessageCount = 200; int runTime = 40; int expectedMessageCount = 200; AndesClient adminReceivingClient = new AndesClient("receive", "127.0.0.1:5672", "topic:topictenant1.com/durableTenantTopic", "100", "false", Integer.toString(runTime), Integer.toString(expectedMessageCount), "1", "listener=true,ackMode=1,durable=true,subscriptionID=multitenant1,delayBetweenMsg=0,unsubscribeAfter=" + expectedMessageCount, "", "admin!topictenant1.com", "admin"); adminReceivingClient.startWorking(); AndesClient tenant1SendingClient = new AndesClient("send", "127.0.0.1:5672", "topic:topictenant1.com/durableTenantTopic", "100", "false", Integer.toString(runTime), Integer.toString(sendMessageCount), "1", "ackMode=1,delayBetweenMsg=0,stopAfter=" + sendMessageCount, "", "topictenantuser1!topictenant1.com", "topictenantuser1"); tenant1SendingClient.startWorking(); boolean adminReceiveSuccess = AndesClientUtils.waitUntilMessagesAreReceived(adminReceivingClient, expectedMessageCount, runTime); boolean tenant1SendSuccess = AndesClientUtils.getIfSenderIsSuccess(tenant1SendingClient, sendMessageCount); Assert.assertTrue(tenant1SendSuccess, "Sending failed for tenant 1 user 1."); Assert.assertEquals(adminReceivingClient.getReceivedTopicMessagecount(), expectedMessageCount); Assert.assertTrue(adminReceiveSuccess, "Message receiving failed for durable topic subscriber of tenant 1. Received Message Count : " + adminReceivingClient.getReceivedTopicMessagecount()); }
Source:
public String toString() { return String.format("%f, %d, %d", value, g, delta); }

Target:
public String toString() { return String.format("%d, %d, %d", value, g, delta); }
Source:
private ConnectionPoolImpl<Jedis> startConnectionPool(String appName, JedisConnectionFactory connFactory, ConnectionPoolConfigurationImpl cpConfig, ConnectionPoolMonitor cpMonitor) { final ConnectionPoolImpl<Jedis> pool = new ConnectionPoolImpl<Jedis>(connFactory, cpConfig, cpMonitor); try { Logger.info("Starting connection pool for app " + appName); Logger.info("Starting connection pool for app " + appName); pool.start().get(); Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @Override public void run() { pool.shutdown(); } })); } catch (NoAvailableHostsException e) { if (cpConfig.getFailOnStartupIfNoHosts()) { throw new RuntimeException(e); } Logger.warn("UNABLE TO START CONNECTION POOL -- IDLING"); pool.idle(); } catch (Exception e) { throw new RuntimeException(e); } return pool; }

Target:
private ConnectionPoolImpl<Jedis> startConnectionPool(String appName, JedisConnectionFactory connFactory, ConnectionPoolConfigurationImpl cpConfig, ConnectionPoolMonitor cpMonitor) { final ConnectionPoolImpl<Jedis> pool = new ConnectionPoolImpl<Jedis>(connFactory, cpConfig, cpMonitor); try { Logger.info("Starting connection pool for app " + appName); pool.start().get(); Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @Override public void run() { pool.shutdown(); } })); } catch (NoAvailableHostsException e) { if (cpConfig.getFailOnStartupIfNoHosts()) { throw new RuntimeException(e); } Logger.warn("UNABLE TO START CONNECTION POOL -- IDLING"); pool.idle(); } catch (Exception e) { throw new RuntimeException(e); } return pool; }
Source:
private void findSafeLiterals(AbstractApexNode<?> node) { ASTBinaryExpression binaryExp = node.getFirstChildOfType(ASTBinaryExpression.class); if (binaryExp != null) { findSafeLiterals(binaryExp); } ASTLiteralExpression literal = node.getFirstChildOfType(ASTLiteralExpression.class); if (literal != null) { int index = literal.jjtGetChildIndex(); if (index == 0) { if (node instanceof ASTVariableDeclaration) { addVariable((ASTVariableDeclaration) node); } else if (node instanceof ASTBinaryExpression) { ASTVariableDeclaration parent = node.getFirstParentOfType(ASTVariableDeclaration.class); if (parent != null) { addVariable(parent); } ASTAssignmentExpression assignment = node.getFirstParentOfType(ASTAssignmentExpression.class); if (assignment != null) { ASTVariableExpression var = assignment.getFirstChildOfType(ASTVariableExpression.class); if (var != null) { addVariable(var); } } } } } else { if (node instanceof ASTField) { ASTField field = (ASTField) node; if ("String".equalsIgnoreCase(field.getTypeRef())) { StandardFieldInfo fieldInfo = (StandardFieldInfo) field.getNode().getFieldInfo(); if (fieldInfo.getValue() != null) { addVariable(fieldInfo); } } } } }

Target:
private void findSafeLiterals(AbstractApexNode<?> node) { ASTBinaryExpression binaryExp = node.getFirstChildOfType(ASTBinaryExpression.class); if (binaryExp != null) { findSafeLiterals(binaryExp); } ASTLiteralExpression literal = node.getFirstChildOfType(ASTLiteralExpression.class); if (literal != null) { int index = literal.jjtGetChildIndex(); if (index == 0) { if (node instanceof ASTVariableDeclaration) { addVariable((ASTVariableDeclaration) node); } else if (node instanceof ASTBinaryExpression) { ASTVariableDeclaration parent = node.getFirstParentOfType(ASTVariableDeclaration.class); if (parent != null) { addVariable(parent); } ASTAssignmentExpression assignment = node.getFirstParentOfType(ASTAssignmentExpression.class); if (assignment != null) { ASTVariableExpression var = assignment.getFirstChildOfType(ASTVariableExpression.class); if (var != null) { addVariable(var); } } } } } else { if (node instanceof ASTField) { ASTField field = (ASTField) node; if ("String".equalsIgnoreCase(field.getType())) { if (field.getValue() != null) { listOfStringLiteralVariables.add(Helper.getFQVariableName(field)); } } } } }
Source:
public void testDefault() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(ConstantNameCheck.class); final String pattern = "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"; final String[] expected = { "25:29: " + getCheckMessage(MSG_INVALID_PATTERN, "badConstant", pattern), "139:30: " + getCheckMessage(MSG_INVALID_PATTERN, "BAD__NAME", pattern), }; verify(checkConfig, getPath("InputSimple.java"), expected); }

Target:
public void testDefault() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(ConstantNameCheck.class); final String pattern = "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"; final String[] expected = { "25:29: " + getCheckMessage(MSG_INVALID_PATTERN, "badConstant", pattern), "142:30: " + getCheckMessage(MSG_INVALID_PATTERN, "BAD__NAME", pattern), }; verify(checkConfig, getPath("InputConstantNameSimple.java"), expected); }
Source:
@Override protected RawClient getClient() throws IOException { HTTPClientConfig config = new HTTPClientConfig.Builder().withHost(Hosts.RIAK_HOST).build(); return HTTPRiakClientFactory.getInstance().newClient(config); }

Target:
@Override protected RawClient getClient() throws IOException { HTTPClientConfig config = new HTTPClientConfig.Builder().withUrl(Hosts.RIAK_URL).build(); return HTTPRiakClientFactory.getInstance().newClient(config); }
Source:
public final double asDouble() { if (value == null) { assert NullHandling.replaceWithDefault(); return 0.0; } final Double theDouble = Doubles.tryParse(value); return theDouble == null ? 0.0 : theDouble; }

Target:
public final double asDouble() { if (value == null) { assert NullHandling.replaceWithDefault(); return 0.0; } final Double theDouble = Doubles.tryParse(value); assert NullHandling.replaceWithDefault() || theDouble != null; return theDouble == null ? 0.0 : theDouble; }
Source:
private Map<String, Object> prepareDhisAttributesMap(Map<String, Object> eventParams) { Map<String, Object> dhisAttributes = new HashMap<>(eventParams); dhisAttributes.remove(MotechEvent.PARAM_INVALID_MOTECH_EVENT); dhisAttributes.remove(MotechEvent.PARAM_REDELIVERY_COUNT); dhisAttributes.remove(EventParams.MESSAGE_DESTINATION); return dhisAttributes; }

Target:
private Map<String, Object> prepareDhisAttributesMap(Map<String, Object> eventParams) { Map<String, Object> dhisAttributes = new HashMap<>(eventParams); dhisAttributes.remove(MotechEvent.PARAM_INVALID_MOTECH_EVENT); dhisAttributes.remove(MotechEvent.PARAM_REDELIVERY_COUNT); dhisAttributes.remove(EventParams.MESSAGE_DESTINATION); dhisAttributes.remove(MotechSchedulerService.JOB_ID_KEY); return dhisAttributes; }
Source:
public static void setRestriction(XHook hook, int uid, String restrictionName, String methodName, boolean restricted) { if (uid == 0) { Util.log(hook, Log.WARN, "uid=0"); } try { PrivacyService.getClient().setRestriction( new ParcelableRestriction(uid, restrictionName, methodName, restricted)); } catch (Throwable ex) { Util.bug(null, ex); } boolean dangerous = PrivacyManager.getSettingBool(hook, 0, PrivacyManager.cSettingDangerous, false, false); if (methodName == null) if (restricted && !dangerous) { for (Hook md : getHooks(restrictionName)) if (md.isDangerous()) PrivacyManager.setRestriction(hook, uid, restrictionName, md.getName(), dangerous); } PrivacyManager .setSetting(hook, uid, PrivacyManager.cSettingState, Integer.toString(ActivityMain.STATE_CHANGED)); PrivacyManager.setSetting(null, uid, PrivacyManager.cSettingModifyTime, Long.toString(System.currentTimeMillis())); }

Target:
public static void setRestriction(XHook hook, int uid, String restrictionName, String methodName, boolean restricted) { if (uid == 0) Util.log(hook, Log.WARN, "uid=0"); try { PrivacyService.getClient().setRestriction( new ParcelableRestriction(uid, restrictionName, methodName, restricted)); } catch (Throwable ex) { Util.bug(null, ex); } boolean dangerous = PrivacyManager.getSettingBool(hook, 0, PrivacyManager.cSettingDangerous, false, false); if (methodName == null) if (restricted && !dangerous) { for (Hook md : getHooks(restrictionName)) if (md.isDangerous()) PrivacyManager.setRestriction(hook, uid, restrictionName, md.getName(), dangerous); } PrivacyManager .setSetting(hook, uid, PrivacyManager.cSettingState, Integer.toString(ActivityMain.STATE_CHANGED)); PrivacyManager.setSetting(null, uid, PrivacyManager.cSettingModifyTime, Long.toString(System.currentTimeMillis())); }
Source:
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { for (TypeElement annotation : annotations) { for (Element element : roundEnv.getElementsAnnotatedWith(annotation)) { if (!(element instanceof TypeElement)) { this.processingEnv.getMessager() .printMessage(Diagnostic.Kind.ERROR, "How is this annotated?", element); continue; } if (!this.processingEnv.getTypeUtils() .isAssignable(element.asType(), this.processingEnv.getElementUtils() .getTypeElement(preprocessorInterfaceCanonicalName) .asType())) { this.processingEnv.getMessager() .printMessage(Diagnostic.Kind.ERROR, "Element is annotated as Preprocessor but is not assignable to " + preprocessorInterfaceCanonicalName + "!", element); } boolean anyConstructorFound = false; boolean noArgPublicConstructorFound = false; for(Element enclosedElement : element.getEnclosedElements()) { if(enclosedElement.getKind() == ElementKind.CONSTRUCTOR) { anyConstructorFound = true; ExecutableElement constructor = (ExecutableElement) enclosedElement; final boolean noArg = constructor.getParameters().size() == 0; final boolean isPublic = constructor.getModifiers().contains(Modifier.PUBLIC); if(noArg && isPublic) { noArgPublicConstructorFound = true; break; } } } if(!noArgPublicConstructorFound && anyConstructorFound){ this.processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Element is annotated as Preprocessor but has not public no-arg constructor!", element); } } } return false; }

Target:
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { for (TypeElement annotation : annotations) { for (Element element : roundEnv.getElementsAnnotatedWith(annotation)) { if (!(element instanceof TypeElement)) { this.processingEnv.getMessager() .printMessage(Diagnostic.Kind.ERROR, "How is this annotated?", element); continue; } if (!this.processingEnv.getTypeUtils() .isAssignable(element.asType(), this.processingEnv.getElementUtils() .getTypeElement(preprocessorInterfaceCanonicalName) .asType())) { this.processingEnv.getMessager() .printMessage(Diagnostic.Kind.ERROR, "Element is annotated as Preprocessor but is not assignable to " + preprocessorInterfaceCanonicalName + "!", element); } boolean anyConstructorFound = false; boolean noArgPublicConstructorFound = false; for(Element enclosedElement : element.getEnclosedElements()) { if(enclosedElement.getKind() == ElementKind.CONSTRUCTOR) { anyConstructorFound = true; ExecutableElement constructor = (ExecutableElement) enclosedElement; final boolean noArg = constructor.getParameters().isEmpty(); final boolean isPublic = constructor.getModifiers().contains(Modifier.PUBLIC); if(noArg && isPublic) { noArgPublicConstructorFound = true; break; } } } if(!noArgPublicConstructorFound && anyConstructorFound){ this.processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Element is annotated as Preprocessor but has no public no-arg constructor!", element); } } } return false; }
Source:
private boolean shouldAllowSaslFailedClientsConnect() { return Boolean.getBoolean(ALLOW_SASL_FAILED_CLIENTS); }

Target:
private static boolean shouldAllowSaslFailedClientsConnect() { return Boolean.getBoolean(ALLOW_SASL_FAILED_CLIENTS); }
Source:
public VersioningService(final String toolingId, final Map<String, Collection<ICodeSystemVersion>> existingVersions, final String... otherToolingIds) { configuration = new PublishOperationConfiguration( checkNotNull(toolingId, "toolingId"), checkNotNull(otherToolingIds, "otherToolingIds")); this.existingVersions = existingVersions; currentVersionSuppliers = initCurrentVersionSuppliers(configuration.getToolingIds()); lockContexts = newHashMap(); lockTargets = newHashMap(); locked = new AtomicBoolean(); }

Target:
public VersioningService(final String toolingId, final Map<String, Collection<ICodeSystemVersion>> existingVersions, final String... otherToolingIds) { this.configuration = new PublishOperationConfiguration(toolingId, otherToolingIds); this.existingVersions = existingVersions; currentVersionSuppliers = initCurrentVersionSuppliers(configuration.getToolingIds()); lockContexts = newHashMap(); lockTargets = newHashMap(); locked = new AtomicBoolean(); }
Source:
public static Collection<PersonaAccount> getPersonaAccountsForAccount(long accountId) throws CentralRepoException { String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE + " WHERE persona_accounts.account_id = " + accountId + "AND p.status_id != " + Persona.PersonaStatus.DELETED.getStatusId(); CentralRepository cr = CentralRepository.getInstance(); if (cr != null) { String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE + " WHERE persona_accounts.account_id = " + accountId; PersonaAccountsQueryCallback queryCallback = new PersonaAccountsQueryCallback(); cr.executeSelectSQL(queryClause, queryCallback); return queryCallback.getPersonaAccountsList(); } return new ArrayList<>(); }

Target:
public static Collection<PersonaAccount> getPersonaAccountsForAccount(long accountId) throws CentralRepoException { String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE + " WHERE persona_accounts.account_id = " + accountId + "AND p.status_id != " + Persona.PersonaStatus.DELETED.getStatusId(); CentralRepository cr = CentralRepository.getInstance(); if (cr != null) { PersonaAccountsQueryCallback queryCallback = new PersonaAccountsQueryCallback(); cr.executeSelectSQL(queryClause, queryCallback); return queryCallback.getPersonaAccountsList(); } return new ArrayList<>(); }
Source:
public RestApiSession(BullhornRestCredentials bullhornRestCredentials) { this.restCredentials = bullhornRestCredentials; this.restTemplate = RestTemplateFactory.getInstance(); this.dateTimeBhRestTokenWillExpire = getNow(); if(bullhornRestCredentials.credentialCheck()) { createSession(); } else { this.restUrl = restCredentials.getRestUrl(); this.bhRestToken = restCredentials.getBhRestToken(); } }

Target:
public RestApiSession(BullhornRestCredentials bullhornRestCredentials) { this.isSessionProvided = isSessionProvided(bullhornRestCredentials); this.restCredentials = bullhornRestCredentials; this.restTemplate = RestTemplateFactory.getInstance(); this.dateTimeBhRestTokenWillExpire = getNow(); if (!this.isSessionProvided) { createSession(); } else { this.restUrl = restCredentials.getRestUrl(); this.bhRestToken = restCredentials.getBhRestToken(); } }
Source:
private ContentWriteController contentWriteController() { return ContentWriteController.create( configFetcher, contentWriteExecutor, lookupBackedContentIdGenerator, contentWriteMessageSender, contentModelOutputter(), lookupStore, contentResolver, contentWriter, new EquivalenceBreaker( contentResolver, entryStore, lookupWriter ), new OldContentDeactivator( new MongoContentLister( mongo, new MongoContentResolver(mongo, lookupStore) ), contentWriter, contentResolver ) ); }

Target:
private ContentWriteController contentWriteController() { return ContentWriteController.create( configFetcher, contentWriteExecutor, lookupBackedContentIdGenerator, contentWriteMessageSender, contentModelOutputter(), lookupStore, contentResolver, contentWriter, EquivalenceBreaker.create( contentResolver, entryStore, lookupWriter ), OldContentDeactivator.create( new MongoContentLister( mongo, new MongoContentResolver(mongo, lookupStore) ), contentWriter, contentResolver ) ); }
Source:
private void InitUsbPolicy() { VDSGroup cluster = (VDSGroup) getCluster().getSelectedItem(); VmOsType osType = (VmOsType) getOSType().getSelectedItem(); DisplayType displayType = (DisplayType) (getDisplayProtocol().getSelectedItem() != null ? ((EntityModel) getDisplayProtocol().getSelectedItem()).getEntity() : null); if (osType == null || cluster == null || displayType == null) { return; } getUsbPolicy().setIsChangable(true); if (Version.v3_0.compareTo(cluster.getcompatibility_version()) >= 0) { if (osType.isWindows()) { getUsbPolicy().setItems(Arrays.asList( UsbPolicy.DISABLED, UsbPolicy.ENABLED_LEGACY )); } else { getUsbPolicy().setItems(Arrays.asList(UsbPolicy.DISABLED)); getUsbPolicy().setSelectedItem(UsbPolicy.DISABLED); getUsbPolicy().setIsChangable(false); } } if (Version.v3_1.compareTo(cluster.getcompatibility_version()) <= 0) { if (osType.isLinux()) { getUsbPolicy().setItems(Arrays.asList( UsbPolicy.DISABLED, UsbPolicy.ENABLED_NATIVE )); } else { getUsbPolicy().setItems( Arrays.asList( UsbPolicy.DISABLED, UsbPolicy.ENABLED_LEGACY, UsbPolicy.ENABLED_NATIVE )); } } if (displayType != DisplayType.qxl) { getUsbPolicy().setIsChangable(false); } getUsbPolicy().setSelectedItem(UsbPolicy.DISABLED); }

Target:
private void InitUsbPolicy() { VDSGroup cluster = (VDSGroup) getCluster().getSelectedItem(); VmOsType osType = (VmOsType) getOSType().getSelectedItem(); DisplayType displayType = (DisplayType) (getDisplayProtocol().getSelectedItem() != null ? ((EntityModel) getDisplayProtocol().getSelectedItem()).getEntity() : null); if (osType == null || cluster == null || displayType == null) { return; } getUsbPolicy().setIsChangable(true); if (Version.v3_1.compareTo(cluster.getcompatibility_version()) > 0) { if (osType.isWindows()) { getUsbPolicy().setItems(Arrays.asList( UsbPolicy.DISABLED, UsbPolicy.ENABLED_LEGACY )); } else { getUsbPolicy().setItems(Arrays.asList(UsbPolicy.DISABLED)); getUsbPolicy().setSelectedItem(UsbPolicy.DISABLED); getUsbPolicy().setIsChangable(false); } } if (Version.v3_1.compareTo(cluster.getcompatibility_version()) <= 0) { if (osType.isLinux()) { getUsbPolicy().setItems(Arrays.asList( UsbPolicy.DISABLED, UsbPolicy.ENABLED_NATIVE )); } else { getUsbPolicy().setItems( Arrays.asList( UsbPolicy.DISABLED, UsbPolicy.ENABLED_LEGACY, UsbPolicy.ENABLED_NATIVE )); } } if (displayType != DisplayType.qxl) { getUsbPolicy().setIsChangable(false); } getUsbPolicy().setSelectedItem(UsbPolicy.DISABLED); }
Source:
private List<GlusterVolumeEntity> getAllGlusterVolumesWithMasterCompatibleVersion(Guid masterVolumeId) { GlusterVolumeEntity masterVolume = getGlusterVolumeDao().getById(masterVolumeId); VDSGroup masterCluster = getVdsGroupDao().get(masterVolume.getClusterId()); List<VDSGroup> clusters = getVdsGroupDao().getGeoRepEligibleVdsGroups(masterCluster.getId(), masterCluster.getcompatibility_version().getValue()); List<GlusterVolumeEntity> volumes = new ArrayList<GlusterVolumeEntity>(); if(clusters != null) { for(VDSGroup currentCluster : clusters) { volumes.addAll(getGlusterVolumeDao().getByClusterId(currentCluster.getId())); } } return volumes; }

Target:
private List<GlusterVolumeEntity> getAllGlusterVolumesWithMasterCompatibleVersion(Guid masterVolumeId) { GlusterVolumeEntity masterVolume = getGlusterVolumeDao().getById(masterVolumeId); VDSGroup masterCluster = getVdsGroupDao().get(masterVolume.getClusterId()); List<VDSGroup> clusters = getVdsGroupDao().getClustersByServiceAndCompatibilityVersion(true, false, masterCluster.getcompatibility_version().getValue()); List<GlusterVolumeEntity> volumes = new ArrayList<GlusterVolumeEntity>(); if(clusters != null) { for(VDSGroup currentCluster : clusters) { if(!currentCluster.getId().equals(masterCluster.getId())) { volumes.addAll(getGlusterVolumeDao().getByClusterId(currentCluster.getId())); } } } return volumes; }
Source:
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { if (env.getIteratorScope() == IteratorScope.scan) { throw new IllegalArgumentException(); } this.source = source; String zookeepers = options.get(ZOOKEEPER_CONNECT_OPT); String zkRoot = options.get(ZOOKEEPER_ROOT_OPT); if (zookeepers == null || zkRoot == null) { throw new IllegalArgumentException("A configuration item for GC iterator was not set"); } oldestActiveTs = ZookeeperUtil.getOldestTimestamp(zookeepers, zkRoot); System.out.println("Running GC iterator with oldest active ts of "+oldestActiveTs); }

Target:
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { if (env.getIteratorScope() == IteratorScope.scan) { throw new IllegalArgumentException(); } this.source = source; String zookeepers = options.get(ZOOKEEPER_CONNECT_OPT); String zkRoot = options.get(ZOOKEEPER_ROOT_OPT); if (zookeepers == null || zkRoot == null) { throw new IllegalArgumentException("A configuration item for GC iterator was not set"); } oldestActiveTs = ZookeeperUtil.getOldestTimestamp(zookeepers, zkRoot); }
Source:
public void invalidate() throws CacheAccessException { if(map.map != null) { for (K k : map.map.keySet()) { invalidate(k); } } if(map.keyCopyMap != null) { for(OnHeapKey<K> key : map.keyCopyMap.keySet()) { invalidate(key.getActualKeyObject()); } } map.clear(); }

Target:
private void invalidate() { if(map.map != null) { for (K k : map.map.keySet()) { try { invalidate(k); } catch (CacheAccessException cae) { LOG.warn("Failed to invalidate mapping for key {}", k, cae); } } } if(map.keyCopyMap != null) { for(OnHeapKey<K> key : map.keyCopyMap.keySet()) { try { invalidate(key.getActualKeyObject()); } catch (CacheAccessException cae) { LOG.warn("Failed to invalidate mapping for key {}", key, cae); } } } map.clear(); }
Source:
protected IFigure createFigure() { IFigure fig = super.createFigure(); DSemanticDiagram dSemanticDiagram = getDSemanticDiagram(); ColorDescription backgroundColor = dSemanticDiagram.getDescription().getBackgroundColor(); if (backgroundColor != null) { RGBValues newValues = new AbstractColorUpdater().getRGBValuesFromColorDescription(dSemanticDiagram.getTarget(), backgroundColor); fig.setBackgroundColor(new Color(null, newValues.getRed(), newValues.getGreen(), newValues.getBlue())); fig.setOpaque(true); } return fig; }

Target:
protected IFigure createFigure() { IFigure fig = super.createFigure(); DSemanticDiagram dSemanticDiagram = getDSemanticDiagram(); if (dSemanticDiagram != null) { ColorDescription backgroundColor = dSemanticDiagram.getDescription().getBackgroundColor(); if (backgroundColor != null) { RGBValues rgbBackgroundValues = new AbstractColorUpdater().getRGBValuesFromColorDescription(dSemanticDiagram.getTarget(), backgroundColor); if (!isWhiteColor(rgbBackgroundValues)) { fig.setBackgroundColor(new Color(null, rgbBackgroundValues.getRed(), rgbBackgroundValues.getGreen(), rgbBackgroundValues.getBlue())); fig.setOpaque(true); } } } return fig; }
Source:
protected void finalize() throws Throwable { if (mIsOpen) { CLEANUP_LOG.warn( "Closing HBaseKijiTable in finalize(). You should close it explicitly", mTableURI); CLEANUP_LOG.warn( "HBaseKijiTable still has retained references.", mTableURI, mRetainCount.get()); if (CLEANUP_LOG.isDebugEnabled()) { CLEANUP_LOG.debug( "Call stack when this HBaseKijiTable was constructed:\n{}", mConstructorStack); } close(); } super.finalize(); }

Target:
protected void finalize() throws Throwable { if (mIsOpen.get()) { CLEANUP_LOG.warn( "Finalizing opened resource '{}' with retained references. " + "You must release() it.", mTableURI, mRetainCount.get()); if (CLEANUP_LOG.isDebugEnabled()) { CLEANUP_LOG.debug( "HBaseKijiTable '{}' was constructed through:\n{}", mTableURI, mConstructorStack); } close(); } super.finalize(); }
Source:
public Block split( @TypeParameter("map<varchar,varchar>") Type mapType, @SqlType(StandardTypes.VARCHAR) Slice string, @SqlType(StandardTypes.VARCHAR) Slice entryDelimiter, @SqlType(StandardTypes.VARCHAR) Slice keyValueDelimiter, @SqlType("function(varchar, varchar, varchar, varchar)") DuplicateKeyResolutionLambda function) { return splitToMap(pageBuilder, mapType, string, entryDelimiter, keyValueDelimiter, function); }

Target:
public Block split( @TypeParameter("map<varchar,varchar>") Type mapType, @SqlType(StandardTypes.VARCHAR) Slice string, @SqlType(StandardTypes.VARCHAR) Slice entryDelimiter, @SqlType(StandardTypes.VARCHAR) Slice keyValueDelimiter, @SqlType("function(varchar, varchar, varchar, varchar)") DuplicateKeyResolutionLambda function) { return splitToMap(pageBuilder, mapType, string, entryDelimiter, keyValueDelimiter, Optional.of(function)); }