auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private Trigger(Parcel parcel) { this.id = parcel.readString(); this.description = parcel.readString(); this.enabled = (boolean) parcel.readValue(null); }

Target:
private Trigger(Parcel parcel) { this.id = parcel.readString(); this.description = parcel.readString(); this.tags = parcel.readHashMap(String.class.getClassLoader()); this.enabled = parcel.readString().equals("true"); }
Source:
public Builder(Context context) { this.context = context; }

Target:
public Builder(Context context) { this.context = context; if (context != null) { Context applicationContext = context.getApplicationContext(); Bundle metaData = ManifestInfo.getApplicationMetadata(applicationContext); if (metaData != null) { applicationId = metaData.getString(PARSE_APPLICATION_ID); clientKey = metaData.getString(PARSE_CLIENT_KEY); } } }
Source:
public void deletePost(Long postId, String username) { Post post = postRepository.findOne(postId); if (post == null) { throw new PostNotFoundException(postId); } else if (post.getAuthor().getUsername().compareTo(username) != 0){ throw new UnauthorizedException("Sorry ! this content is private."); } postRepository.delete(post); }

Target:
public void deletePost(Long postId, String username) { Post post = postRepository.findOne(postId); if (post == null) { throw new PostNotFoundException(postId); } else if (!post.isOwnedBy(username)){ throw new ResourceNotAuthorizedException("Sorry ! this content is private."); } postRepository.delete(post); }
Source:
private Monitor() { machineName = getMachineName(); eventSender = new IEventSender() { @Override public void sendThroughputEvent(String service, String messageId) { try { connection.getClient().event() .metric(1) .service(machineName + " " + service + " throughput.") .tags("storm", "throughput").send(); } catch (Throwable t) { logger.warn("Riemann error during send : " + t.getStackTrace()); } } }; startTimestampPerId = Maps.newConcurrentMap(); connection = new RiemannConnection(); connection.connect(); }

Target:
private Monitor() { machineName = getMachineName(); startTimestampPerId = Maps.newConcurrentMap();; eventSender = new EventSender(machineName); }
Source:
public void resolve(TemplateVariable variable, TemplateContext context) { super.resolve(variable, context); List params= variable.getVariableType().getParams(); if (params.size() >= 2) { DateFormat format= new SimpleDateFormat((String)params.get(0), Locale.forLanguageTag((String)params.get(1))); resolveWithFormat(variable, context, format); } else if (params.size() == 1) { DateFormat format= new SimpleDateFormat((String)params.get(0)); resolveWithFormat(variable, context, format); } else { super.resolve(variable, context); } }

Target:
public void resolve(TemplateVariable variable, TemplateContext context) { super.resolve(variable, context); List<String> params= variable.getVariableType().getParams(); if (params.size() >= 2) { DateFormat format= new SimpleDateFormat(params.get(0), new ULocale(params.get(1))); resolveWithFormat(variable, context, format); } else if (params.size() == 1) { DateFormat format= new SimpleDateFormat(params.get(0)); resolveWithFormat(variable, context, format); } else { super.resolve(variable, context); } }
Source:
private E makeRecord() { if (recordClass != null && recordClass != GenericData.Record.class) { E record = makeReflectRecord(); if (record != null) { return record; } } return makeGenericRecord(); }

Target:
private E makeRecord() { if (recordClass != GenericData.Record.class) { E record = makeReflectRecord(); if (record != null) { return record; } } return makeGenericRecord(); }
Source:
public void registerIndexes(final Collection<IndexDefinition> indexDefinitions) { for (final IndexDefinition indexDefinition : indexDefinitions) { final String indexPropertyName = indexDefinition.propertyName(); final Class<?> propertyType = getPropertyType(indexPropertyName); indexDefinition.setPropertyType(propertyType); final StringBuilder indexPropertyNameBuilder = new StringBuilder(indexPropertyName); if (CompoundIndexDefinition.class.isAssignableFrom(indexDefinition.getClass())) { final CompoundIndexDefinition compoundIndexDefinition = (CompoundIndexDefinition) indexDefinition; final String supportingPropertyName = compoundIndexDefinition.supportingPropertyName(); final Class<?> supportingPropertyType = getPropertyType(supportingPropertyName); compoundIndexDefinition.setSupportingPropertyType(supportingPropertyType); indexPropertyNameBuilder.append("_"); indexPropertyNameBuilder.append(supportingPropertyName); } this.indexDefinitions.put(indexPropertyNameBuilder.toString(), indexDefinition); } }

Target:
public void registerIndexes(final Collection<IndexDefinition> indexDefinitions) { for (final IndexDefinition indexDefinition : indexDefinitions) { final String propertyName = indexDefinition.propertyName(); final Class<?> propertyType = getPropertyType(propertyName); indexDefinition.setPropertyType(propertyType); String indexName; if (CompoundIndexDefinition.class.isAssignableFrom(indexDefinition.getClass())) { final CompoundIndexDefinition compoundIndexDefinition = (CompoundIndexDefinition) indexDefinition; final String supportingPropertyName = compoundIndexDefinition.supportingPropertyName(); final Class<?> supportingPropertyType = getPropertyType(supportingPropertyName); compoundIndexDefinition.setSupportingPropertyType(supportingPropertyType); indexName = compoundName(propertyName, supportingPropertyName); } else { indexName = indexDefinition.propertyName(); } this.indexDefinitions.put(indexName, indexDefinition); } }
Source:
public void testProcess() throws Exception { HashMap<String, FProcessorFunction> map = new HashMap<>(); FProcessorFunction oneWayFunction = new FProcessorFunction() { @Override public void process(FContext ctx, FProtocol in, FProtocol out) throws TException { return; } }; map.put(oneWay, oneWayFunction); FBaseProcessor processor = new FBaseProcessor(map); FProtocol iprot = mock(FProtocol.class); FProtocol oprot = mock(FProtocol.class); FContext ctx = new FContext(); TMessage thriftMessage = new TMessage(oneWay, (byte) 0x00, 1); when(iprot.readRequestHeader()).thenReturn(ctx); when(iprot.readMessageBegin()).thenReturn(thriftMessage); processor.process(iprot, oprot); }

Target:
public void testProcess() throws Exception { map.put(oneWay, oneWayFunction); FContext ctx = new FContext(); TMessage thriftMessage = new TMessage(oneWay, (byte) 0x00, 1); when(iprot.readRequestHeader()).thenReturn(ctx); when(iprot.readMessageBegin()).thenReturn(thriftMessage); processor.process(iprot, oprot); verify(oneWayFunction).process(ctx, iprot, oprot); }
Source:
public Background createBackground(Path context, ScenarioSimulationModel.Type type, String value) throws Exception { switch (type) { case RULE: return ruleSimulationCreationStrategy.createBackground(context, value); case DMN: return dmnSimulationCreationStrategy.createBackground(context, value); default: return null; } }

Target:
public Background createBackground(Path context, ScenarioSimulationModel.Type type, String value) throws Exception { switch (type) { case RULE: return ruleSimulationCreationStrategy.createBackground(context, value); case DMN: return dmnSimulationCreationStrategy.createBackground(context, value); default: throw new IllegalStateException("Unknown ScenarioSimulationModel.Type " + type); } }
Source:
public static ClientConfiguration toClientConf(AccumuloConfiguration conf) { ClientConfiguration clientConf = ClientConfiguration.create(); final String serverPrincipal = conf.get(Property.GENERAL_KERBEROS_PRINCIPAL); final KerberosName krbName; if (serverPrincipal != null && !serverPrincipal.isEmpty()) { krbName = new KerberosName(serverPrincipal); clientConf.setProperty(KERBEROS_SERVER_PRIMARY, krbName.getServiceName()); } for (Map.Entry<String,String> entry : conf) { String key = entry.getKey(); clientConf.setProperty(key, entry.getValue()); } return clientConf; }

Target:
public static ClientConfiguration toClientConf(AccumuloConfiguration conf) { ClientConfiguration clientConf = ClientConfiguration.create(); final String serverPrincipal = conf.get(Property.GENERAL_KERBEROS_PRINCIPAL); final KerberosName krbName; if (serverPrincipal != null && !serverPrincipal.isEmpty()) { krbName = new KerberosName(serverPrincipal); clientConf.setProperty(KERBEROS_SERVER_PRIMARY, krbName.getServiceName()); } HashSet<String> clientKeys = new HashSet<>(); for (ClientConfiguration.ClientProperty prop : ClientConfiguration.ClientProperty.values()) { clientKeys.add(prop.getKey()); } String key; for (Map.Entry<String,String> entry : conf) { key = entry.getKey(); if (clientKeys.contains(key)) { clientConf.setProperty(key, entry.getValue()); } } return clientConf; }
Source:
public long getNextSequenceValue(String name,long init,long inc) { LOGGER.debug("getNextSequenceValue({})",name); BasicDBObject q=new BasicDBObject(NAME,name); DBObject doc=coll.findOne(q); if(doc==null) { LOGGER.debug("inserting sequence record name={}, init={}, inc={}",name,init,inc); if(inc==0) inc=1; initIndex(); BasicDBObject u=new BasicDBObject(). append(NAME,name). append(INIT,init). append(INC,inc). append(VALUE,init); try { coll.insert(u); } catch (Exception e) { LOGGER.debug("Insertion failed with {}, trying to read",e); } doc=coll.findOne(q); if(doc==null) throw new RuntimeException("Cannot generate value for "+name); } LOGGER.debug("Sequence doc={}",doc); Long increment=(Long)doc.get(INC); BasicDBObject u=new BasicDBObject(). append("$inc",new BasicDBObject(VALUE,increment)); doc=coll.findAndModify(q,u); Long l=(Long)doc.get(VALUE); LOGGER.debug("{} -> {}",name,l); return l; }

Target:
public long getNextSequenceValue(String name,long init,long inc) { LOGGER.debug("getNextSequenceValue({})",name); BasicDBObject q=new BasicDBObject(NAME,name); DBObject doc=coll.findOne(q); if(doc==null) { LOGGER.debug("inserting sequence record name={}, init={}, inc={}",name,init,inc); if(inc==0) inc=1; initIndex(); BasicDBObject u=new BasicDBObject(). append(NAME,name). append(INIT,init). append(INC,inc). append(VALUE,init); try { coll.insert(u, WriteConcern.SAFE); } catch (Exception e) { LOGGER.debug("Insertion failed with {}, trying to read",e); } doc=coll.findOne(q); if(doc==null) throw new RuntimeException("Cannot generate value for "+name); } LOGGER.debug("Sequence doc={}",doc); Long increment=(Long)doc.get(INC); BasicDBObject u=new BasicDBObject(). append("$inc",new BasicDBObject(VALUE,increment)); doc=coll.findAndModify(q,u); Long l=(Long)doc.get(VALUE); LOGGER.debug("{} -> {}",name,l); return l; }
Source:
public Object readResolve() { if (allowEmptyArchive == null) { this.allowEmptyArchive = Boolean.getBoolean(ArtifactArchiver.class.getName()+".warnOnEmpty"); } if (defaultExcludes == null){ defaultExcludes = true; } if (caseSensitive == null) { caseSensitive = true; } if (flattenDirectories == null) { flattenDirectories = false; } return this; }

Target:
public Object readResolve() { if (allowEmptyArchive == null) { this.allowEmptyArchive = SystemProperties.getBoolean(ArtifactArchiver.class.getName()+".warnOnEmpty"); } if (defaultExcludes == null){ defaultExcludes = true; } if (caseSensitive == null) { caseSensitive = true; } return this; }
Source:
private int executeIncrementalLoad(DriverContext driverContext) { try { IncrementalLoad load = work.getIncrementalLoad(); childTasks = Collections.singletonList(load.execute(driverContext, getHive(), LOG)); if (work.getIncrementalIterator().hasNext()) { createBuilderTask(childTasks); } return 0; } catch (Exception e) { LOG.error("failed replication", e); setException(e); return 1; } }

Target:
private int executeIncrementalLoad(DriverContext driverContext) { try { IncrementalLoadTasksBuilder load = work.getIncrementalLoadTaskBuilder(); this.childTasks = Collections.singletonList(load.build(driverContext, getHive(), LOG)); if (work.getIncrementalIterator().hasNext()) { createBuilderTask(this.childTasks); } return 0; } catch (Exception e) { LOG.error("failed replication", e); setException(e); return 1; } }
Source:
public TransactionSynchronization create(Object key) { Assert.notNull(key, "'key' must not be null"); if (!TransactionSynchronizationManager.hasResource(key)) { DefaultTransactionalResourceSynchronization synchronization = new DefaultTransactionalResourceSynchronization(key); TransactionSynchronizationManager.bindResource(key, synchronization.getResourceHolder()); return synchronization; } return null; }

Target:
public TransactionSynchronization create(Object key) { Assert.notNull(key, "'key' must not be null"); return new DefaultTransactionalResourceSynchronization(key); }
Source:
public void backupDatabase(long stackId, String backupId) { stackUpdater.updateStackStatus(stackId, DetailedStackStatus.DATABASE_BACKUP_IN_PROGRESS, "Initiating database backup " + backupId); clusterService.updateClusterStatusByStackId(stackId, Status.UPDATE_IN_PROGRESS); flowMessageService.fireEventAndLog(stackId, Status.UPDATE_IN_PROGRESS.name(), DATALAKE_DATABASE_BACKUP); }

Target:
public void backupDatabase(long stackId, String backupId) { stackUpdater.updateStackStatus(stackId, DetailedStackStatus.DATABASE_BACKUP_IN_PROGRESS, "Initiating database backup " + backupId); clusterService.updateClusterStatusByStackId(stackId, Status.BACKUP_IN_PROGRESS); flowMessageService.fireEventAndLog(stackId, Status.UPDATE_IN_PROGRESS.name(), DATALAKE_DATABASE_BACKUP); }
Source:
public FileAndName(File f, String n) { file = f; name = n; fConfiguration = null; }

Target:
public FileAndName(File f, String n) { fFile = f; fName = n; fTraceTypeId = null; }
Source:
public void writeToParcel(Parcel out, int flags) { out.writeLong(mId); out.writeInt(mForceBroken ? 1 : 0); out.writeString(mType == null ? null : mType.toString()); out.writeLong(mStartTimeInSecs); out.writeLong(mEndTimeInSecs); out.writeString(mVisibility); out.writeParcelable(mFrom, 0); out.writeParcelable(mTo, 0); out.writeParcelable(mSingleLocation, 0); out.writeString(mAction); out.writeInt(mDirection); out.writeString(mNotes); out.writeInt(mIsFrequencyBased ? 1 : 0); out.writeInt(mFrequency); out.writeString(mServiceTripId); out.writeString(mServiceName); out.writeInt(mServiceColor == null ? Color.BLACK : mServiceColor.getColor()); out.writeString(mServiceNumber); out.writeString(mServiceOperator); out.writeString(mServiceDirection); out.writeString(mStartStopCode); out.writeString(mEndStopCode); out.writeList(mStreets); out.writeList(mShapes); out.writeParcelable(mRealTimeVehicle, 0); out.writeList(mAlerts); out.writeString(mTerms); out.writeByte((byte) (mIsContinuation ? 1 : 0)); out.writeString(transportModeId); out.writeByte((byte) (isRealTime ? 1 : 0)); out.writeLong(durationWithoutTraffic); out.writeLong(templateHashCode); out.writeParcelable(modeInfo, 0); out.writeParcelable(booking, 0); out.writeString(platform); out.writeInt(stopCount); if (wheelchairAccessible != null) { out.writeInt(wheelchairAccessible ? 1 : 0); } else { out.writeInt(-1); } }

Target:
public void writeToParcel(Parcel out, int flags) { out.writeLong(mId); out.writeInt(mForceBroken ? 1 : 0); out.writeString(mType == null ? null : mType.toString()); out.writeLong(mStartTimeInSecs); out.writeLong(mEndTimeInSecs); out.writeString(mVisibility); out.writeParcelable(mFrom, 0); out.writeParcelable(mTo, 0); out.writeParcelable(mSingleLocation, 0); out.writeString(mAction); out.writeInt(mDirection); out.writeString(mNotes); out.writeInt(mIsFrequencyBased ? 1 : 0); out.writeInt(mFrequency); out.writeString(mServiceTripId); out.writeString(mServiceName); out.writeInt(mServiceColor == null ? Color.BLACK : mServiceColor.getColor()); out.writeString(mServiceNumber); out.writeString(mServiceOperator); out.writeString(mServiceDirection); out.writeString(mStartStopCode); out.writeString(mEndStopCode); out.writeList(mStreets); out.writeList(mShapes); out.writeParcelable(mRealTimeVehicle, 0); out.writeList(mAlerts); out.writeString(mTerms); out.writeByte((byte) (mIsContinuation ? 1 : 0)); out.writeString(transportModeId); out.writeByte((byte) (isRealTime ? 1 : 0)); out.writeLong(durationWithoutTraffic); out.writeLong(templateHashCode); out.writeParcelable(modeInfo, 0); out.writeParcelable(booking, 0); out.writeString(platform); out.writeInt(stopCount); out.writeByte((byte) (wheelchairAccessible ? 1 : 0)); }
Source:
private void updateSlaveNodeAndVolumeId(GlusterGeoRepSession session) { List<VDS> slaveHosts = getVdsDao().getAllForHostname(session.getSlaveHostName()); if (slaveHosts != null && !slaveHosts.isEmpty()) { session.setSlaveNodeUuid(slaveHosts.get(0).getId()); GlusterVolumeEntity slaveVol = getVolumeDao().getByName(slaveHosts.get(0).getVdsGroupId(), session.getSlaveVolumeName()); if (slaveVol != null) { session.setSlaveVolumeId(slaveVol.getId()); } } }

Target:
private void updateSlaveNodeAndVolumeId(GlusterGeoRepSession session) { List<VDS> slaveHosts = getVdsDao().getAllForHostname(session.getSlaveHostName()); if (!CollectionUtils.isEmpty(slaveHosts)) { session.setSlaveNodeUuid(slaveHosts.get(0).getId()); GlusterVolumeEntity slaveVol = getVolumeDao().getByName(slaveHosts.get(0).getVdsGroupId(), session.getSlaveVolumeName()); if (slaveVol != null) { session.setSlaveVolumeId(slaveVol.getId()); } } }
Source:
public void tick(TickEvent.WorldTickEvent event) { if(!event.world.isRemote) { List<EntityPlayer> players = event.world.playerEntities; int i = 0; for(Village village : event.world.villageCollectionObj.getVillageList()) { if(village.hasCapability(TEST_CAP, null)) { boolean playerInRadius = false; for(EntityPlayer player : players) if(new Vec3d(player.posX, 0, player.posZ).squareDistanceTo(new Vec3d(village.getCenter().getX(), 0, village.getCenter().getZ())) <= village.getVillageRadius() * village.getVillageRadius()) { playerInRadius = playerInRadius || true; } if(village.getCapability(TEST_CAP, null).getVal() && !playerInRadius) { village.getCapability(TEST_CAP, null).toggleVal(); for(EntityPlayer player : players) player.sendMessage(new TextComponentString(TextFormatting.RED + "All Players Have Exited Village " + i)); } else if(!village.getCapability(TEST_CAP, null).getVal() && playerInRadius) { village.getCapability(TEST_CAP, null).toggleVal(); for(EntityPlayer player : players) player.sendMessage(new TextComponentString(TextFormatting.GREEN + "Some Players Have Entered Village " + i)); } } i++; } } }

Target:
public void tick(TickEvent.WorldTickEvent event) { if(!event.world.isRemote) { List<EntityPlayer> players = event.world.playerEntities; int i = 0; for(Village village : event.world.villageCollectionObj.getVillageList()) { if(village.hasCapability(TEST_CAP, null)) { boolean playerInRadius = false; for(EntityPlayer player : players) { if(new Vec3d(player.posX, 0, player.posZ).squareDistanceTo(new Vec3d(village.getCenter().getX(), 0, village.getCenter().getZ())) <= village.getVillageRadius() * village.getVillageRadius()) { playerInRadius = playerInRadius || true; } } if(village.getCapability(TEST_CAP, null).getVal() && !playerInRadius) { village.getCapability(TEST_CAP, null).toggleVal(); for(EntityPlayer player : players) player.sendMessage(new TextComponentString(TextFormatting.RED + "All Players Have Exited Village " + i)); } else if(!village.getCapability(TEST_CAP, null).getVal() && playerInRadius) { village.getCapability(TEST_CAP, null).toggleVal(); for(EntityPlayer player : players) player.sendMessage(new TextComponentString(TextFormatting.GREEN + "Some Players Have Entered Village " + i)); } } i++; } } }
Source:
public void updateSubscription(Subscription modifiedSubscription) { consumerHolder.get(modifiedSubscription.getTopicName(), modifiedSubscription.getName()). ifPresent((consumer) -> consumer.updateSubscription(modifiedSubscription)); }

Target:
public void updateSubscription(Subscription modifiedSubscription) { synchronized (subscriptionsLocks.getLock(modifiedSubscription)) { consumerHolder.get(modifiedSubscription.getTopicName(), modifiedSubscription.getName()). ifPresent((consumer) -> consumer.updateSubscription(modifiedSubscription)); } }
Source:
public Optional<Config.ConfigProvider> create() { ServletContext context = Resteasy.getContextData(ServletContext.class); JsonNode node = null; try { String dmrConfig = loadDmrConfig(context); if (dmrConfig != null) { node = new ObjectMapper().readTree(dmrConfig); ServicesLogger.LOGGER.loadingFrom("standalone.xml or domain.xml"); } } catch (IOException e) { LOG.warn("Failed to load DMR config", e); } return createJsonProvider(node); }

Target:
public Optional<Config.ConfigProvider> create() { ServletContext context = Resteasy.getContextData(ServletContext.class); JsonNode node = null; try { String dmrConfig = loadDmrConfig(context); if (dmrConfig != null) { node = JsonSerialization.mapper.readTree(dmrConfig); ServicesLogger.LOGGER.loadingFrom("standalone.xml or domain.xml"); } } catch (IOException e) { LOG.warn("Failed to load DMR config", e); } return createJsonProvider(node); }
Source:
@Override public Result visit(Join e) { final Result leftResult = visitChild(0, e.getLeft()).resetAlias(); final Result rightResult = visitChild(1, e.getRight()).resetAlias(); final Context leftContext = leftResult.qualifiedContext(); final Context rightContext = rightResult.qualifiedContext(); SqlNode sqlCondition = null; SqlLiteral condType = JoinConditionType.ON.symbol(POS); JoinType joinType = joinType(e.getJoinType()); if ((e.getJoinType() == JoinRelType.INNER || e.isSemiJoin()) && e.getCondition().isAlwaysTrue()) { joinType = JoinType.COMMA; condType = JoinConditionType.NONE.symbol(POS); } else { sqlCondition = convertConditionToSqlNode(e.getCondition(), leftContext, rightContext, e.getLeft().getRowType().getFieldCount()); } SqlNode join = new SqlJoin(POS, leftResult.asFrom(), SqlLiteral.createBoolean(false, POS), joinType.symbol(POS), rightResult.asFrom(), condType, sqlCondition); return result(join, leftResult, rightResult); }

Target:
@Override public Result visit(Join e) { final Result leftResult = visitChild(0, e.getLeft()).resetAlias(); final Result rightResult = visitChild(1, e.getRight()).resetAlias(); final Context leftContext = leftResult.qualifiedContext(); final Context rightContext = rightResult.qualifiedContext(); SqlNode sqlCondition = null; SqlLiteral condType = JoinConditionType.ON.symbol(POS); JoinType joinType = joinType(e.getJoinType()); if (e.getJoinType() == JoinRelType.INNER && e.getCondition().isAlwaysTrue()) { joinType = JoinType.COMMA; condType = JoinConditionType.NONE.symbol(POS); } else { sqlCondition = convertConditionToSqlNode(e.getCondition(), leftContext, rightContext, e.getLeft().getRowType().getFieldCount()); } SqlNode join = new SqlJoin(POS, leftResult.asFrom(), SqlLiteral.createBoolean(false, POS), joinType.symbol(POS), rightResult.asFrom(), condType, sqlCondition); return result(join, leftResult, rightResult); }
Source:
public void testSubscriptionLoad() throws IOException, InterruptedException { final TimeLogger timeLogger = new TimeLogger(); final List<EventType> eventTypeList = createEventTypes(EVENT_TYPE_COUNT, PARTITION_PER_EVENT_TYPE); timeLogger.mark("Create event types"); eventTypeList.parallelStream().forEach(et -> sendEvents(et, MESSAGES_PER_EVENT_TYPE, PARTITION_PER_EVENT_TYPE)); timeLogger.mark("Publishing " + (MESSAGES_PER_EVENT_TYPE * EVENT_TYPE_COUNT) + " messages"); final Subscription subscription = createSubscription(eventTypeList); timeLogger.mark("Create subscription"); final List<TestStreamingClient> clients = createSteamingClients( subscription, Math.min(EVENT_TYPE_COUNT + 5, EVENT_TYPE_COUNT * PARTITION_PER_EVENT_TYPE)); clients.forEach(TestStreamingClient::start); timeLogger.mark("Create " + clients.size() + " clients"); final Map<String, String> receivedEvents = streamAllData( clients, MESSAGES_PER_EVENT_TYPE * eventTypeList.size()); timeLogger.mark("Receive and commit " + receivedEvents.size() + " events"); clients.parallelStream().forEach(TestStreamingClient::close); timeLogger.mark("Closing connections"); Assert.assertEquals(EVENT_TYPE_COUNT * MESSAGES_PER_EVENT_TYPE, receivedEvents.size()); clients.stream().map(TestStreamingClient::getSessionId).forEach( sessionId -> Assert.assertTrue( receivedEvents.values().stream().filter(v -> v.equals(sessionId)).count() > 0)); }

Target:
public void testSubscriptionLoad() throws IOException, InterruptedException { final TimeLogger timeLogger = new TimeLogger(); final List<EventType> eventTypeList = createEventTypes(EVENT_TYPE_COUNT, PARTITION_PER_EVENT_TYPE); timeLogger.mark("Create event types"); eventTypeList.parallelStream().forEach(et -> sendEvents(et, MESSAGES_PER_EVENT_TYPE, PARTITION_PER_EVENT_TYPE)); timeLogger.mark("Publishing " + (MESSAGES_PER_EVENT_TYPE * EVENT_TYPE_COUNT) + " messages"); final Subscription subscription = createSubscription(eventTypeList); timeLogger.mark("Create subscription"); final List<TestStreamingClient> clients = createSteamingClients( subscription, Math.min(EVENT_TYPE_COUNT + 5, EVENT_TYPE_COUNT * PARTITION_PER_EVENT_TYPE)); clients.forEach(TestStreamingClient::start); timeLogger.mark("Create " + clients.size() + " clients"); final Map<String, String> receivedEvents = streamAllData( clients, MESSAGES_PER_EVENT_TYPE * EVENT_TYPE_COUNT); timeLogger.mark("Receive and commit " + receivedEvents.size() + " events"); clients.parallelStream().forEach(TestStreamingClient::close); timeLogger.mark("Closing connections"); Assert.assertEquals(EVENT_TYPE_COUNT * MESSAGES_PER_EVENT_TYPE, receivedEvents.size()); clients.stream().map(TestStreamingClient::getSessionId).forEach( sessionId -> Assert.assertTrue( receivedEvents.values().stream().filter(v -> v.equals(sessionId)).count() > 0)); }
Source:
public ResourceReference parse(String rawReference) { while(true) { ResourceReference resourceReference = parseURILinks(rawReference); if (resourceReference != null) { String parseReturn = resourceReference; break; } StringBuilder content = new StringBuilder(rawReference); resourceReference = parseInterWikiLinks(content); if (resourceReference != null) { String parseReturn = resourceReference; break; } if (!isInWikiMode()) { resourceReference = new ResourceReference(rawReference, ResourceType.URL); resourceReference.setTyped(false); String parseReturn = resourceReference; break; } } if (parseReturn == null) { String parseReturn = parseDocumentLink(content); } return parseReturn; }

Target:
public ResourceReference parse(String rawReference) { ResourceReference resourceReference = parseURILinks(rawReference); if (resourceReference != null) { return resourceReference; } StringBuilder content = new StringBuilder(rawReference); resourceReference = parseInterWikiLinks(content); if (resourceReference != null) { return resourceReference; } if (!isInWikiMode()) { resourceReference = new ResourceReference(rawReference, ResourceType.URL); resourceReference.setTyped(false); return resourceReference; } return parseDocumentLink(content); }
Source:
public void initialize() { centroids = memoryStore.get(Centroids.class.getName()); }

Target:
public void initialize() { centroids = memoryStore.get(ClusteringPreCtrlTask.KEY_CENTROIDS); }
Source:
private ConnectionContainer upsertObjects(Environment context) { if (context.ids.isPresent()) { throw new BadRequestException("UPSERT must not include ids"); } if (!context.data.isPresent()) { throw new BadRequestException("UPSERT must include data argument"); } Class<?> entityClass; EntityDictionary dictionary = context.requestScope.getDictionary(); if (context.isRoot()) { entityClass = dictionary.getEntityClass(context.field.getName()); } else { entityClass = dictionary.getParameterizedType(context.parentResource.getResourceClass(), context.field.getName()); } Optional<Entity> parentEntity; if (!context.isRoot()) { parentEntity = Optional.of(new Entity(Optional.empty(), null, context.parentResource.getResourceClass(), context.requestScope)); } else { parentEntity = Optional.empty(); } LinkedHashSet<Entity> entitySet = new LinkedHashSet<>(); for (Map<String, Object> input : context.data.get()) { entitySet.add(new Entity(parentEntity, input, entityClass, context.requestScope)); } for (Entity entity : entitySet) { graphWalker(entity, (e) -> upsertObject(context, e)); } for (Entity entity : entitySet) { graphWalker(entity, this::updateRelationship); if (!context.isRoot()) { context.parentResource.addRelation(context.field.getName(), entity.toPersistentResource()); } } String entityName = dictionary.getJsonAliasFor(entityClass); Set<PersistentResource> resources = entitySet.stream() .map(Entity::toPersistentResource) .collect(Collectors.toCollection(LinkedHashSet::new)); return new ConnectionContainer(resources, Optional.empty(), entityName); }

Target:
private ConnectionContainer upsertObjects(Environment context) { if (context.ids.isPresent()) { throw new BadRequestException("UPSERT must not include ids"); } if (!context.data.isPresent()) { throw new BadRequestException("UPSERT must include data argument"); } Class<?> entityClass; EntityDictionary dictionary = context.requestScope.getDictionary(); if (context.isRoot()) { entityClass = dictionary.getEntityClass(context.field.getName()); } else { entityClass = dictionary.getParameterizedType(context.parentResource.getResourceClass(), context.field.getName()); } Optional<Entity> parentEntity; if (!context.isRoot()) { parentEntity = Optional.of(new Entity(Optional.empty(), null, context.parentResource.getResourceClass(), context.requestScope)); } else { parentEntity = Optional.empty(); } LinkedHashSet<Entity> entitySet = new LinkedHashSet<>(); for (Map<String, Object> input : context.data.get()) { entitySet.add(new Entity(parentEntity, input, entityClass, context.requestScope)); } for (Entity entity : entitySet) { graphWalker(entity, (entityObject) -> upsertObject(context, entityObject)); } for (Entity entity : entitySet) { graphWalker(entity, this::updateRelationship); if (!context.isRoot()) { context.parentResource.addRelation(context.field.getName(), entity.toPersistentResource()); } } String entityName = dictionary.getJsonAliasFor(entityClass); Set<PersistentResource> resources = entitySet.stream() .map(Entity::toPersistentResource) .collect(Collectors.toCollection(LinkedHashSet::new)); return new ConnectionContainer(resources, Optional.empty(), entityName); }
Source:
public void setPublisherConfirms(boolean publisherConfirms) { Assert.isTrue(!publisherConfirms || !ConfirmType.SIMPLE.equals(this.confirmType), "Cannot set both publisherConfirms and simplePublisherConfirms"); if (publisherConfirms) { setPublisherConfirmType(ConfirmType.CORRELATED); } }

Target:
public void setPublisherConfirms(boolean publisherConfirms) { Assert.isTrue(!publisherConfirms || !ConfirmType.SIMPLE.equals(this.confirmType), "Cannot set both publisherConfirms and simplePublisherConfirms"); if (publisherConfirms) { setPublisherConfirmType(ConfirmType.CORRELATED); } else if (this.confirmType.equals(ConfirmType.CORRELATED)) { setPublisherConfirmType(ConfirmType.NONE); } }
Source:
public void setAllowDescriptionEdit(boolean allow) { allowDescriptionEdit = allow; }

Target:
public void setAllowDescriptionEdit(boolean allow) { allowDescriptionEdit = allow; updateText(); }
Source:
private void resetRecordsDeliveryStateOnSubscriptionOnInit() { if (!recordsDeliveryQueue.isEmpty()) { log.warn("{}: Found non-empty queue while starting subscription. This indicates unsuccessful clean up of" + "previous subscription - {}. rid {}", shardId, subscribeToShardId, getLastRequestId()); recordsDeliveryQueue.clear(); } }

Target:
private void resetRecordsDeliveryStateOnSubscriptionOnInit() { if (!recordsDeliveryQueue.isEmpty()) { log.warn("{}: Found non-empty queue while starting subscription. This indicates unsuccessful clean up of" + "previous subscription - {}. Last successful request details -- {}", shardId, subscribeToShardId, lastSuccessfulRequestDetails); recordsDeliveryQueue.clear(); } }
Source:
public static List<Target> readTargetFile(final File targetsFile) { Utils.regularReadableUserFile(targetsFile); logger.log(Level.INFO, String.format("Reading target intervals from exome file '%s' ...", targetsFile.getAbsolutePath())); final List<Target> inputTargets; try (final TargetTableReader reader = new TargetTableReader(targetsFile)) { inputTargets = reader.toList(); } catch (final IOException ex) { throw new UserException.CouldNotReadInputFile("Could not read input targets file", ex); } return inputTargets; }

Target:
public static List<Target> readTargetFile(final File targetsFile) { Utils.regularReadableUserFile(targetsFile); logger.log(Level.INFO, String.format("Reading targets from file '%s' ...", targetsFile.getAbsolutePath())); final List<Target> inputTargets; try (final TargetTableReader reader = new TargetTableReader(targetsFile)) { inputTargets = reader.toList(); } catch (final IOException ex) { throw new UserException.CouldNotReadInputFile("Could not read input targets file", ex); } return inputTargets; }
Source:
public void resume() { checkRealm(); pauseDepth--; if (pauseDepth == 0) { sideEffects.forEach(s -> s.resume()); } }

Target:
public void resume() { checkRealm(); pauseDepth--; if (pauseDepth < 0) { throw new IllegalStateException( "Resume has unessesarily been called too often, so that the pauseDepth is below zero."); } else if (pauseDepth == 0) { sideEffects.forEach(s -> s.resume()); } }
Source:
private IMethod[] relatedTypeDeclaresMethodName(IProgressMonitor pm, IMethod method, String newName) throws CoreException { try{ Set<IMethod> result= new HashSet<>(); Set<IType> types= getRelatedTypes(); pm.beginTask("", types.size()); for (IType iType : types) { final IMethod found= Checks.findMethod(method, iType); final IType declaring= found.getDeclaringType(); result.addAll(Arrays.asList(hierarchyDeclaresMethodName(new SubProgressMonitor(pm, 1), declaring.newTypeHierarchy(new SubProgressMonitor(pm, 1)), found, newName))); } return result.toArray(new IMethod[result.size()]); } finally { pm.done(); } }

Target:
private IMethod[] relatedTypeDeclaresMethodName(IProgressMonitor pm, IMethod method, String newName) throws CoreException { try{ Set<IMethod> result= new HashSet<>(); Set<IType> types= getRelatedTypes(); pm.beginTask("", types.size()); for (IType type : types) { final IMethod found= Checks.findMethod(method, type); final IType declaring= found.getDeclaringType(); result.addAll(Arrays.asList(hierarchyDeclaresMethodName(new SubProgressMonitor(pm, 1), declaring.newTypeHierarchy(new SubProgressMonitor(pm, 1)), found, newName))); } return result.toArray(new IMethod[result.size()]); } finally { pm.done(); } }
Source:
public byte getGoodMaternal() { if (maternal >= 0) return maternal; if (chr.isY() || chr.isMT()) { return (byte) (Math.min(1, alts.length)); } return (byte) (Math.min(2, alts.length)); }

Target:
public byte getGoodMaternal() { if (maternal >= 0) return maternal; if (chr.isMT()) { return (byte) (Math.min(1, alts.length)); } if (chr.isY()) { return (byte) 0; } return (byte) (Math.min(2, alts.length)); }
Source:
public static void preInit(FMLPreInitializationEvent event) { if (FMLForgePlugin.RUNTIME_DEOBF) { try { ZipFile zipFile = new ZipFile(event.getSourceFile()); Enumeration enumeration = zipFile.entries(); while (enumeration.hasMoreElements()) { processPath(((ZipEntry)enumeration.nextElement()).getName()); } zipFile.close(); } catch (Exception e) { } } else { File folder = new File(event.getSourceFile().getParentFile().getAbsolutePath()); for (File file : FileUtils.listFiles(folder, new String[] { "png" }, true)) { processPath(file.getAbsolutePath().replace("\\", "/")); } } ModLogger.log(Level.INFO, "Designs found: Bed(" + listBed.size() + "), Chisel(" + listChisel.size() + "), FlowerPot(" + listFlowerPot.size() + "), Tile(" + listTile.size() + ")"); }

Target:
public static void preInit(FMLPreInitializationEvent event) { if (FMLForgePlugin.RUNTIME_DEOBF) { try { ZipFile zipFile = new ZipFile(event.getSourceFile()); Enumeration enumeration = zipFile.entries(); while (enumeration.hasMoreElements()) { processPath(((ZipEntry)enumeration.nextElement()).getName()); } zipFile.close(); } catch (Exception e) { } } else { File folder = new File(event.getSourceFile().getAbsolutePath()); for (File file : FileUtils.listFiles(folder, new String[] { "png" }, true)) { processPath(file.getAbsolutePath().replace("\\", "/")); } } ModLogger.log(Level.INFO, "Designs found: Bed(" + listBed.size() + "), Chisel(" + listChisel.size() + "), FlowerPot(" + listFlowerPot.size() + "), Tile(" + listTile.size() + ")"); }
Source:
public void testSTGeometries() { assertSTGeometries("POINT empty", null); assertSTGeometries("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", ImmutableList.of("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))")); assertSTGeometries("MULTIPOINT (1 2, 4 8, 16 32)", ImmutableList.of("POINT (1 2)", "POINT (4 8)", "POINT (16 32)")); assertSTGeometries("MULTILINESTRING ((1 1, 2 2))", ImmutableList.of("LINESTRING (1 1, 2 2)")); assertSTGeometries("MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)), ((1 1, 3 1, 3 3, 1 3, 1 1)))", ImmutableList.of("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", "POLYGON ((1 1, 3 1, 3 3, 1 3, 1 1))")); }

Target:
public void testSTGeometries() { assertFunction("ST_Geometries(ST_GeometryFromText('POINT EMPTY'))", new ArrayType(GEOMETRY), null); assertSTGeometries("POINT (1 5)", "POINT (1 5)"); assertSTGeometries("LINESTRING (77.29 29.07, 77.42 29.26, 77.27 29.31, 77.29 29.07)", "LINESTRING (77.29 29.07, 77.42 29.26, 77.27 29.31, 77.29 29.07)"); assertSTGeometries("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", "POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))"); assertSTGeometries("MULTIPOINT (1 2, 4 8, 16 32)", "POINT (1 2)", "POINT (4 8)", "POINT (16 32)"); assertSTGeometries("MULTILINESTRING ((1 1, 2 2))", "LINESTRING (1 1, 2 2)"); assertSTGeometries("MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)), ((1 1, 3 1, 3 3, 1 3, 1 1)))", "POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", "POLYGON ((1 1, 3 1, 3 3, 1 3, 1 1))"); assertSTGeometries("GEOMETRYCOLLECTION (POINT (2 3), LINESTRING (2 3, 3 4))", "POINT (2 3)", "LINESTRING (2 3, 3 4)"); }
Source:
public ThrowingRunnableAdapter(Runnable supplier) { this.supplier = supplier; }

Target:
public ThrowingRunnableAdapter(Runnable supplier) { if (supplier == null) { throw new IllegalArgumentException("You must specify a supplier (was null)."); } this.supplier = supplier; }
Source:
void shutdown() throws InterruptedException, StoreException, IOException { final Timer.Context context = metrics.hardDeleteShutdownTimeInMs.time(); try { if (enabled.get()) { logger.info("Hard delete shutdown initiated"); enabled.set(false); hardDeleteLock.lock(); try { pauseCondition.signal(); } finally { hardDeleteLock.unlock(); } if (!shutdownLatch.await(5, TimeUnit.SECONDS)) { logger.error("HardDelete shutdown took more than 5 secs "); } logger.info("Hard delete shutdown complete"); throttler.close(); pruneHardDeleteRecoveryRange(); persistCleanupToken(); } } finally { context.stop(); } }

Target:
void shutdown() throws InterruptedException, StoreException, IOException { long startTimeInMs = time.milliseconds(); try { if (enabled.get()) { logger.info("Hard delete shutdown initiated"); enabled.set(false); hardDeleteLock.lock(); try { pauseCondition.signal(); } finally { hardDeleteLock.unlock(); } shutdownLatch.await(); logger.info("Hard delete shutdown complete"); throttler.close(); pruneHardDeleteRecoveryRange(); persistCleanupToken(); } } finally { metrics.hardDeleteShutdownTimeInMs.update(time.milliseconds() - startTimeInMs); } }
Source:
TokenSecurityRealm(Builder configuration) { Assert.checkNotNullParam("configuration", configuration); if (configuration.principalClaimName == null) { this.principalClaimName = "username"; } else { this.principalClaimName = configuration.principalClaimName; } this.strategy = Assert.checkNotNullParam("tokenValidationStrategy(", configuration.strategy); }

Target:
TokenSecurityRealm(Builder configuration) { Assert.checkNotNullParam("configuration", configuration); if (configuration.principalClaimName == null) { this.principalClaimName = "username"; } else { this.principalClaimName = configuration.principalClaimName; } this.strategy = Assert.checkNotNullParam("tokenValidationStrategy", configuration.strategy); }
Source:
public void execute(CommandSender sender, String[] args) { if (args.length != 0) { sender.sendMessage( ChatColor.RED + "You do not need to specify a name. If you wish to know where another player is, use /whereis <player>"); } else { ProxiedPlayer player = ProxyServer.getInstance().getPlayer( sender.getName() ); sender.sendMessage( ChatColor.BLUE + "You are in the " + player.getServer().getInfo().getName() + "."); } }

Target:
public void execute(CommandSender sender, String[] args) { if (args.length != 0) { sender.sendMessage( ChatColor.RED + "You do not need to specify a name. If you wish to know where another player is, use /whereis <player>"); } else { ProxiedPlayer player = ProxyServer.getInstance().getPlayer( sender.getName() ); if (sender instanceof ProxiedPlayer) { sender.sendMessage( ChatColor.BLUE + "You are in the " + player.getServer().getInfo().getName() + "." ); } else { sender.sendMessage( "You are in the console." ); } } }
Source:
public void displayMessage(@NonNull final OSInAppMessage message) { if (!inAppMessagingEnabled) { OneSignal.onesignalLog(OneSignal.LOG_LEVEL.VERBOSE, "In app messaging is currently paused, iam will not be shown!"); return; } inAppMessageShowing = true; String htmlPath = htmlPathForMessage(message); OneSignalRestClient.getSync(htmlPath, new ResponseHandler() { @Override void onFailure(int statusCode, String response, Throwable throwable) { inAppMessageShowing = false; evaluateInAppMessages(); printHttpErrorForInAppMessageRequest("html", statusCode, response); } @Override void onSuccess(String response) { inAppMessageShowing = true; try { JSONObject jsonResponse = new JSONObject(response); String htmlStr = jsonResponse.getString("html"); double displayDuration = jsonResponse.optDouble("display_duration"); message.setDisplayDuration(displayDuration); WebViewManager.showHTMLString(message, htmlStr); } catch (JSONException e) { e.printStackTrace(); } } }, null); }

Target:
private void displayMessage(@NonNull final OSInAppMessage message) { if (!inAppMessagingEnabled) { OneSignal.onesignalLog(OneSignal.LOG_LEVEL.VERBOSE, "In app messaging is currently paused, iam will not be shown!"); return; } inAppMessageShowing = true; String htmlPath = htmlPathForMessage(message); OneSignalRestClient.getSync(htmlPath, new ResponseHandler() { @Override void onFailure(int statusCode, String response, Throwable throwable) { inAppMessageShowing = false; printHttpErrorForInAppMessageRequest("html", statusCode, response); if (!OSUtils.shouldRetryNetworkRequest(statusCode) || htmlNetworkRequestAttemptCount >= OSUtils.MAX_NETWORK_REQUEST_ATTEMPT_COUNT) { htmlNetworkRequestAttemptCount = 0; messageWasDismissed(message); return; } htmlNetworkRequestAttemptCount++; queueMessageForDisplay(message); } @Override void onSuccess(String response) { htmlNetworkRequestAttemptCount = 0; try { JSONObject jsonResponse = new JSONObject(response); String htmlStr = jsonResponse.getString("html"); double displayDuration = jsonResponse.optDouble("display_duration"); message.setDisplayDuration(displayDuration); WebViewManager.showHTMLString(message, htmlStr); } catch (JSONException e) { e.printStackTrace(); } } }, null); }
Source:
public Boolean implies(SymbolicValueRelation relation) { if (v1.equals(relation.v1) && v2.equals(relation.v2)) { return relation.isImpliedBy(this); } else if (v1.equals(relation.v2) && v2.equals(relation.v1)) { return relation.isImpliedBy(symmetric()); } return null; }

Target:
protected Boolean implies(SymbolicValueRelation relation) { if (v1.equals(relation.v1) && v2.equals(relation.v2)) { return relation.isImpliedBy(this); } else if (v1.equals(relation.v2) && v2.equals(relation.v1)) { return relation.isImpliedBy(symmetric()); } return null; }
Source:
public String getFailureMessage() { StringBuilder sb = new StringBuilder(); Iterable<ICondition> failures = Iterables.filter(conditions, Predicates.not(Predicates.in(okConditions))); if (conditions.size() - okConditions.size() == 1) { sb.append("The following condition has not been met: "); sb.append(failures.iterator().next().getFailureMessage()); } else { sb.append("Several conditions have not been met:\n"); for (ICondition condition : failures) { sb.append(".").append(condition.getFailureMessage()).append("\n"); } } return sb.toString(); }

Target:
public String getFailureMessage() { StringBuilder sb = new StringBuilder(); if (failures.size() == 1) { sb.append("The following condition has not been met: "); sb.append(failures.iterator().next().getFailureMessage()); } else { sb.append("Several conditions have not been met:\n"); for (ICondition condition : failures) { sb.append(".").append(condition.getFailureMessage()).append("\n"); } } return sb.toString(); }
Source:
private void doInit(ExtMap inputMap, ExtMap outputMap) { context = inputMap.<ExtMap> get(Base.InvokeKeys.CONTEXT); configuration = context.<Properties> get(Base.ContextKeys.CONFIGURATION); broker = LdapFactory.getInstance(getAuthzName()); context.<List<String>> get( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ).add("config.authn.user.password"); context.mput( Base.ContextKeys.AUTHOR, "The oVirt Project").mput( Base.ContextKeys.EXTENSION_NAME, "Kerberos/Ldap Authn (Built-in)" ).mput( Base.ContextKeys.LICENSE, "ASL 2.0" ).mput( Base.ContextKeys.HOME_URL, "<LINK_0>" ).mput( Base.ContextKeys.VERSION, "N/A" ).mput( Authn.ContextKeys.CAPABILITIES, Authn.Capabilities.AUTHENTICATE_PASSWORD ).mput( Base.ContextKeys.BUILD_INTERFACE_VERSION, Base.INTERFACE_VERSION_CURRENT); KerberosManager.getInstance(configuration); UsersDomainsCacheManagerService.getInstance().init(configuration); }

Target:
private void doInit(ExtMap inputMap, ExtMap outputMap) { context = inputMap.<ExtMap> get(Base.InvokeKeys.CONTEXT); configuration = context.<Properties> get(Base.ContextKeys.CONFIGURATION); Utils.putDefaultsIfMissing(configuration); broker = LdapFactory.getInstance(getAuthzName()); context.<List<String>> get( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ).add("config.authn.user.password"); context.mput( Base.ContextKeys.AUTHOR, "The oVirt Project").mput( Base.ContextKeys.EXTENSION_NAME, "Kerberos/Ldap Authn (Built-in)" ).mput( Base.ContextKeys.LICENSE, "ASL 2.0" ).mput( Base.ContextKeys.HOME_URL, "<LINK_0>" ).mput( Base.ContextKeys.VERSION, "N/A" ).mput( Authn.ContextKeys.CAPABILITIES, Authn.Capabilities.AUTHENTICATE_PASSWORD ).mput( Base.ContextKeys.BUILD_INTERFACE_VERSION, Base.INTERFACE_VERSION_CURRENT); KerberosManager.getInstance(configuration); UsersDomainsCacheManagerService.getInstance().init(configuration); }
Source:
private void attachDiskToTemplate(Guid templateId) { DiskImage templateDiskImage = getParameters().getDiskImage(); DiskVmElement dve = new DiskVmElement(templateDiskImage.getId(), templateId); dve.setDiskInterface(DiskInterface.VirtIO); DbFacade.getInstance().getDiskVmElementDao().save(dve); VmDeviceUtils.addDiskDevice(templateId, templateDiskImage.getId()); }

Target:
private void attachDiskToTemplate(Guid templateId) { DiskImage templateDiskImage = getParameters().getDiskImage(); DiskVmElement dve = new DiskVmElement(templateDiskImage.getId(), templateId); dve.setDiskInterface(DiskInterface.VirtIO); getDiskVmElementDao().save(dve); VmDeviceUtils.addDiskDevice(templateId, templateDiskImage.getId()); }
Source:
public JobExecutionStateMachineImpl( final List<ExecutionStage> executionStages, final ExecutionContext executionContext, final Collection<JobExecutionListener> listeners ) { this.executionStages = executionStages; this.executionContext = executionContext; this.taskExecutor = new TaskExecutorBuilder() .corePoolSize(1) .maxPoolSize(1) .threadNamePrefix("StateMachine") .build(); this.taskExecutor.initialize(); this.listener = new CompositeListener(listeners); }

Target:
public JobExecutionStateMachineImpl( final List<ExecutionStage> executionStages, final ExecutionContext executionContext, final Collection<JobExecutionListener> listeners ) { this.executionStages = executionStages; this.executionContext = executionContext; this.listener = new CompositeListener(ImmutableSet.copyOf(listeners)); }