auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public String readString() throws IOException { final int size = readInt32(); if (size > 0) { if (size < getCurrentRemaining()) { String value = Utf8Utils.decode(_currentSegment.getArray(), _localOffset, size, _textBuffer); _localOffset += size; return value; } else { ByteStringLongDecoderState state = new ByteStringLongDecoderState(_byteArrays, _currentIndex, _localOffset); String value = Utf8Utils.decodeLong(state, size, _textBuffer); _currentIndex = state.getCurrentIndex(); _currentSegment = _byteArrays.get(_currentIndex); _localOffset = state.getPosition(); return value; } } else if (size == 0) { return ""; } else { throw new IOException("Read negative size: " + size + ". Invalid string"); } }

Target:
public String readString() throws IOException { final int size = readInt32(); if (size > 0) { if (size <= getCurrentRemaining()) { String value = Utf8Utils.decode(_currentSegment.getArray(), _currentArrayOffset, size, _textBuffer); _currentArrayOffset += size; return value; } else { ByteStringLongDecoderState state = new ByteStringLongDecoderState(_byteArrays, _currentIndex, _currentArrayOffset); String value = Utf8Utils.decodeLong(state, size, _textBuffer); _currentIndex = state.getCurrentIndex(); _currentSegment = _byteArrays.get(_currentIndex); _currentArrayOffset = state.getPosition(); return value; } } else if (size == 0) { return ""; } else { throw new IOException("Read negative size: " + size + ". Invalid string"); } }
Source:
private BinaryLatch enqueuePopulateIndex( WritableFulltext index, GraphDatabaseService db, Supplier<ResourceIterable<? extends Entity>> entitySupplier ) throws IOException { BinaryLatch completedLatch = new BinaryLatch(); FulltextIndexUpdate population = () -> { PartitionedIndexWriter indexWriter = index.getIndexWriter(); String[] indexedPropertyKeys = index.properties().toArray( new String[0] ); try ( Transaction ignore = db.beginTx( 10, TimeUnit.HOURS ) ) { ResourceIterable<? extends Entity> entities = entitySupplier.get(); for ( Entity entity : entities ) { long entityId = entity.getId(); Map<String,Object> properties = entity.getProperties( indexedPropertyKeys ); if ( !properties.isEmpty() ) { updateDocument( indexWriter, entityId, properties ); } } } return Pair.of( index, completedLatch ); }; enqueueUpdate( population ); return completedLatch; }

Target:
private AsyncFulltextIndexOperation enqueuePopulateIndex( WritableFulltext index, GraphDatabaseService db, Supplier<ResourceIterable<? extends Entity>> entitySupplier ) throws IOException { Latch completedLatch = new Latch(); FulltextIndexUpdate population = () -> { PartitionedIndexWriter indexWriter = index.getIndexWriter(); String[] indexedPropertyKeys = index.properties().toArray( new String[0] ); ArrayList<Supplier<Document>> documents = new ArrayList<>(); try ( Transaction ignore = db.beginTx( 1, TimeUnit.DAYS ) ) { ResourceIterable<? extends Entity> entities = entitySupplier.get(); for ( Entity entity : entities ) { long entityId = entity.getId(); Map<String,Object> properties = entity.getProperties( indexedPropertyKeys ); if ( !properties.isEmpty() ) { documents.add( documentBuilder( entityId, properties ) ); } if ( documents.size() > POPULATING_BATCH_SIZE ) { indexWriter.addDocuments( documents.size(), reifyDocuments( documents ) ); documents.clear(); } } } indexWriter.addDocuments( documents.size(), reifyDocuments( documents ) ); return Pair.of( index, completedLatch ); }; enqueueUpdate( population ); return completedLatch; }
Source:
private static void addSecurityStandards(NewRule rule, SecurityStandards securityStandards) { for (String s : securityStandards.OWASP) { rule.addOwaspTop10(OwaspTop10.valueOf(s)); } int[] cweNumbers = Arrays.stream(securityStandards.CWE).map(cwe -> cwe.substring(4)).mapToInt(Integer::valueOf).toArray(); rule.addCwe(cweNumbers); }

Target:
private static void addSecurityStandards(NewRule rule, SecurityStandards securityStandards) { for (String s : securityStandards.OWASP) { rule.addOwaspTop10(OwaspTop10.valueOf(s)); } rule.addCwe(securityStandards.CWE); }
Source:
public void separateLoopsTest() { Dominoes dominoes = new Dominoes(); Domino[] dominoesList = {new Domino(1, 2), new Domino(2, 3), new Domino(3, 1), new Domino(1, 1), new Domino(2, 2), new Domino(3, 3)}; ArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList)); ArrayList<Domino> chain = dominoes.formChain(dominoesArray); assertValidChain(dominoesArray, chain); }

Target:
public void separateLoopsTest() throws ChainNotFoundException { Dominoes dominoes = new Dominoes(); Domino[] dominoesArray = {new Domino(1, 2), new Domino(2, 3), new Domino(3, 1), new Domino(1, 1), new Domino(2, 2), new Domino(3, 3)}; List<Domino> dominoesList = Arrays.asList(dominoesArray); List<Domino> chain = dominoes.formChain(dominoesList); assertValidChain(dominoesList, chain); }
Source:
protected boolean validateInputs() { if (!super.validateInputs()) { return false; } if (getVdsId() == null) { getQueryReturnValue().setExceptionString(EngineMessage.VDS_ID_IS_NULL.name()); getQueryReturnValue().setSucceeded(false); return false; } if (getVds() == null) { getQueryReturnValue().setExceptionString(EngineMessage.VDS_ID_NOT_EXIST.name()); getQueryReturnValue().setSucceeded(false); return false; } return true; }

Target:
protected boolean validateInputs() { if (!super.validateInputs()) { return false; } if (getVdsId() == null) { getQueryReturnValue().setExceptionString(EngineMessage.VDS_ID_IS_NULL.name()); getQueryReturnValue().setSucceeded(false); return false; } if (getVds() == null) { getQueryReturnValue().setExceptionString(EngineMessage.VDS_INVALID_SERVER_ID.name()); getQueryReturnValue().setSucceeded(false); return false; } return true; }
Source:
protected Object decode( ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception { while (buf.readableBytes() > 0 && Character.isDigit(buf.getByte(buf.readerIndex()))) { buf.readByte(); } if (buf.readableBytes() < 11) { return null; } int version = buf.getUnsignedByte(buf.readerIndex() + 1); int offset = 1 + 1 + 3; if ((version & 0x80) != 0) { offset += 4; } int length = buf.getUnsignedShort(buf.readerIndex() + offset); offset += 2; if ((version & 0x40) != 0) { offset += 3; } length += offset; if (buf.readableBytes() >= length) { return buf.readBytes(length); } return null; }

Target:
protected Object decode( ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception { while (buf.readable() && Character.isDigit(buf.getByte(buf.readerIndex()))) { buf.readByte(); } if (buf.readableBytes() < 11) { return null; } int version = buf.getUnsignedByte(buf.readerIndex() + 1); int offset = 1 + 1 + 3; if ((version & 0x80) != 0) { offset += 4; } int length = buf.getUnsignedShort(buf.readerIndex() + offset); offset += 2; if ((version & 0x40) != 0) { offset += 3; } length += offset; if (buf.readableBytes() >= length) { return buf.readBytes(length); } return null; }
Source:
public ODatabasePoolInternal get(String database, String username, String password, OrientDBConfig parentConfig) { checkForClose(); String key = OSecurityManager.instance().createSHA256(database + username + password); ODatabasePoolInternal pool = getByKey(key); if (pool != null) { return pool; } return poolCache.computeIfAbsent(key, hash -> { OrientDBConfig config = OrientDBConfig.builder() .addConfig(OGlobalConfiguration.DB_POOL_MAX, maxPoolSize) .build(); if (parentConfig != null) { config.setParent(parentConfig); } return new ODatabasePoolImpl(orientDB, database, username, password, config); }); }

Target:
public ODatabasePoolInternal get(String database, String username, String password, OrientDBConfig parentConfig) { checkForClose(); String key = OSecurityManager.instance().createSHA256(database + username + password); ODatabasePoolInternal pool = getByKey(key); if (pool != null) { return pool; } ODatabasePoolInternal db = poolCache.get(key); if (db != null && !db.isClosed()) { return db; } OrientDBConfig config = OrientDBConfig.builder() .addConfig(OGlobalConfiguration.DB_POOL_MAX, maxPoolSize) .build(); if (parentConfig != null) { config.setParent(parentConfig); } db = new ODatabasePoolImpl(orientDB, database, username, password, config); poolCache.put(key, db); return db; }
Source:
public void setupProperties() { super.setupProperties(); apiMode.setPossibleValues((Object[]) MarketoComponentProperties.APIMode.values()); apiMode.setValue(MarketoComponentProperties.APIMode.REST); connection.setApiMode(apiMode.getValue()); batchSize.setValue(100); dieOnError.setValue(true); }

Target:
public void setupProperties() { super.setupProperties(); apiMode.setValue(MarketoComponentProperties.APIMode.REST); connection.setApiMode(apiMode.getValue()); batchSize.setValue(100); dieOnError.setValue(true); }
Source:
public void close() throws IOException { try { if (lineIterator != null) { lineIterator.close(); } } catch (Throwable t) { try { if (closer != null) { closer.close(); } } catch (Exception e) { t.addSuppressed(e); } throw t; } if (closer != null) { closer.close(); } }

Target:
public void close() throws IOException { Closer firehoseCloser = Closer.create(); if (lineIterator != null) { firehoseCloser.register(lineIterator); } firehoseCloser.register(closer); firehoseCloser.close(); }
Source:
public static boolean isLogicalType(OpType type) { return type == And || type == Or; }

Target:
public static boolean isLogicalType(OpType type) { return type == Not || type == And || type == Or; }
Source:
public ComparisonCondition(final ConditionType conditionType, final String fieldName, final Object comparisonValue) { super(conditionType); this.fieldName = fieldName; this.comparisonValue = comparisonValue; }

Target:
private ComparisonCondition(final ConditionType conditionType, final String fieldName, final Object comparisonValue) { super(conditionType); this.fieldName = fieldName; this.comparisonValue = comparisonValue; }
Source:
public int getTransactionTimeout() throws XAException { log.infof("getTransactionTimeout: returning timeout: %s", transactionTimeout); return transactionTimeout; }

Target:
public int getTransactionTimeout() throws XAException { log.tracef("getTransactionTimeout: returning timeout: %s", transactionTimeout); return transactionTimeout; }
Source:
public MessageHandler cassandraSinkMessageHandler() { CassandraMessageHandler<?> cassandraMessageHandler = new CassandraMessageHandler<>(this.template, cassandraSinkProperties.getQueryType()); cassandraMessageHandler.setProducesReply(false); if (cassandraSinkProperties.getConsistencyLevel() != null || cassandraSinkProperties.getRetryPolicy() != null || cassandraSinkProperties.getTtl() > 0) { cassandraMessageHandler.setWriteOptions( new WriteOptions(cassandraSinkProperties.getConsistencyLevel(), cassandraSinkProperties.getRetryPolicy(), cassandraSinkProperties.getTtl())); } if (StringUtils.hasText(cassandraSinkProperties.getIngestQuery())) { cassandraMessageHandler.setIngestQuery(cassandraSinkProperties.getIngestQuery()); } else if (StringUtils.hasText(cassandraSinkProperties.getStatementExpression())) { Expression expression = PARSER.parseExpression(cassandraSinkProperties.getStatementExpression()); cassandraMessageHandler.setStatementExpression(expression); } return cassandraMessageHandler; }

Target:
public MessageHandler cassandraSinkMessageHandler() { CassandraMessageHandler<?> cassandraMessageHandler = new CassandraMessageHandler<>(this.template, cassandraSinkProperties.getQueryType()); cassandraMessageHandler.setProducesReply(false); if (cassandraSinkProperties.getConsistencyLevel() != null || cassandraSinkProperties.getRetryPolicy() != null || cassandraSinkProperties.getTtl() > 0) { cassandraMessageHandler.setWriteOptions( new WriteOptions(cassandraSinkProperties.getConsistencyLevel(), cassandraSinkProperties.getRetryPolicy(), cassandraSinkProperties.getTtl())); } if (StringUtils.hasText(cassandraSinkProperties.getIngestQuery())) { cassandraMessageHandler.setIngestQuery(cassandraSinkProperties.getIngestQuery()); } else if (cassandraSinkProperties.getStatementExpression() != null) { cassandraMessageHandler.setStatementExpression(cassandraSinkProperties.getStatementExpression()); } return cassandraMessageHandler; }
Source:
public RichResource getRichResourceById(PerunSession sess, int id) throws InternalErrorException, ResourceNotExistsException { try { List<RichResource> rich = temp.query("select " + resourceMappingSelectQuery + ", " + VosManagerImpl.voMappingSelectQuery + ", " + FacilitiesManagerImpl.facilityMappingSelectQuery + ", "+ resourceTagMappingSelectQuery +" from resources join vos on resources.vo_id=vos.id " + "join facilities on resources.facility_id=facilities.id left outer join tags_resources on resources.id=tags_resources.resource_id left outer join res_tags on tags_resources.tag_id=res_tags.id where resources.id=?", new RichResourceExtractor(), id); if (rich != null && !rich.isEmpty()) { if (rich.get(0) != null) { return rich.get(0); } } throw new ResourceNotExistsException("Resource with ID="+id+" not exists"); } catch (EmptyResultDataAccessException e) { throw new ResourceNotExistsException(e); } catch(RuntimeException ex) { throw new InternalErrorException(ex); } }

Target:
public RichResource getRichResourceById(PerunSession sess, int id) throws InternalErrorException, ResourceNotExistsException { try { List<RichResource> rich = temp.query("select " + resourceMappingSelectQuery + ", " + VosManagerImpl.voMappingSelectQuery + ", " + FacilitiesManagerImpl.facilityMappingSelectQuery + ", "+ resourceTagMappingSelectQuery +" from resources join vos on resources.vo_id=vos.id " + "join facilities on resources.facility_id=facilities.id left outer join tags_resources on resources.id=tags_resources.resource_id left outer join res_tags on tags_resources.tag_id=res_tags.id where resources.id=?", RICH_RESOURCE_WITH_TAGS_EXTRACTOR, id); if (rich != null && rich.size()>1) { throw new ConsistencyErrorException("There are more than one Resources under ID="+id); } else if (rich != null && rich.isEmpty()) { throw new ResourceNotExistsException("Resource with ID="+id+" not exists"); } if (rich != null && rich.size() == 1) { if (rich.get(0) != null) { return rich.get(0); } else { throw new InternalErrorException("RichResource with ID="+id+" in null."); } } throw new InternalErrorException("Response from SQL RowExttractor is null."); } catch (EmptyResultDataAccessException e) { throw new ResourceNotExistsException(e); } catch(RuntimeException ex) { throw new InternalErrorException(ex); } }
Source:
protected Composite createControlComposite(Composite composite) { final Composite controlComposite = new Composite(composite, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).hint(1, getTableHeightHint()) .applyTo(controlComposite); GridLayoutFactory.fillDefaults().numColumns(1).applyTo(controlComposite); return controlComposite; }

Target:
protected Composite createControlComposite(Composite composite) { final Composite controlComposite = new Composite(composite, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(1).applyTo(controlComposite); return controlComposite; }
Source:
public void doStart() { Thread thread = new Thread(() -> { try { SoroushBotAbstractConsumer.this.run(); } catch (InterruptedException e) { e.printStackTrace(); } }); thread.start(); thread.setName("Soroush Receiver"); }

Target:
public void doStart() { run(); }
Source:
private void removeMissingModuleTypes(Collection<String> moduleTypes) { Map<String, List<String>> mapMissingHandlers = null; for (Iterator<String> it = moduleTypes.iterator(); it.hasNext();) { String moduleTypeName = it.next(); Set<String> rules = null; synchronized (this) { rules = mapModuleTypeToRules.get(moduleTypeName); } if (rules != null) { for (String rUID : rules) { RuleStatus ruleStatus = getRuleStatus(rUID); if (ruleStatus == null) { logger.debug("Missing status for:" + rUID); } switch (ruleStatus) { case RUNNING: case IDLE: mapMissingHandlers = mapMissingHandlers != null ? mapMissingHandlers : new HashMap<String, List<String>>(20); List<String> list = mapMissingHandlers.get(rUID); if (list == null) { list = new ArrayList<String>(5); } list.add(moduleTypeName); mapMissingHandlers.put(rUID, list); break; default: break; } } } } if (mapMissingHandlers != null) { for (Entry<String, List<String>> e : mapMissingHandlers.entrySet()) { String rUID = e.getKey(); List<String> missingTypes = e.getValue(); StringBuffer sb = new StringBuffer(); sb.append("Missing handlers: "); for (String typeUID : missingTypes) { sb.append(typeUID).append(", "); } unregister(getRule0(rUID)); setRuleStatusInfo(rUID, new RuleStatusInfo(RuleStatus.NOT_INITIALIZED, RuleStatusDetail.HANDLER_MISSING_ERROR, sb.substring(0, sb.length() - 2))); } } for (Iterator<String> it = moduleTypes.iterator(); it.hasNext();) { String moduleTypeName = it.next(); moduleHandlerFactories.remove(moduleTypeName); } }

Target:
private void removeMissingModuleTypes(Collection<String> moduleTypes) { Map<String, List<String>> mapMissingHandlers = null; for (Iterator<String> it = moduleTypes.iterator(); it.hasNext();) { String moduleTypeName = it.next(); Set<String> rules = null; synchronized (this) { rules = mapModuleTypeToRules.get(moduleTypeName); } if (rules != null) { for (String rUID : rules) { RuleStatus ruleStatus = getRuleStatus(rUID); switch (ruleStatus) { case RUNNING: case IDLE: mapMissingHandlers = mapMissingHandlers != null ? mapMissingHandlers : new HashMap<String, List<String>>(20); List<String> list = mapMissingHandlers.get(rUID); if (list == null) { list = new ArrayList<String>(5); } list.add(moduleTypeName); mapMissingHandlers.put(rUID, list); break; default: break; } } } } if (mapMissingHandlers != null) { for (Entry<String, List<String>> e : mapMissingHandlers.entrySet()) { String rUID = e.getKey(); List<String> missingTypes = e.getValue(); StringBuffer sb = new StringBuffer(); sb.append("Missing handlers: "); for (String typeUID : missingTypes) { sb.append(typeUID).append(", "); } unregister(getRule0(rUID)); setRuleStatusInfo(rUID, new RuleStatusInfo(RuleStatus.NOT_INITIALIZED, RuleStatusDetail.HANDLER_MISSING_ERROR, sb.substring(0, sb.length() - 2))); } } for (Iterator<String> it = moduleTypes.iterator(); it.hasNext();) { String moduleTypeName = it.next(); moduleHandlerFactories.remove(moduleTypeName); } }
Source:
public void testDefaultConfiguration() { String[] values = new String[] { "zookeeper1", "Client1", "true", "zookeeper/hadoop.hadoop.com", "true", "ClientCnxnSocketNetty", "true" }; String[] properties = new String[] { ZK_SASL_CLIENT_USERNAME, LOGIN_CONTEXT_NAME_KEY, ENABLE_CLIENT_SASL_KEY, ZOOKEEPER_SERVER_REALM, DISABLE_AUTO_WATCH_RESET, ZOOKEEPER_CLIENT_CNXN_SOCKET, SECURE_CLIENT }; assertEquals(properties.length,values.length); for (int i = 0; i < properties.length; i++) { String prop = properties[i]; System.setProperty(prop, values[i]); } ZKClientConfig conf = new ZKClientConfig(); for (int i = 0; i < properties.length; i++) { String prop = properties[i]; String result = conf.getProperty(prop); assertEquals(values[i], result); } for (int i = 0; i < properties.length; i++) { String prop = properties[i]; System.clearProperty(prop); } conf = new ZKClientConfig(); for (int i = 0; i < properties.length; i++) { String prop = properties[i]; String result = conf.getProperty(prop); assertNull(result); } }

Target:
public void testDefaultConfiguration() { Map<String, String> properties = new HashMap<>(); properties.put(ZK_SASL_CLIENT_USERNAME, "zookeeper1"); properties.put(LOGIN_CONTEXT_NAME_KEY, "Client1"); properties.put(ENABLE_CLIENT_SASL_KEY, "true"); properties.put(ZOOKEEPER_SERVER_REALM, "zookeeper/hadoop.hadoop.com"); properties.put(DISABLE_AUTO_WATCH_RESET, "true"); properties.put(ZOOKEEPER_CLIENT_CNXN_SOCKET, "ClientCnxnSocketNetty"); properties.put(SECURE_CLIENT, "true"); for (Map.Entry<String, String> e : properties.entrySet()) { System.setProperty(e.getKey(), e.getValue()); } ZKClientConfig conf = new ZKClientConfig(); for (Map.Entry<String, String> e : properties.entrySet()) { assertEquals(e.getValue(), conf.getProperty(e.getKey())); } for (Map.Entry<String, String> e : properties.entrySet()) { System.clearProperty(e.getKey()); } conf = new ZKClientConfig(); for (Map.Entry<String, String> e : properties.entrySet()) { String result = conf.getProperty(e.getKey()); assertNull(result); } }
Source:
public static JSONObject readLogLines(File file, int startOffset, int lines) { JSONObject json = new JSONObject(); String content = ""; long off = 0; long endOffset = 0; int linesRead = 0; int bytesRead = 0; try (RandomAccessFile raf = new RandomAccessFile(file, "r")) { long len = raf.length(); if (startOffset < 0 || startOffset > len) { off = len; while (lines > 0 && --off >= 0) { raf.seek(off); if (off == 0 || raf.read() == '\n') { lines--; linesRead++; } } bytesRead = (int) (len - off); byte[] buf = null; if(bytesRead >= logBufLimit) { buf = new byte[logBufLimit]; raf.read(buf); addExceedingMsg(buf, "UTF-8"); } else { buf = new byte[bytesRead]; raf.read(buf); } content = LessBytes.toString(buf); endOffset = len; } else if (len > 0 && startOffset < len) { off = startOffset; while (lines > 0 && off < len) { raf.seek(off++); if (raf.read() == '\n') { lines--; linesRead++; } } bytesRead = (int) (off - startOffset); byte[] buf = null; if(bytesRead >= logBufLimit) { buf = new byte[logBufLimit]; raf.seek(startOffset); raf.read(buf); addExceedingMsg(buf, "UTF-8"); } else { buf = new byte[bytesRead]; raf.seek(startOffset); raf.read(buf); } content = LessBytes.toString(buf); endOffset = off; } else if (startOffset == len) { endOffset = len; linesRead = 0; content = ""; } json.put("offset", endOffset); json.put("lines", linesRead); json.put("lastModified", file.lastModified()); json.put("out", content); } catch (Exception e) { log.warn("", e); } return json; }

Target:
public static JSONObject readLogLines(File file, int startOffset, int lines) { JSONObject json = new JSONObject(); String content = ""; long off = 0; long endOffset = 0; int linesRead = 0; int bytesRead = 0; try (RandomAccessFile raf = new RandomAccessFile(file, "r")) { long len = raf.length(); if (startOffset < 0 || startOffset > len) { off = len; while (lines > 0 && --off >= 0) { raf.seek(off); if (off == 0 || raf.read() == '\n') { lines--; linesRead++; } } bytesRead = (int) (len - off); byte[] buf = readFileBytesLimited(raf, bytesRead); content = LessBytes.toString(buf); endOffset = len; } else if (len > 0 && startOffset < len) { off = startOffset; while (lines > 0 && off < len) { raf.seek(off++); if (raf.read() == '\n') { lines--; linesRead++; } } bytesRead = (int) (off - startOffset); raf.seek(startOffset); byte[] buf = readFileBytesLimited(raf, bytesRead); content = LessBytes.toString(buf); endOffset = off; } else if (startOffset == len) { endOffset = len; linesRead = 0; content = ""; } json.put("offset", endOffset); json.put("lines", linesRead); json.put("lastModified", file.lastModified()); json.put("out", content); } catch (Exception e) { log.warn("", e); } return json; }
Source:
public Mono<ServiceBusManagementNode> getManagementNode(String entityPath) { if (isDisposed()) { return Mono.error(logger.logExceptionAsError(new IllegalStateException(String.format( "connectionId[%s]: Connection is disposed. Cannot get management instance for '%s'", connectionId, entityPath)))); } final ServiceBusManagementNode existing = managementNodes.get(entityPath); if (existing != null) { return Mono.just(existing); } return getReactorConnection().then( Mono.fromCallable(() -> { final ServiceBusManagementNode node = managementNodes.computeIfAbsent(entityPath, key -> { final String sessionName = entityPath + "-" + MANAGEMENT_SESSION_NAME; final String linkName = entityPath + "-" + MANAGEMENT_LINK_NAME; final String address = entityPath + "/" + MANAGEMENT_ADDRESS; logger.info("Creating management node. entityPath: [{}]. address: [{}]. linkName: [{}]", entityPath, address, linkName); TokenManager cbsBasedTokenManager = new AzureTokenManagerProvider( CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, fullyQualifiedNamespace, entityPath) .getTokenManager(getClaimsBasedSecurityNode(), entityPath) ; final Mono<RequestResponseChannel> requestResponseChannel = createRequestResponseChannel(sessionName, linkName, address); return new ManagementChannel(requestResponseChannel, entityPath, tokenCredential, tokenManagerProvider, messageSerializer, scheduler, cbsBasedTokenManager); }); return node; })); }

Target:
public Mono<ServiceBusManagementNode> getManagementNode(String entityPath) { if (isDisposed()) { return Mono.error(logger.logExceptionAsError(new IllegalStateException(String.format( "connectionId[%s]: Connection is disposed. Cannot get management instance for '%s'", connectionId, entityPath)))); } final ServiceBusManagementNode existing = managementNodes.get(entityPath); if (existing != null) { return Mono.just(existing); } return getReactorConnection().then( Mono.fromCallable(() -> { final ServiceBusManagementNode node = managementNodes.computeIfAbsent(entityPath, key -> { final String sessionName = entityPath + "-" + MANAGEMENT_SESSION_NAME; final String linkName = entityPath + "-" + MANAGEMENT_LINK_NAME; final String address = entityPath + "/" + MANAGEMENT_ADDRESS; logger.info("Creating management node. entityPath: [{}]. address: [{}]. linkName: [{}]", entityPath, address, linkName); TokenManager cbsBasedTokenManager = new AzureTokenManagerProvider( CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, fullyQualifiedNamespace, entityPath) .getTokenManager(getClaimsBasedSecurityNode(), entityPath); final Mono<RequestResponseChannel> requestResponseChannel = createRequestResponseChannel(sessionName, linkName, address); return new ManagementChannel(requestResponseChannel, messageSerializer, scheduler, cbsBasedTokenManager); }); return node; })); }
Source:
public static Map<String, KnoxDataSource> loadDataSources() throws IOException { Map<String, KnoxDataSource> datasources = null; String home = System.getProperty("user.home"); String json = null; File dsFile = new File( home + File.separator + ".knoxshell" + File.separator + KNOXDATASOURCES_JSON); synchronized(KnoxSession.class) { json = readFileToString(dsFile, "UTF8"); } datasources = getMapOfDataSourcesFromJsonString(json); return datasources; }

Target:
public static Map<String, KnoxDataSource> loadDataSources() throws IOException { Map<String, KnoxDataSource> datasources = null; String home = System.getProperty("user.home"); String json = null; File dsFile = new File( home + File.separator + ".knoxshell" + File.separator + KNOXDATASOURCES_JSON); if (dsFile.exists()) { json = readFileToString(dsFile, "UTF8"); datasources = getMapOfDataSourcesFromJsonString(json); } return datasources; }
Source:
private static List<String> buildColumnsNames() { ImmutableList.Builder<String> columnNamesBuilder = ImmutableList.builder(); columnNamesBuilder.add("column_name"); columnNamesBuilder.add("data_size"); columnNamesBuilder.add("distinct_values_count"); columnNamesBuilder.add("nulls_count"); columnNamesBuilder.add("row_count"); return columnNamesBuilder.build(); }

Target:
private static List<String> buildColumnsNames() { return ImmutableList.<String>builder() .add("column_name") .add("data_size") .add("distinct_values_count") .add("nulls_fraction") .add("row_count") .build(); }
Source:
public void testZoneKeyIdRange() { boolean[] hasValue = new boolean[MAX_TIME_ZONE_KEY + 1]; for (TimeZoneKey timeZoneKey : TimeZoneKey.getTimeZoneKeys()) { short key = timeZoneKey.getKey(); assertTrue(key >= 0, timeZoneKey + " has a negative time zone key"); assertFalse(hasValue[key], "Another time zone has the same zone key as " + timeZoneKey); hasValue[key] = true; } for (int i = 0; i < hasValue.length; i++) { switch (i) { case 2040: continue; default: break; } assertTrue(hasValue[i], "There is no time zone with key " + i); } }

Target:
public void testZoneKeyIdRange() { boolean[] hasValue = new boolean[MAX_TIME_ZONE_KEY + 1]; for (TimeZoneKey timeZoneKey : TimeZoneKey.getTimeZoneKeys()) { short key = timeZoneKey.getKey(); assertTrue(key >= 0, timeZoneKey + " has a negative time zone key"); assertFalse(hasValue[key], "Another time zone has the same zone key as " + timeZoneKey); hasValue[key] = true; } assertFalse(hasValue[2040]); hasValue[2040] = true; for (int i = 0; i < hasValue.length; i++) { assertTrue(hasValue[i], "There is no time zone with key " + i); } }
Source:
public void emit(final Event event) { if(event instanceof ServiceMetricEvent) { if(event == null) { return; } } try { TypeReference<Map<String, Object>> typeRef = new TypeReference<Map<String, Object>>() {}; HashMap<String, Object> result = jsonMapper.readValue(jsonMapper.writeValueAsString(event), typeRef); result.put("clusterName", config.getClusterName()); producer.send(new ProducerRecord<String, String>(config.getTopic(), jsonMapper.writeValueAsString(result)), new Callback() { @Override public void onCompletion(RecordMetadata metadata, Exception exception) { if(exception != null) { log.warn(exception, "Exception is occured! Retry."); emit(event); } } }); } catch (Exception e) { log.warn(e, "Failed to generate json"); } }

Target:
public void emit(final Event event) { if (event != null) { ImmutableMap.Builder<String, Object> resultBuilder = ImmutableMap.<String, Object>builder().putAll(event.toMap()); if (config.getClusterName() != null) { resultBuilder.put("clusterName", config.getClusterName()); } Map<String, Object> result = resultBuilder.build(); try { String resultJson = jsonMapper.writeValueAsString(result); ObjectContainer<String> objectContainer = new ObjectContainer<>(resultJson, resultJson.getBytes().length); if (event instanceof ServiceMetricEvent) { if (!metricQueue.offer(objectContainer)) { metricLost.incrementAndGet(); } } else if (event instanceof AlertEvent) { if (!alertQueue.offer(objectContainer)) { alertLost.incrementAndGet(); } } else { invalidLost.incrementAndGet(); } } catch (JsonProcessingException e) { invalidLost.incrementAndGet(); } } }
Source:
private static void setParamsOfView(View view, int highlightRectangleIndex, int widthModifier, int heightModifier) { int width = 1; int height = 1; int[] coords = new int[2]; coords[0] = 0; coords[1] = 0; if (view != null) { width = view.getWidth() * widthModifier + (widthModifier - 1) * MODIFIER_ADDITION; height = view.getHeight() * heightModifier + (widthModifier - 1) * MODIFIER_ADDITION; view.getLocationOnScreen(coords); } highlightAreas[highlightRectangleIndex] = new Rectangle(coords[0], coords[1], width, height); }

Target:
private static void setParamsOfView(View view, int highlightRectangleIndex, int widthModifier, int heightModifier) { int width = 1; int height = 1; int[] coords = new int[2]; if (view != null) { width = view.getWidth() * widthModifier + (widthModifier - 1) * MODIFIER_ADDITION; height = view.getHeight() * heightModifier + (widthModifier - 1) * MODIFIER_ADDITION; view.getLocationOnScreen(coords); } highlightAreas[highlightRectangleIndex] = new Rectangle(coords[0], coords[1], width, height); }
Source:
private static long getGeometryMemorySize(OGCGeometry geometry) { if (geometry == null) { return 0; } else if (geometry.isEmpty()) { return OGC_GEOMETRY_BASE_INSTANCE_SIZE; } else { return geometry.estimateMemorySize(); } }

Target:
private static long getGeometryMemorySize(OGCGeometry geometry) { if (geometry == null) { return 0; } if (geometry.isEmpty()) { return OGC_GEOMETRY_BASE_INSTANCE_SIZE; } return geometry.estimateMemorySize(); }
Source:
void setNetworkInterface(NetworkInterface netInterface, InternetProtocolFamily family) throws IOException { InetAddress address = deriveInetAddress(netInterface, family == InternetProtocolFamily.IPv6); if (address.equals(family == InternetProtocolFamily.IPv4 ? INET6_ANY : INET_ANY)) { throw new IOException("NetworkInterface does not support " + family); } final NativeInetAddress nativeAddress = NativeInetAddress.newInstance(address); setInterface(intValue(), ipv6, nativeAddress.address(), nativeAddress.scopeId(), interfaceIndex(netInterface)); }

Target:
void setNetworkInterface(NetworkInterface netInterface, InternetProtocolFamily family) throws IOException { InetAddress address = deriveInetAddress(netInterface, family == InternetProtocolFamily.IPv6); if (address.equals(family == InternetProtocolFamily.IPv4 ? INET_ANY : INET6_ANY)) { throw new IOException("NetworkInterface does not support " + family); } final NativeInetAddress nativeAddress = NativeInetAddress.newInstance(address); setInterface(intValue(), ipv6, nativeAddress.address(), nativeAddress.scopeId(), interfaceIndex(netInterface)); }
Source:
private Predicate<String> currentOrSubpackage(final String controllerPackageName) { return new Predicate<String>() { @Override public boolean apply(String input) { return controllerPackageName.contains(input); } }; }

Target:
private Predicate<String> currentOrSubpackage(final String controllerPackageName) { return new Predicate<String>() { @Override public boolean apply(String input) { return controllerPackageName.startsWith(input); } }; }
Source:
public static AtomicReference<Map<String, MantaErrorCode>> createErrorMap() throws MantaClientException { errorMap = new AtomicReference<>(); if (errorMap.get() == null) { Map<String, MantaErrorCode> backing = new HashMap<>(nonDeprecatedList.size()); for (MantaErrorCode m : getNonDeprecatedList()) { try { backing.put(m.getCode(), m); } catch (UnsupportedOperationException e) { throw new MantaClientException("Operation Unsupported by Map ", e); } } errorMap.compareAndSet(null, Collections.unmodifiableMap(backing)); } return errorMap; }

Target:
public static Map<String, MantaErrorCode> createErrorMap() throws MantaClientException { final Map<String, MantaErrorCode> map = new LinkedHashMap<>(values().length); for (MantaErrorCode errorCode : values()) { final MantaErrorCode replaced = map.put(errorCode.code, errorCode); if (replaced != null) { String msg = String.format("Duplicate error code specified in enum: %s", replaced.code); throw new IllegalArgumentException(msg); } } return map; }
Source:
public ConfigBuilder withMaxIdleSessions( int size ) { return withMaxConnectionPoolSize( size ); }

Target:
public ConfigBuilder withMaxIdleSessions( int size ) { return this; }
Source:
protected static FunctionImplementation sqlInvokedFunctionToImplementation(SqlInvokedRegularFunction function) { checkArgument(function.getLanguage().equals(SQL)); return new SqlInvokedRegularSqlFunctionImplementation(function.getBody()); }

Target:
protected static ScalarFunctionImplementation sqlInvokedFunctionToImplementation(SqlInvokedRegularFunction function) { checkArgument(function.getFunctionImplementationType().equals(SQL)); return new SqlInvokedScalarFunctionImplementation(function.getBody()); }
Source:
public Map<String, String> getStrings(Set<String> keys) { Objects.requireNonNull(keys); Map<String, String> kvMap = new HashMap<>(keys.size()); Block<Document> block = doc -> { String key = doc.getString(ID_KEY); Object value = doc.get(VALUE_KEY); String strValue = null; if (value instanceof String) { strValue = (String) value; } else if (value instanceof Binary) { byte[] bytes = ((Binary) value).getData(); try { strValue = bytesToString(bytes); } catch (CharacterCodingException e) { } } if (strValue == null) { throw new IllegalArgumentException("Value is not a String for key: " + key); } kvMap.put(key, strValue); }; findByKeys(keys, block); return kvMap; }

Target:
public Map<String, String> getStrings(Set<String> keys) { Objects.requireNonNull(keys); Map<String, String> map = new HashMap<>(keys.size()); Block<Document> block = doc -> { String key = doc.getString(ID_KEY); Object value = doc.get(VALUE_KEY); if (value != null) { String strValue = null; if (value instanceof String) { strValue = (String) value; } else if (value instanceof Binary) { byte[] bytes = ((Binary) value).getData(); try { strValue = bytesToString(bytes); } catch (CharacterCodingException e) { } } if (strValue == null) { throw new IllegalArgumentException("Value is not a String for key: " + key); } map.put(key, strValue); } }; findByKeys(keys, block); return map; }
Source:
public void bitwise() { counter trueCount = new Counter(true); counter falseCount = new Counter(false); String x = "Hai"; if (trueCount.count() | falseCount.count()) { x = "kthxbai"; } assertEquals(x, __); assertEquals(trueCount.count, __); assertEquals(falseCount.count, __); }

Target:
public void bitwise() { Counter trueCount = new Counter(true); Counter falseCount = new Counter(false); String x = "Hai"; if (trueCount.count() | falseCount.count()) { x = "kthxbai"; } assertEquals(x, __); assertEquals(trueCount.count, __); assertEquals(falseCount.count, __); }
Source:
private void validateUser(ServerConfiguration conf) throws AccessControlException { if (conf.containsKey("permittedStartupUsers")) { String currentUser = System.getProperty("user.name"); String[] propertyValue = conf.getPermittedStartupUsers(); for (String s : propertyValue) { if (s.equals(currentUser)) { return; } } String errorMsg = "System cannot start because current user isn't in permittedStartupUsers." + " Current user: " + currentUser + " permittedStartupUsers: " + Arrays.toString(propertyValue); LOG.error(errorMsg); throw new AccessControlException(errorMsg); } }

Target:
private void validateUser(ServerConfiguration conf) throws AccessControlException { if (conf.containsKey(PERMITTED_STARTUP_USERS)) { String currentUser = System.getProperty("user.name"); String[] propertyValue = conf.getPermittedStartupUsers(); for (String s : propertyValue) { if (s.equals(currentUser)) { return; } } String errorMsg = "System cannot start because current user isn't in permittedStartupUsers." + " Current user: " + currentUser + " permittedStartupUsers: " + Arrays.toString(propertyValue); LOG.error(errorMsg); throw new AccessControlException(errorMsg); } }
Source:
public <T> void deleteAll(Class<T> type) { ClassInfo classInfo = session.metaData().classInfo(type.getName()); if (classInfo != null) { String entityLabel = session.entityType(classInfo.name()); if (entityLabel == null) { LOG.warn("Unable to find database label for entity " + type.getName() + " : no results will be returned. Make sure the class is registered, " + "and not abstract without @NodeEntity annotation"); } Statement request = getDeleteStatementsBasedOnType(type).delete(entityLabel); RowModelRequest query = new DefaultRowModelRequest(request.getStatement(), request.getParameters()); session.notifyListeners(new PersistenceEvent(type, Event.TYPE.PRE_DELETE)); session.doInTransaction(() -> { try (Response<RowModel> response = session.requestHandler().execute(query)) { session.context().removeType(type); if (session.eventsEnabled()) { session.notifyListeners(new PersistenceEvent(type, Event.TYPE.POST_DELETE)); } } }, Transaction.Type.READ_WRITE); } else { session.warn(type.getName() + " is not a persistable class"); } }

Target:
public <T> void deleteAll(Class<T> type) { ClassInfo classInfo = session.metaData().classInfo(type.getName()); if (classInfo != null) { String entityLabel = classInfo.neo4jName(); if (entityLabel == null) { LOG.warn("Unable to find database label for entity " + type.getName() + " : no results will be returned. Make sure the class is registered, " + "and not abstract without @NodeEntity annotation"); } Statement request = getDeleteStatementsBasedOnType(type).delete(entityLabel); RowModelRequest query = new DefaultRowModelRequest(request.getStatement(), request.getParameters()); session.notifyListeners(new PersistenceEvent(type, Event.TYPE.PRE_DELETE)); session.doInTransaction(() -> { try (Response<RowModel> response = session.requestHandler().execute(query)) { session.context().removeType(type); if (session.eventsEnabled()) { session.notifyListeners(new PersistenceEvent(type, Event.TYPE.POST_DELETE)); } } }, Transaction.Type.READ_WRITE); } else { session.warn(type.getName() + " is not a persistable class"); } }
Source:
public static AffinityGroup map(org.ovirt.engine.core.common.scheduling.AffinityGroup entity, AffinityGroup template) { AffinityGroup model = template != null ? template : new AffinityGroup(); model.setId(entity.getId().toString()); model.setName(entity.getName()); model.setDescription(entity.getDescription()); model.setPositive(entity.isVmAffinityEnabled() ? entity.getVmPolarityBooleanObject() : null); model.setEnforcing(entity.isVmEnforcing()); AffinityRule hostsRule = new AffinityRule(); hostsRule.setEnabled(true); hostsRule.setEnforcing(entity.isVdsEnforcing()); hostsRule.setPositive(entity.isVdsPositive()); model.setHostsRule(hostsRule); AffinityRule vmsRule = new AffinityRule(); vmsRule.setEnabled(entity.isVmAffinityEnabled()); vmsRule.setEnforcing(entity.isVmEnforcing()); vmsRule.setPositive(entity.isVmPositive()); model.setVmsRule(vmsRule); Cluster cluster = new Cluster(); cluster.setId(entity.getClusterId().toString()); model.setCluster(cluster); return model; }

Target:
public static AffinityGroup map(org.ovirt.engine.core.common.scheduling.AffinityGroup entity, AffinityGroup template) { AffinityGroup model = template != null ? template : new AffinityGroup(); model.setId(entity.getId().toString()); model.setName(entity.getName()); model.setDescription(entity.getDescription()); model.setPositive(entity.isVmAffinityEnabled() ? entity.getVmPolarityBooleanObject() : null); model.setEnforcing(entity.isVmEnforcing()); AffinityRule hostsRule = model.getHostsRule(); if (hostsRule == null) { hostsRule = new AffinityRule(); model.setHostsRule(hostsRule); } hostsRule.setEnabled(true); hostsRule.setEnforcing(entity.isVdsEnforcing()); hostsRule.setPositive(entity.isVdsPositive()); AffinityRule vmsRule = model.getVmsRule(); if (vmsRule == null) { vmsRule = new AffinityRule(); model.setVmsRule(vmsRule); } vmsRule.setEnabled(entity.isVmAffinityEnabled()); vmsRule.setEnforcing(entity.isVmEnforcing()); vmsRule.setPositive(entity.isVmPositive()); Cluster cluster = new Cluster(); cluster.setId(entity.getClusterId().toString()); model.setCluster(cluster); return model; }
Source:
private void readWhilePossible(ChannelStateByteBuffer buffer) throws IOException { while (haveMoreData() && buffer.isWritable()) { if (pos < 0 || rem <= 0) { advanceOffset(); } int bytesRead = serializer.readData(stream, buffer, rem); rem -= bytesRead; pos = addExact(pos, bytesRead); } }

Target:
private void readWhilePossible(ChannelStateByteBuffer buffer) throws IOException { while (haveMoreData() && buffer.isWritable()) { if (remainingBytes <= 0) { advanceOffset(); } int bytesRead = serializer.readData(stream, buffer, remainingBytes); remainingBytes -= bytesRead; } }
Source:
public void stopServerListRefreshing() { serverListUpdater.stop(); }

Target:
public void stopServerListRefreshing() { if (serverListUpdater != null) { serverListUpdater.stop(); } }
Source:
private void setDebugPort(Server server) { if (StringUtils.isBlank(debug) || wizard.checkYes(debug)) { debug = wizard.promptForValueIfMissingWithDefault( ENABLE_DEBUGGING_DEFAULT_MESSAGE, server.getDebugPort(), "port number", "no debugging"); } if(StringUtils.isNumeric(debug)){ server.setDebugPort(debug); } }

Target:
private void setDebugPort(Server server) { if (StringUtils.isBlank(debug) || wizard.checkYes(debug)) { while (!"no debugging".equals(debug) && !StringUtils.isNumeric(debug)) { debug = wizard.promptForValueIfMissingWithDefault( ENABLE_DEBUGGING_DEFAULT_MESSAGE, server.getDebugPort(), "port number", "no debugging"); if(!StringUtils.isNumeric(debug)){ wizard.showMessage("\nPort number must be numeric."); } else if(!"no debugging".equals(debug)){ server.setDebugPort(debug); } } } }
Source:
private ContainerMapping createPackageMapping(Layer layer, ToolSection toolSection) { ContainerMapping packageMapping = DescriptionFactory.eINSTANCE.createContainerMapping(); packageMapping.setLabel("packageMapping"); packageMapping.setName(BASE_ID + ".package.container"); packageMapping.setStyle(StyleFactory.eINSTANCE.createFlatContainerStyleDescription()); layer.getContainerMappings().add(packageMapping); packageMapping.setSemanticCandidatesExpression("feature:eContents"); ContainerCreationDescription containerPackageMapping = ToolFactory.eINSTANCE.createContainerCreationDescription(); containerPackageMapping.setName(BASE_ID + ".package.container.creation"); containerPackageMapping.setLabel("Package"); toolSection.getOwnedTools().add(containerPackageMapping); containerPackageMapping.getContainerMappings().add(packageMapping); return packageMapping; }

Target:
private ContainerMapping createPackageMapping(Layer layer, ToolSection toolSection) { ContainerMapping packageMapping = DescriptionFactory.eINSTANCE.createContainerMapping(); packageMapping.setLabel("Package Mapping"); packageMapping.setName(baseId + ".package.container"); packageMapping.setStyle(StyleFactory.eINSTANCE.createFlatContainerStyleDescription()); layer.getContainerMappings().add(packageMapping); packageMapping.setSemanticCandidatesExpression("feature:eContents"); ContainerCreationDescription containerPackageMapping = ToolFactory.eINSTANCE.createContainerCreationDescription(); containerPackageMapping.setName(baseId + ".package.container.creation"); containerPackageMapping.setLabel("Package"); toolSection.getOwnedTools().add(containerPackageMapping); containerPackageMapping.getContainerMappings().add(packageMapping); return packageMapping; }
Source:
private void pollStoreAvailability() { storesMutex.writeLock().lock(); try { for (StoreStatus status : storeStatuses.values()) { if (!status.availabilityChanged()) continue; cacheNotifier.notifyPersistenceAvailabilityChanged(status.availability); if (!status.availability) { unavailableException = new StoreUnavailableException(String.format("Store %s is unavailable", status.store)); managerAvailable = false; return; } if (!managerAvailable) { managerAvailable = true; unavailableException = null; } } } finally { storesMutex.writeLock().unlock(); } }

Target:
private void pollStoreAvailability() { storesMutex.writeLock().lock(); try { boolean availabilityChanged = false; boolean failureDetected = false; for (StoreStatus status : storeStatuses.values()) { if (status.availabilityChanged()) availabilityChanged = true; if (availabilityChanged && !status.availability && !failureDetected) { failureDetected = true; unavailableException = new StoreUnavailableException(String.format("Store %s is unavailable", status.store)); cacheNotifier.notifyPersistenceAvailabilityChanged(false); } } if (!failureDetected && availabilityChanged) { unavailableException = null; cacheNotifier.notifyPersistenceAvailabilityChanged(true); } } finally { storesMutex.writeLock().unlock(); } }
Source:
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws NotEnoughArgumentsException { if (args.length < 2) { throw new NotEnoughArgumentsException(); } final String address = EssentialsXMPP.getInstance().getAddress(args[0]); if (address == null) { sender.sendMessage("§cThere are no players matching that name."); return; } final String message = getFinalArg(args, 1); final String senderName = sender.isPlayer() ? ess.getUser(sender.getPlayer()).getDisplayName() : Console.NAME; sender.sendMessage("[" + senderName + ">" + address + "] " + message); if (!EssentialsXMPP.getInstance().sendMessage(address, "[" + senderName + "] " + message)) { sender.sendMessage("§cError sending message."); } }

Target:
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws NotEnoughArgumentsException { if (args.length < 2) { throw new NotEnoughArgumentsException(); } final String address = EssentialsXMPP.getInstance().getAddress(args[0]); if (address == null) { sender.sendMessage(ChatColor.RED + "There are no players matching that name."); return; } final String message = getFinalArg(args, 1); final String senderName = sender.isPlayer() ? ess.getUser(sender.getPlayer()).getDisplayName() : Console.NAME; sender.sendMessage("[" + senderName + ">" + address + "] " + message); if (!EssentialsXMPP.getInstance().sendMessage(address, "[" + senderName + "] " + message)) { sender.sendMessage(ChatColor.RED + "Error sending message."); } }
Source:
public StrictDtlsCorrelationContextMatcher() { super("relaxed correlation", KEYS); }

Target:
public StrictDtlsCorrelationContextMatcher() { super("strict correlation", KEYS); }