auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public LzoGenericB64LineRecordReader(TypeRef<M> typeRef, BinaryConverter<M> converter) { super(typeRef, new GenericWritable<M>(converter), converter); <START> LOG.info("record type is " + typeRef.getRawClass()); <END> }</code><technical_language>this adds anymode, typeRef convertors creator. kill log line</technical_language>

Target:
public LzoGenericB64LineRecordReader(TypeRef<M> typeRef, BinaryConverter<M> converter) { super(typeRef, new GenericWritable<M>(converter), converter); }
Source:
<code>void transformEntryTypeValues(final Map<Integer, List<ObservationUnitRow>> observationUnitRowMap) { final List<Enumeration> entryTypes = this.ontologyDataManager .getStandardVariable(TermId.ENTRY_TYPE.getId(), this.contextUtil.getCurrentProgramUUID()).getEnumerations(); <START> final Map<String, String> entryTypeDescriptionNameMap = new HashMap<>(); <END> for(final Enumeration entryType: entryTypes) { entryTypeDescriptionNameMap.put(entryType.getDescription(), entryType.getName()); } for(Integer instanceId: observationUnitRowMap.keySet()) { final List<ObservationUnitRow> observationUnitRows = observationUnitRowMap.get(instanceId); for(ObservationUnitRow row: observationUnitRows) { final ObservationUnitData data = row.getVariables().get(TermId.ENTRY_TYPE.name()); data.setValue(entryTypeDescriptionNameMap.get(data.getValue())); } } }</code><technical_language>Stream API simplify code here: final Map<String, String> entryTypeDescriptionNameMap = entryTypes.stream().collect(Collectors.toMap(Enumeration::getDescription, Enumeration::getName));</technical_language>

Target:
void transformEntryTypeValues(final Map<Integer, List<ObservationUnitRow>> observationUnitRowMap) { final List<Enumeration> entryTypes = this.ontologyDataManager .getStandardVariable(TermId.ENTRY_TYPE.getId(), this.contextUtil.getCurrentProgramUUID()).getEnumerations(); final Map<String, String> entryTypeDescriptionNameMap = entryTypes.stream().collect(Collectors.toMap(Enumeration::getDescription, Enumeration::getName)); final List<ObservationUnitRow> allRows = observationUnitRowMap.values().stream().flatMap(list -> list.stream()).collect(Collectors.toList()); allRows.forEach(row -> { final ObservationUnitData data = row.getVariables().get(TermId.ENTRY_TYPE.name()); data.setValue(entryTypeDescriptionNameMap.get(data.getValue())); }); }
Source:
<code>private void clearCachefiles() { <START> final File cacheDir = new File(MainActivity.getSDPath()); <END> final File[] cacheFiles = cacheDir.listFiles(new FilenameFilter() { @Override public boolean accept( final File dir, final String name ) { return name.matches( ".*-cache\\.json" ); } } ); for (File cache: cacheFiles) { cache.delete(); } }</code><technical_language>test this sd card (allowing access photos, downloads, etc). (when app-specific storage area)</technical_language>

Target:
private void clearCachefiles() { final File cacheDir = new File(MainActivity.getSDPath()); final File[] cacheFiles = cacheDir.listFiles(new FilenameFilter() { @Override public boolean accept( final File dir, final String name ) { return name.matches( ".*-cache\\.json" ); } } ); if (null != cacheFiles) { for (File cache: cacheFiles) { boolean deleted = cache.delete(); if (!deleted) { MainActivity.warn("failed to delete cache file: "+cache.getAbsolutePath()); } } } }
Source:
<code>public void star() throws IOException { <START> root.createRequest().method("PUT").setRawUrlPath(getApiTailUrl("star")).send(); <END> }</code><technical_language>suggestion root.createRequest().method("PUT").withUrlPath(getApiTailUrl("star")).send();</technical_language>

Target:
public void star() throws IOException { root.createRequest().method("PUT").withUrlPath(getApiTailUrl("star")).send(); }
Source:
<code>private Player findVictim() { if (goingToAttack) { return null; } if (hasRan()) { return null; } long now = GameEngine.getTime(); if (getChasing() != null) { return null; } ActiveTile[][] tiles = getViewArea().getViewedArea(2, 2, 2, 2); for (int x = 0; x < tiles.length; x++) { for (int y = 0; y < tiles[x].length; y++) { ActiveTile t = tiles[x][y]; if (t != null) { for (Player p : t.getPlayers()) { if (p.inCombat()) { continue; } if (p.isBusy() || p.isNonaggro() || now - p.getCombatTimer() < (p .getCombatState() == CombatState.RUNNING || p.getCombatState() == CombatState.WAITING ? 3000 : 500) || !p.nextTo(this) || !p.getLocation().inBounds(loc.minX - 4, loc.minY - 4, loc.maxX + 4, <START> loc.maxY + 4) || System.currentTimeInMillis() - p.getLastPing() > 60000) { <END> continue; } if (getLocation().inWilderness() || p.getCombatLevel() < (getCombatLevel() * 2) + 1) { return p; } } } } } return null; }</code><technical_language>System.currentTimeInMillis, especially get elapsed time (this is nanoTime is for); GameEngine's getTime method instead (when get elapsed time) getTimestamp method need actual time. This allows change entire application track of time, more accurate, System.currentTimeInMillis a hardware poll (which is extremely slow), require changes entire application</technical_language>

Target:
private Player findVictim() { if (goingToAttack) { return null; } if (hasRan()) { return null; } long now = GameEngine.getTime(); if (getChasing() != null) { return null; } ActiveTile[][] tiles = getViewArea().getViewedArea(2, 2, 2, 2); for (int x = 0; x < tiles.length; x++) { for (int y = 0; y < tiles[x].length; y++) { ActiveTile t = tiles[x][y]; if (t != null) { for (Player p : t.getPlayers()) { if (p.inCombat()) { continue; } if (p.isBusy() || p.isNonaggro() || now - p.getCombatTimer() < (p .getCombatState() == CombatState.RUNNING || p.getCombatState() == CombatState.WAITING ? 3000 : 500) || !p.nextTo(this) || !p.getLocation().inBounds(loc.minX - 4, loc.minY - 4, loc.maxX + 4, loc.maxY + 4) || GameEngine.getTime() - p.getLastPing() > 60000) { continue; } if (getLocation().inWilderness() || p.getCombatLevel() < (getCombatLevel() * 2) + 1) { return p; } } } } } return null; }
Source:
<code>public void reduce() throws Exception { int part = 0; for (File inputFile : _reducerInputDir.listFiles()) { RecordReader avroRecordReader = RecordReaderFactory .getRecordReaderByClass("org.apache.pinot.plugin.inputformat.avro.AvroRecordReader", inputFile, _pinotSchema.getColumnNames(), null); while (avroRecordReader.hasNext()) { GenericRow next = avroRecordReader.next(); _collector.collect(next); <START> if (_collector.size() == MAX_RECORDS_TO_COLLECT) { <END> int numFiles = flushRecords(_collector, part); part += numFiles; _collector.reset(); } } } if (_collector.size() > 0) { flushRecords(_collector, part); _collector.reset(); } }</code><technical_language>_numRecordsPerPart collector collects enough records, flush them</technical_language>

Target:
public void reduce() throws Exception { int part = 0; for (File inputFile : _reducerInputDir.listFiles()) { RecordReader avroRecordReader = RecordReaderFactory .getRecordReaderByClass("org.apache.pinot.plugin.inputformat.avro.AvroRecordReader", inputFile, _pinotSchema.getColumnNames(), null); while (avroRecordReader.hasNext()) { GenericRow next = avroRecordReader.next(); _collector.collect(next); if (_collector.size() == _numRecordsPerPart) { flushRecords(_collector, createReducerOutputFileName(_reducerId, part++)); _collector.reset(); } } } if (_collector.size() > 0) { flushRecords(_collector, createReducerOutputFileName(_reducerId, part)); _collector.reset(); } }
Source:
<code>public StoredConfig getSystemConfig() throws IOException, ConfigInvalidException { <START> FileBasedConfig c = openSystemConfig(null, FS.DETECTED); <END> if (c.isOutdated()) { LOG.debug("loading system config {}", systemConfig); c.load(); } return c; }</code><technical_language>I thought point of get... operations reload if necessary. This reload, overwrite a user set openSystemConfig. I guess null check compareAndSet in openSystemConfig happen here</technical_language>

Target:
public StoredConfig getSystemConfig() throws IOException, ConfigInvalidException { FileBasedConfig c = systemConfig.get(); if (c == null) { systemConfig.compareAndSet(null, openSystemConfig(null, FS.DETECTED)); c = systemConfig.get(); } if (c.isOutdated()) { LOG.debug("loading system config {}", systemConfig); c.load(); } return c; }
Source:
<code><START> public Metacard getBaseMetacard(Map<String, Object> properties, List<MetacardType> metacardTypes) <END> throws CatalogTransformerException { final String propertyTypeName = (String) properties.get(METACARD_TYPE_PROPERTY_KEY); MetacardImpl metacard; if (isEmpty(propertyTypeName) || metacardTypes == null) { LOGGER.debug( "MetacardType specified in input is null or empty. Assuming default MetacardType"); metacard = new MetacardImpl(); } else { MetacardType metacardType = metacardTypes .stream() .filter(type -> type.getName().equals(propertyTypeName)) .findFirst() .orElseThrow( () -> new CatalogTransformerException( "MetacardType specified in input has not been registered with the system. Cannot parse input. MetacardType name: " + propertyTypeName)); LOGGER.debug("Found registered MetacardType: {}", propertyTypeName); metacard = new MetacardImpl(metacardType); } return metacard; }</code><technical_language>protected if is required subclasses private if is expected override it</technical_language>

Target:
protected Metacard getBaseMetacard( Map<String, Object> properties, List<MetacardType> metacardTypes) throws CatalogTransformerException { final String propertyTypeName = (String) properties.get(METACARD_TYPE_PROPERTY_KEY); MetacardImpl metacard; if (isEmpty(propertyTypeName) || metacardTypes == null) { LOGGER.debug( "MetacardType specified in input is null or empty. Assuming default MetacardType"); metacard = new MetacardImpl(); } else { MetacardType metacardType = metacardTypes .stream() .filter(type -> type.getName().equals(propertyTypeName)) .findFirst() .orElseThrow( () -> new CatalogTransformerException( "MetacardType specified in input has not been registered with the system. Cannot parse input. MetacardType name: " + propertyTypeName)); LOGGER.debug("Found registered MetacardType: {}", propertyTypeName); metacard = new MetacardImpl(metacardType); } return metacard; }
Source:
<code>protected void onMethodInvocationFound(MethodInvocationTree mit) { <START> if (!hasSemantic()) { return; } <END> Arguments arguments = mit.arguments(); ExpressionTree argumentExpression; if (hasBooleanArgumentAtPosition(arguments, 0)) { argumentExpression = arguments.get(0); } else if (hasBooleanArgumentAtPosition(arguments, arguments.size() - 1)) { argumentExpression = arguments.get(arguments.size() - 1); } else { return; } Optional<Assertion> replacementAssertionOpt = getReplacementAssertion(argumentExpression); if (replacementAssertionOpt.isPresent()) { IdentifierTree problematicAssertionCallIdentifier = ExpressionUtils.methodName(mit); if (problematicAssertionCallIdentifier.name().equals("assertFalse")) { replacementAssertionOpt = complement(replacementAssertionOpt.get()); if (!replacementAssertionOpt.isPresent()) { return; } } Assertion replacementAssertion = replacementAssertionOpt.get(); List<JavaFileScannerContext.Location> secondaryLocation = Collections.singletonList(new JavaFileScannerContext.Location( String.format("%s is performed here, which is better expressed with %s.", replacementAssertion.actionDescription, replacementAssertion.methodName), argumentExpression)); String message = String.format("Use %s instead.", replacementAssertion.methodName); reportIssue(problematicAssertionCallIdentifier, message, secondaryLocation, null); } }</code><technical_language>test hasSemantic() is useful for checks extends IssuableSubscriptionVisitor. AbstractMethodDetection do this test, need it</technical_language>

Target:
protected void onMethodInvocationFound(MethodInvocationTree mit) { mit.arguments().stream() .filter(argument -> argument.symbolType().isPrimitive(Type.Primitives.BOOLEAN)) .findFirst() .ifPresent(argument -> checkBooleanExpressionInAssertMethod(ExpressionUtils.methodName(mit), argument)); }
Source:
<code><START> private VariantContextJavascriptFilter(final File scriptFile, final VCFHeader header) throws IOException { <END> super(scriptFile, header); this.scriptFile = scriptFile; String fname = scriptFile.getName(); if (fname.toLowerCase().endsWith(".js")) { fname = fname.substring(0, fname.length() - 3); } else if (fname.toLowerCase().endsWith(".javascript")) { fname = fname.substring(0, fname.length() - 11); } if(fname.isEmpty()) fname="JSFILTER"; this.filterName = fname; }</code><technical_language>want another newline scriptFile</technical_language>

Target:
private VariantContextJavascriptFilter(final File scriptFile, final VCFHeader header) throws IOException { super(scriptFile, header); this.scriptFile = scriptFile; String fname = IOUtil.basename(scriptFile); if(fname.isEmpty()) fname="JSFILTER"; this.filterName = fname; }
Source:
<code>private boolean initGlusterHost() { glusterHostUuidFound = true; if (GlusterFeatureSupported.glusterHostUuidSupported(getVdsGroup().getcompatibility_version())) { VDSReturnValue returnValue = runVdsCommand(VDSCommandType.GetGlusterHostUUID, new VdsIdVDSCommandParametersBase(getVds().getId())); <START> Guid addedServerUuid = Guid.createGuidFromString((String) returnValue.getReturnValue()); <END> if (returnValue.getSucceeded() && returnValue.getReturnValue() != null) { if (!checkIfHostUuidExists(addedServerUuid)) { glusterHostUuidFound = true; setNonOperational(NonOperationalReason.GLUSTER_HOST_UUID_ALREADY_EXISTS, null); return false; } saveGlusterHostUuid(addedServerUuid); } else { glusterHostUuidFound = false; setNonOperational(NonOperationalReason.GLUSTER_HOST_UUID_NOT_FOUND, null); } } return glusterHostUuidFound && initGlusterPeerProcess(); }</code><technical_language>mandatory, parse returnValue 'if' check operation succeeded null.. i dont addedServerUuid 'if'</technical_language>

Target:
private boolean initGlusterHost() { glusterHostUuidFound = true; if (GlusterFeatureSupported.glusterHostUuidSupported(getVdsGroup().getcompatibility_version())) { VDSReturnValue returnValue = runVdsCommand(VDSCommandType.GetGlusterHostUUID, new VdsIdVDSCommandParametersBase(getVds().getId())); if (returnValue.getSucceeded() && returnValue.getReturnValue() != null) { Guid addedServerUuid = Guid.createGuidFromString((String) returnValue.getReturnValue()); if (hostUuidExists(addedServerUuid)) { setNonOperational(NonOperationalReason.GLUSTER_HOST_UUID_ALREADY_EXISTS, null); return false; } saveGlusterHostUuid(addedServerUuid); } else { glusterHostUuidFound = false; setNonOperational(NonOperationalReason.GLUSTER_HOST_UUID_NOT_FOUND, null); } } return glusterHostUuidFound && initGlusterPeerProcess(); }
Source:
<code>protected Long nullUnsafeScalar(MonthDay value) { LocalDate date = value.atYear( LEAP_YEAR ); <START> return date.atStartOfDay().atZone( ZoneOffset.UTC ).toInstant().toEpochMilli(); <END> }</code><technical_language>call value.toInstant( ZoneOffset.UTC ) instead of atZone(...).toInstant()</technical_language>

Target:
protected Long nullUnsafeScalar(MonthDay value) { LocalDate date = value.atYear( LEAP_YEAR ); return date.atStartOfDay().toInstant( ZoneOffset.UTC ).toEpochMilli(); }
Source:
<code>public long skip(long n) throws IOException { if (n > MOVEMENT_LIMIT) { mSequentialReadCount = 0; mPos += n; return n; } else { <START> long skipped = ((FSDataInputStream) in).skip(n); <END> mPos += skipped; return skipped; } }</code><technical_language>Is guaranteed in is positioned correctly</technical_language>

Target:
public long skip(long n) throws IOException { if (n <= 0) { return 0; } if (n > MOVEMENT_LIMIT) { mSequentialReadCount = 0; } mPos += n; return n; }
Source:
<code>private AssertionError clocksWentBackwards(long timestampLowerBound, long freshTimestamp) { <START> return new AssertionError(String.format(CLOCKS_WENT_BACKWARDS_MESSAGE, timestampLowerBound, freshTimestamp)); <END> }</code><technical_language>this AssertionError; this IllegalStateException, I think. Like, Assertion error implies bug in code; this bug in deployment</technical_language>

Target:
private static AssertionError clocksWentBackwards(long timestampLowerBound, long freshTimestamp) { return new AssertionError(String.format(CLOCKS_WENT_BACKWARDS_MESSAGE, timestampLowerBound, freshTimestamp)); }
Source:
<code>private void registerClearNotification(String alias, Cache<?, ?> cache) { OperationStatistic<ClearOutcome> clear = StatsUtils.findOperationStatisticOnChildren(cache, ClearOutcome.class, "clear"); clear.addDerivedStatistic(new OperationResultFilter<>(EnumSet.of(ClearOutcome.SUCCESS), <START> (long time, long latency) -> cacheCleared(alias))); <END> }</code><technical_language>need type parameters</technical_language>

Target:
private void registerClearNotification(String alias, Cache<?, ?> cache) { OperationStatistic<ClearOutcome> clear = StatsUtils.findOperationStatisticOnChildren(cache, ClearOutcome.class, "clear"); clear.addDerivedStatistic(new OperationResultFilter<>(EnumSet.of(ClearOutcome.SUCCESS), (time, latency) -> cacheCleared(alias))); }
Source:
<code>public @NotNull ConversionResult convertMessages(final Cursor cursor, DataType dataType) throws MessagingException { final Map<String, String> msgMap = getMessageMap(cursor); final Message m; switch (dataType) { case WHATSAPP: m = mMessageGenerator.messageFromMapWhatsApp(cursor); break; default: m = mMessageGenerator.messageForDataType(msgMap, dataType); break; } final ConversionResult result = new ConversionResult(dataType); if (m != null) { if(mSyncReadFlag) { switch (dataType) { case SMS: <START> m.setFlag(Flag.SEEN, msgMap.get(SmsConsts.READ).equals("1")); <END> break; case MMS: m.setFlag(Flag.SEEN, msgMap.get(MmsConsts.READ).equals("1")); break; default: m.setFlag(Flag.SEEN, mMarkAsRead); break; } } else { m.setFlag(Flag.SEEN, mMarkAsRead); } result.add(m, msgMap); } return result; }</code><technical_language>null-safe java "1".equals(msgMap.get(SmsConsts.READ))</technical_language>

Target:
public @NotNull ConversionResult convertMessages(final Cursor cursor, DataType dataType) throws MessagingException { final Map<String, String> msgMap = getMessageMap(cursor); final Message m; switch (dataType) { case WHATSAPP: m = mMessageGenerator.messageFromMapWhatsApp(cursor); break; default: m = mMessageGenerator.messageForDataType(msgMap, dataType); break; } final ConversionResult result = new ConversionResult(dataType); if (m != null) { m.setFlag(Flag.SEEN, markAsSeen(dataType, msgMap)); result.add(m, msgMap); } return result; }
Source:
<code>public static boolean hasTelephony(Context context) { PackageManager pm = context.getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) || <START> ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getNetworkType()!= <END> TelephonyManager.NETWORK_TYPE_UNKNOWN; }</code><technical_language>This crash of get system service returns null</technical_language>

Target:
public static boolean hasTelephony(Context context) { PackageManager pm = context.getPackageManager(); TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); boolean hasNetwork = tm!=null ? tm.getNetworkType() != TelephonyManager.NETWORK_TYPE_UNKNOWN : false; return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) || hasNetwork; }
Source:
<code>double compute(OperationMetricKey key, ASTMethodOrConstructorDeclaration node, String name, boolean force) { for (OperationSignature sig : operations.keySet()) { for (OperationStats stats : operations.get(sig)) { <START> if (stats.equals(name)) { <END> return stats.compute(key, node, force); } } } return Double.NaN; }</code><technical_language>This equals strange: OperationStats != String... A normal, well-behaving equals method return false for this comparison, classes match. need additional method equalsName(...)</technical_language>

Target:
double compute(OperationMetricKey key, ASTMethodOrConstructorDeclaration node, String name, boolean force) { Map<String, OperationStats> sigMap = operations.get(OperationSignature.buildFor(node)); if (sigMap == null) { return Double.NaN; } OperationStats stats = sigMap.get(name); return stats == null ? Double.NaN : stats.compute(key, node, force); }
Source:
<code>static void register(Class<? extends Directive> directiveClass) { if (NestedContextDirective.class.isAssignableFrom(directiveClass)) { nestedContextDirectives.add(directiveClass); } <START> if (FetchDirective.class.isAssignableFrom(directiveClass) && directiveClass != DefaultSrcDirective.class && directiveClass != FrameSrcDirective.class && directiveClass != WorkerSrcDirective.class) { <END> fetchDirectives.add(directiveClass); } }</code><technical_language>this else if</technical_language>

Target:
static void register(Class<? extends Directive> directiveClass) { if (NestedContextDirective.class.isAssignableFrom(directiveClass)) { nestedContextDirectives.add(directiveClass); } else if (FetchDirective.class.isAssignableFrom(directiveClass) && directiveClass != DefaultSrcDirective.class && directiveClass != FrameSrcDirective.class && directiveClass != WorkerSrcDirective.class) { fetchDirectives.add(directiveClass); } }
Source:
<code>public void testLoginNotActivatedUserShouldFail() <START> throws UnexpectedErrorException, NoConnectionException { <END> HttpServletRequest httpRequest = new MockHttpServletRequest(); HttpServletResponse httpResponse = new MockHttpServletResponse(); LoginUserDto loginUserDto = new LoginUserDto("username", "password", true, "192.168.1.1"); when(authenticator.authenticate(loginUserDto, httpRequest, httpResponse)) .thenReturn(AuthenticationStatus.NOT_ENABLED); AuthenticationStatus result = userService.loginUser(loginUserDto, httpRequest, httpResponse); assertEquals(result, AuthenticationStatus.NOT_ENABLED, "Login not activated user should fail."); }</code><technical_language>matter in tests exceptions get thrown, easier throws Exception</technical_language>

Target:
public void testLoginNotActivatedUserShouldFail() throws Exception { HttpServletRequest httpRequest = new MockHttpServletRequest(); HttpServletResponse httpResponse = new MockHttpServletResponse(); LoginUserDto loginUserDto = new LoginUserDto("username", "password", true, "192.168.1.1"); when(authenticator.authenticate(loginUserDto, httpRequest, httpResponse)) .thenReturn(AuthenticationStatus.NOT_ENABLED); AuthenticationStatus result = userService.loginUser(loginUserDto, httpRequest, httpResponse); assertEquals(result, AuthenticationStatus.NOT_ENABLED, "Login not activated user should fail."); }
Source:
<code>public void testMappingDoesNotExistInInput() throws Exception { Schema inputSchema = Schema.recordOf("sourceRecord", Schema.Field.of(ID, Schema.of(Schema.Type.STRING)), Schema.Field.of(NAME, Schema.of(Schema.Type.STRING)), Schema.Field.of(SALARY, Schema.of(Schema.Type.STRING)), Schema.Field.of(DESIGNATIONID, Schema.of(Schema.Type.STRING))); ValueMapper.Config config = new ValueMapper.Config("does_not_exist:designation_lookup_table:designationName", "does_not_exist:DEFAULTID"); MockPipelineConfigurer configurer = new MockPipelineConfigurer(inputSchema); ValueMapper mapper = new ValueMapper(config); String caughtException = ""; try { mapper.configurePipeline(configurer); } catch (Exception e) { caughtException = e.getMessage(); } <START> Assert.assertEquals(validationExceptionMessage, caughtException); <END> FailureCollector collector = configurer.getStageConfigurer().getFailureCollector(); Assert.assertEquals(1, collector.getValidationFailures().size()); Assert.assertEquals(1, collector.getValidationFailures().get(0).getCauses().size()); Cause expectedCause = new Cause(); expectedCause.addAttribute(stage, mockStage); expectedCause.addAttribute(CauseAttributes.STAGE_CONFIG, MAPPING); expectedCause.addAttribute(CauseAttributes.CONFIG_ELEMENT, "does_not_exist:designation_lookup_table:designationName"); Assert.assertEquals(expectedCause, collector.getValidationFailures().get(0).getCauses().get(0)); }</code><technical_language>check exception message</technical_language>

Target:
public void testMappingDoesNotExistInInput() throws Exception { Schema inputSchema = Schema.recordOf("sourceRecord", Schema.Field.of(ID, Schema.of(Schema.Type.STRING)), Schema.Field.of(NAME, Schema.of(Schema.Type.STRING)), Schema.Field.of(SALARY, Schema.of(Schema.Type.STRING)), Schema.Field.of(DESIGNATIONID, Schema.of(Schema.Type.STRING))); ValueMapper.Config config = new ValueMapper.Config("does_not_exist:designation_lookup_table:designationName", "does_not_exist:DEFAULTID"); MockPipelineConfigurer configurer = new MockPipelineConfigurer(inputSchema); ValueMapper mapper = new ValueMapper(config); try { mapper.configurePipeline(configurer); Assert.fail(); } catch (ValidationException e) { Assert.assertEquals(1, e.getFailures().size()); Assert.assertEquals(1, e.getFailures().get(0).getCauses().size()); Cause expectedCause = new Cause(); expectedCause.addAttribute(STAGE, MOCK_STAGE); expectedCause.addAttribute(CauseAttributes.STAGE_CONFIG, ValueMapper.Config.MAPPING); expectedCause.addAttribute(CauseAttributes.CONFIG_ELEMENT, "does_not_exist:designation_lookup_table:designationName"); Assert.assertEquals(expectedCause, e.getFailures().get(0).getCauses().get(0)); } }
Source:
<code>public void testCreateTableWithPKConstraint() throws Exception { String tableName = generateUniqueName(); String schemaName = generateUniqueName(); <START> Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); <END> try (Connection conn = DriverManager.getConnection(getUrl(), props)) { String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, tableName); String query = "create table " + pTableFullName + "(a_char CHAR(15) NOT NULL, " + "b_char CHAR(15) NOT NULL, " + "c_bigint BIGINT NOT NULL CONSTRAINT PK PRIMARY KEY (a_char, b_char, c_bigint)) IMMUTABLE_ROWS=TRUE"; conn.createStatement().execute(query); conn.commit(); String args = {"-tb", tableName, "-s", schemaName}; SchemaExtractionTool set = new SchemaExtractionTool(); set.setConf(conn.unwrap(PhoenixConnection.class).getQueryServices().getConfiguration()); set.run(args); Assert.assertEquals(query.toUpperCase(), set.getOutput().toUpperCase()); } }</code><technical_language>of tests of form: 1. Create a table some SQL table name 2. Run SchemaExtractionTool 3. Assert output is equal original SQL. extract logic a helper function pass in tablename SQL in test</technical_language>

Target:
public void testCreateTableWithPKConstraint() throws Exception { String tableName = generateUniqueName(); String schemaName = generateUniqueName(); String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, tableName); String query = "create table " + pTableFullName + "(a_char CHAR(15) NOT NULL, " + "b_char CHAR(15) NOT NULL, " + "c_bigint BIGINT NOT NULL CONSTRAINT PK PRIMARY KEY (a_char, b_char, c_bigint)) IMMUTABLE_ROWS=TRUE"; List<String> queries = new ArrayList<String>(){}; queries.add(query); String result = runSchemaExtractionTool(schemaName, tableName, null, queries); Assert.assertEquals(query.toUpperCase(), result.toUpperCase()); }
Source:
<code>private void validateExtension() { Set<String> usedOverrideKeys = new HashSet<>(); <START> for (OverrideSetting setting : overrides) { <END> if (usedOverrideKeys.contains(setting.nativeRuleName)) { throw new IllegalArgumentException( "Multiple overrides specified for the same rule: " + setting.nativeRuleName); } else { usedOverrideKeys.add(setting.nativeRuleName); } Preconditions.checkNotNull(Strings.emptyToNull(setting.nativeRuleName), "nativeRuleName is required for override"); Preconditions.checkNotNull(Strings.emptyToNull(setting.importLocation), "importLocation is required for override"); Preconditions.checkNotNull(Strings.emptyToNull(setting.newRuleName), "newRuleName is required for override"); } }</code><technical_language>nit: streams</technical_language>

Target:
private void validateExtension() { Set<String> usedOverrideKeys = new HashSet<>(); for (RawOverrideSetting baseSetting : overrides) { RawOverrideSetting setting = applyDefaults(baseSetting); Preconditions.checkNotNull( Strings.emptyToNull(setting.getNativeRuleName()), "nativeRuleName is required for override"); Preconditions.checkNotNull( Strings.emptyToNull(setting.getImportLocation()), setting.getNativeRuleName() + ": importLocation is required for override," + " since no defaultImportLocation is specified"); Preconditions.checkNotNull( Strings.emptyToNull(setting.getNewRuleName()), setting.getNativeRuleName() + ": newRuleName is required for override," + " since no defaultRuleNamePrefix is specified"); if (usedOverrideKeys.contains(setting.getNativeRuleName())) { throw new IllegalArgumentException( "Multiple overrides specified for the same rule: " + setting.getNativeRuleName()); } else { usedOverrideKeys.add(setting.getNativeRuleName()); } } }
Source:
<code>private void searchForReuse(ProgressMonitor monitor) throws IOException { long cnt = 0; cnt += objectsLists[Constants.OBJ_COMMIT].size(); cnt += objectsLists[Constants.OBJ_TREE].size(); cnt += objectsLists[Constants.OBJ_BLOB].size(); cnt += objectsLists[Constants.OBJ_TAG].size(); long start = System.currentTimeMillis(); beginPhase(PackingPhase.FINDING_SOURCES, monitor, cnt); if (cnt <= 4096) { <START> BlockList<ObjectToPack> tmp = new BlockList<ObjectToPack>(); <END> tmp.addAll(objectsLists[Constants.OBJ_TAG]); tmp.addAll(objectsLists[Constants.OBJ_COMMIT]); tmp.addAll(objectsLists[Constants.OBJ_TREE]); tmp.addAll(objectsLists[Constants.OBJ_BLOB]); searchForReuse(monitor, tmp); if (pruneCurrentObjectList) { pruneEdgesFromObjectList(objectsLists[Constants.OBJ_COMMIT]); pruneEdgesFromObjectList(objectsLists[Constants.OBJ_TREE]); pruneEdgesFromObjectList(objectsLists[Constants.OBJ_BLOB]); pruneEdgesFromObjectList(objectsLists[Constants.OBJ_TAG]); } } else { searchForReuse(monitor, objectsLists[Constants.OBJ_TAG]); searchForReuse(monitor, objectsLists[Constants.OBJ_COMMIT]); searchForReuse(monitor, objectsLists[Constants.OBJ_TREE]); searchForReuse(monitor, objectsLists[Constants.OBJ_BLOB]); } endPhase(monitor); stats.timeSearchingForReuse = System.currentTimeMillis() - start; }</code><technical_language>do longer preset capacity of BlockList number of objects added</technical_language>

Target:
private void searchForReuse(ProgressMonitor monitor) throws IOException { long cnt = 0; cnt += objectsLists[Constants.OBJ_COMMIT].size(); cnt += objectsLists[Constants.OBJ_TREE].size(); cnt += objectsLists[Constants.OBJ_BLOB].size(); cnt += objectsLists[Constants.OBJ_TAG].size(); long start = System.currentTimeMillis(); beginPhase(PackingPhase.FINDING_SOURCES, monitor, cnt); if (cnt <= 4096) { BlockList<ObjectToPack> tmp = new BlockList<ObjectToPack>(cnt); tmp.addAll(objectsLists[Constants.OBJ_TAG]); tmp.addAll(objectsLists[Constants.OBJ_COMMIT]); tmp.addAll(objectsLists[Constants.OBJ_TREE]); tmp.addAll(objectsLists[Constants.OBJ_BLOB]); searchForReuse(monitor, tmp); if (pruneCurrentObjectList) { pruneEdgesFromObjectList(objectsLists[Constants.OBJ_COMMIT]); pruneEdgesFromObjectList(objectsLists[Constants.OBJ_TREE]); pruneEdgesFromObjectList(objectsLists[Constants.OBJ_BLOB]); pruneEdgesFromObjectList(objectsLists[Constants.OBJ_TAG]); } } else { searchForReuse(monitor, objectsLists[Constants.OBJ_TAG]); searchForReuse(monitor, objectsLists[Constants.OBJ_COMMIT]); searchForReuse(monitor, objectsLists[Constants.OBJ_TREE]); searchForReuse(monitor, objectsLists[Constants.OBJ_BLOB]); } endPhase(monitor); stats.timeSearchingForReuse = System.currentTimeMillis() - start; }
Source:
<code>private static boolean isOnlyDictionaryEncodingPages(Set<Encoding> encodings) { if (encodings.size() > PARQUET_DATA_TRIPLE) { return false; <START> } <END> for (Encoding encoding : encodings) { if (encoding.usesDictionary()) { return true; } } return false; }</code><technical_language>please verify heuristics. some other cases. PAGE_V2 formalizes this contract</technical_language>

Target:
private boolean isOnlyDictionaryEncodingPages(Set<Encoding> encodings) { if (encodings.size() > 3) { return false; } for (Encoding encoding : encodings) { if (encoding.usesDictionary()) { return true; } } return false; }
Source:
<code>public Object handle(UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain) throws Exception { InterceptorChainParameterResolverFactory.initialize(interceptorChain); <START> delegate.handle(unitOfWork.getMessage(), target); <END> Optional<CommandHandlerInterceptorHandlingMember> unwrap = delegate.unwrap( CommandHandlerInterceptorHandlingMember.class); Object result = null; if (unwrap.isPresent() && unwrap.get().shouldInvokeInterceptorChain()) { result = interceptorChain.proceed(); } return result; }</code><technical_language>actually, result this method assigned result. While true support implicit shortcutting interceptors, is interceptor returns a value. Interceptors explicitly shortcut, (by declaring InterceptorChain parameter invoking chain in conditions)</technical_language>

Target:
public Object handle(UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain) throws Exception { InterceptorChainParameterResolverFactory.initialize(interceptorChain); Object result = delegate.handle(unitOfWork.getMessage(), target); if (delegate.unwrap(CommandHandlerInterceptorHandlingMember.class) .map(CommandHandlerInterceptorHandlingMember::shouldInvokeInterceptorChain).orElse(false)) { result = interceptorChain.proceed(); } return result; }
Source:
<code>private void createSessions() throws ConfigError, FieldConvertError { final SessionSettings settings = getSettings(); boolean continueInitOnError = false; if (settings.isSetting(SessionFactory.SETTING_CONTINUE_INIT_ON_ERROR)) { continueInitOnError = settings.getBool(SessionFactory.SETTING_CONTINUE_INIT_ON_ERROR); } final Map<SessionID, Session> initiatorSessions = new HashMap<>(); for (final Iterator<SessionID> i = settings.sectionIterator(); i.hasNext();) { final SessionID sessionID = i.next(); if (isInitiatorSession(sessionID)) { try { <START> if (!settings.isSetting(sessionID, SETTING_INACTIVE_SESSION) || !settings.getBool(sessionID, SETTING_INACTIVE_SESSION)) { <END> final Session quickfixSession = createSession(sessionID); initiatorSessions.put(sessionID, quickfixSession); } } catch (final Throwable e) { if (continueInitOnError) { log.error("error during session initialization, continuing...", e); } else { throw e instanceof ConfigError ? (ConfigError) e : new ConfigError( "error during session initialization", e); } } } } setSessions(initiatorSessions); }</code><technical_language>Some tests this nice</technical_language>

Target:
private void createSessions() throws ConfigError, FieldConvertError { final SessionSettings settings = getSettings(); boolean continueInitOnError = false; if (settings.isSetting(SessionFactory.SETTING_CONTINUE_INIT_ON_ERROR)) { continueInitOnError = settings.getBool(SessionFactory.SETTING_CONTINUE_INIT_ON_ERROR); } final Map<SessionID, Session> initiatorSessions = new HashMap<>(); for (final Iterator<SessionID> i = settings.sectionIterator(); i.hasNext();) { final SessionID sessionID = i.next(); if (isInitiatorSession(sessionID)) { try { if (!settings.isSetting(sessionID, SETTING_DYNAMIC_SESSION) || !settings.getBool(sessionID, SETTING_DYNAMIC_SESSION)) { final Session quickfixSession = createSession(sessionID); initiatorSessions.put(sessionID, quickfixSession); } } catch (final Throwable e) { if (continueInitOnError) { log.error("error during session initialization, continuing...", e); } else { throw e instanceof ConfigError ? (ConfigError) e : new ConfigError( "error during session initialization", e); } } } } setSessions(initiatorSessions); }
Source:
<code>@Override public String getProcName() { <START> return getClass().getSimpleName() + " " + WAL.stripWALsDirPrefix(getWAL()); <END> }</code><technical_language>prefix? WAL directly</technical_language>

Target:
@Override public String getProcName() { return getClass().getSimpleName() + " " + getWALNameFromStrPath(getWAL()); }
Source:
<code>public String explainQuery(@CliOption(key = {"", "query"}, mandatory = true, help = "Query to execute") String sql, @CliOption(key = {"save"}, mandatory = false, help = "query to explain") String location) throws UnsupportedEncodingException { QueryPlan plan = getClient().getQueryPlan(sql); <START> if (plan.isHasError() == true) { <END> return "Explain FAILED:" + plan.getErrorMsg(); } return plan.getPlanString(); }</code><technical_language>if(plan.isHashError()) is enough</technical_language>

Target:
public String explainQuery(@CliOption(key = {"", "query"}, mandatory = true, help = "Query to execute") String sql, @CliOption(key = {"save"}, mandatory = false, help = "query to explain") String location) throws UnsupportedEncodingException { QueryPlan plan = getClient().getQueryPlan(sql); if (plan.isError()) { return "Explain FAILED:" + plan.getErrorMsg(); } return plan.getPlanString(); }
Source:
<code>public int hashCode() { final int iHash = Double.hashCode( getRealDouble() ); <START> final int rHash = Double.hashCode( getImaginaryDouble() ); <END> return Util.combineHash( iHash, rHash ); }</code><technical_language>want swap these, rHash <= getRealDouble() iHash <= getImaginaryDouble(), no</technical_language>

Target:
public int hashCode() { final int rHash = Double.hashCode( getRealDouble() ); final int iHash = Double.hashCode( getImaginaryDouble() ); return Util.combineHash( rHash, iHash ); }
Source:
<code>public AsyncQuery updateStatus(String asyncQueryId, QueryStatus status) { <START> AsyncQuery queryObj = (AsyncQuery) DBUtil.executeInTransaction(elideSettings, <END> dataStore, (tx, scope) -> { EntityProjection asyncQueryCollection = EntityProjection.builder() .type(AsyncQuery.class) .build(); AsyncQuery query = (AsyncQuery) tx.loadObject(asyncQueryCollection, asyncQueryId, scope); query.setStatus(status); tx.save(query, scope); return query; }); return queryObj; }</code><technical_language>If remove DBUtil, I assume revert this file</technical_language>

Target:
public AsyncQuery updateStatus(String asyncQueryId, QueryStatus status) { AsyncQuery queryObj = (AsyncQuery) executeInTransaction(elideSettings, dataStore, (tx, scope) -> { EntityProjection asyncQueryCollection = EntityProjection.builder() .type(AsyncQuery.class) .build(); AsyncQuery query = (AsyncQuery) tx.loadObject(asyncQueryCollection, asyncQueryId, scope); query.setStatus(status); tx.save(query, scope); return query; }); return queryObj; }
Source:
<code>public void anonCanSignUpWithoutConfirmingVerificationEmail() { WikiBasePageObject base = new WikiBasePageObject(); SignUpPageObject signUp = base.navigateToSpecialSignUpPage(wikiURL); String userName = "User" + signUp.getTimeStamp(); String password = "Pass" + signUp.getTimeStamp(); String email = credentials.emailQaart2; RegisterArea register = new RegisterArea(false); register.typeEmailAddress(email); register.typeUsername(userName); register.typePassword(password); register.typeBirthdate(PageContent.WIKI_SIGN_UP_BIRTHMONTH, PageContent.WIKI_SIGN_UP_BIRTHDAY, PageContent.WIKI_SIGN_UP_BIRTHYEAR); register.clickSignUpSubmitButton(); base.verifyUserLoggedIn(userName); BannerNotifications notification = new BannerNotifications(); Assertion.assertEquals(notification.getBannerNotificationTextEmailNotConfirmed(), <START> "Oh no! Your email address has not yet been confirmed. You should have a confirmation message in your inbox. Didn't get it? Click here and we'll send a new one. If you need to change your address, head to your Preferences page."); <END> }</code><technical_language>this string variable shorter</technical_language>

Target:
public void anonCanSignUpWithoutConfirmingVerificationEmail() { WikiBasePageObject base = new WikiBasePageObject(); SignUpPageObject signUp = base.navigateToSpecialSignUpPage(wikiURL); String userName = "User" + signUp.getTimeStamp(); String password = "Pass" + signUp.getTimeStamp(); String email = credentials.emailQaart2; RegisterArea register = new RegisterArea(false); register.typeEmailAddress(email); register.typeUsername(userName); register.typePassword(password); register.typeBirthdate(PageContent.WIKI_SIGN_UP_BIRTHMONTH, PageContent.WIKI_SIGN_UP_BIRTHDAY, PageContent.WIKI_SIGN_UP_BIRTHYEAR); register.clickSignUpSubmitButton(); base.verifyUserLoggedIn(userName); BannerNotifications notification = new BannerNotifications(); String bannerNotifMessageEN = "Oh no! Your email address has not yet been confirmed. " + "You should have a confirmation message in your inbox. " + "Didn't get it? Click here and we'll send a new one. " + "If you need to change your address, " + "head to your Preferences page."; Assertion.assertEquals( notification.getBannerNotificationTextEmailNotConfirmed(), bannerNotifMessageEN); }
Source:
<code>private static void initialize(final List<HyperEdgeSegment> segments, final List<HyperEdgeSegment> sources, final List<HyperEdgeSegment> sinks, final boolean criticalOnly) { int nextMark = -1; for (HyperEdgeSegment segment : segments) { segment.mark = nextMark--; int inWeight = 0; int outWeight = 0; <START> int criticalInWeight = 0; <END> int criticalOutWeight = 0; for (HyperEdgeSegmentDependency dependency : segment.getOutgoingSegmentDependencies()) { switch (dependency.getType()) { case CRITICAL: assert dependency.getWeight() > 0; outWeight += dependency.getWeight(); criticalOutWeight += dependency.getWeight(); break; default: if (!criticalOnly) { outWeight += dependency.getWeight(); } } } for (HyperEdgeSegmentDependency dependency : segment.getIncomingSegmentDependencies()) { switch (dependency.getType()) { case CRITICAL: assert dependency.getWeight() > 0; inWeight += dependency.getWeight(); criticalInWeight += dependency.getWeight(); break; default: if (!criticalOnly) { inWeight += dependency.getWeight(); } } } segment.setInWeight(inWeight); segment.setCriticalInWeight(criticalInWeight); segment.setOutWeight(outWeight); segment.setCriticalOutWeight(criticalOutWeight); if (outWeight == 0) { sinks.add(segment); } else if (inWeight == 0) { sources.add(segment); } } }</code><technical_language>int criticalInWeight = segment.getOutgoingSegmentDependencies().stream().filter(d -> d.getType() == CRITICAL).sumInt()? filter for inWeight</technical_language>

Target:
private static void initialize(final List<HyperEdgeSegment> segments, final List<HyperEdgeSegment> sources, final List<HyperEdgeSegment> sinks, final boolean criticalOnly) { int nextMark = -1; for (HyperEdgeSegment segment : segments) { segment.mark = nextMark--; int criticalInWeight = segment.getIncomingSegmentDependencies().stream() .filter(dep -> dep.getType() == DependencyType.CRITICAL) .mapToInt(dep -> dep.getWeight()) .sum(); int criticalOutWeight = segment.getOutgoingSegmentDependencies().stream() .filter(dep -> dep.getType() == DependencyType.CRITICAL) .mapToInt(dep -> dep.getWeight()) .sum(); int inWeight = criticalInWeight; int outWeight = criticalOutWeight; if (!criticalOnly) { inWeight = segment.getIncomingSegmentDependencies().stream() .mapToInt(dep -> dep.getWeight()) .sum(); outWeight = segment.getOutgoingSegmentDependencies().stream() .mapToInt(dep -> dep.getWeight()) .sum(); } segment.setInWeight(inWeight); segment.setCriticalInWeight(criticalInWeight); segment.setOutWeight(outWeight); segment.setCriticalOutWeight(criticalOutWeight); if (outWeight == 0) { sinks.add(segment); } else if (inWeight == 0) { sources.add(segment); } } }
Source:
<code>public AbfsInputStreamContext withReadAheadQueueDepth( final int readAheadQueueDepth) { this.readAheadQueueDepth = (readAheadQueueDepth >= 0) ? readAheadQueueDepth <START> : Runtime.getRuntime().availableProcessors();; <END> return this; }</code><technical_language>trailing ;</technical_language>

Target:
public AbfsInputStreamContext withReadAheadQueueDepth( final int readAheadQueueDepth) { this.readAheadQueueDepth = (readAheadQueueDepth >= 0) ? readAheadQueueDepth : Runtime.getRuntime().availableProcessors(); return this; }
Source:
<code><START> public static SerializableError of(String message, Class<? extends Exception> exceptionClass) { <END> return ImmutableSerializableError.builder() .message(message) .exceptionName(exceptionClass.getName()) .build(); }</code><technical_language>change class parameter a string</technical_language>

Target:
public static SerializableError of(String message, Class<? extends Exception> exceptionClass) { return ImmutableSerializableError.builder() .message(message) .errorName(exceptionClass.getName()) .build(); }
Source:
<code><START> List<ClassMethodPair> getLifecycleMethods(final Class<Annotation> clazz) { <END> return lifecycleMethods.get(clazz); }</code><technical_language>binary compat break</technical_language>

Target:
public List<ClassMethodPair> getLifecycleMethods(final Class<Annotation> clazz) { return lifecycleMethods.get(clazz); }
Source:
<code>public ScheduledFuture schedule(TaskDefinition definition) { checkNotDuplicateTask(definition.getName()); checkNotAtCapacity(); try { taskLifecycleHook.preTaskSchedule(name, definition); return createContextAndSchedule(definition); } finally { <START> taskLifecycleHook.postTaskSchedule(name, definition); <END> } }</code><technical_language>Do want invoke this if scheduling threw exception</technical_language>

Target:
public ScheduledFuture schedule(TaskDefinition definition) { checkNotDuplicateTask(definition.getName()); acquirePermit(false); return createContextAndSchedule(definition); }
Source:
<code>protected GeoWaveStoreType getStoreType() { <START> return GeoWaveStoreType.DYNAMODB; <END> }</code><technical_language>REDIS</technical_language>

Target:
protected GeoWaveStoreType getStoreType() { return GeoWaveStoreType.REDIS; }
Source:
<code><START> private void assertBigRedirectAlertAttributes(Alert alert) { <END> assertThat(alert.getRisk(), is(Alert.RISK_LOW)); assertThat(alert.getConfidence(), is(Alert.CONFIDENCE_MEDIUM)); assertThat(alert.getName(), is(getLocalisedString("name"))); assertThat(alert.getDescription(), is(getLocalisedString("desc"))); assertThat(alert.getSolution(), is(getLocalisedString("soln"))); assertThat(alert.getReference(), is(getLocalisedString("refs"))); assertThat(alert.getOtherInfo(), is(getExpectedExtraInfo())); assertThat(alert.getCweId(), is(201)); assertThat(alert.getWascId(), is(13)); assertThat(alert.getUri(), is(URI)); }</code><technical_language>static (and ones)</technical_language>

Target:
private static void assertBigRedirectAlertAttributes(Alert alert) { assertThat(alert.getRisk(), is(Alert.RISK_LOW)); assertThat(alert.getConfidence(), is(Alert.CONFIDENCE_MEDIUM)); assertThat(alert.getName(), is(getLocalisedString("name"))); assertThat(alert.getDescription(), is(getLocalisedString("desc"))); assertThat(alert.getSolution(), is(getLocalisedString("soln"))); assertThat(alert.getReference(), is(getLocalisedString("refs"))); assertThat(alert.getOtherInfo(), is(getExpectedExtraInfo())); assertThat(alert.getCweId(), is(201)); assertThat(alert.getWascId(), is(13)); assertThat(alert.getUri(), is(URI)); }