auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onCreate() { super.onCreate(); AndroidClassHasher.registerAndroidClassHashStrategy(); AndroidUtil.initializeStaticHandlers(); CommCareApplication.app = this; PreInitLogger pil = new PreInitLogger(); Logger.registerLogger(pil); System.setProperty("http.keepAlive", "false"); Thread.setDefaultUncaughtExceptionHandler(new CommCareExceptionHandler(Thread.getDefaultUncaughtExceptionHandler(), this)); PropertyManager.setPropertyManager(new ODKPropertyManager()); SQLiteDatabase.loadLibs(this); setRoots(); prepareTemporaryStorage(); dbState = initGlobalDb(); try { LegacyInstallUtils.checkForLegacyInstall(this, this.getGlobalStorage(ApplicationRecord.class)); } catch (SessionUnavailableException sfe) { throw new RuntimeException(sfe); } finally { Logger.registerLogger(new AndroidLogger(this.getGlobalStorage(AndroidLogEntry.STORAGE_KEY, AndroidLogEntry.class))); pil.dumpToNewLogger(); } XPathErrorLogger.registerStorage(getGlobalStorage(XPathErrorEntry.STORAGE_KEY, XPathErrorEntry.class)); intializeDefaultLocalizerData(); if (dbState != STATE_MIGRATION_FAILED && dbState != STATE_MIGRATION_QUESTIONABLE) { initializeAnAppOnStartup(); } ACRAUtil.initACRA(this); if (!GoogleAnalyticsUtils.versionIncompatible()) { analyticsInstance = GoogleAnalytics.getInstance(this); } }

Target:
public void onCreate() { super.onCreate(); AndroidClassHasher.registerAndroidClassHashStrategy(); AndroidUtil.initializeStaticHandlers(); CommCareApplication.app = this; PreInitLogger pil = new PreInitLogger(); Logger.registerLogger(pil); System.setProperty("http.keepAlive", "false"); Thread.setDefaultUncaughtExceptionHandler(new CommCareExceptionHandler(Thread.getDefaultUncaughtExceptionHandler(), this)); PropertyManager.setPropertyManager(new ODKPropertyManager()); SQLiteDatabase.loadLibs(this); setRoots(); prepareTemporaryStorage(); dbState = initGlobalDb(); try { LegacyInstallUtils.checkForLegacyInstall(this, this.getGlobalStorage(ApplicationRecord.class)); } catch (SessionUnavailableException sfe) { throw new RuntimeException(sfe); } finally { Logger.registerLogger(new AndroidLogger(this.getGlobalStorage(AndroidLogEntry.STORAGE_KEY, AndroidLogEntry.class))); pil.dumpToNewLogger(); } intializeDefaultLocalizerData(); if (dbState != STATE_MIGRATION_FAILED && dbState != STATE_MIGRATION_QUESTIONABLE) { initializeAnAppOnStartup(); } ACRAUtil.initACRA(this); if (!GoogleAnalyticsUtils.versionIncompatible()) { analyticsInstance = GoogleAnalytics.getInstance(this); } }
Source:
public boolean handle(CorfuMsg message, ChannelHandlerContext ctx) { if (!handlerMap.containsKey(message.getMsgType())) { return false; } try { Object ret = handlerMap.get(message.getMsgType()) .handle(message, ctx, client.getRouter()); if (ret != null) { client.getRouter().completeRequest(message.getRequestID(), ret); } } catch (Exception ex) { client.getRouter().completeExceptionally(message.getRequestID(), ex); } return true; }

Target:
public boolean handle(CorfuMsg message, ChannelHandlerContext ctx) { if (handlerMap.containsKey(message.getMsgType())) { try { Object ret = handlerMap.get(message.getMsgType()) .handle(message, ctx, client.getRouter()); if (ret != null) { client.getRouter().completeRequest(message.getRequestID(), ret); } } catch (Throwable e) { client.getRouter().completeExceptionally(message.getRequestID(), e); } return true; } return false; }
Source:
@Override public void initCubicWorld() { this.isCubicWorld = true; this.entitySpawner = new CubeWorldEntitySpawner(); ServerCubeCache chunkProvider = new ServerCubeCache(this); this.chunkProvider = chunkProvider; this.generatorPipeline = new GeneratorPipeline(); this.lightingManager = new LightingManager(this); ICubicChunksWorldType type = (ICubicChunksWorldType) this.getWorldType(); type.registerWorldGen(this, this.generatorPipeline); GeneratorPipeline.checkStages(this.generatorPipeline); this.cubeGenerator = new WorldGenerator(this, this.generatorPipeline); this.thePlayerManager = new PlayerCubeMap(this); this.chunkGc = new ChunkGc(getCubeCache(), getPlayerCubeMap()); this.maxHeight = type.getMaxHeight(); this.minHeight = type.getMinHeight(); this.saveHandler = new CubicChunksSaveHandler(this, this.getSaveHandler()); this.generateWorld(); }

Target:
@Override public void initCubicWorld() { this.isCubicWorld = true; this.entitySpawner = new CubeWorldEntitySpawner(); ServerCubeCache chunkProvider = new ServerCubeCache(this); this.chunkProvider = chunkProvider; this.generatorStageRegistry = new GeneratorStageRegistry(); this.lightingManager = new LightingManager(this); ICubicChunksWorldType type = (ICubicChunksWorldType) this.getWorldType(); type.registerWorldGen(this, this.generatorStageRegistry); GeneratorStageRegistry.checkStages(this.generatorStageRegistry); this.cubeGenerator = new WorldGenerator(this, this.generatorStageRegistry); this.thePlayerManager = new PlayerCubeMap(this); this.chunkGc = new ChunkGc(getCubeCache(), getPlayerCubeMap()); this.maxHeight = type.getMaxHeight(); this.minHeight = type.getMinHeight(); this.saveHandler = new CubicChunksSaveHandler(this, this.getSaveHandler()); this.generateWorld(); }
Source:
public void upgrade(User user) { Optional<String> vpnPassword = user.takeVpnPassword(); vpnPassword.ifPresent(p -> setPassworOnDefaultDevice(user, p)); }

Target:
public void upgrade(User user) { Optional<String> vpnPassword = user.getAndClearVpnPassword(); vpnPassword.ifPresent(p -> setPasswordOnDefaultDevice(user, p)); }
Source:
public FuzzyBlockState build() { checkNotNull(internalState); if (values.isEmpty()) { return internalState.getBlockType().getFuzzyMatcher(); } FuzzyBlockState blockState = new FuzzyBlockState(internalState.getBlockType()); for (Map.Entry<Property<?>, Object> entry : values.entrySet()) { blockState.setState(entry.getKey(), entry.getValue()); } return blockState; }

Target:
public FuzzyBlockState build() { checkNotNull(type); if (values.isEmpty()) { return type.getFuzzyMatcher(); } return new FuzzyBlockState(type, values); }
Source:
private String getApiToken(Map<String, Comparable> properties) { String apiToken = getOrDefault(properties, KUBERNETES_SYSTEM_PREFIX, KUBERNETES_API_TOKEN, null); if (apiToken == null) { apiToken = readAccountToken(); } return apiToken; }

Target:
private String getApiToken(Map<String, Comparable> properties) { String apiToken = getOrNull(properties, KUBERNETES_SYSTEM_PREFIX, KUBERNETES_API_TOKEN); if (apiToken == null) { apiToken = readAccountToken(); } return apiToken; }
Source:
public static AutobatchingPaxosLearnerNetworkClientFactory create( LocalAndRemotes<WithDedicatedExecutor<BatchPaxosLearner>> learners, int quorumSize) { DisruptorAutobatcher<Map.Entry<Client, PaxosValue>, PaxosResponse> learn = Autobatchers.coalescing(new LearnCoalescingConsumer(learners.local(), learners.remotes())) .safeLoggablePurpose("batch-paxos-learner.learn") .build(); Map<BatchPaxosLearner, ExecutorService> executors = KeyedStream.of(learners.all()) .map(WithDedicatedExecutor::executor) .mapKeys(WithDedicatedExecutor::service) .collectToMap(); List<BatchPaxosLearner> remotes = learners.all() .stream() .map(WithDedicatedExecutor::service) .collect(Collectors.toList()); DisruptorAutobatcher<WithSeq<Client>, PaxosResponses<PaxosContainer<Optional<PaxosValue>>>> learnedValues = Autobatchers.coalescing( wrap( remotes, executors, quorumSize, LearnedValuesCoalescingFunction::new)) .safeLoggablePurpose("batch-paxos-learner.learned-values") .build(); DisruptorAutobatcher<WithSeq<Client>, PaxosResponses<PaxosUpdate>> learnedValuesSince = Autobatchers.coalescing( wrap( remotes, executors, quorumSize, LearnedValuesSinceCoalescingFunction::new)) .safeLoggablePurpose("batch-paxos-learner.learned-values-since") .build(); return new AutobatchingPaxosLearnerNetworkClientFactory( learn, learnedValues, learnedValuesSince); }

Target:
public static AutobatchingPaxosLearnerNetworkClientFactory create( LocalAndRemotes<WithDedicatedExecutor<BatchPaxosLearner>> learners, int quorumSize) { DisruptorAutobatcher<Map.Entry<Client, PaxosValue>, PaxosResponse> learn = Autobatchers.coalescing(new LearnCoalescingConsumer(learners.local(), learners.remotes())) .safeLoggablePurpose("batch-paxos-learner.learn") .build(); Map<BatchPaxosLearner, ExecutorService> executors = WithDedicatedExecutor.convert(learners.all()); List<BatchPaxosLearner> remotes = ImmutableList.copyOf(executors.keySet()); DisruptorAutobatcher<WithSeq<Client>, PaxosResponses<PaxosContainer<Optional<PaxosValue>>>> learnedValues = Autobatchers.coalescing( wrap( remotes, executors, quorumSize, LearnedValuesCoalescingFunction::new)) .safeLoggablePurpose("batch-paxos-learner.learned-values") .build(); DisruptorAutobatcher<WithSeq<Client>, PaxosResponses<PaxosUpdate>> learnedValuesSince = Autobatchers.coalescing( wrap( remotes, executors, quorumSize, LearnedValuesSinceCoalescingFunction::new)) .safeLoggablePurpose("batch-paxos-learner.learned-values-since") .build(); return new AutobatchingPaxosLearnerNetworkClientFactory( learn, learnedValues, learnedValuesSince); }
Source:
public String author() throws IOException { try { return new JdbcSession(this.sql.source()) .sql("SELECT author FROM attachment WHERE bout = ? AND name = ?") .set(this.bout) .set(this.label) .select(new SingleOutcome<>(String.class)); } catch (final SQLException ex) { throw new IOException(ex); } }

Target:
public String author() throws IOException { try { return new JdbcSession(this.sql.source()) .sql( "SELECT author FROM attachment WHERE bout = ? AND name = ?" ) .set(this.bout) .set(this.label) .select(new SingleOutcome<>(String.class)); } catch (final SQLException ex) { throw new IOException( String.format("Can't fetch author from bout #%d", this.bout), ex ); } }
Source:
public static boolean rulesetNeedUpdate(DependencyResolver dependencyResolver) { List<Coordinate> resolveVersions = dependencyResolver.resolveVersions(DependencyQueryBuilder.create(CoordinateBuilder.create() .setGroupId("org.jboss.windup.rules") .setArtifactId("windup-rulesets"))); int i = 0; Coordinate latestCoordinate; do{ i++; latestCoordinate = resolveVersions.get(resolveVersions.size() - i); }while(latestCoordinate.isSnapshot()); Path windupRulesDir = PathUtil.getWindupRulesDir(); Path coreRulesPropertiesPath = windupRulesDir.resolve(RULESET_CORE_DIRECTORY + "/META-INF/maven/org.jboss.windup.rules/windup-rulesets/pom.properties"); try (BufferedReader br = Files.newBufferedReader(coreRulesPropertiesPath, StandardCharsets.UTF_8)) { String line; while ((line = br.readLine()) != null) { if (line.startsWith(META_INF_VERSION_KEY)) { String installedVersion = line.substring(META_INF_VERSION_KEY.length()); String latestVersion = latestCoordinate.getVersion(); return versionIsOld(installedVersion,latestVersion); } } } catch (IOException e) { e.printStackTrace(); } return false; }

Target:
public static boolean rulesetNeedUpdate(DependencyResolver dependencyResolver) { List<Coordinate> resolveVersions = dependencyResolver.resolveVersions(DependencyQueryBuilder.create(CoordinateBuilder.create() .setGroupId("org.jboss.windup.rules") .setArtifactId("windup-rulesets"))); int i = 0; Coordinate latestCoordinate; do { i++; latestCoordinate = resolveVersions.get(resolveVersions.size() - i); } while (latestCoordinate.isSnapshot()); Path windupRulesDir = PathUtil.getWindupRulesDir(); Imported<ResourceFactory> imported = FurnaceHolder.getFurnace().getAddonRegistry().getServices(ResourceFactory.class); ResourceFactory factory = imported.get(); Path coreRulesPropertiesPath = windupRulesDir.resolve(RULESET_CORE_DIRECTORY + "/META-INF/maven/org.jboss.windup.rules/windup-rulesets/pom.xml"); File pomXml = coreRulesPropertiesPath.toFile(); if (pomXml.exists()) { MavenModelResource pom = (MavenModelResource) factory.create(pomXml); String installedVersion = pom.getCurrentModel().getVersion(); String latestVersion = latestCoordinate.getVersion(); SingleVersion installed = new SingleVersion(installedVersion); SingleVersion latest = new SingleVersion(latestVersion); return versionIsOld(installed, latest); } else { return false; } }
Source:
private void deployHADeployments() { int size = toDeployOnQuorum.size(); if (size != 0) { log.info("There are " + size + " HA deployments waiting on a quorum. These will now be deployed"); for (final Runnable task: new ArrayList<>(toDeployOnQuorum)) { try { task.run(); } catch (Throwable t) { log.error("Failed to run redeployment task", t); } } toDeployOnQuorum.clear(); } }

Target:
private void deployHADeployments() { int size = toDeployOnQuorum.size(); if (size != 0) { log.info("There are " + size + " HA deployments waiting on a quorum. These will now be deployed"); Runnable task; while ((task = toDeployOnQuorum.poll()) != null) { try { task.run(); } catch (Throwable t) { log.error("Failed to run redeployment task", t); } } } }
Source:
public void visit(Method method) { if (!predicate.test(method)) { return; } TypedClassOperation operation = TypedOperation.forMethod(method); if (classType.isSubtypeOf(operation.getDeclaringType()) && operation.isStatic()) { int declaringClassMods = method.getDeclaringClass().getModifiers() & Modifier.classModifiers(); if (!Modifier.isPublic(declaringClassMods)) { operation = operation.getOperationForType(classType); } } if (operation == null) { System.out.println("null operation for " + classType + " method " + method.getName()); } if (!omitPredicate.shouldOmit(classType, operation, method)) { addOperation(operation); } }

Target:
public void visit(Method method) { if (!reflectionPredicate.test(method)) { return; } TypedClassOperation operation = instantiateTypes(TypedOperation.forMethod(method)); checkSubTypes(operation); if (operation.isStatic()) { int declaringClassMods = method.getDeclaringClass().getModifiers() & Modifier.classModifiers(); if (!Modifier.isPublic(declaringClassMods)) { operation = operation.getOperationForType(classType); } } if (!omitPredicate.shouldOmit(operation.getOperationForType(classType))) { operations.add(operation); } }
Source:
public void testIDetectParentIsAFile() throws Exception { final Path cwd = path("/" + getMethodName() + "-" + UUID.randomUUID()); final Path file = new Path(cwd, "file"); try { touch(guardedFs, file); awaitFileStatus(guardedFs, file); final S3AFileStatus newParentFile = MetadataStoreTestBase .basicFileStatus(cwd, 1, false, 1); metadataStore.put(new PathMetadata(newParentFile)); final S3GuardFsck s3GuardFsck = new S3GuardFsck(rawFS, metadataStore); final List<S3GuardFsck.ComparePair> comparePairs = s3GuardFsck.compareS3ToMs(cwd); assertEquals("Number of pairs should be two. The cwd (parent) and the " + "child.", 2, comparePairs.size()); final S3GuardFsck.ComparePair cwdPair = comparePairs.stream() .filter(p -> p.getPath().equals(cwd)) .findFirst().get(); assertNotNull("The pair should not be null.", cwdPair); assertTrue("The cwdPair must contain a violation.", cwdPair.containsViolation()); Assertions.assertThat(cwdPair.getViolations()) .describedAs("Violations in the cwdPair") .contains(S3GuardFsck.Violation.DIR_IN_S3_FILE_IN_MS); final S3GuardFsck.ComparePair childPair = comparePairs.stream() .filter(p -> p.getPath().equals(file)) .findFirst().get(); assertNotNull("The pair should not be null.", childPair); assertTrue("The childPair must contain a violation.", childPair.containsViolation()); Assertions.assertThat(childPair.getViolations()) .describedAs("Violations in the childPair") .contains(S3GuardFsck.Violation.PARENT_IS_A_FILE); } finally { rawFS.delete(cwd, true); metadataStore.forgetMetadata(file); metadataStore.forgetMetadata(cwd); } }

Target:
public void testIDetectParentIsAFile() throws Exception { final Path cwd = path("/" + getMethodName() + "-" + UUID.randomUUID()); final Path file = new Path(cwd, "file"); try { touchGuardedAndWaitRaw(file); final S3AFileStatus newParentFile = MetadataStoreTestBase .basicFileStatus(cwd, 1, false, 1); metadataStore.put(new PathMetadata(newParentFile)); final S3GuardFsck s3GuardFsck = new S3GuardFsck(rawFs, metadataStore); final List<S3GuardFsck.ComparePair> comparePairs = s3GuardFsck.compareS3ToMs(cwd); assertComparePairsSize(comparePairs, 2); checkForViolationInPairs(cwd, comparePairs, S3GuardFsck.Violation.DIR_IN_S3_FILE_IN_MS); checkForViolationInPairs(file, comparePairs, S3GuardFsck.Violation.PARENT_IS_A_FILE); } finally { cleanup(file, cwd); } }
Source:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } AbstractAccessControl other = (AbstractAccessControl) obj; if (!Objects.equals(this.id, other.id)) { return false; } return true; }

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } AccessControl other = (AccessControl) obj; if (!Objects.equals(this.id, other.getId())) { return false; } return true; }
Source:
public void testStreamInputPacketIndexOverlappingBothSides() { assertTrue(fFixture.append(new PacketStub(1, 0, 3))); assertTrue(fFixture.append(new PacketStub(2, 0, 3))); assertTrue(fFixture.append(new PacketStub(3, 0, 3))); assertTrue(fFixture.append(new PacketStub(4, 7, 9))); assertTrue(fFixture.append(new PacketStub(5, 7, 9))); assertTrue(fFixture.append(new PacketStub(6, 7, 9))); assertEquals(0, fFixture.search(3)); assertEquals(2, fFixture.search(6)); assertEquals(3, fFixture.search(8)); }

Target:
public void testStreamInputPacketIndexOverlappingBothSides() { assertTrue(fFixture.append(new PacketStub(0, 0, 3))); assertTrue(fFixture.append(new PacketStub(1, 0, 3))); assertTrue(fFixture.append(new PacketStub(2, 0, 3))); assertTrue(fFixture.append(new PacketStub(3, 7, 9))); assertTrue(fFixture.append(new PacketStub(4, 7, 9))); assertTrue(fFixture.append(new PacketStub(5, 7, 9))); assertEquals(0, fFixture.search(3)); assertEquals(2, fFixture.search(6)); assertEquals(3, fFixture.search(8)); }
Source:
public PlanNodeStatsEstimate mapSymbolColumnStatistics(Symbol symbol, Function<SymbolStatsEstimate, SymbolStatsEstimate> mappingFunction) { return buildFrom(this) .setSymbolStatistics(symbolStatistics.entrySet().stream() .collect(Collectors.toMap( Map.Entry::getKey, e -> { if (e.getKey().equals(symbol)) { return mappingFunction.apply(e.getValue()); } return e.getValue(); }))) .build(); }

Target:
public PlanNodeStatsEstimate mapSymbolColumnStatistics(Symbol symbol, Function<SymbolStatsEstimate, SymbolStatsEstimate> mappingFunction) { return buildFrom(this) .setSymbolStatistics(symbolStatistics.entrySet().stream() .collect(toImmutableMap( Map.Entry::getKey, e -> { if (e.getKey().equals(symbol)) { return mappingFunction.apply(e.getValue()); } return e.getValue(); }))) .build(); }
Source:
public PolicyDecision isAuthorized(IdentifierBundle whoToAuth, RequestedAction whatToAuth) { if (whoToAuth == null) { return defaultDecision("whomToAuth was null"); } if (whatToAuth == null) { return defaultDecision("whatToAuth was null"); } List<String> userUris = new ArrayList<String>(HasAssociatedIndividual.getIndividualUris(whoToAuth)); for (Permission p : HasPermission.getPermissions(whoToAuth)) { if (p.isAuthorized(userUris, whatToAuth)) { log.debug("Permission " + p + " approves request " + whatToAuth); return new BasicPolicyDecision(Authorization.AUTHORIZED, "PermissionsPolicy: approved by " + p); } else { log.trace("Permission " + p + " denies request " + whatToAuth); } } log.debug("No permission will approve " + whatToAuth); return defaultDecision("no permission will approve " + whatToAuth); }

Target:
public PolicyDecision isAuthorized(IdentifierBundle whoToAuth, RequestedAction whatToAuth) { if (whoToAuth == null) { return defaultDecision("whomToAuth was null"); } if (whatToAuth == null) { return defaultDecision("whatToAuth was null"); } List<String> personUris = new ArrayList<String>(HasAssociatedIndividual.getIndividualUris(whoToAuth)); for (Permission p : HasPermission.getPermissions(whoToAuth)) { if (p.isAuthorized(personUris, whatToAuth)) { log.debug("Permission " + p + " approves request " + whatToAuth); return new BasicPolicyDecision(Authorization.AUTHORIZED, "PermissionsPolicy: approved by " + p); } else { log.trace("Permission " + p + " denies request " + whatToAuth); } } log.debug("No permission will approve " + whatToAuth); return defaultDecision("no permission will approve " + whatToAuth); }
Source:
private static <T> T lookup(Context context, Class<T> clazz, String name) throws NamingException { Object object = context.lookup(name); try { return clazz.cast(object); } catch (ClassCastException ex) { if (object instanceof Reference) { Reference ref = (Reference) object; String errorMessage = "JNDI failed to de-reference Reference with name " + name + "; is the " + "factory " + ref .getFactoryClassName() + " in your classpath?"; throw new NamingException(errorMessage); } else { String errorMessage = "JNDI lookup of name " + name + " returned a " + object.getClass().getName() + " while a " + clazz + " was expected"; logger.error(errorMessage); throw new NamingException(errorMessage); } } }

Target:
private static <T> T lookup(Context context, Class<T> clazz, String name) throws NamingException { Object object = context.lookup(name); try { return clazz.cast(object); } catch (ClassCastException ex) { if (object instanceof Reference) { Reference ref = (Reference) object; String errorMessage = "JNDI failed to de-reference Reference with name " + name + "; is the " + "factory " + ref .getFactoryClassName() + " in your classpath?"; throw new NamingException(errorMessage); } else { String errorMessage = "JNDI lookup of name " + name + " returned a " + object.getClass().getName() + " while a " + clazz + " was expected"; throw new NamingException(errorMessage); } } }
Source:
public AzureCloudInstanceInformation build() { return new AzureCloudInstanceInformation(_cloudInstanceInfoMap); }

Target:
public AzureCloudInstanceInformation build() { return new AzureCloudInstanceInformation(new HashMap<>(_cloudInstanceInfoMap)); }
Source:
public static IterableMapping fromPrism(IterableMappingPrism iterableMapping, ExecutableElement method, FormattingMessager messager) { if ( iterableMapping == null ) { return null; } boolean elementTargetTypeIsDefined = !TypeKind.VOID.equals( iterableMapping.elementTargetType().getKind() ); if ( !elementTargetTypeIsDefined && iterableMapping.dateFormat().isEmpty() && iterableMapping.qualifiedBy().isEmpty() ) { messager.printMessage( Diagnostic.Kind.ERROR, method, Message.iterablemapping_noelements ); } return new IterableMapping( iterableMapping.dateFormat(), iterableMapping.qualifiedBy(), elementTargetTypeIsDefined ? iterableMapping.elementTargetType() : null, iterableMapping.mirror, iterableMapping.values.dateFormat() ); }

Target:
public static IterableMapping fromPrism(IterableMappingPrism iterableMapping, ExecutableElement method, FormattingMessager messager) { if ( iterableMapping == null ) { return null; } boolean elementTargetTypeIsDefined = !TypeKind.VOID.equals( iterableMapping.elementTargetType().getKind() ); if ( !elementTargetTypeIsDefined && iterableMapping.dateFormat().isEmpty() && iterableMapping.qualifiedBy().isEmpty() ) { messager.printMessage( method, Message.ITERABLEMAPPING_NO_ELEMENTS ); } return new IterableMapping( iterableMapping.dateFormat(), iterableMapping.qualifiedBy(), elementTargetTypeIsDefined ? iterableMapping.elementTargetType() : null, iterableMapping.mirror, iterableMapping.values.dateFormat() ); }
Source:
public void createUnloggedTableIfNotExists(final RelationKey relationKey, final Schema schema) throws DbException { Objects.requireNonNull(jdbcConnection); Objects.requireNonNull(jdbcInfo); Objects.requireNonNull(relationKey); Objects.requireNonNull(schema); execute(createIfNotExistsStatementFromSchema(schema, relationKey, true)); }

Target:
public void createUnloggedTableIfNotExists(final RelationKey relationKey, final Schema schema) throws DbException { Objects.requireNonNull(jdbcConnection, "jdbcConnection"); Objects.requireNonNull(jdbcInfo, "jdbcInfo"); Objects.requireNonNull(relationKey, "relationKey"); Objects.requireNonNull(schema, "schema"); execute(createIfNotExistsStatementFromSchema(schema, relationKey, true)); }
Source:
private KeyAwareLockPromise acquireLocalLock(InvocationContext ctx, DataCommand command) throws InterruptedException { if (trace) log.tracef("acquireLocalLock"); final TxInvocationContext txContext = (TxInvocationContext) ctx; Object key = command.getKey(); txContext.addAffectedKey(key); ((TxInvocationContext) ctx).getCacheTransaction().cleanupBackupLocksForKey(key); return lockOrRegisterBackupLock(txContext, key, getLockTimeoutMillis(command)); }

Target:
private KeyAwareLockPromise acquireLocalLock(InvocationContext ctx, DataCommand command) throws InterruptedException { if (trace) log.tracef("acquireLocalLock"); final TxInvocationContext txContext = (TxInvocationContext) ctx; Object key = command.getKey(); txContext.addAffectedKey(key); txContext.getCacheTransaction().removeBackupLock(key); return lockOrRegisterBackupLock(txContext, key, getLockTimeoutMillis(command)); }
Source:
public void setUp() { VM vm = new VM(); vm.setId(vmId); doReturn(vm).when(command).getVm(); }

Target:
public void setUp() { VM vm = new VM(); vm.setId(vmId); command.setVm(vm); }
Source:
private BlockingConnection retrieveMQTTConnection(String host, String truststorePath, String truststorePass, String keystorePath, String keystorePass) throws Exception { MQTT mqtt = new MQTT(); mqtt.setConnectAttemptsMax(1); mqtt.setReconnectAttemptsMax(0); mqtt.setHost(host); mqtt.setUserName(fullUser); mqtt.setPassword(fullPass); SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(getKeyManager(keystorePath, keystorePass), getTrustManager(truststorePath, truststorePass), null); mqtt.setSslContext(sslContext); BlockingConnection connection = mqtt.blockingConnection(); connection.connect(); return connection; }

Target:
private BlockingConnection retrieveMQTTConnection(String host, String truststorePath, String truststorePass, String keystorePath, String keystorePass) throws Exception { MQTT mqtt = new MQTT(); mqtt.setConnectAttemptsMax(1); mqtt.setReconnectAttemptsMax(0); mqtt.setHost(host); mqtt.setUserName(fullUser); mqtt.setPassword(fullPass); SSLContext sslContext = SSLSupport.createContext(TransportConstants.DEFAULT_KEYSTORE_PROVIDER, keystorePath, keystorePass, TransportConstants.DEFAULT_TRUSTSTORE_PROVIDER, truststorePath, truststorePass); mqtt.setSslContext(sslContext); BlockingConnection connection = mqtt.blockingConnection(); connection.connect(); return connection; }
Source:
boolean resumeSession() { Session session = currentSession.get(); if (session == null) { startSession(false); return false; } else { return session.isStopped.compareAndSet(true, false); } }

Target:
boolean resumeSession() { Session session = currentSession.get(); boolean resumed; if (session == null) { session = startSession(false); resumed = false; } else { resumed = session.isStopped.compareAndSet(true, false); } notifySessionStartObserver(session); return resumed; }
Source:
public void onInfoWindowClick(Marker marker) { mCustomInfoWindowAdapter.cancelUpdates(); ObaTripStatus status = mMarkerData.getStatusFromMarker(marker); String focusedStopId = mController.getFocusedStopId(); if (mController != null && mController.getFocusedStopId != null) { TripDetailsActivity.start(mActivity, status.getActiveTripId(), focusedStopId); } else { TripDetailsActivity.start(mActivity, status.getActiveTripId()); } }

Target:
public void onInfoWindowClick(Marker marker) { mCustomInfoWindowAdapter.cancelUpdates(); ObaTripStatus status = mMarkerData.getStatusFromMarker(marker); if (mController != null && mController.getFocusedStopId() != null) { TripDetailsActivity.start(mActivity, status.getActiveTripId(), mController.getFocusedStopId()); } else { TripDetailsActivity.start(mActivity, status.getActiveTripId()); } }
Source:
private static void log(String text) { if (debug) { log(text); } }

Target:
private static void log(String text) { if (debug) { Log.d(TAG, text); } }
Source:
public void testPartitionMultiget() throws Exception { List<String> keys = Lists.newArrayList(); for (int i = 0; i < 500; i++) { final String key = "key-" + i; keys.add(key); client.set(key, key, TTL); } final ListenableFuture<List<String>> resultsFuture = client.get(keys); final List<String> results = resultsFuture.get(); assertEquals(keys, results); for (String key : keys) { client.delete(key); } }

Target:
public void testPartitionMultiget() throws Exception { final List<String> keys = Lists.newArrayList(); for (int i = 0; i < 500; i++) { keys.add("key-" + i); } final List<ListenableFuture<MemcacheStatus>> futures = Lists.newArrayList(); try { for (final String key : keys) { futures.add(client.set(key, key, TTL)); } Futures.allAsList(futures).get(); final ListenableFuture<List<String>> resultsFuture = client.get(keys); final List<String> results = resultsFuture.get(); assertEquals(keys, results); } finally { futures.clear(); for (final String key : keys) { futures.add(client.delete(key)); } Futures.allAsList(futures).get(); } }
Source:
public Function<Double, Double> differentiate(Function<Double, Double> function, Function<Double, Boolean> domain) { ArgChecker.notNull(function, "function"); ArgChecker.notNull(domain, "domain"); return new Function<Double, Double>() { @SuppressWarnings("synthetic-access") @Override public Double apply(Double x) { ArgChecker.notNull(x, "x"); ArgChecker.isTrue(domain.apply(x), "point is not in the function domain", x.toString()); if (!domain.apply(x + eps)) { if (!domain.apply(x - eps)) { throw new IllegalArgumentException("cannot get derivative at point " + x.toString()); } return (-function.apply(x - threeEps) + 4d * function.apply(x - twoEps) - 5d * function.apply(x - eps) + 2d * function.apply(x)) / epsSqr; } else { if (!domain.apply(x - eps)) { return (-function.apply(x + threeEps) + 4d * function.apply(x + twoEps) - 5d * function.apply(x + eps) + 2d * function.apply(x)) / epsSqr; } return (function.apply(x + eps) + function.apply(x - eps) - 2d * function.apply(x)) / epsSqr; } } }; }

Target:
public Function<Double, Double> differentiate(Function<Double, Double> function, Function<Double, Boolean> domain) { ArgChecker.notNull(function, "function"); ArgChecker.notNull(domain, "domain"); return new Function<Double, Double>() { @SuppressWarnings("synthetic-access") @Override public Double apply(Double x) { ArgChecker.notNull(x, "x"); ArgChecker.isTrue(domain.apply(x), "point is not in the function domain", x.toString()); if (!domain.apply(x + threeEps)) { if (!domain.apply(x - threeEps)) { throw new IllegalArgumentException("cannot get derivative at point " + x.toString()); } return (-function.apply(x - threeEps) + 4d * function.apply(x - twoEps) - 5d * function.apply(x - eps) + 2d * function.apply(x)) / epsSqr; } else { if (!domain.apply(x - eps)) { return (-function.apply(x + threeEps) + 4d * function.apply(x + twoEps) - 5d * function.apply(x + eps) + 2d * function.apply(x)) / epsSqr; } return (function.apply(x + eps) + function.apply(x - eps) - 2d * function.apply(x)) / epsSqr; } } }; }
Source:
public void snippetIsNotAffectedByXSS() { new ArticlePage().open("/File:Mala-mi.jpg"); FilePageObject filePage = new FilePageObject(); Assertion.assertTrue(filePage.doesSnippetContainXSS()); AlertHandler xssAlert = new AlertHandler(); Assertion.assertFalse(xssAlert.isAlertPresent(driver)); }

Target:
public void snippetIsNotAffectedByXSS() { new ArticlePage().open("/File:Mala-mi.jpg"); FilePageObject filePage = new FilePageObject(); Assertion.assertTrue(filePage.doesSnippetContainXSS()); Assertion.assertFalse(AlertHandler.isAlertPresent(driver)); }
Source:
public void permissionIndividuallyByRole(Permissionable parent, Permissionable permissionable, User user, Role role) throws DotDataException, DotSecurityException { List<Permission> newSetOfPermissions = getNewPermissions(parent, permissionable, user); List<Permission> newSetOfPermissionsFiltered = new ArrayList<>(); for (Permission newPermission : newSetOfPermissions) { Role newPermissionRole = APILocator.getRoleAPI().loadRoleById(newPermission.getRoleId()); if (!APILocator.getRoleAPI().isParentRole(role, newPermissionRole)) { newSetOfPermissionsFiltered.add(newPermission); } } if (!newSetOfPermissions.isEmpty()) { permissionFactory.assignPermissions(newSetOfPermissionsFiltered, permissionable); } }

Target:
public void permissionIndividuallyByRole(Permissionable parent, Permissionable permissionable, User user, Role role) throws DotDataException, DotSecurityException { List<Permission> newSetOfPermissions = getNewPermissions(parent, permissionable, user); ImmutableList.Builder<Permission> immutablePermissionsFiltered = new Builder<>(); for (Permission newPermission : newSetOfPermissions) { Role newPermissionRole = APILocator.getRoleAPI().loadRoleById(newPermission.getRoleId()); if (!APILocator.getRoleAPI().isParentRole(role, newPermissionRole)) { immutablePermissionsFiltered.add(newPermission); } } final List<Permission> permissionsFiltered = immutablePermissionsFiltered.build(); if (!permissionsFiltered.isEmpty()) { permissionFactory.assignPermissions(permissionsFiltered, permissionable); } }
Source:
public void setLevel(Level newLevel) throws SecurityException { super.setLevel(newLevel); LogContext.checkAccess(); loggerNode.setLevel(newLevel); }

Target:
public void setLevel(Level newLevel) throws SecurityException { LogContext.checkAccess(); super.setLevel(newLevel); loggerNode.setLevel(newLevel); }
Source:
private static Optional<KubernetesSlave> resolveNode(@NonNull Jenkins jenkins, String namespace, String name) { return new ArrayList<>(jenkins.getNodes()).stream() .filter(n -> n instanceof KubernetesSlave) .map(n -> (KubernetesSlave) n) .filter(ks -> Objects.equals(ks.getNamespace(), namespace) && Objects.equals(ks.getPodName(), name)) .findFirst(); }

Target:
private static Optional<KubernetesSlave> resolveNode(@NonNull Jenkins jenkins, String namespace, String name) { return new ArrayList<>(jenkins.getNodes()).stream() .filter(KubernetesSlave.class::isInstance) .map(KubernetesSlave.class::cast) .filter(ks -> Objects.equals(ks.getNamespace(), namespace) && Objects.equals(ks.getPodName(), name)) .findFirst(); }
Source:
private static void putKielBusStyle(String name, Style style) { STYLES.put("AK____|B" + name, style); STYLES.put("KIEL__|B" + name, style); }

Target:
private static void putKielBusStyle(String name, Style style) { STYLES.put("AK|B" + name, style); STYLES.put("KIEL|B" + name, style); }
Source:
private Path getArtifactPath(String basePath, String artifactPath) throws IOException { Path base = Paths.get(basePath); Path path = base.resolve(artifactPath); if (!Files.exists(path.getParent())) { Files.createDirectories(path.getParent()); } return path; }

Target:
public static Path getArtifactPath(String basePath, String artifactPath) throws IOException { Path base = Paths.get(basePath); Path path = base.resolve(artifactPath); if (!Files.exists(path.getParent())) { Files.createDirectories(path.getParent()); } return path; }
Source:
private List<DiskImage> initializeListForCopiedImage() { List<DiskImage> clonedDiskImages = (ArrayList)getImages().clone(); ArrayList<Guid> storageDomains = new ArrayList<>(); for (DiskImage clonedDiskImage : clonedDiskImages) { clonedDiskImage.setStorageIds(storageDomains); } return clonedDiskImages; }

Target:
private List<DiskImage> initializeListForCopiedImage() { List<DiskImage> clonedDiskImages = new ArrayList<>(getImages()); ArrayList<Guid> storageDomains = new ArrayList<>(); for (DiskImage clonedDiskImage : clonedDiskImages) { clonedDiskImage.setStorageIds(storageDomains); } return clonedDiskImages; }
Source:
public IndexedRecord fillRecord(SyncStatus status, Schema schema, IndexedRecord record) { Boolean isDynamic = Boolean.FALSE; Schema currentSchema = schema; if (AvroUtils.isIncludeAllFields(schema)) { isDynamic = true; currentSchema = MarketoSourceOrSink.mergeDynamicSchemas(record.getSchema(), flowSchema); } IndexedRecord outRecord = new Record(currentSchema); for (Field f : currentSchema.getFields()) { switch (f.name()) { case FIELD_LEAD_ID: case FIELD_ID_SOAP: case FIELD_ID_REST: case FIELD_CAMPAIGN_ID: if (status.getId() == null) { try { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(inputSchema.getField(f.name()).pos())); } catch (NullPointerException e) { LOG.error("Could not find field `{}` in schema : {}.", f.name(), e.getMessage()); } } else { outRecord.put(f.pos(), status.getId()); } break; case FIELD_SUCCESS: outRecord.put(f.pos(), Boolean.parseBoolean(status.getStatus())); break; case FIELD_STATUS: outRecord.put(f.pos(), status.getStatus()); break; case FIELD_ERROR_MSG: case FIELD_REASON: outRecord.put(f.pos(), status.getAvailableReason()); break; case FIELD_MARKETO_GUID: outRecord.put(f.pos(), status.getMarketoGUID()); break; case FIELD_SEQ: outRecord.put(f.pos(), status.getSeq()); break; default: if (isDynamic) { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(f.pos())); } else { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(inputSchema.getField(f.name()).pos())); } } } return outRecord; }

Target:
public IndexedRecord fillRecord(SyncStatus status, Schema schema, IndexedRecord record) { Boolean isDynamic = Boolean.FALSE; Schema currentSchema = schema; if (AvroUtils.isIncludeAllFields(schema)) { isDynamic = true; if (dynamicSchema == null) { dynamicSchema = MarketoSourceOrSink.mergeDynamicSchemas(record.getSchema(), schema); } currentSchema = dynamicSchema; } IndexedRecord outRecord = new Record(currentSchema); for (Field f : currentSchema.getFields()) { switch (f.name()) { case FIELD_LEAD_ID: case FIELD_ID_SOAP: case FIELD_ID_REST: case FIELD_CAMPAIGN_ID: if (status.getId() == null) { try { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(inputSchema.getField(f.name()).pos())); } catch (NullPointerException e) { LOG.error("Could not find field `{}` in schema : {}.", f.name(), e.getMessage()); } } else { outRecord.put(f.pos(), status.getId()); } break; case FIELD_SUCCESS: outRecord.put(f.pos(), Boolean.parseBoolean(status.getStatus())); break; case FIELD_STATUS: outRecord.put(f.pos(), status.getStatus()); break; case FIELD_ERROR_MSG: case FIELD_REASON: outRecord.put(f.pos(), status.getAvailableReason()); break; case FIELD_MARKETO_GUID: outRecord.put(f.pos(), status.getMarketoGUID()); break; case FIELD_SEQ: outRecord.put(f.pos(), status.getSeq()); break; default: if (isDynamic) { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(f.pos())); } else { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(inputSchema.getField(f.name()).pos())); } } } return outRecord; }
Source:
public void testBooleanLiteralStats() { assertExpression("true") .equalTo(standardInputStatistics); assertExpression("false") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); assertExpression("cast(null as boolean)") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); assertExpression("cast(null as boolean) AND sin(x) > x").outputRowsCountUnknown(); assertExpression("cast(null as boolean) AND null") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); }

Target:
public void testBooleanLiteralStats() { assertExpression("true") .equalTo(standardInputStatistics); assertExpression("false") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); assertExpression("cast(null as boolean) AND cast(null as boolean)") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); assertExpression("cast(null as boolean) OR sin(x) > x").outputRowsCount(NaN); Expression expression = expression("cast(null as boolean) AND sin(x) > x"); RowExpression rowExpression = translator.translateAndOptimize(expression, standardTypes); PlanNodeStatsEstimate rowExpressionStatsEstimate = statsCalculator.filterStats(standardInputStatistics, rowExpression, session, standardTypes); PlanNodeStatsAssertion.assertThat(rowExpressionStatsEstimate).outputRowsCount(0.0); }
Source:
public void commandDone(ICommandToken token, ICommandResult result) { if (token.getCommand() instanceof MICommand<?> && result instanceof MIInfo && ((MIInfo) result).isRunning()) { IDMContext ctx = ((MICommand<MIInfo>) token.getCommand()).getContext(); IExecutionDMContext execDMCtx = (ctx instanceof IExecutionDMContext) ? (IExecutionDMContext) ctx : DMContexts.getParentOfType(ctx, IExecutionDMContext.class); if (execDMCtx != null) { MIResultRecord rr = ((MIInfo) result).getMIOutput().getMIResultRecord(); if (rr != null) { fRunCommands.put(execDMCtx, Integer.valueOf(rr.getToken())); } } } }

Target:
public void commandDone(ICommandToken token, ICommandResult result) { if (token.getCommand() instanceof MICommand<?> && result instanceof MIInfo && ((MIInfo) result).isRunning()) { IDMContext ctx = ((MICommand<MIInfo>) token.getCommand()).getContext(); IExecutionDMContext execDMCtx = DMContexts.getAncestorOfType(ctx, IExecutionDMContext.class); if (execDMCtx != null) { MIResultRecord rr = ((MIInfo) result).getMIOutput().getMIResultRecord(); if (rr != null) { fRunCommands.put(execDMCtx, Integer.valueOf(rr.getToken())); } } } }
Source:
protected boolean checkIfLunDiskCanBeAdded() { LUNs lun = ((LunDisk) getParameters().getDiskInfo()).getLun(); switch (lun.getLunType()) { case UNKNOWN: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE); case ISCSI: if (lun.getLunConnections() == null || lun.getLunConnections().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } for (StorageServerConnections conn : lun.getLunConnections()) { if (StringUtils.isEmpty(conn.getiqn()) || StringUtils.isEmpty(conn.getconnection()) || StringUtils.isEmpty(conn.getport())) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } } break; } if (getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) != null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_IS_ALREADY_IN_USE); } if (getVm() != null) { if (!isVmNotInPreviewSnapshot()) { return false; } if (!isVmNotLocked()) { return false; } } return true; }

Target:
protected boolean checkIfLunDiskCanBeAdded() { LUNs lun = ((LunDisk) getParameters().getDiskInfo()).getLun(); switch (lun.getLunType()) { case UNKNOWN: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE); case ISCSI: if (lun.getLunConnections() == null || lun.getLunConnections().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } for (StorageServerConnections conn : lun.getLunConnections()) { if (StringUtils.isEmpty(conn.getiqn()) || StringUtils.isEmpty(conn.getconnection()) || StringUtils.isEmpty(conn.getport())) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } } break; } if (getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) != null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_IS_ALREADY_IN_USE); } if (getVm() != null && !(isVmNotInPreviewSnapshot() && isVmNotLocked())) { return false; } return true; }
Source:
public void addOrderSetMember(OrderSetMember orderSetMember, Integer position) { if (orderSetMember == null || getOrderSetMembers().contains(orderSetMember)) return; position = position == null ? getOrderSetMembers().size() : position - 1; orderSetMember.setOrderSet(this); getOrderSetMembers().add(position, orderSetMember); }

Target:
public void addOrderSetMember(OrderSetMember orderSetMember, Integer position) { Integer listIndex = findListIndexForGivenPosition(position); orderSetMember.setOrderSet(this); getOrderSetMembers().add(listIndex, orderSetMember); }
Source:
private Keyspace(String keyspaceName, boolean loadSSTables) { metadata = Schema.instance.getKeyspaceMetadata(keyspaceName); assert metadata != null : "Unknown keyspace " + keyspaceName; createReplicationStrategy(metadata); this.metric = new KeyspaceMetrics(this); this.viewManager = new ViewManager(this); for (TableMetadata cfm : metadata.tablesAndViews()) { logger.info("Initializing {}.{}", getName(), cfm.name); if (cfm.isVirtual()) initVirtualCf(Schema.instance.getTableMetadataRef(cfm.id)); else initCf(Schema.instance.getTableMetadataRef(cfm.id), loadSSTables); } this.viewManager.reload(false); }

Target:
private Keyspace(String keyspaceName, boolean loadSSTables) { metadata = Schema.instance.getKeyspaceMetadata(keyspaceName); assert metadata != null : "Unknown keyspace " + keyspaceName; createReplicationStrategy(metadata); this.metric = new KeyspaceMetrics(this); this.viewManager = new ViewManager(this); for (TableMetadata cfm : metadata.tablesAndViews()) { logger.trace("Initializing {}.{}", getName(), cfm.name); if (cfm.isVirtual()) initVirtualCf(Schema.instance.getTableMetadata(cfm.id)); else initCf(Schema.instance.getTableMetadataRef(cfm.id), loadSSTables); } this.viewManager.reload(false); }
Source:
public void typeInLinkInput(String text) { waitForElementVisibleByElement(linkInput); waitForElementClickableByElement(linkInput); linkInput.sendKeys(text); waitForElementNotVisibleByElement(inputPending); waitForValueToBePresentInElementsAttributeByElement(linkInput, "value", text); title.click(); }

Target:
public void typeInLinkInput(String text) { waitForDialogVisible(); waitForElementClickableByElement(linkInput); linkInput.sendKeys(text); waitForElementNotVisibleByElement(inputPending); waitForValueToBePresentInElementsAttributeByElement(linkInput, "value", text); title.click(); }
Source:
public void entityReference(String entity) { delegate.entityReference(entity); }

Target:
public void entityReference(String entity) { assertOpenBlock(); delegate.entityReference(entity); }