auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected TerracottaServer createNode(int stripeId, int nodesId) { String uniqueId = combine(stripeId, nodesId); TerracottaServer terracottaServer = server("node-" + uniqueId, "localhost") .tsaPort(getNodePort(stripeId, nodesId)) .tsaGroupPort(getNodeGroupPort(stripeId, nodesId)) .configRepo("terracotta" + uniqueId + "/repository") .logs("terracotta" + uniqueId + "/logs") .dataDir("main:terracotta" + uniqueId + "/data-dir") .offheap("main:512MB,foo:1GB") .metaData("terracotta" + uniqueId + "/metadata"); if (mode) { if (voters > 0) { terracottaServer.failoverPriority("consistency:" + voters); } else if (voters == 0) { terracottaServer.failoverPriority("consistency"); } else { throw new IllegalArgumentException("voters can't be negative " + voters); } } <START> return terracottaServer; <END> }</code><technical_language>FailoverPriority, this simplified, need if() conditions anymore do: .failoverPriority(failoverPriority.toString())</technical_language>

Target:
protected TerracottaServer createNode(int stripeId, int nodesId) { String uniqueId = combine(stripeId, nodesId); return server("node-" + uniqueId, "localhost") .tsaPort(getNodePort(stripeId, nodesId)) .tsaGroupPort(getNodeGroupPort(stripeId, nodesId)) .configRepo("terracotta" + uniqueId + "/repository") .logs("terracotta" + uniqueId + "/logs") .dataDir("main:terracotta" + uniqueId + "/data-dir") .offheap("main:512MB,foo:1GB") .metaData("terracotta" + uniqueId + "/metadata") .failoverPriority(failoverPriority.toString()); }
Source:
<code>public ActionDescriptor[] getExtendedActions() { ArrayList<ActionDescriptor> results = new ArrayList<>(); for (Object <START> element : <END> cache) { EditorContribution ec = (EditorContribution) element; if (ec.actions != null) { results.addAll(ec.actions); } } return results.toArray(new ActionDescriptor[results.size()]); }</code><technical_language>rename contribution</technical_language>

Target:
public ActionDescriptor[] getExtendedActions() { ArrayList<ActionDescriptor> results = new ArrayList<>(); for (Object contribution : cache) { EditorContribution ec = (EditorContribution) contribution; if (ec.actions != null) { results.addAll(ec.actions); } } return results.toArray(new ActionDescriptor[results.size()]); }
Source:
<code>public Object get(Object thiz) { try { return getter.invoke( thiz ); } catch (Error e) { throw e; } catch (Throwable e) { if ( e instanceof InterruptedException ) { Thread.currentThread().interrupt(); } <START> throw log.errorInvokingMember( member.getName(), thiz.toString(), e ); <END> } }</code><technical_language>pass thiz type Object instead of thiz.toString() here, JBoss logger call toString() automatically, if for some reason thiz is null, throw NPE this code</technical_language>

Target:
public Object get(Object thiz) { try { return getter.invoke( thiz ); } catch (Error e) { throw e; } catch (Throwable e) { if ( e instanceof InterruptedException ) { Thread.currentThread().interrupt(); } throw log.errorInvokingMember( member, thiz, e ); } }
Source:
<code>public void pull_filterDocIdsFromAnimalDb_twoDocShouldBePulled() throws Exception { org.junit.Assume.assumeTrue(ClientTestUtils.isCouchDBV2(remoteDb.couchClient.getRootUri())); List<String> docIds = Arrays.asList("snipe","kookaburra"); PullStrategy replicator = super.getPullStrategy(docIds); Assert.assertEquals(0, datastore.getDocumentCount()); AnimalDb.populate(remoteDb.couchClient); this.pull(replicator, 2); Assert.assertEquals(2, datastore.getDocumentCount()); String[] birds = {"snipe", "kookaburra"}; <START> for (String bird : birds) { <END> Assert.assertTrue(datastore.contains(bird)); } }</code><technical_language>removing birds object iterating docIds? for (String bird : docIds) { ... }</technical_language>

Target:
public void pull_filterDocIdsFromAnimalDb_twoDocShouldBePulled() throws Exception { org.junit.Assume.assumeTrue(ClientTestUtils.isCouchDBV2(remoteDb.couchClient.getRootUri())); List<String> docIds = Arrays.asList("snipe","kookaburra"); PullStrategy replicator = super.getPullStrategy(docIds); Assert.assertEquals(0, datastore.getDocumentCount()); AnimalDb.populate(remoteDb.couchClient); this.pull(replicator, 2); Assert.assertEquals(2, datastore.getDocumentCount()); for (String bird : docIds) { Assert.assertTrue(datastore.contains(bird)); } }
Source:
<code>public DataWord negate() { <START> if (this.isZero()) return zero(); <END> byte[] newData = this.getData(); for (int i = 0; i < this.data.length; ++i) { newData[i] = (byte) ~this.data[i]; } for (int i = this.data.length - 1; i >= 0; --i) { newData[i] = (byte) (1 + this.data[i] & 0xFF); if (newData[i] != 0) break; } return new DataWord(newData); }</code><technical_language>return this;</technical_language>

Target:
public DataWord negate() { if (this.isZero()) return ZERO; byte[] newData = this.copyData(); for (int i = 0; i < this.data.length; ++i) { newData[i] = (byte) ~this.data[i]; } for (int i = this.data.length - 1; i >= 0; --i) { newData[i] = (byte) (1 + this.data[i] & 0xFF); if (newData[i] != 0) break; } return new DataWord(newData); }
Source:
<code>public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { dataSetProcessorType= CompilerContext.DataSetProcessorType.FORCED_SPARK; <START> acb.setDataSetProcessorType(dataSetProcessorType); <END> assignResultSetNumber(); costEstimate = childResult.getFinalCostEstimate(); if (SanityManager.DEBUG) { SanityManager.ASSERT(windowInfoList != null, "windowInfoList not set up as expected"); } int aggInfoItemIndex = acb.addItem(windowInfoList); acb.pushGetResultSetFactoryExpression(mb); childResult.generate(acb, mb); mb.push(isInSortedOrder); mb.push(aggInfoItemIndex); resultColumns.generateHolder(acb, mb); mb.push(resultColumns.getTotalColumnSize()); mb.push(resultSetNumber); mb.push(costEstimate.rowCount()); mb.push(costEstimate.getEstimatedCost()); mb.push(printExplainInformationForActivation()); mb.callMethod(VMOpcode.INVOKEINTERFACE, null, "getWindowResultSet", ClassName.NoPutResultSet, 9); }</code><technical_language>forcing Spark side execution here? is that</technical_language>

Target:
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { assignResultSetNumber(); costEstimate = childResult.getFinalCostEstimate(); if (SanityManager.DEBUG) { SanityManager.ASSERT(windowInfoList != null, "windowInfoList not set up as expected"); } int aggInfoItemIndex = acb.addItem(windowInfoList); acb.pushGetResultSetFactoryExpression(mb); childResult.generate(acb, mb); mb.push(isInSortedOrder); mb.push(aggInfoItemIndex); resultColumns.generateHolder(acb, mb); mb.push(resultColumns.getTotalColumnSize()); mb.push(resultSetNumber); mb.push(costEstimate.rowCount()); mb.push(costEstimate.getEstimatedCost()); mb.push(printExplainInformationForActivation()); mb.callMethod(VMOpcode.INVOKEINTERFACE, null, "getWindowResultSet", ClassName.NoPutResultSet, 9); }
Source:
<code>private LogReplicationEntry processReceivedMessage(LogReplicationEntry message) { if (rxState.equals(RxState.LOG_ENTRY_SYNC)) { return logEntrySinkBufferManager.processMsgAndBuffer(message); } else { LogReplicationEntry ack = snapshotSinkBufferManager.processMsgAndBuffer(message); if (ack.getMetadata().getMessageMetadataType() == MessageType.SNAPSHOT_REPLICATED) { long lastStartedSnapshotSync = logReplicationMetadataManager.getLastSnapStartTimestamp(); if (ack.getMetadata().getSnapshotTimestamp() == lastStartedSnapshotSync) { snapshotSyncPlugin.onSnapshotSyncEnd(runtime); } else { log.warn("SNAPSHOT_SYNC has completed for {}, but new ongoing SNAPSHOT_SYNC is {}", ack.getMetadata().getSnapshotTimestamp(), lastStartedSnapshotSync); } <START> } <END> return ack; } }</code><technical_language>While snapshot transfer, message snapshottimestamp. check metadata's seqNum + 1 = ack's seqNum</technical_language>

Target:
private LogReplicationEntry processReceivedMessage(LogReplicationEntry message) { if (rxState.equals(RxState.LOG_ENTRY_SYNC)) { return logEntrySinkBufferManager.processMsgAndBuffer(message); } else { LogReplicationEntry ack = snapshotSinkBufferManager.processMsgAndBuffer(message); if (ack.getMetadata().getMessageMetadataType() == MessageType.SNAPSHOT_REPLICATED) { long lastAppliedBaseSnapshotTimestamp = logReplicationMetadataManager.getLastAppliedBaseSnapshotTimestamp(); long latestSnapshotSyncCycleId = logReplicationMetadataManager.getCurrentSnapshotSyncCycleId(); long ackSnapshotSyncCycleId = ack.getMetadata().getSyncRequestId().getMostSignificantBits() & Long.MAX_VALUE; if ((ackSnapshotSyncCycleId == latestSnapshotSyncCycleId) && (ack.getMetadata().getSnapshotTimestamp() == lastAppliedBaseSnapshotTimestamp)) { snapshotSyncPlugin.onSnapshotSyncEnd(runtime); } else { log.warn("SNAPSHOT_SYNC has completed for {}, but new ongoing SNAPSHOT_SYNC is {}", ack.getMetadata().getSnapshotTimestamp(), lastAppliedBaseSnapshotTimestamp); } } return ack; } }
Source:
<code>default Stream<T> removeLast(Predicate<T> predicate) { if(findFirst(predicate).isDefined()) { return reverse().removeFirst(predicate).reverse(); } else { return this; <START> } <END> }</code><technical_language>I do a reverse().removeFirst(predicate) instead of findFirst in order process elements 2 times, e.g. java final Stream<T> removed = reverse().removeFirst(predicate); return removed.length() == length() ? this : removed.reverse();</technical_language>

Target:
default Stream<T> removeLast(Predicate<T> predicate) { final Stream<T> removed = reverse().removeFirst(predicate); return removed.length() == length() ? this : removed.reverse(); }
Source:
<code>private void reconnectPending() { synchronized (mPendingReconnect) { for (WeakReference<TerminalBridge> ref : mPendingReconnect) { TerminalBridge bridge = ref.get(); if (bridge == null) { continue; } int sleepVal = 500; int retryLimit = getRetries(); int retryCount = 0; try { Thread.sleep(sleepVal); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } <START> while ( ( retryLimit == 0 || retryCount <= retryLimit ) && bridge.isDisconnected() ){ <END> bridge.startConnection(); if ( retryCount < 8 ) { sleepVal = sleepVal * 2; } try { Thread.sleep(sleepVal); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } retryCount++; Log.d(TAG, String.format("Retries %s session stat: %s", retryCount, bridge.isSessionOpen() )); while(bridge.isConnecting()){ try { Thread.sleep(500); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } Log.d(TAG, String.format("Sleeping while wait on connecting")); } } } mPendingReconnect.clear(); } }</code><technical_language>spacing style existing conventions. reformat this patch match exists</technical_language>

Target:
private void reconnectPending() { synchronized (mPendingReconnect) { for (WeakReference<TerminalBridge> ref : mPendingReconnect) { TerminalBridge bridge = ref.get(); if (bridge == null) { continue; } int sleepVal = MINIMUM_RETRY_INTERVAL; int retryLimit = getRetries(); int retryCount = 0; try { Thread.sleep(sleepVal); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } while ((retryLimit == 0 || retryCount <= retryLimit) && bridge.isDisconnected()){ bridge.startConnection(); if (retryCount < MAXIMUM_RETRY_MULTIPLIER) { sleepVal = sleepVal * RETRY_SLEEP_MULTIPLIER; } try { Thread.sleep(sleepVal); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } retryCount++; Log.d(TAG, String.format("Retries %s session stat: %s", retryCount, bridge.isSessionOpen() )); int connectingCount = 0; while(bridge.isConnecting() && connectingCount<=MAXIMUM_CONNECTING_WAIT){ try { Thread.sleep(MINIMUM_RETRY_INTERVAL); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } connectingCount++; Log.d(TAG, String.format("Sleeping while wait on connecting")); } } } mPendingReconnect.clear(); } }
Source:
<code>public void initTable() { <START> AbstractTextColumn<GuestContainer> idColumn = new AbstractTextColumn<GuestContainer>() { <END> @Override public String getValue(GuestContainer row) { if(row != null) { return row.getId(); } return constants.empty(); } }; AbstractTextColumn<GuestContainer> namesColumn = new AbstractTextColumn<GuestContainer>() { @Override public String getValue(GuestContainer row) { if (row != null && row.getNames() != null) { return StringUtils.join(row.getNames(), ", "); } return constants.empty(); } }; AbstractTextColumn<GuestContainer> imageColumn = new AbstractTextColumn<GuestContainer>() { @Override public String getValue(GuestContainer row) { if (row != null) { return row.getImage(); } return constants.empty(); } }; AbstractTextColumn<GuestContainer> commandColumn = new AbstractTextColumn<GuestContainer>() { @Override public String getValue(GuestContainer row) { if (row != null) { return row.getCommand(); } return constants.empty(); } }; AbstractTextColumn<GuestContainer> statusColumn = new AbstractTextColumn<GuestContainer>() { @Override public String getValue(GuestContainer row) { if (row != null) { return row.getStatus(); } return constants.empty(); } }; getTable().addColumn(idColumn, constants.idContainer()); getTable().addColumn(namesColumn, constants.namesContainer()); getTable().addColumn(imageColumn, constants.imageContainer()); getTable().addColumn(commandColumn, constants.commandContainer()); getTable().addColumn(statusColumn, constants.statusContainer()); }</code><technical_language>personally I prefer inline instantiation of columns in call table.addColumn (as in line 72) code more compact easier add/remove/move columns - especially need reference individual column instances for some additional tweaks. if strongly prefer this style, OK it</technical_language>

Target:
public void initTable() { getTable().addColumn(new AbstractTextColumn<GuestContainer>() { @Override public String getValue(GuestContainer row) { if (row != null) { return row.getId(); } return constants.empty(); } }, constants.idContainer()); getTable().addColumn(new AbstractTextColumn<GuestContainer>() { @Override public String getValue(GuestContainer row) { return StringUtils.join(row.getNames(), ", "); } }, constants.namesContainer()); getTable().addColumn(new AbstractTextColumn<GuestContainer>() { @Override public String getValue(GuestContainer row) { return row.getImage(); } }, constants.imageContainer()); getTable().addColumn(new AbstractTextColumn<GuestContainer>() { @Override public String getValue(GuestContainer row) { return row.getCommand(); } }, constants.commandContainer()); getTable().addColumn(new AbstractTextColumn<GuestContainer>() { @Override public String getValue(GuestContainer row) { return row.getStatus(); } }, constants.statusContainer()); }
Source:
<code>byte[] receive(int code) throws IOException { try { int len = din.readInt(); int get_code = din.read(); byte[] data = null; if (len > 1) { data = new byte[len - 1]; din.readFully(data); } if (get_code == RiakClient.MSG_ErrorResp) { RpbErrorResp err = com.basho.riak.pbc.RPB.RpbErrorResp.parseFrom(data); throw new RiakError(err); } if (code != get_code) { <START> throw new IOException("bad message code. Expected: " + code + " actual: " + get_code); <END> } return data; } catch (IOException e) { close(); throw e; } }</code><technical_language>closing socket received message code is unexpected? clear proper behavior here</technical_language>

Target:
byte[] receive(int code) throws IOException { int len; int get_code; byte[] data = null; try { len = din.readInt(); get_code = din.read(); if (len > 1) { data = new byte[len - 1]; din.readFully(data); } } catch (IOException e) { close(); throw e; } if (get_code == RiakClient.MSG_ErrorResp) { RpbErrorResp err = com.basho.riak.pbc.RPB.RpbErrorResp.parseFrom(data); throw new RiakError(err); } if (code != get_code) { throw new IOException("bad message code. Expected: " + code + " actual: " + get_code); } return data; }
Source:
<code>public void testShouldDumpMetaDataForNonNativeTableIfSetMeataDataOnly() throws Throwable { String createTableQuery = "CREATE TABLE custom_serdes( serde_id bigint COMMENT 'from deserializer', name string " + "COMMENT 'from deserializer', slib string COMMENT 'from deserializer') " + "ROW FORMAT SERDE 'org.apache.hive.storage.jdbc.JdbcSerDe' " + "STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler' " + "WITH SERDEPROPERTIES ('serialization.format'='1') " + "TBLPROPERTIES ( " + "'hive.sql.database.type'='METASTORE', " + "'hive.sql.query'='SELECT \"SERDE_ID\", \"NAME\", \"SLIB\" FROM \"SERDES\"')"; WarehouseInstance.Tuple bootstrapTuple = primary .run("use " + primaryDbName) .run(createTableQuery) .dump(primaryDbName, null, Collections.singletonList("'hive.repl.dump.metadata.only'='true'")); Path cSerdesTableDumpLocation = new Path( new Path(bootstrapTuple.dumpLocation, primaryDbName), "custom_serdes"); FileSystem fs = cSerdesTableDumpLocation.getFileSystem(primary.hiveConf); assertTrue(fs.exists(cSerdesTableDumpLocation)); FileStatus[] fileInfoList = fs.listStatus(cSerdesTableDumpLocation); <START> assertFalse(fileInfoList.length == 0); <END> }</code><technical_language>Check if _metadata file exist table dump path</technical_language>

Target:
public void testShouldDumpMetaDataForNonNativeTableIfSetMeataDataOnly() throws Throwable { String tableName = testName.getMethodName() + "_table"; String createTableQuery = "CREATE TABLE " + tableName + " ( serde_id bigint COMMENT 'from deserializer', name string " + "COMMENT 'from deserializer', slib string COMMENT 'from deserializer') " + "ROW FORMAT SERDE 'org.apache.hive.storage.jdbc.JdbcSerDe' " + "STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler' " + "WITH SERDEPROPERTIES ('serialization.format'='1') " + "TBLPROPERTIES ( " + "'hive.sql.database.type'='METASTORE', " + "'hive.sql.query'='SELECT \"SERDE_ID\", \"NAME\", \"SLIB\" FROM \"SERDES\"')"; WarehouseInstance.Tuple bootstrapTuple = primary .run("use " + primaryDbName) .run(createTableQuery) .dump(primaryDbName, null, Collections.singletonList("'hive.repl.dump.metadata.only'='true'")); replica.load(replicatedDbName, bootstrapTuple.dumpLocation) .status(replicatedDbName) .verifyResult(bootstrapTuple.lastReplicationId) .run("use " + replicatedDbName) .run("show tables") .verifyResult(tableName); }
Source:
<code>public String toString() { <START> return serverName; <END> }</code><technical_language>String.format( "Server[%s]", serverName )</technical_language>

Target:
public String toString() { return format( "Server[%s]", serverName ); }
Source:
<code>private void updateLabelList() { AsyncQuery getLabelsQuery = new AsyncQuery(); getLabelsQuery.asyncCallback = new INewAsyncCallback() { @SuppressWarnings("unchecked") @Override public void onSuccess(Object model, Object result) { List<Label> allLabels = (List<Label>) result; if (getIsNew()) { labelList.setItems(allLabels); labelList.setSelectedItems(new ArrayList<Label>()); } else { List<Label> selectedLabels = new ArrayList<>(); <START> for (Label label : allLabels) { <END> if (label.getHosts().contains(getHostId())) { selectedLabels.add(label); } } labelList.setItems(allLabels); labelList.setSelectedItems(selectedLabels); } labelList.setIsChangeable(false); } }; AsyncDataProvider.getInstance().getLabelList(getLabelsQuery); }</code><technical_language>try java 8 stream api somthing : selectedLabels = allLabels.stream().filter(label->label.gethosts().contains(getHostId()))</technical_language>

Target:
private void updateLabelList() { final AsyncQuery getAllLabelsQuery = new AsyncQuery(); getAllLabelsQuery.asyncCallback = new INewAsyncCallback() { @SuppressWarnings("unchecked") @Override public void onSuccess(Object model, Object result) { final List<Label> allLabels = (List<Label>) result; if (getIsNew()) { labelList.setItems(allLabels); labelList.setSelectedItems(new ArrayList<Label>()); } else { AsyncQuery getLabelsByHostIdQuery = new AsyncQuery(); getLabelsByHostIdQuery.asyncCallback = new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { List<Label> hostLabelsList = (List<Label>) returnValue; labelList.setItems(allLabels); labelList.setSelectedItems(hostLabelsList); } }; AsyncDataProvider.getInstance().getLabelListByEntityId(getLabelsByHostIdQuery, getHostId()); } labelList.setIsChangeable(false); } }; AsyncDataProvider.getInstance().getLabelList(getAllLabelsQuery); }
Source:
<code>public boolean isTerminationRequired(WorkloadExecutionStatus status) { if (stopTime != -1) { if (System.currentTimeMillis() >= stopTime) { log.info("Request to terminate work. Max duration reached"); return true; } } if (stopSampleCount != -1) { if (status.getTotalSamples() >= stopSampleCount) { log.info("Request to terminate work. Number of samples reached"); return true; } } boolean everyNodeHasEmptyTransactions = true; for (NodeId nodeId : status.getNodes()) { if (status.getEmptyTransactions(nodeId) == 0) { everyNodeHasEmptyTransactions = false; break; } } if (everyNodeHasEmptyTransactions) { <START> log.info("Request to terminate work. Every node has empty transactions which means there are nothing to do any more"); <END> return true; } return shutdown.get(); }</code><technical_language>propose: "Request terminate work. unique combination of <Endpoint,Query> executed"</technical_language>

Target:
public boolean isTerminationRequired(WorkloadExecutionStatus status) { if (stopTime != -1) { if (System.currentTimeMillis() >= stopTime) { log.info("Request to terminate work. Max duration reached"); return true; } } if (stopSampleCount != -1) { if (status.getTotalSamples() >= stopSampleCount) { log.info("Request to terminate work. Number of samples reached"); return true; } } boolean everyNodeHasEmptyTransactions = true; for (NodeId nodeId : status.getNodes()) { if (status.getEmptyTransactions(nodeId) == 0) { everyNodeHasEmptyTransactions = false; break; } } if (everyNodeHasEmptyTransactions) { log.info("Request to terminate work. All planned invocations are finished"); return true; } return shutdown.get(); }
Source:
<code>public Type getOutputType(final Schema schema, final Schema stateSchema) { final Type castFrom = getLeft().getOutputType(schema, stateSchema); final Type castTo = getRight().getOutputType(schema, stateSchema); if (isSimpleCast(castFrom, castTo)) { return castTo; } else { <START> Preconditions.checkState(false, "Cannot cast from " + castFrom + " to " + castTo); <END> return null; } }</code><technical_language>is a logger-like syntax for this is more efficient valid state: Preconditions.checkState(false, "Cannot cast %s %s", castFrom, castTo); said, if invalid state throw IllegalStateException directly</technical_language>

Target:
public Type getOutputType(final Schema schema, final Schema stateSchema) { final Type castFrom = getLeft().getOutputType(schema, stateSchema); final Type castTo = getRight().getOutputType(schema, stateSchema); if (isSimpleCast(castFrom, castTo)) { return castTo; } else { throw new IllegalStateException(String.format("Cannot cast from %s to %s", castFrom, castTo)); } }
Source:
<code>private void advanceLocation() { if (this.showParticles) { playAirbendingParticles(this.location, this.particles, 0.275F, 0.275F, 0.275F); } if (this.random.nextInt(4) == 0) { playAirbendingSound(this.location); } if (GeneralMethods.checkDiagonalWall(this.location, this.direction)) { this.remove(); return; <START> } else if (this.location.distance(this.origin) > this.range) { <END> this.remove(); return; } this.location = this.location.add(this.direction.clone().multiply(this.speedFactor)); }</code><technical_language>is this check line 426</technical_language>

Target:
private void advanceLocation() { if (this.showParticles) { playAirbendingParticles(this.location, this.particles, 0.275F, 0.275F, 0.275F); } if (this.random.nextInt(4) == 0) { playAirbendingSound(this.location); } if (GeneralMethods.checkDiagonalWall(this.location, this.direction)) { this.remove(); return; } this.location = this.location.add(this.direction.clone().multiply(this.speedFactor)); }
Source:
<code>private void acquireWithinEventExecutor(final Promise<Channel> acquirePromise) { assert this.executor.inEventLoop(); if (!this.isClosed) { if (this.allChannels.size() + this.pendingCreateChannelFutures.size() < this.capacity) { final Future<Channel> createChannelFuture = this.channelFactory.create(executor.newPromise()); this.pendingCreateChannelFutures.add(createChannelFuture); createChannelFuture.addListener((GenericFutureListener<Future<Channel>>) future -> { ApnsChannelPool.this.pendingCreateChannelFutures.remove(createChannelFuture); if (future.isSuccess()) { final Channel channel = future.getNow(); ApnsChannelPool.this.allChannels.add(channel); ApnsChannelPool.this.metricsListener.handleConnectionAdded(); log.debug("Created channel {}", channel); acquirePromise.trySuccess(channel); } else { ApnsChannelPool.this.metricsListener.handleConnectionCreationFailed(); <START> log.debug("Failed to create channel", future.cause()); <END> acquirePromise.tryFailure(future.cause()); ApnsChannelPool.this.handleNextAcquisition(); } }); } else { final Channel channelFromIdlePool = ApnsChannelPool.this.idleChannels.poll(); if (channelFromIdlePool != null) { if (channelFromIdlePool.isActive()) { acquirePromise.trySuccess(channelFromIdlePool); } else { this.discardChannel(channelFromIdlePool); this.acquireWithinEventExecutor(acquirePromise); } } else { pendingAcquisitionPromises.add(acquirePromise); } } } else { acquirePromise.tryFailure(POOL_CLOSED_EXCEPTION); } }</code><technical_language>Is this more important debug</technical_language>

Target:
private void acquireWithinEventExecutor(final Promise<Channel> acquirePromise) { assert this.executor.inEventLoop(); if (!this.isClosed) { if (this.allChannels.size() + this.pendingCreateChannelFutures.size() < this.capacity) { final Future<Channel> createChannelFuture = this.channelFactory.create(executor.newPromise()); this.pendingCreateChannelFutures.add(createChannelFuture); createChannelFuture.addListener((GenericFutureListener<Future<Channel>>) future -> { ApnsChannelPool.this.pendingCreateChannelFutures.remove(createChannelFuture); if (future.isSuccess()) { final Channel channel = future.getNow(); ApnsChannelPool.this.allChannels.add(channel); ApnsChannelPool.this.metricsListener.handleConnectionAdded(); log.debug("Created channel {}", channel); acquirePromise.trySuccess(channel); } else { ApnsChannelPool.this.metricsListener.handleConnectionCreationFailed(); log.warn("Failed to create channel", future.cause()); acquirePromise.tryFailure(future.cause()); ApnsChannelPool.this.handleNextAcquisition(); } }); } else { final Channel channelFromIdlePool = ApnsChannelPool.this.idleChannels.poll(); if (channelFromIdlePool != null) { if (channelFromIdlePool.isActive()) { acquirePromise.trySuccess(channelFromIdlePool); } else { this.discardChannel(channelFromIdlePool); this.acquireWithinEventExecutor(acquirePromise); } } else { pendingAcquisitionPromises.add(acquirePromise); } } } else { acquirePromise.tryFailure(POOL_CLOSED_EXCEPTION); } }
Source:
<code>public boolean scmMaterialsHaveDestination() { for (MaterialConfig scmMaterial : getSCMAndPluggableSCMConfigs()) { <START> String destination = (scmMaterial instanceof ScmMaterialConfig) ? ((ScmMaterialConfig) scmMaterial).getFolder() : ((PluggableSCMMaterialConfig) scmMaterial).getFolder(); <END> if (StringUtil.isBlank(destination)) { return false; } } return true; }</code><technical_language>MaterialConfig interface a getFolder() method. is this needed? condition check, I mean</technical_language>

Target:
public boolean scmMaterialsHaveDestination() { for (MaterialConfig scmMaterial : getSCMAndPluggableSCMConfigs()) { String destination = scmMaterial.getFolder(); if (StringUtil.isBlank(destination)) { return false; } } return true; }
Source:
<code>private void buildTestableDeployments(DeploymentScenario scenario, TestClass testCase, ProtocolRegistry protoReg) { for (Deployment deployment : scenario.deployments()) { DeploymentDescription description = deployment.getDescription(); if (!description.testable() || !description.isArchiveDeployment()) { continue; } List<Archive<?>> auxiliaryArchives = loadAuxiliaryArchives(description); ProtocolDefinition protocolDefinition = protoReg.getProtocol(description.getProtocol()); if (protocolDefinition == null) { protocolDefinition = protoReg.getProtocol( containerRegistry.get() .getContainer(description.getTarget()) .getDeployableContainer() .getDefaultProtocol()); } Protocol<?> protocol = protocolDefinition.getProtocol(); DeploymentPackager packager = protocol.getPackager(); Archive<?> applicationArchive = description.getArchive(); applyApplicationProcessors(description.getArchive(), testCase); applyAuxiliaryProcessors(auxiliaryArchives); try { if (ClassContainer.class.isInstance(applicationArchive)) { ClassContainer<?> classContainer = ClassContainer.class.cast(applicationArchive); classContainer.addClass(testCase.getJavaClass()); <START> addAdditionalObserverClass(classContainer, testCase.getJavaClass()); <END> } } catch (UnsupportedOperationException e) { } description.setTestableArchive( packager.generateDeployment( new TestDeployment(deployment.getDescription(), applicationArchive, auxiliaryArchives), serviceLoader.get().all(ProtocolArchiveProcessor.class))); } }</code><technical_language>I add IfPresent method name move if of method</technical_language>

Target:
private void buildTestableDeployments(DeploymentScenario scenario, TestClass testCase, ProtocolRegistry protoReg) { for (Deployment deployment : scenario.deployments()) { DeploymentDescription description = deployment.getDescription(); if (!description.testable() || !description.isArchiveDeployment()) { continue; } List<Archive<?>> auxiliaryArchives = loadAuxiliaryArchives(description); ProtocolDefinition protocolDefinition = protoReg.getProtocol(description.getProtocol()); if (protocolDefinition == null) { protocolDefinition = protoReg.getProtocol( containerRegistry.get() .getContainer(description.getTarget()) .getDeployableContainer() .getDefaultProtocol()); } Protocol<?> protocol = protocolDefinition.getProtocol(); DeploymentPackager packager = protocol.getPackager(); Archive<?> applicationArchive = description.getArchive(); applyApplicationProcessors(description.getArchive(), testCase); applyAuxiliaryProcessors(auxiliaryArchives); try { if (ClassContainer.class.isInstance(applicationArchive)) { ClassContainer<?> classContainer = ClassContainer.class.cast(applicationArchive); classContainer.addClass(testCase.getJavaClass()); addAdditionalObserverClassesIfPresent(classContainer, testCase.getJavaClass()); } } catch (UnsupportedOperationException e) { } description.setTestableArchive( packager.generateDeployment( new TestDeployment(deployment.getDescription(), applicationArchive, auxiliaryArchives), serviceLoader.get().all(ProtocolArchiveProcessor.class))); } }
Source:
<code><START> public static void init(Class<?> caller) { <END> if ( !init ) { objectNotFoundExceptions = new ArrayList<Class>( 2 ); try { objectNotFoundExceptions.add( ClassLoaderHelper.classForName( "org.hibernate.ObjectNotFoundException", caller ) ); } catch ( ClassNotFoundException e ) { } try { objectNotFoundExceptions.add( ClassLoaderHelper.classForName( "javax.persistence.EntityNotFoundException", caller ) ); } catch ( ClassNotFoundException e ) { } init = true; } }</code><technical_language>Do need this init() method? _LoaderHelper_ class is in hibernate-search-orm module, depends JPA Hibernate ORM, module configured able load ObjectNotFoundException/EntityNotFoundException. I this work fine ClassLoaderHelper.classForName( "org.hibernate.ObjectNotFoundException", LoaderHelper.class ) needing init volatiles</technical_language>

Target:
public static void init(Class<?> caller) { if ( !init ) { objectNotFoundExceptions = new ArrayList<Class>( 2 ); try { objectNotFoundExceptions.add( ClassLoaderHelper.classForName( "org.hibernate.ObjectNotFoundException", caller.getClassLoader() ) ); } catch ( ClassNotFoundException e ) { } try { objectNotFoundExceptions.add( ClassLoaderHelper.classForName( "javax.persistence.EntityNotFoundException", caller.getClassLoader() ) ); } catch ( ClassNotFoundException e ) { } init = true; } }
Source:
<code>public void onMessage(String message) { logger.debug("Message received from server: {}", message); <START> final JsonObject json = parser.parse(message).getAsJsonObject(); <END> if (json.has("id")) { logger.debug("Response received from server: {}", json); int messageId = json.get("id").getAsInt(); if (messageId == nextMessageId - 1) { commandResponse = json; commandLatch.countDown(); } } else { logger.debug("Event received from server: {}", json); try { if (eventHandler != null) { scheduler.submit(new Runnable() { @Override public void run() { try { eventHandler.handleEvent(json); } catch (Exception e) { logger.error("Error handling event player state change message: {}", json, e.getMessage(), e); } } }); } } catch (Exception e) { logger.error("Error handling player state change message", e); } } }</code><technical_language>if parser fails? throw exception? Is jsonnull? cases do handled here</technical_language>

Target:
public void onMessage(String message) { logger.debug("Message received from server: {}", message); try { final JsonObject json = parser.parse(message).getAsJsonObject(); if (json.has("id")) { logger.debug("Response received from server: {}", json); int messageId = json.get("id").getAsInt(); if (messageId == nextMessageId - 1) { commandResponse = json; commandLatch.countDown(); } } else { logger.debug("Event received from server: {}", json); try { if (eventHandler != null) { scheduler.submit(() -> { try { eventHandler.handleEvent(json); } catch (Exception e) { logger.error("Error handling event player state change message: {}", json, e.getMessage(), e); } }); } } catch (Exception e) { logger.error("Error handling player state change message", e); } } } catch (JsonParseException e) { logger.debug("Not valid JSON message: {}", e.getMessage(), e); } }
Source:
<code>public void setVisible(boolean visible) { parent.setVisible(visible); isVisible = visible; if (visible && handler != null && !isVisited()) { tv.setInput(CfgHolder.unique(getDefaultCfgs(handler))); tv.setAllChecked(true); StringBuilder s = <START> new StringBuilder(EMPTY_STR); <END> visitedTCs = handler.getSelectedToolChains(); for (int i=0; i < visitedTCs.length; i++) { s.append(((visitedTCs[i] == null) ? "" : visitedTCs[i].getUniqueRealName())); if (i < visitedTCs.length - 1) s.append("\n"); } l_chains.setText(s.toString()); l_projtype.setText(handler.getName()); setPageComplete(isCustomPageComplete()); l_chains.getParent().pack(); } if (visible) { parent.getParent().layout(true, true); update(); } }</code><technical_language>new StringBuilder(EMPTY_STR) is equivalent new StringBuilder()</technical_language>

Target:
public void setVisible(boolean visible) { parent.setVisible(visible); isVisible = visible; if (visible && handler != null && !isVisited()) { tv.setInput(CfgHolder.unique(getDefaultCfgs(handler))); tv.setAllChecked(true); StringBuilder s = new StringBuilder(); visitedTCs = handler.getSelectedToolChains(); for (int i=0; i < visitedTCs.length; i++) { s.append(((visitedTCs[i] == null) ? "" : visitedTCs[i].getUniqueRealName())); if (i < visitedTCs.length - 1) s.append('\n'); } l_chains.setText(s.toString()); l_projtype.setText(handler.getName()); setPageComplete(isCustomPageComplete()); l_chains.getParent().pack(); } if (visible) { parent.getParent().layout(true, true); update(); } }
Source:
<code>public void testGetTaskFormWithoutPermissioneViaUIClientTest() throws Exception { changeUser(USER_YODA); long processInstanceId = processClient.startProcess(CONTAINER_ID, HIRING_PROCESS_ID); assertTrue(processInstanceId > 0); try { List<TaskSummary> tasks = taskClient.findTasksByStatusByProcessInstanceId(processInstanceId, null, 0, 10); assertNotNull(tasks); assertEquals(1, tasks.size()); Long taskId = tasks.get(0).getId(); changeUser(USER_JOHN); <START> uiServicesClient.getTaskForm(CONTAINER_ID, taskId, "en"); <END> fail(); } finally { processClient.abortProcessInstance(CONTAINER_ID, processInstanceId); } }</code><technical_language>Please check error message HTTP code [RestJmsSharedBaseIntegrationTest.assertClientException()](<LINK_0> method</technical_language>

Target:
public void testGetTaskFormWithoutPermissioneViaUIClientTest() throws Exception { long processInstanceId = processClient.startProcess(CONTAINER_ID, HIRING_PROCESS_ID); assertTrue(processInstanceId > 0); List<TaskSummary> tasks = taskClient.findTasksByStatusByProcessInstanceId(processInstanceId, null, 0, 10); assertNotNull(tasks); assertEquals(1, tasks.size()); Long taskId = tasks.get(0).getId(); try { assertClientException( () -> uiServicesClient.getTaskForm(CONTAINER_ID, taskId, "en"), 401, MessageFormat.format(TASK_PERMISSION_REST_ERROR, taskId), MessageFormat.format(TASK_PERMISSION_JMS_ERROR, USER_YODA, taskId)); } finally { processClient.abortProcessInstance(CONTAINER_ID, processInstanceId); } }
Source:
<code>private Thread getStuckThread(Thread mainThread) { List<Thread> threadsInGroup = getThreadsInGroup(mainThread.getThreadGroup()); if (threadsInGroup.isEmpty()) { return null; } Thread stuckThread = null; long maxCpuTime = 0; for (Thread thread : threadsInGroup) { try { <START> thread.join(); <END> long threadCpuTime = cpuTime(thread); if (stuckThread == null || threadCpuTime > maxCpuTime) { stuckThread = thread; maxCpuTime = threadCpuTime; } } catch (InterruptedException e) { e.printStackTrace(); } } return (stuckThread == mainThread) ? null : stuckThread; }</code><technical_language>This sense me. If thread is stuck join() it, stuck, too</technical_language>

Target:
private Thread getStuckThread(Thread mainThread) { List<Thread> threadsInGroup = getThreadsInGroup(mainThread.getThreadGroup()); if (threadsInGroup.isEmpty()) { return null; } Thread stuckThread = null; long maxCpuTime = 0; for (Thread thread : threadsInGroup) { if (thread.getState() == Thread.State.RUNNABLE) { long threadCpuTime = cpuTime(thread); if (stuckThread == null || threadCpuTime > maxCpuTime) { stuckThread = thread; maxCpuTime = threadCpuTime; } } } return (stuckThread == mainThread) ? null : stuckThread; }
Source:
<code>public boolean getIsNamespaceEnabled() throws AzureBlobFileSystemException { if (!isNamespaceEnabledSet) { <START> if (isNameSpaceEnabledSetFromConfig()) { <END> return this.isNamespaceEnabled; } LOG.debug("Get root ACL status"); try (AbfsPerfInfo perfInfo = startTracking("getIsNamespaceEnabled", "getAclStatus")) { AbfsRestOperation op = client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + AbfsHttpConstants.ROOT_PATH); perfInfo.registerResult(op.getResult()); isNamespaceEnabled = true; perfInfo.registerSuccess(true); } catch (AbfsRestOperationException ex) { if (HttpURLConnection.HTTP_BAD_REQUEST != ex.getStatusCode()) { throw ex; } isNamespaceEnabled = false; } isNamespaceEnabledSet = true; } return isNamespaceEnabled; }</code><technical_language>if merged</technical_language>

Target:
public boolean getIsNamespaceEnabled() throws AzureBlobFileSystemException { try { return this.isNamespaceEnabled.toBoolean(); } catch (TrileanConversionException e) { LOG.debug("isNamespaceEnabled is UNKNOWN; fall back and determine through" + " getAcl server call", e); } LOG.debug("Get root ACL status"); try (AbfsPerfInfo perfInfo = startTracking("getIsNamespaceEnabled", "getAclStatus")) { AbfsRestOperation op = client.getAclStatus( AbfsHttpConstants.FORWARD_SLASH + AbfsHttpConstants.ROOT_PATH); perfInfo.registerResult(op.getResult()); isNamespaceEnabled = Trilean.getTrilean(true); perfInfo.registerSuccess(true); } catch (AbfsRestOperationException ex) { if (HttpURLConnection.HTTP_BAD_REQUEST != ex.getStatusCode()) { throw ex; } isNamespaceEnabled = Trilean.getTrilean(false); } return isNamespaceEnabled.toBoolean(); }
Source:
<code>public static Map<String, Set<String>> getParentChildMap(String hierarchyPath) { Map<String, Set<String>> parentChildMap = new HashMap<>(); try { BufferedReader reader = new BufferedReader(new FileReader(hierarchyPath)); reader.readLine(); String line; <START> String[] nodes; <END> while ((line = reader.readLine()) != null) { if (line.isEmpty()) continue; String[] tokens = line.split("\t", 2); String parentID = tokens[0].trim(); String childIDs = tokens[1].trim(); Set<String> childIDSet = new HashSet<>(); nodes = childIDs.split("\t"); for (String node : nodes) { childIDSet.add(node); } parentChildMap.put(parentID, childIDSet); } reader.close(); } catch (Exception e) { e.printStackTrace(); } return parentChildMap; }</code><technical_language>Throw exception top of call stack, fail a helpful error message</technical_language>

Target:
static Map<String, Set<String>> getParentChildMap(String hierarchyPath) { Map<String, Set<String>> parentChildMap = new HashMap<>(); try(BufferedReader reader = new BufferedReader(new FileReader(hierarchyPath))) { reader.readLine(); String line; String[] nodes; while ((line = reader.readLine()) != null) { if (line.isEmpty()) continue; String[] tokens = line.split("\t", 2); String parentID = tokens[0].trim(); String childIDs = tokens[1].trim(); Set<String> childIDSet = new HashSet<>(); nodes = childIDs.split("\t"); childIDSet.addAll(Arrays.asList(nodes)); parentChildMap.put(parentID, childIDSet); } } catch (IOException e) { e.printStackTrace(); logger.error("IO Error while reading the file at " + hierarchyPath); throw new RuntimeException("IO Error while reading the file at " + hierarchyPath); } return parentChildMap; }
Source:
<code>public void lockAcquiredByConjureLockServiceIsAlsoAcquiredInLegacy() throws InterruptedException { com.palantir.lock.LockRequest lockRequest = com.palantir.lock.LockRequest.builder( ImmutableSortedMap.<LockDescriptor, LockMode>naturalOrder() .put(StringLockDescriptor.of("lock"), LockMode.WRITE) .build()) .doNotBlock() .build(); String anonymousId = LockClient.ANONYMOUS.getClientId(); ConjureLockV1Request conjureLockRequest = ConjureLockV1Request.builder() .lockClient(anonymousId) .lockRequest(lockRequest) .build(); HeldLocksToken token = client.conjureLegacyLockService().lockAndGetHeldLocks( AuthHeader.valueOf("Bearer unused"), client.namespace(), conjureLockRequest) .orElseThrow(() -> new RuntimeException("We should have been able to get the lock")); assertThat(client.legacyLockService().lockAndGetHeldLocks(anonymousId, lockRequest)) .as("if the conjure impl has taken a lock, the legacy impl mustn't be able to take it") .isNull(); <START> assertThat(client.legacyLockService().unlock(token.getLockRefreshToken())).isTrue(); <END> assertThat(client.legacyLockService().lockAndGetHeldLocks(anonymousId, lockRequest)) .as("a lock once unlocked by conjure impl can be acquired by legacy impl") .isNotNull(); assertThat(client.conjureLegacyLockService().lockAndGetHeldLocks( AuthHeader.valueOf("Bearer unused"), client.namespace(), conjureLockRequest)) .as("if the legacy impl has taken a lock, the conjure impl mustn't be able to take it") .isEmpty(); }</code><technical_language>as("legacy impl unlock a lock conjure impl")</technical_language>

Target:
public void lockAcquiredByConjureLockServiceIsAlsoAcquiredInLegacy() throws InterruptedException { com.palantir.lock.LockRequest lockRequest = com.palantir.lock.LockRequest.builder( ImmutableSortedMap.<LockDescriptor, LockMode>naturalOrder() .put(StringLockDescriptor.of("lock"), LockMode.WRITE) .build()) .doNotBlock() .build(); String anonymousId = LockClient.ANONYMOUS.getClientId(); ConjureLockV1Request conjureLockRequest = ConjureLockV1Request.builder() .lockClient(anonymousId) .lockRequest(lockRequest) .build(); HeldLocksToken token = client.conjureLegacyLockService().lockAndGetHeldLocks( AuthHeader.valueOf("Bearer unused"), client.namespace(), conjureLockRequest) .orElseThrow(() -> new RuntimeException("We should have been able to get the lock")); assertThat(client.legacyLockService().lockAndGetHeldLocks(anonymousId, lockRequest)) .as("if the conjure impl has taken a lock, the legacy impl mustn't be able to take it") .isNull(); assertThat(client.legacyLockService().unlock(token.getLockRefreshToken())) .as("legacy impl can unlock a lock taken by conjure impl") .isTrue(); assertThat(client.legacyLockService().lockAndGetHeldLocks(anonymousId, lockRequest)) .as("lock taken by conjure impl that was unlocked can now be acquired by legacy impl") .isNotNull(); assertThat(client.conjureLegacyLockService().lockAndGetHeldLocks( AuthHeader.valueOf("Bearer unused"), client.namespace(), conjureLockRequest)) .as("if the legacy impl has taken a lock, the conjure impl mustn't be able to take it") .isEmpty(); }
Source:
<code>protected boolean isLBSystemService(Service service) { Map<String, Object> data = DataAccessor.fields(service) .withKey("launchConfig").withDefault(Collections.EMPTY_MAP) .as(Map.class); Object imageObj = data.get(InstanceConstants.FIELD_IMAGE_UUID); if (imageObj == null) { return false; } String defaultImageUuid = LB_IMAGE_UUID.get().toLowerCase(); String[] splitted = defaultImageUuid.split(":"); String formattedDefault = String.format("%s:%s", splitted[0], splitted[1]); <START> logger.info("Image is " + imageObj.toString()); <END> logger.info("formatted default is " + formattedDefault); return imageObj.toString().startsWith(formattedDefault); }</code><technical_language>is this called logged</technical_language>

Target:
protected boolean isLBSystemService(Service service) { Map<String, Object> data = DataAccessor.fields(service) .withKey("launchConfig").withDefault(Collections.EMPTY_MAP) .as(Map.class); Object imageObj = data.get(InstanceConstants.FIELD_IMAGE_UUID); if (imageObj == null) { return false; } String defaultImageUuid = LB_IMAGE_UUID.get().toLowerCase(); String[] splitted = defaultImageUuid.split(":"); String formattedDefault = String.format("%s:%s", splitted[0], splitted[1]); return imageObj.toString().startsWith(formattedDefault); }
Source:
<code>public void process(GeneratingRegion region) { Border3D border = region.getBorderForFacet(PlayAreaFacet.class); PlayAreaFacet facet = new PlayAreaFacet(region.getRegion(), border); Rect2i processRegion = facet.getWorldRegion(); for (BaseVector2i position: processRegion.contents()) { <START> if (position.distanceSquared(new Vector2i(0, 0)) <= 2500) { <END> facet.setWorld((Vector2i) position, true); } else { facet.setWorld((Vector2i) position, false); } } region.setRegionFacet(PlayAreaFacet.class, facet); }</code><technical_language>2500 is a magic number</technical_language>

Target:
public void process(GeneratingRegion region) { Border3D border = region.getBorderForFacet(PlayAreaFacet.class); PlayAreaFacet facet = new PlayAreaFacet(region.getRegion(), border); int playAreaRadiusSquared = LASUtils.PLAY_AREA_RADIUS * LASUtils.PLAY_AREA_RADIUS; Rect2i processRegion = facet.getWorldRegion(); for (BaseVector2i position : processRegion.contents()) { if (position.distanceSquared(new Vector2i(0, 0)) <= playAreaRadiusSquared) { facet.setWorld((Vector2i) position, true); } else { facet.setWorld((Vector2i) position, false); } } region.setRegionFacet(PlayAreaFacet.class, facet); }