auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String readValue(HttpServletRequest request, HttpServletResponse ignored) { String name = getName(); String value = null; javax.servlet.http.Cookie cookie = getCookie(request, name); if (cookie != null) { String path = StringUtils.clean(getPath()); <START> if (path != null && !request.getRequestURI().startsWith(path)) { <END> log.warn("Found '{}' cookie at path '{}', but should be only used for '{}'", new Object[] { name, request.getRequestURI(), path}); } else { value = cookie.getValue(); log.debug("Found '{}' cookie value [{}]", name, value); } } else { log.trace("No '{}' cookie value", name); } return value; }</code><technical_language>check if getPath() != calcualtePath(...)</technical_language>

Target:
public String readValue(HttpServletRequest request, HttpServletResponse ignored) { String name = getName(); String value = null; javax.servlet.http.Cookie cookie = getCookie(request, name); if (cookie != null) { String path = StringUtils.clean(getPath()); if (path != null && !pathMatches(path, request.getRequestURI())) { log.warn("Found '{}' cookie at path '{}', but should be only used for '{}'", new Object[] { name, request.getRequestURI(), path}); } else { value = cookie.getValue(); log.debug("Found '{}' cookie value [{}]", name, value); } } else { log.trace("No '{}' cookie value", name); } return value; }
Source:
<code>public void beforeMethod() { manager = new PersistentUUIDManagerImpl(); eventLogManager = new EventLogManagerImpl(); <START> topologyManager = new ClusterTopologyManagerImpl() { <END> @Override public void broadcastRebalanceStart(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed) { } @Override public void broadcastTopologyUpdate(String cacheName, CacheTopology cacheTopology, AvailabilityMode availabilityMode, boolean totalOrder, boolean distributed) { } @Override public void broadcastStableTopologyUpdate(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed) { } @Override public void broadcastShutdownCache(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed) throws Exception { } }; preferConsistencyStrategy = new PreferConsistencyStrategy(eventLogManager, manager); }</code><technical_language>a mock instead</technical_language>

Target:
public void beforeMethod() { manager = new PersistentUUIDManagerImpl(); eventLogManager = new EventLogManagerImpl(); topologyManager = Mockito.mock(ClusterTopologyManager.class); preferConsistencyStrategy = new PreferConsistencyStrategy(eventLogManager, manager); }
Source:
<code>private void addProcessorConfig(ImportConfiguration config, Map<String, AbstractImporterFactory> importerModules) { Properties properties = config.getmoduleProperties(); <START> String module = properties.getProperty(ImportDataProcessor.IMPORT_MODULE); <END> String attrs[] = module.split("\\|"); String bundleJar = attrs[1]; FormatterBuilder formatterBuilder = config.getFormatterBuilder(); try { ImporterWrapper wrapper = m_importers.get(bundleJar); if (wrapper == null) { AbstractImporterFactory importFactory = importerModules.get(bundleJar); wrapper = new ImporterWrapper(importFactory); String name = wrapper.getImporterType(); if (name == null || name.trim().isEmpty()) { throw new RuntimeException("Importer must implement and return a valid unique name."); } m_importers.put(bundleJar, wrapper); } wrapper.configure(properties, formatterBuilder); } catch(Throwable t) { m_logger.error("Failed to configure import handler for " + bundleJar, t); Throwables.propagate(t); } }</code><technical_language>this in unexpected format</technical_language>

Target:
private void addProcessorConfig(ImportConfiguration config, Map<String, AbstractImporterFactory> importerModules) { Properties properties = config.getmoduleProperties(); String module = properties.getProperty(ImportDataProcessor.IMPORT_MODULE); assert(module != null); String attrs[] = module.split("\\|"); String bundleJar = attrs[1]; FormatterBuilder formatterBuilder = config.getFormatterBuilder(); try { ImporterWrapper wrapper = m_importers.get(bundleJar); if (wrapper == null) { AbstractImporterFactory importFactory = importerModules.get(bundleJar); wrapper = new ImporterWrapper(importFactory); String name = wrapper.getImporterType(); if (name == null || name.trim().isEmpty()) { throw new RuntimeException("Importer must implement and return a valid unique name."); } m_importers.put(bundleJar, wrapper); } wrapper.configure(properties, formatterBuilder); } catch(Throwable t) { m_logger.error("Failed to configure import handler for " + bundleJar, t); Throwables.propagate(t); } }
Source:
<code>public T executeOperation(Transport transport) { HeaderParams params = writeHeader(transport, GET_STREAM_REQUEST); transport.writeArray(keyBytes); transport.writeVInt(offset); transport.flush(); short status = readHeaderAndValidate(transport, params); T result = null; if (HotRodConstants.isNotExist(status)) { result = null; } else { if (HotRodConstants.isSuccess(status)) { retryable = false; short flags = transport.readByte(); long creation = -1; int lifespan = -1; long lastUsed = -1; int maxIdle = -1; if ((flags & INFINITE_LIFESPAN) != INFINITE_LIFESPAN) { creation = transport.readLong(); lifespan = transport.readVInt(); } if ((flags & INFINITE_MAXIDLE) != INFINITE_MAXIDLE) { lastUsed = transport.readLong(); maxIdle = transport.readVInt(); } long version = transport.readLong(); result = codec.readAsStream(transport, new VersionedMetadataImpl(creation, lifespan, lastUsed, maxIdle, version), () -> { <START> transport.setBusy(false); <END> transport.getTransportFactory().releaseTransport(transport); } ); } } return result; }</code><technical_language>liking lack of symmetry setBusy works. Setting true is set else is helpful for reviewer busy is set...etc. least, transport.setBusy(true) calling readAsStream</technical_language>

Target:
public T executeOperation(Transport transport) { HeaderParams params = writeHeader(transport, GET_STREAM_REQUEST); transport.writeArray(keyBytes); transport.writeVInt(offset); transport.flush(); short status = readHeaderAndValidate(transport, params); T result = null; if (HotRodConstants.isNotExist(status)) { result = null; } else { if (HotRodConstants.isSuccess(status)) { retryable = false; short flags = transport.readByte(); long creation = -1; int lifespan = -1; long lastUsed = -1; int maxIdle = -1; if ((flags & INFINITE_LIFESPAN) != INFINITE_LIFESPAN) { creation = transport.readLong(); lifespan = transport.readVInt(); } if ((flags & INFINITE_MAXIDLE) != INFINITE_MAXIDLE) { lastUsed = transport.readLong(); maxIdle = transport.readVInt(); } long version = transport.readLong(); transport.setBusy(true); result = codec.readAsStream(transport, new VersionedMetadataImpl(creation, lifespan, lastUsed, maxIdle, version), () -> { transport.setBusy(false); transport.getTransportFactory().releaseTransport(transport); } ); } } return result; }
Source:
<code>public void afterPropertiesSet() throws Exception { ThymeleafViewResolver viewResolver = applicationContext.getBean(ThymeleafViewResolver.class); if (viewResolver == null) { LOG.warn( "Cannot adjust ThymeleafViewResolver: " + "bean of this type wasn't found in application context" ); return; } boolean production = environment.acceptsProfiles("prod"); <START> boolean useCdn = Boolean.valueOf(environment.getProperty(SecurityConfig.APP_USE_CDN)); <END> viewResolver.setStaticVariables(resourcesAsMap(production, useCdn)); }</code><technical_language>No, need Boolean.valueOf(), <LINK_0> instead</technical_language>

Target:
public void afterPropertiesSet() throws Exception { ThymeleafViewResolver viewResolver = applicationContext.getBean(ThymeleafViewResolver.class); if (viewResolver == null) { LOG.warn( "Cannot adjust ThymeleafViewResolver: " + "bean of this type wasn't found in application context" ); return; } boolean productionEnv = environment.acceptsProfiles("prod"); viewResolver.setStaticVariables(resourcesAsMap(productionEnv)); }
Source:
<code>public List<Mica.StudySummaryDto> listCollectionStudyStates(@QueryParam("query") String query, @QueryParam("from") @DefaultValue("0") Integer from, @QueryParam("limit") Integer limit, @QueryParam("type") String type, @Context HttpServletResponse response) { Stream<? extends EntityState> result; long totalCount; if(limit == null) limit = MAX_LIMIT; if(limit < 0) throw new IllegalArgumentException("limit cannot be negative"); if(Strings.isNullOrEmpty(query)) { List<? extends EntityState> studyStates = <START> (type != null ? getStudyServiceByType(type).findAllStates() : studyService.findAllStates()).stream() <END> .filter(s -> subjectAclService.isPermitted("/draft/collection-study", "VIEW", s.getId()) || subjectAclService.isPermitted("/draft/harmonization-study", "VIEW", s.getId())) .collect(toList()); totalCount = studyStates.size(); result = studyStates.stream().sorted((o1, o2) -> o1.getId().compareTo(o2.getId())).skip(from).limit(limit); } else { DocumentService.Documents<Study> studyDocuments = draftStudyService.find(from, limit, null, null, null, query); totalCount = studyDocuments.getTotal(); result = (type != null ? getStudyServiceByType(type).findAllStates(studyDocuments.getList().stream().map(Study::getId).collect(toList())) : studyService.findAllStates(studyDocuments.getList().stream().map(Study::getId).collect(toList()))) .stream(); } response.addHeader("X-Total-Count", Long.toString(totalCount)); return result.map(dtos::asDto).collect(toList()); }</code><technical_language>check if type is null empty</technical_language>

Target:
public List<Mica.StudySummaryDto> listCollectionStudyStates(@QueryParam("query") String query, @QueryParam("from") @DefaultValue("0") Integer from, @QueryParam("limit") Integer limit, @QueryParam("type") String type, @Context HttpServletResponse response) { Stream<? extends EntityState> result; long totalCount; if(limit == null) limit = MAX_LIMIT; if(limit < 0) throw new IllegalArgumentException("limit cannot be negative"); if(Strings.isNullOrEmpty(query)) { List<? extends EntityState> studyStates = (!Strings.isNullOrEmpty(type) ? getStudyServiceByType(type).findAllStates() : studyService.findAllStates()).stream() .filter(s -> subjectAclService.isPermitted("/draft/collection-study", "VIEW", s.getId()) || subjectAclService.isPermitted("/draft/harmonization-study", "VIEW", s.getId())) .collect(toList()); totalCount = studyStates.size(); result = studyStates.stream().sorted((o1, o2) -> o1.getId().compareTo(o2.getId())).skip(from).limit(limit); } else { DocumentService.Documents<Study> studyDocuments = draftStudyService.find(from, limit, null, null, null, query); totalCount = studyDocuments.getTotal(); result = (!Strings.isNullOrEmpty(type) ? getStudyServiceByType(type).findAllStates(studyDocuments.getList().stream().map(Study::getId).collect(toList())) : studyService.findAllStates(studyDocuments.getList().stream().map(Study::getId).collect(toList()))) .stream(); } response.addHeader("X-Total-Count", Long.toString(totalCount)); return result.map(dtos::asDto).collect(toList()); }
Source:
<code>public Mutation toMutation(K key) { <START> V valueFromStorage = (V) valueDataConversion.fromStorage(value); <END> return new Mutations.ReadWriteWithValue<>(valueFromStorage, f); }</code><technical_language>use/test case is, a non-serializable pojo (user type) is encoded a UTF-8 byte[ ] some string representation of it</technical_language>

Target:
public Mutation toMutation(K key) { return new Mutations.ReadWriteWithValue<>(value, f); }
Source:
<code>public void theRetrieveAssociationLNObjectlistRequestIsReceived() throws Throwable { this.correlationUidPattern = Pattern.compile(this.organisationId.getOrganisationId() + "\\|\\|\\|\\S{17}\\|\\|\\|\\S{17}"); this.testCase = this.wsdlProjectFactory.createWsdlTestCase(SOAP_PROJECT_XML, TEST_SUITE_XML, TEST_CASE_XML); PROPERTIES_MAP.put("DeviceIdentificationE", this.deviceId.getDeviceId()); PROPERTIES_MAP.put("OrganisationIdentification", this.organisationId.getOrganisationId()); final TestCaseResult runTestStepByName = this.testCaseRunner.runWsdlTestCase(this.testCase, PROPERTIES_MAP, TEST_CASE_NAME_REQUEST); final TestStepResult runTestStepByNameResult = runTestStepByName.getRunTestStepByName(); final WsdlTestCaseRunner wsdlTestCaseRunner = runTestStepByName.getResults(); assertEquals(TestStepStatus.OK, runTestStepByNameResult.getStatus()); for (final TestStepResult tcr : wsdlTestCaseRunner.getResults()) { this.response = ((MessageExchange) tcr).getResponseContent(); <START> this.correlationUidMatcher = this.correlationUidPattern.matcher(this.response); <END> } this.correlationUidMatcher.find(); this.correlationUid = this.correlationUidMatcher.group(); }</code><technical_language>loop results, set matcher time matcher set in iteration. Is is intended here? If realy need result loop</technical_language>

Target:
public void theRetrieveAssociationLNObjectlistRequestIsReceived() throws Throwable { this.correlationUidPattern = Pattern.compile(this.organisationId.getOrganisationId() + "\\|\\|\\|\\S{17}\\|\\|\\|\\S{17}"); this.testCase = this.wsdlProjectFactory.createWsdlTestCase(SOAP_PROJECT_XML, TEST_SUITE_XML, TEST_CASE_XML); PROPERTIES_MAP.put("DeviceIdentificationE", this.deviceId.getDeviceId()); PROPERTIES_MAP.put("OrganisationIdentification", this.organisationId.getOrganisationId()); final TestCaseResult runTestStepByName = this.testCaseRunner.runWsdlTestCase(this.testCase, PROPERTIES_MAP, TEST_CASE_NAME_REQUEST); final TestStepResult runTestStepByNameResult = runTestStepByName.getRunTestStepByName(); final WsdlTestCaseRunner wsdlTestCaseRunner = runTestStepByName.getResults(); assertEquals(TestStepStatus.OK, runTestStepByNameResult.getStatus()); for (final TestStepResult tcr : wsdlTestCaseRunner.getResults()) { this.response = ((MessageExchange) tcr).getResponseContent(); this.correlationUidMatcher = this.correlationUidPattern.matcher(this.response); } assertTrue(this.correlationUidMatcher.find()); this.correlationUid = this.correlationUidMatcher.group(); }
Source:
<code>public void break_without_argument() { verifyBlockCfg("" + "while (cond( succ = [body, END], elem = 1 )) {" + " body( succ = [END], elem = 2 );" + " break;" + "}"); verifyBlockCfg("" + "do {" + " body( succ = [END] );" + " break;" + "} while (cond( succ = [body, END] ));"); verifyBlockCfg("" + "while (outerCond( succ = [innerCond, END] )) {" + " while (innerCond( succ = [bodyInner, ifCond] )) {" + " bodyInner( succ = [innerCond] );" + " }" + " if (ifCond( succ = [bodyIf, outerCond] )) {" + " bodyIf( succ = [END] );" + " break;" + " }" + "}"); verifyBlockCfg("" + <START> "before(succ = [cond], elem = 1);" + <END> "for ($i=1 ; cond( succ = [body, END], elem = 1); $i++) {" + " body( succ = [END], elem = 2 );" + " break;" + "}"); verifyBlockCfg("" + "before(succ = [cond], elem = 1);" + "foreach ( cond(succ = [body, END], elem = 1) as $key) {" + " body( succ = [END], elem = 2 );" + " break;" + "}"); }</code><technical_language>I said, I $i=1 part of this block (thus elem = 2)</technical_language>

Target:
public void break_without_argument() { verifyBlockCfg("" + "while (cond( succ = [body, END], elem = 1 )) {" + " body( succ = [END], elem = 2 );" + " break;" + "}"); verifyBlockCfg("" + "do {" + " body( succ = [END] );" + " break;" + "} while (cond( succ = [body, END] ));"); verifyBlockCfg("" + "while (outerCond( succ = [innerCond, END] )) {" + " while (innerCond( succ = [bodyInner, ifCond] )) {" + " bodyInner( succ = [innerCond] );" + " }" + " if (ifCond( succ = [bodyIf, outerCond] )) {" + " bodyIf( succ = [END] );" + " break;" + " }" + "}"); verifyBlockCfg("" + "before(succ = [cond]);" + "for (; cond( succ = [body, END]) ; updateBlock(succ = [cond])) {" + " body( succ = [END]);" + " break;" + "}"); verifyBlockCfg("" + "before(succ = [cond], elem = 1);" + "foreach ( cond(succ = [body, END], elem = 1) as $foo) {" + " body( succ = [END], elem = 2 );" + " break;" + "}"); }
Source:
<code>private static StringBuilder getStringBuilder(JPQLNextSerializer serializer) { try { <START> Field builderField = SerializerBase.class.getDeclaredField("builder"); <END> builderField.setAccessible(true); return (StringBuilder) builderField.get(serializer); } catch (Exception e) { throw new IllegalStateException(e); } }</code><technical_language>Please create a static init block put field in a static final variable. this: private static final Field BUILDER_FIELD; static { try { Field builderField = SerializerBase.class.getDeclaredField("builder"); builderField.setAccessible(true); BUILDER_FIELD = builderField; } catch (Exception ex) { throw new RuntimeException(ex); } }</technical_language>

Target:
private static StringBuilder getStringBuilder(JPQLNextSerializer serializer) { try { return (StringBuilder) BUILDER_FIELD.get(serializer); } catch (Exception e) { throw new IllegalStateException(e); } }
Source:
<code>public void log(Request request, Response response) { final int status = response.getCommittedMetaData().getStatus(); <START> registry.meter(prefix + '.' + status + "-responses").mark(); <END> wrapped.log(request, response); }</code><technical_language>I note this is namespace pre-existing "aggregating" metric</technical_language>

Target:
public void log(Request request, Response response) { final int status = response.getCommittedMetaData().getStatus(); registry.meter(prefix + '.' + status + "-responses").mark(); if (wrapped != null) { wrapped.log(request, response); } }
Source:
<code>public DecimalStatistics(BigDecimal minimum, BigDecimal maximum, long decimalSizeInBytes) <START> { <END> checkArgument(minimum == null || maximum == null || minimum.compareTo(maximum) <= 0, "minimum is not less than maximum"); this.minimum = minimum; this.maximum = maximum; int retainedSizeInBytes = 0; if (minimum != null) { retainedSizeInBytes += BIG_DECIMAL_INSTANCE_SIZE + decimalSizeInBytes; } if (maximum != null) { retainedSizeInBytes += BIG_DECIMAL_INSTANCE_SIZE + decimalSizeInBytes; } this.retainedSizeInBytes = retainedSizeInBytes + INSTANCE_SIZE; }</code><technical_language>some point switch this decimal library represent longs</technical_language>

Target:
public DecimalStatistics(BigDecimal minimum, BigDecimal maximum, long decimalSizeInBytes) { checkArgument(minimum == null || maximum == null || minimum.compareTo(maximum) <= 0, "minimum is not less than maximum"); this.minimum = minimum; this.maximum = maximum; int retainedSizeInBytes = 0; if (minimum != null) { retainedSizeInBytes += BIG_DECIMAL_INSTANCE_SIZE + decimalSizeInBytes; } if (maximum != null && minimum != maximum) { retainedSizeInBytes += BIG_DECIMAL_INSTANCE_SIZE + decimalSizeInBytes; } this.retainedSizeInBytes = retainedSizeInBytes + INSTANCE_SIZE; }
Source:
<code>FileAuditEndpoint(Builder builder) throws IOException { this.dateFormatSupplier = builder.dateFormatSupplier; this.syncOnAccept = builder.syncOnAccept; try (FileOutputStream fos = new FileOutputStream(builder.location.toFile(), true)) { this.fileDescriptor = fos.getFD(); this.outputStream = new BufferedOutputStream(fos); <START> } <END> }</code><technical_language>AFAICT this stream immediately closed success</technical_language>

Target:
FileAuditEndpoint(Builder builder) throws IOException { this.dateFormatSupplier = builder.dateFormatSupplier; this.syncOnAccept = builder.syncOnAccept; FileOutputStream fos = new FileOutputStream(builder.location.toFile(), true); try { this.fileDescriptor = fos.getFD(); } catch (IOException e) { fos.close(); throw e; } this.outputStream = new BufferedOutputStream(fos); }
Source:
<code>private static long[][] buildFrequencies(final List<CramCompressionRecord> cramRecords) { final long[][] frequencies = new long[SYMBOL_SPACE_SIZE][SYMBOL_SPACE_SIZE]; for (final CramCompressionRecord record : cramRecords) { if (record.readFeatures != null) { for (final ReadFeature readFeature : record.readFeatures) { if (readFeature.getOperator() == Substitution.operator) { final Substitution substitution = ((Substitution) readFeature); final byte refBase = substitution.getReferenceBase(); final byte base = substitution.getBase(); <START> frequencies[refBase][base]++; <END> } } } } return frequencies; }</code><technical_language>refBase base typed bytes... values 127 (as highest byte is set 1 negative). frequencies is a [256][256] 2d array. ... 256 bytes wan create this arrays 128 in size simply disregard negative base values? Need check in other places is this is a common problem other arrays codeByByte byteByCode</technical_language>

Target:
private static long[][] buildFrequencies(final List<CramCompressionRecord> cramRecords) { final long[][] frequencies = new long[SYMBOL_SPACE_SIZE][SYMBOL_SPACE_SIZE]; for (final CramCompressionRecord record : cramRecords) { if (record.readFeatures != null) { for (final ReadFeature readFeature : record.readFeatures) { if (readFeature.getOperator() == Substitution.operator) { final Substitution substitution = ((Substitution) readFeature); final byte refBase = substitution.getReferenceBase(); final byte base = substitution.getBase(); if (refBase <= 0 || base <= 0) { throw new IllegalArgumentException( String.format("CRAM: Attempt to generate a substitution code for invalid reference base with value '%d'", refBase)); } frequencies[refBase][base]++; } } } } return frequencies; }
Source:
<code>public Messages add(Message message) { get(message.getSeverity()).add(message); <START> unhandledErrors = true; <END> return this; }</code><technical_language>check if message severity is ERROR</technical_language>

Target:
public Messages add(Message message) { get(message.getSeverity()).add(message); if(Severity.ERROR.equals(message.getSeverity())) { unhandledErrors = true; } return this; }
Source:
<code>public String getDisplayedGenderType() { return gender == null || gender == Gender.OTHER <START> ? Const.STUDENT_PROFILE_FIELD_NOT_FILLED <END> : gender.name().toLowerCase(); }</code><technical_language>Null is other</technical_language>

Target:
public String getDisplayedGenderType() { return gender == null ? Const.STUDENT_PROFILE_FIELD_NOT_FILLED : gender.name().toLowerCase(); }
Source:
<code>public Order cloneForDiscontinuing() { Order newOrder = new Order(); newOrder.setCareSetting(this.getCareSetting()); newOrder.setConcept(this.getConcept()); newOrder.setAction(Action.DISCONTINUE); newOrder.setPreviousOrder(this); newOrder.setPatient(this.getPatient()); <START> newOrder.setOrderer(this.getOrderer()); <END> newOrder.setStartDate(this.getStartDate()); return newOrder; }</code><technical_language>here, copy orderer</technical_language>

Target:
public Order cloneForDiscontinuing() { Order newOrder = new Order(); newOrder.setCareSetting(this.getCareSetting()); newOrder.setConcept(this.getConcept()); newOrder.setAction(Action.DISCONTINUE); newOrder.setPreviousOrder(this); newOrder.setPatient(this.getPatient()); newOrder.setStartDate(this.getStartDate()); return newOrder; }
Source:
<code>public void processTuple(byte[] inputTuple) { if (inputTuple == null) { this.admitError(null, "null tuple"); return; } String incomingString = ""; try { if (encoding != null) { incomingString = new String(inputTuple, encoding); } else { incomingString = new String(inputTuple, CharEncoding.UTF_8); <START> } <END> if (StringUtils.isBlank(incomingString)) { this.admitError(incomingString, "Blank tuple"); return; } logger.info("Input string ", incomingString); logger.info("Parsing with log format {}", this.geLogFileFormat()); if (this.logSchemaDetails != null && clazz != null) { if (parsedOutput.isConnected()) { parsedOutput.emit(objMapper.readValue(this.logSchemaDetails.createJsonFromLog(incomingString).toString().getBytes(), clazz)); parsedOutputCount++; } } } catch (NullPointerException | IOException | JSONException e) { this.admitError(incomingString, e.getMessage()); logger.error("Failed to parse log tuple {}, Exception = ", inputTuple, e); } }</code><technical_language>A more compact: {code} String enc = encoding != null ? encoding : CharEncoding.UTF_8; incomingString = new String(inputTuple, encoding); {code} Actually, if encoding is expected change midstream, check field set in setup() -- avoid test for tuple here</technical_language>

Target:
public void processTuple(byte[] inputTuple) { if (inputTuple == null) { this.emitError(null, "null tuple"); return; } String incomingString = ""; try { incomingString = new String(inputTuple, encoding); if (StringUtils.isBlank(incomingString)) { this.emitError(incomingString, "Blank tuple"); return; } logger.debug("Input string ", incomingString); logger.debug("Parsing with log format {}", this.geLogFileFormat()); if (this.logSchemaDetails != null && clazz != null) { if (parsedOutput.isConnected()) { parsedOutput.emit(objMapper.readValue(this.logSchemaDetails.createJsonFromLog(incomingString).toString().getBytes(), clazz)); parsedOutputCount++; } } } catch (NullPointerException | IOException | JSONException e) { this.emitError(incomingString, e.getMessage()); logger.error("Failed to parse log tuple {}, Exception = ", inputTuple, e); } }
Source:
<code><START> private synchronized boolean stopEventThread() { <END> while (_eventThread.isAlive()) { try { _eventThread.interrupt(); _eventThread.join(EVENT_THREAD_SHORT_JOIN_TIMEOUT); } catch (InterruptedException e) { _log.warn("Exception caught while stopping coordinator", e); return true; } } return false; }</code><technical_language>move this function closer waitForEventThreadToJoin</technical_language>

Target:
private synchronized boolean stopEventThread() { while (_eventThread.isAlive()) { try { _eventThread.interrupt(); _eventThread.join(EVENT_THREAD_SHORT_JOIN_TIMEOUT); } catch (InterruptedException e) { _log.warn("Exception caught while interrupting the event thread", e); return true; } } return false; }
Source:
<code>public ValueAndTimestamp<V1> get(final K key) { final ValueAndTimestamp<V> valueAndTimestamp = parentGetter.get(key); return ValueAndTimestamp.make( valueTransformer.transform(key, getValueOrNull(valueAndTimestamp)), <START> valueAndTimestamp == null ? context.timestamp() : valueAndTimestamp.timestamp()); <END> }</code><technical_language>If valueAndTimestamp != null this max(valueAndTimestamp.timestamp(), context.timestamp())</technical_language>

Target:
public ValueAndTimestamp<V1> get(final K key) { final ValueAndTimestamp<V> valueAndTimestamp = parentGetter.get(key); return ValueAndTimestamp.make( valueTransformer.transform(key, getValueOrNull(valueAndTimestamp)), valueAndTimestamp == null ? UNKNOWN : valueAndTimestamp.timestamp()); }
Source:
<code>protected void processAuthenticationResponse(HttpServletRequest request, HttpServletResponse response, AuthenticationContext context) throws AuthenticationFailedException { <START> String token = request.getParameter("token"); <END> String username = getLoggedInUser(context); if (token != null) { try { int tokenvalue = Integer.parseInt(token); if (!TOTPAuthenticatorServiceComponent.getTotpManager().isValidTokenLocalUser(tokenvalue, username)) { log.info("Authentication failed, user : "+username); throw new AuthenticationFailedException(); } } catch (TOTPException e) { throw new AuthenticationFailedException("TOTP Authentication process failed for user " + username, e); } } }</code><technical_language>CharacterEncoder.getSafeText()</technical_language>

Target:
protected void processAuthenticationResponse(HttpServletRequest request, HttpServletResponse response, AuthenticationContext context) throws AuthenticationFailedException { String token = CharacterEncoder.getSafeText(request.getParameter("token")); String username = getLoggedInUser(context); if (token != null) { try { int tokenvalue = Integer.parseInt(token); if (!TOTPAuthenticatorServiceComponent.getTotpManager().isValidTokenLocalUser(tokenvalue, username)) { log.info("Authentication failed, user : "+username); throw new AuthenticationFailedException(); } } catch (TOTPException e) { throw new AuthenticationFailedException("TOTP Authentication process failed for user " + username, e); } } }
Source:
<code><START> public static void addBrickViaUi(Class<?> brickHeaderClass, int brickCategoryId) { <END> onView(withId(R.id.button_add)) .perform(click()); onData(allOf(Is.is(instanceOf(String.class)), Is.is(UiTestUtils.getResourcesString(brickCategoryId)))) .inAdapterView(BrickCategoryListMatchers.isBrickCategoryView()) .perform(click()); onData(Is.is(instanceOf(brickHeaderClass))).inAdapterView(BrickPrototypeListMatchers.isBrickPrototypeView()) .perform(click()); onData(instanceOf(Brick.class)) .inAdapterView(ScriptListMatchers.isScriptListView()).atPosition(1) .perform(click()); }</code><technical_language>please remove static</technical_language>

Target:
public void addBrickViaUi(Class<?> brickHeaderClass, int brickCategoryId) { onView(withId(R.id.button_add)) .perform(click()); onData(allOf(Is.is(instanceOf(String.class)), Is.is(UiTestUtils.getResourcesString(brickCategoryId)))) .inAdapterView(BrickCategoryListMatchers.isBrickCategoryView()) .perform(click()); onData(Is.is(instanceOf(brickHeaderClass))).inAdapterView(BrickPrototypeListMatchers.isBrickPrototypeView()) .perform(click()); onData(instanceOf(Brick.class)) .inAdapterView(ScriptListMatchers.isScriptListView()).atPosition(1) .perform(click()); }
Source:
<code>private XmlRpcStruct initNicStructure() { XmlRpcStruct map = new XmlRpcStruct(); VmNetworkInterface nic = getParameters().getNic(); VmDevice vmDevice = getParameters().getVmDevice(); map.add(VdsProperties.Type, VmDeviceType.INTERFACE.getName()); map.add(VdsProperties.Device, VmDeviceType.BRIDGE.getName()); map.add(VdsProperties.mac_addr, nic.getMacAddress()); if (nic.getNetworkName() != null) { map.add(VdsProperties.network, nic.getNetworkName()); <START> } <END> map.add(VdsProperties.linkState, nic.isLinked() ? "up" : "down"); addAddress(map, vmDevice.getAddress()); map.add(VdsProperties.SpecParams, vmDevice.getSpecParams()); map.add(VdsProperties.nic_type, VmInterfaceType.forValue(nic.getType()).name()); map.add(VdsProperties.DeviceId, vmDevice.getId().getDeviceId().toString()); if (vmDevice.getBootOrder() > 0) { map.add(VdsProperties.BootOrder, String.valueOf(vmDevice.getBootOrder())); } if (nic.isPortMirroring()) { map.add(VdsProperties.portMirroring, Collections.singletonList(nic.getNetworkName())); } VmInfoBuilder.addNetworkFiltersToNic(map, getParameters().getVm().getvds_group_compatibility_version()); return map; }</code><technical_language>for 3.2</technical_language>

Target:
private XmlRpcStruct initNicStructure() { XmlRpcStruct map = new XmlRpcStruct(); VmNetworkInterface nic = getParameters().getNic(); VmDevice vmDevice = getParameters().getVmDevice(); map.add(VdsProperties.Type, VmDeviceType.INTERFACE.getName()); map.add(VdsProperties.Device, VmDeviceType.BRIDGE.getName()); map.add(VdsProperties.mac_addr, nic.getMacAddress()); if (nic.getNetworkName() != null) { map.add(VdsProperties.network, nic.getNetworkName()); } boolean linkingSupported = Config.<Boolean> GetValue(ConfigValues.NetworkLinkingSupported, getParameters().getVm().getvds_group_compatibility_version().getValue()); if (linkingSupported) { map.add(VdsProperties.linkActive, String.valueOf(nic.isLinked())); } addAddress(map, vmDevice.getAddress()); map.add(VdsProperties.SpecParams, vmDevice.getSpecParams()); map.add(VdsProperties.nic_type, VmInterfaceType.forValue(nic.getType()).name()); map.add(VdsProperties.DeviceId, vmDevice.getId().getDeviceId().toString()); if (vmDevice.getBootOrder() > 0) { map.add(VdsProperties.BootOrder, String.valueOf(vmDevice.getBootOrder())); } if (nic.isPortMirroring()) { map.add(VdsProperties.portMirroring, Collections.singletonList(nic.getNetworkName())); } VmInfoBuilder.addNetworkFiltersToNic(map, getParameters().getVm().getvds_group_compatibility_version()); return map; }
Source:
<code>public WorldReflectionNode(Context context) { renderQueues = context.get(RenderQueuesHelper.class); worldRenderer = context.get(WorldRenderer.class); <START> <END> playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new ReflectedCamera(playerCamera)); addDesiredStateChange(new LookThrough(playerCamera)); renderingConfig = context.get(Config.class).getRendering(); requiresCondition(() -> renderingConfig.isReflectiveWater()); renderingConfig.subscribe(RenderingConfig.REFLECTIVE_WATER, this); DisplayResolutionDependentFBOs displayResolutionDependentFBOs = context.get(DisplayResolutionDependentFBOs.class); requiresFBO(new FBOConfig(REFLECTED_FBO, HALF_SCALE, FBO.Type.DEFAULT).useDepthBuffer(), displayResolutionDependentFBOs); addDesiredStateChange(new BindFBO(REFLECTED_FBO, displayResolutionDependentFBOs)); addDesiredStateChange(new SetViewportToSizeOf(REFLECTED_FBO, displayResolutionDependentFBOs)); addDesiredStateChange(new EnableFaceCulling()); addDesiredStateChange(new SetFacesToCull(GL_FRONT)); addDesiredStateChange(new EnableMaterial(CHUNK_MATERIAL)); chunkMaterial = getMaterial(CHUNK_MATERIAL); }</code><technical_language>move this empty line worldRenderer assignement</technical_language>

Target:
public WorldReflectionNode(Context context) { super(context); renderQueues = context.get(RenderQueuesHelper.class); worldRenderer = context.get(WorldRenderer.class); playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new ReflectedCamera(playerCamera)); addDesiredStateChange(new LookThrough(playerCamera)); renderingConfig = context.get(Config.class).getRendering(); requiresCondition(() -> renderingConfig.isReflectiveWater()); renderingConfig.subscribe(RenderingConfig.REFLECTIVE_WATER, this); DisplayResolutionDependentFBOs displayResolutionDependentFBOs = context.get(DisplayResolutionDependentFBOs.class); requiresFBO(new FBOConfig(REFLECTED_FBO, HALF_SCALE, FBO.Type.DEFAULT).useDepthBuffer(), displayResolutionDependentFBOs); addDesiredStateChange(new BindFBO(REFLECTED_FBO, displayResolutionDependentFBOs)); addDesiredStateChange(new SetViewportToSizeOf(REFLECTED_FBO, displayResolutionDependentFBOs)); addDesiredStateChange(new EnableFaceCulling()); addDesiredStateChange(new SetFacesToCull(GL_FRONT)); addDesiredStateChange(new EnableMaterial(CHUNK_MATERIAL)); chunkMaterial = getMaterial(CHUNK_MATERIAL); }
Source:
<code>private boolean processTopicRemoved() throws InterruptedException { if (topicToRemove != null) { topics.remove(topicToRemove); messageStream.removeTopic(topicToRemove); <START> Set<TopicPartition> removed = kafkaConsumer.assignment().stream().filter(partition -> !topics.contains(partition.topic())).collect(Collectors.toSet()); <END> Map<TopicPartition, OffsetAndMetadata> offsets = acknowledgmentHandler.removePartitions(removed); removed.forEach(partition -> flowControl.remove(partition)); commitOffsets(offsets); topicToRemove = null; return true; } return false; }</code><technical_language>Is equivalent check partition.topic() == topicToRemove instead of !topics.contains(partition.topic()) here</technical_language>

Target:
private boolean processTopicRemoved() throws InterruptedException { if (topicToRemove != null) { topics.remove(topicToRemove); messageStream.removeTopic(topicToRemove); Set<TopicPartition> removed = kafkaConsumer.assignment().stream().filter(partition -> partition.topic().equals(topicToRemove)).collect(Collectors.toSet()); Map<TopicPartition, OffsetAndMetadata> offsets = acknowledgmentHandler.removePartitions(removed); removed.forEach(partition -> flowControl.remove(partition)); commitOffsets(offsets); topicToRemove = null; return true; } return false; }
Source:
<code>private void addLeewayToDateClaims() { if (!claims.containsKey(PublicClaims.EXPIRES_AT)) { claims.put(PublicClaims.EXPIRES_AT, defaultLeeway); } if (!claims.containsKey(PublicClaims.NOT_BEFORE)) { claims.put(PublicClaims.NOT_BEFORE, defaultLeeway); } if (!claims.containsKey(PublicClaims.ISSUED_AT)) { claims.put(PublicClaims.ISSUED_AT, defaultLeeway); } <START> if(ignoreIssuedAt) { <END> claims.remove(PublicClaims.ISSUED_AT); } }</code><technical_language>swap this if avoid case in claim is added immediately removed. return right removing claim, if is considered</technical_language>

Target:
private void addLeewayToDateClaims() { if (!claims.containsKey(PublicClaims.EXPIRES_AT)) { claims.put(PublicClaims.EXPIRES_AT, defaultLeeway); } if (!claims.containsKey(PublicClaims.NOT_BEFORE)) { claims.put(PublicClaims.NOT_BEFORE, defaultLeeway); } if(ignoreIssuedAt) { claims.remove(PublicClaims.ISSUED_AT); return; } if (!claims.containsKey(PublicClaims.ISSUED_AT)) { claims.put(PublicClaims.ISSUED_AT, defaultLeeway); } }
Source:
<code>public static boolean move(final File from, final File to) { if (to.exists()) { if (!to.delete()) { Log.d(K9.LOG_TAG, "Unable to delete file: " + to.getAbsolutePath()); } } if (!to.getParentFile().mkdirs()) { Log.d(K9.LOG_TAG, "Unable to make directories: " + to.getParentFile().getAbsolutePath()); } try { copyFile(from, to); <START> boolean deleteFromOk = from.delete(); <END> if (!deleteFromOk) { Log.e(K9.LOG_TAG, "Unable to delete source file after copying to destination!"); } return true; } catch (Exception e) { Log.w(K9.LOG_TAG, "cannot move " + from.getAbsolutePath() + " to " + to.getAbsolutePath(), e); return false; } }</code><technical_language>If deleteFailed negation in if below</technical_language>

Target:
public static boolean move(final File from, final File to) { if (to.exists()) { if (!to.delete()) { Log.d(K9.LOG_TAG, "Unable to delete file: " + to.getAbsolutePath()); } } if (!to.getParentFile().mkdirs()) { Log.d(K9.LOG_TAG, "Unable to make directories: " + to.getParentFile().getAbsolutePath()); } try { copyFile(from, to); boolean deleteFromFailed = !from.delete(); if (deleteFromFailed) { Log.e(K9.LOG_TAG, "Unable to delete source file after copying to destination!"); } return true; } catch (Exception e) { Log.w(K9.LOG_TAG, "cannot move " + from.getAbsolutePath() + " to " + to.getAbsolutePath(), e); return false; } }
Source:
<code>private void checkPhysicalDragDrop(StructureTreeNode dragNode, StructureTreeNode dropNode) <START> throws ClassCastException { <END> MediaUnit dragUnit = (MediaUnit) dragNode.getDataObject(); MediaUnit dropUnit = (MediaUnit) dropNode.getDataObject(); StructuralElementViewInterface divisionView = dataEditor.getRuleset().getStructuralElementView( dropUnit.getType(), dataEditor.getAcquisitionStage(), dataEditor.getPriorityList()); LinkedList<MediaUnit> dragParents; if (divisionView.getAllowedSubstructuralElements().containsKey(dragUnit.getType())) { dragParents = MetadataEditor.getAncestorsOfMediaUnit(dragUnit, dataEditor.getWorkpiece().getMediaUnit()); if (dragParents.isEmpty()) { Helper.setErrorMessage("No parents of media unit " + dragUnit.getType() + " found!"); } else { MediaUnit parentUnit = dragParents.get(dragParents.size() - 1); if (parentUnit.getChildren().contains(dragUnit)) { preservePhysical(); return; } else { Helper.setErrorMessage("Parents of media unit " + dragUnit.getType() + " do not contain media " + "unit!"); } } } else { Helper.setErrorMessage("Media unit of type '" + dragUnit.getType() + "' NOT allowed as child of media unit of type '" + dropUnit.getType() + "!"); } show(); }</code><technical_language>need define - is runtime exception</technical_language>

Target:
private void checkPhysicalDragDrop(StructureTreeNode dragNode, StructureTreeNode dropNode) { MediaUnit dragUnit = (MediaUnit) dragNode.getDataObject(); MediaUnit dropUnit = (MediaUnit) dropNode.getDataObject(); StructuralElementViewInterface divisionView = dataEditor.getRuleset().getStructuralElementView( dropUnit.getType(), dataEditor.getAcquisitionStage(), dataEditor.getPriorityList()); LinkedList<MediaUnit> dragParents; if (divisionView.getAllowedSubstructuralElements().containsKey(dragUnit.getType())) { dragParents = MetadataEditor.getAncestorsOfMediaUnit(dragUnit, dataEditor.getWorkpiece().getMediaUnit()); if (dragParents.isEmpty()) { Helper.setErrorMessage(Helper.getTranslation("dataEditor.noParentsError", Collections.singletonList(dragNode.getLabel()))); } else { MediaUnit parentUnit = dragParents.get(dragParents.size() - 1); if (parentUnit.getChildren().contains(dragUnit)) { preservePhysical(); return; } else { Helper.setErrorMessage(Helper.getTranslation("dataEditor.childNotContainedError", Collections.singletonList(dragUnit.getType()))); } } } else { Helper.setErrorMessage(Helper.getTranslation("dataEditor.forbiddenChildElement", Arrays.asList(dragNode.getLabel(), dropNode.getLabel()))); } show(); }
Source:
<code>List<VariantEntity> findByComplexFiltersHelper(Query query, List<String> studies, List<String> consequenceType, RelationalOperator mafOperator, Double mafValue, RelationalOperator polyphenScoreOperator, Double polyphenScoreValue, RelationalOperator siftScoreOperator, Double siftScoreValue, List<String> exclude, Pageable pageable) { applyFilters(query, studies, consequenceType, mafOperator, mafValue, polyphenScoreOperator, polyphenScoreValue, siftScoreOperator, siftScoreValue); ArrayList<String> sortProps = new ArrayList<String>(); sortProps.add("chr"); sortProps.add("start"); query.with(new Sort(Sort.Direction.ASC, sortProps)); Pageable pageable1 = (pageable != null) ? pageable : new PageRequest(0, 10); query.with(pageable1); <START> if (Objects.nonNull(exclude) && !exclude.isEmpty()) { <END> exclude.forEach(e -> query.fields().exclude(e)); } return mongoTemplate.find(query, VariantEntity.class); }</code><technical_language>Please exclude != null, [this method exists Predicate](<LINK_0></technical_language>

Target:
List<VariantEntity> findByComplexFiltersHelper(Query query, List<String> studies, List<String> consequenceType, RelationalOperator mafOperator, Double mafValue, RelationalOperator polyphenScoreOperator, Double polyphenScoreValue, RelationalOperator siftScoreOperator, Double siftScoreValue, List<String> exclude, Pageable pageable) { applyFilters(query, studies, consequenceType, mafOperator, mafValue, polyphenScoreOperator, polyphenScoreValue, siftScoreOperator, siftScoreValue); ArrayList<String> sortProps = new ArrayList<String>(); sortProps.add("chr"); sortProps.add("start"); query.with(new Sort(Sort.Direction.ASC, sortProps)); Pageable pageable1 = (pageable != null) ? pageable : new PageRequest(0, 10); query.with(pageable1); if (exclude != null && !exclude.isEmpty()) { exclude.forEach(e -> query.fields().exclude(e)); } return mongoTemplate.find(query, VariantEntity.class); }
Source:
<code>public void performSearch() { LOGGER.debug("Run search " + searchField.getText()); if (searchField.getText().isEmpty()) { currentResults.setText(""); setHintTooltip(null); stateManager.clearSearchQuery(); return; } if (regularExp.isSelected() && !validRegex()) { <START> currentResults.setText(Localization.lang("Invalid Regex")); <END> return ; } SearchQuery searchQuery = new SearchQuery(this.searchField.getText(), this.caseSensitive.isSelected(), this.regularExp.isSelected()); if (!searchQuery.isValid()) { informUserAboutInvalidSearchQuery(); return; } stateManager.setSearchQuery(searchQuery); }</code><technical_language>@Siedlerchr suggests, nice if report invalid regex user in text box. validation framework for this: <LINK_0> (the other places this library is give a good idea implement - sounds more scarier is)</technical_language>

Target:
public void performSearch() { LOGGER.debug("Run search " + searchField.getText()); if (searchField.getText().isEmpty()) { currentResults.setText(""); setHintTooltip(null); stateManager.clearSearchQuery(); return; } if (!regexValidator.getValidationStatus().isValid()) { currentResults.setText(Localization.lang("Invalid regular expression")); return; } SearchQuery searchQuery = new SearchQuery(this.searchField.getText(), this.caseSensitive.isSelected(), this.regularExp.isSelected()); if (!searchQuery.isValid()) { informUserAboutInvalidSearchQuery(); return; } stateManager.setSearchQuery(searchQuery); }
Source:
<code>void close() throws IOException { for (Map.Entry<String, LogSegment> entry : segmentsByName.entrySet()) { <START> entry.getValue().close(); <END> } }</code><technical_language>Guess want leave log in state in-case of log segments throws close, throw right is it? In other words, get a suggestion close if some log segments throws exception</technical_language>

Target:
void close() throws IOException { for (LogSegment segment : segmentsByName.values()) { segment.flush(); segment.close(); } }
Source:
<code>protected void channelRead0(ChannelHandlerContext ctx, Message msg) throws Exception { seenMessages.incrementAndGet(); final byte[] payload = msg.asBytes(); boolean sawKtTag = false; for (String tag : msg.getTags()) { if (tag.startsWith("kt:")) { sawKtTag = true; sendOrReportFailure(tag.substring(3), payload); } } if (!sawKtTag) { sendOrReportFailure(defaultTopic, payload); } if (propagate) { propagatedMessages.incrementAndGet(); <START> msg.retain(); <END> ctx.fireChannelRead(msg); } }</code><technical_language>is msg.release() invoked</technical_language>

Target:
protected void channelRead0(ChannelHandlerContext ctx, Message msg) throws Exception { seenMessages.incrementAndGet(); final byte[] payload = msg.asBytes(); boolean sawKtTag = false; for (String tag : msg.getTags()) { if (tag.startsWith("kt:")) { sawKtTag = true; sendOrReportFailure(tag.substring(3), payload); } } if (!sawKtTag) { sendOrReportFailure(defaultTopic, payload); } if (propagate) { msg.retain(); ctx.fireChannelRead(msg); } }
Source:
<code>public FigShareProfile extractUserProfile(final String body) { final FigShareProfile profile = newProfile(); final JsonNode json = JsonHelper.getFirstNode(body); if (json != null) { if (getProfileId() != null) { profile.setId(ProfileHelper.sanitizeIdentifier(profile, JsonHelper.getElement(json, getProfileId()))); } for (final String attribute : getPrimaryAttributes()) { convertAndAdd(profile, PROFILE_ATTRIBUTE, attribute, JsonHelper.getElement(json, attribute)); } <START> for (final String attribute : getSecondaryAttributes()) { <END> convertAndAdd(profile, PROFILE_ATTRIBUTE, attribute, JsonHelper.getElement(json, attribute)); } } else { raiseProfileExtractionJsonError(body); } return profile; }</code><technical_language>defined secondary attributes, do you? -> <LINK_0></technical_language>

Target:
public FigShareProfile extractUserProfile(final String body) { final FigShareProfile profile = newProfile(); final JsonNode json = JsonHelper.getFirstNode(body); if (json != null) { if (getProfileId() != null) { profile.setId(ProfileHelper.sanitizeIdentifier(profile, JsonHelper.getElement(json, getProfileId()))); } for (final String attribute : getPrimaryAttributes()) { convertAndAdd(profile, PROFILE_ATTRIBUTE, attribute, JsonHelper.getElement(json, attribute)); } } else { raiseProfileExtractionJsonError(body); } return profile; }
Source:
<code>public void testUnmarshallTopLevelEventWithEdgesEmptyProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_CATCHING_INTERMEDIATE_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); IntermediateTimerEvent emptyEvent = getCatchingIntermediateNodeById(diagram, EMPTY_WITH_INCOME_TOP_LEVEL_EVENT_ID, HAS_INCOME_EDGE, HAS_OUTGOING_EDGE); assertGeneralSet(emptyEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); <START> assertTimerEventEmpty(emptyEvent.getExecutionSet(), CANCELLING, ""); <END> }</code><technical_language>suggestion assertTimerEventEmpty(emptyEvent.getExecutionSet(), CANCELLING, EMPTY_VALUE);</technical_language>

Target:
public void testUnmarshallTopLevelEventWithEdgesEmptyProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_CATCHING_INTERMEDIATE_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); IntermediateTimerEvent emptyEvent = getCatchingIntermediateNodeById(diagram, EMPTY_WITH_INCOME_TOP_LEVEL_EVENT_ID, HAS_INCOME_EDGE, HAS_OUTGOING_EDGE); assertGeneralSet(emptyEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); assertTimerEventEmpty(emptyEvent.getExecutionSet(), CANCELLING, EMPTY_VALUE); }