auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private boolean isExtractionFinished() { int count = 0; while (isTempFilePresent() && count < 100) { if (count == 0) { System.out.println( "There is marker file, which means that some other process is already extracting the archive," + " waiting for extraction to finish"); } System.out.print("."); try { Thread.sleep(100); } catch (InterruptedException e) { log.warning("Problem occurred when the thread was sleeping:\n" + e.getMessage()); } count++; } System.out.println(); <START> if (count == 99 && isTempFilePresent()) { <END> try { deleteFileRecursively(destinationDir.toPath()); } catch (IOException e) { throw new RuntimeException("Failed to delete directory:" + destinationDir, e); } } return !isTempFilePresent(); }</code><technical_language>correct if wrong - if timeout is reached, count 100. In while cycle, check if count < 100 count is incremented, means end count == 100</technical_language>

Target:
private boolean isExtractionFinished() { int count = 0; while (isTempFilePresent() && count < 100) { if (count == 0) { System.out.println( "There is marker file, which means that some other process is already extracting the archive," + " waiting for extraction to finish"); } System.out.print("."); try { Thread.sleep(100); } catch (InterruptedException e) { log.warning("Problem occurred when the thread was sleeping:\n" + e.getMessage()); } count++; } System.out.println(); if (count == 100 && isTempFilePresent()) { try { deleteFileRecursively(destinationDir.toPath()); return false; } catch (IOException e) { throw new RuntimeException("Failed to delete directory:" + destinationDir, e); } } return true; }
Source:
<code>public static void openEmailClient(final FragmentActivity activityContext, final String to, final String subject, final String email, Config config) { if (NetworkUtil.isConnectedMobile(activityContext) && NetworkUtil.isOnZeroRatedNetwork(activityContext, config)) { IDialogCallback callback = new IDialogCallback() { @Override public void onPositiveClicked() { <START> } <END> @Override public void onNegativeClicked() { return; } }; MediaConsentUtils.showLeavingAppDataDialog(activityContext, callback); } Intent email_intent = new Intent(Intent.ACTION_SEND); email_intent.putExtra(Intent.EXTRA_EMAIL, new String[]{to}); email_intent.putExtra(Intent.EXTRA_SUBJECT, subject); email_intent.putExtra(Intent.EXTRA_TEXT, email); email_intent.setType("plain/text"); try { email_intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); if (activityContext != null) { Intent targetIntent = Intent.createChooser(email_intent, activityContext.getString(R.string.email_chooser_header)); targetIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); activityContext.startActivity(targetIntent); } } catch (android.content.ActivityNotFoundException ex) { Toast.makeText(activityContext, activityContext.getString(R.string.email_client_not_present), Toast.LENGTH_SHORT) .show(); logger.error(ex); } }</code><technical_language>this line is pretty important :stuck_out_tongue_closed_eyes:</technical_language>

Target:
public static void openEmailClient(final FragmentActivity activityContext, final String to, final String subject, final String email, Config config) { if (NetworkUtil.isConnectedMobile(activityContext) && NetworkUtil.isOnZeroRatedNetwork(activityContext, config)) { IDialogCallback callback = new IDialogCallback() { @Override public void onPositiveClicked() { sendEmailIntent(activityContext, to, subject, email); } @Override public void onNegativeClicked() { } }; MediaConsentUtils.showLeavingAppDataDialog(activityContext, callback); } else { sendEmailIntent(activityContext, to, subject, email); } }
Source:
<code>private MethodBehavior createGuavaPreconditionsBehavior(Symbol.MethodSymbol symbol, boolean isCheckNotNull) { MethodBehavior behavior = new MethodBehavior(symbol); HappyPathYield happyPathYield = new HappyPathYield(behavior); <START> happyPathYield.parametersConstraints.add(pmapForConstraint(isCheckNotNull ? ObjectConstraint.NOT_NULL : BooleanConstraint.TRUE)); <END> for (int i = 1; i < symbol.parameterTypes().size(); i++) { happyPathYield.parametersConstraints.add(PCollections.emptyMap()); } PMap<Class<? extends Constraint>, Constraint> constraints = isCheckNotNull ? happyPathYield.parametersConstraints.get(0) : null; happyPathYield.setResult(isCheckNotNull ? 0 : -1, constraints); behavior.addYield(happyPathYield); behavior.completed(); return behavior; }</code><technical_language>![MAJOR](<LINK_1> 'Severity: MAJOR') Unknown method [![rule](<LINK_2>](<LINK_0> ![MAJOR](<LINK_1> 'Severity: MAJOR') Unknown method [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
private static MethodBehavior createGuavaPreconditionsBehavior(Symbol.MethodSymbol symbol, boolean isCheckNotNull) { MethodBehavior behavior = new MethodBehavior(symbol); HappyPathYield happyPathYield = new HappyPathYield(behavior); happyPathYield.parametersConstraints.add(pmapForConstraint(isCheckNotNull ? ObjectConstraint.NOT_NULL : BooleanConstraint.TRUE)); for (int i = 1; i < symbol.parameterTypes().size(); i++) { happyPathYield.parametersConstraints.add(PCollections.emptyMap()); } PMap<Class<? extends Constraint>, Constraint> constraints = isCheckNotNull ? happyPathYield.parametersConstraints.get(0) : null; happyPathYield.setResult(isCheckNotNull ? 0 : -1, constraints); behavior.addYield(happyPathYield); behavior.completed(); return behavior; }
Source:
<code>public void resetFactory() { <START> factory.setMembersTouse(null); <END> }</code><technical_language>please a capital 'U' in 'Touse' more readable :)</technical_language>

Target:
public void resetFactory() { factory.setMembersToUse(null); }
Source:
<code>private boolean skipFilename(Path source) { logger.info("Looking into file: ", source); String skipRegex = "\\.tmcrc|metadata\\.yml|(.*)Hidden(.*)"; if (source.getFileName().toString().matches(skipRegex)) { logger.info("Skipping file: ", source); return true; } <START> return false; <END> }</code><technical_language>for this method, change log messages a bit instead log messages logger.info("Skipping file: ", source); <- remains unchanged logger.info("Not skipping file: ", source); <- return false drop file..</technical_language>

Target:
private boolean skipFilename(Path source) { String skipRegex = "\\.tmcrc|metadata\\.yml|(.*)Hidden(.*)"; if (source.getFileName().toString().matches(skipRegex)) { logger.info("Skipping file: ", source); return true; } logger.info("Not skipping file: ", source); return false; }
Source:
<code>private boolean isOldStudentExists(StudentAttributes s) { boolean isOldStudentExist = false; for (StudentAttributes studentsInDb : studentsDb.getAllOldStudents()) { if (studentsInDb.getId().equals(s.getId())) { isOldStudentExist = true; } } <START> return isOldStudentExist; <END> }</code><technical_language>return false do early return true in for-loop. Similarly for isNewStudentExists</technical_language>

Target:
private boolean isOldStudentExists(StudentAttributes s) { for (StudentAttributes studentsInDb : studentsDb.getAllOldStudents()) { if (studentsInDb.getId().equals(s.getId())) { return true; } } return false; }
Source:
<code>public static void main(String[] args) throws Exception { Configuration conf = CachedConfiguration.getInstance(); FileSystem fs = FileSystem.get(conf); Opts opts = new Opts(); opts.parseArgs(SplitLarge.class.getName(), args); for (String file : opts.files) { AccumuloConfiguration aconf = DefaultConfiguration.getInstance(); Path path = new Path(file); CachableBlockFile.Reader rdr = new CachableBlockFile.Reader(fs, path, conf, null, null, aconf); try (Reader iter = new RFile.Reader(rdr)) { if (!file.endsWith(".rf")) { throw new IllegalArgumentException("File must end with .rf"); } String smallName = file.substring(0, file.length() - 3) + "_small.rf"; String largeName = file.substring(0, file.length() - 3) + "_large.rf"; int blockSize = (int) aconf.getAsBytes(Property.TABLE_FILE_BLOCK_SIZE); try ( Writer small = new RFile.Writer( new BCFile.Writer(new RateLimitedOutputStream(fs.create(new Path(smallName)), null), "gz", conf, false, aconf), blockSize); Writer large = new RFile.Writer( <START> new BCFile.Writer(new RateLimitedOutputStream(fs.create(new Path(largeName)), null), <END> "gz", conf, false, aconf), blockSize)) { small.startDefaultLocalityGroup(); large.startDefaultLocalityGroup(); iter.seek(new Range(), new ArrayList<>(), false); while (iter.hasTop()) { Key key = iter.getTopKey(); Value value = iter.getTopValue(); if (key.getSize() + value.getSize() < opts.maxSize) { small.append(key, value); } else { large.append(key, value); } iter.next(); } } } } }</code><technical_language>Do call this constructor a RateLimitedOutputStream? If so, push constructor implementation</technical_language>

Target:
public static void main(String[] args) throws Exception { Configuration conf = CachedConfiguration.getInstance(); FileSystem fs = FileSystem.get(conf); Opts opts = new Opts(); opts.parseArgs(SplitLarge.class.getName(), args); for (String file : opts.files) { AccumuloConfiguration aconf = DefaultConfiguration.getInstance(); Path path = new Path(file); CachableBlockFile.Reader rdr = new CachableBlockFile.Reader(fs, path, conf, null, null, aconf); try (Reader iter = new RFile.Reader(rdr)) { if (!file.endsWith(".rf")) { throw new IllegalArgumentException("File must end with .rf"); } String smallName = file.substring(0, file.length() - 3) + "_small.rf"; String largeName = file.substring(0, file.length() - 3) + "_large.rf"; int blockSize = (int) aconf.getAsBytes(Property.TABLE_FILE_BLOCK_SIZE); try ( Writer small = new RFile.Writer( new BCFile.Writer(fs.create(new Path(smallName)), null, "gz", conf, aconf), blockSize); Writer large = new RFile.Writer( new BCFile.Writer(fs.create(new Path(largeName)), null, "gz", conf, aconf), blockSize)) { small.startDefaultLocalityGroup(); large.startDefaultLocalityGroup(); iter.seek(new Range(), new ArrayList<>(), false); while (iter.hasTop()) { Key key = iter.getTopKey(); Value value = iter.getTopValue(); if (key.getSize() + value.getSize() < opts.maxSize) { small.append(key, value); } else { large.append(key, value); } iter.next(); } } } } }
Source:
<code>public void verify_with_default_test_jar() throws IOException { File file = new File("target/test-jars"); <START> if (file.mkdir()) { <END> JavaCheckVerifier.verifyNoIssue(FILENAME_NO_ISSUE, NO_EFFECT_VISITOR); file.delete(); } }</code><technical_language>@m-g-sonar if folder creation fails test pass</technical_language>

Target:
public void verify_with_default_test_jar() throws IOException { File file = new File("target/test-jars"); if (file.exists()) { file.delete(); } if (file.mkdir()) { JavaCheckVerifier.verifyNoIssue(FILENAME_NO_ISSUE, NO_EFFECT_VISITOR); file.delete(); } else { Fail.fail(); } }
Source:
<code>public static boolean isLeadingADigit(String identifier) { <START> Pattern p = Pattern.compile("\\d.*"); Matcher m = p.matcher(identifier); return m.matches(); <END> }</code><technical_language>Implementation of this other similar methods is highly inefficient. Character.isJavaIdentifierStart</technical_language>

Target:
public static boolean isLeadingADigit(String identifier) { return identifier.length() > 0 && Character.isDigit(identifier.charAt(0)); }
Source:
<code>public ScheduledReporter build(MetricRegistry registry) { GraphiteReporter.Builder builder = builder(registry); <START> if ("udp".equalsIgnoreCase(this.transport)) { <END> return builder.build(new GraphiteUDP(host, port)); } else { return builder.build(new Graphite(host, port)); } }</code><technical_language>Is this needed here? If not, consider dropping it</technical_language>

Target:
public ScheduledReporter build(MetricRegistry registry) { GraphiteReporter.Builder builder = builder(registry); if ("udp".equalsIgnoreCase(transport)) { return builder.build(new GraphiteUDP(host, port)); } else { return builder.build(new Graphite(host, port)); } }
Source:
<code>@Override public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); <START> U.writeString(out, login()); U.writeString(out, password()); <END> U.writeMap(out, userAttrs); out.writeObject(cred); }</code><technical_language>Login password included cred object, need pass twice. login password fields useless removed GridClientAbstractMessage userAttrs field moved GridClientAuthenticationRequest</technical_language>

Target:
@Override public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeObject(cred); U.writeMap(out, userAttrs); }
Source:
<code>public void containersChanged(Set<TaskContainerDelta> containers) { for (TaskContainerDelta delta : containers) { IRepositoryElement reviewRepoElement = delta.getElement(); if (!(reviewRepoElement instanceof ITask)) { <START> return; <END> } ITask review = (ITask) reviewRepoElement; AbstractRepositoryConnector connector = repositoryManager.getRepositoryConnector(review.getConnectorKind()); if (review != null && connector instanceof ReviewsConnector) { try { String reviewUrl = review.getUrl(); switch (delta.getKind()) { case DELETED: deleteMappingsTo(reviewUrl); break; case ADDED: case CONTENT: TaskData taskData = taskDataManager.getTaskData(review); if (taskData == null) { return; } String reviewDescription = taskData.getRoot() .getMappedAttribute(TaskAttribute.DESCRIPTION) .getValue(); updateMapping(reviewUrl, reviewDescription); break; case REMOVED: default: StatusHandler.log(new Status(IStatus.ERROR, ReviewsCoreConstants.PLUGIN_ID, "Unknown change")); } } catch (CoreException e) { StatusHandler.log( new Status(IStatus.ERROR, ReviewsCoreConstants.PLUGIN_ID, "Error getting taskData.", e)); } } } }</code><technical_language>this continue</technical_language>

Target:
public void containersChanged(Set<TaskContainerDelta> containers) { for (TaskContainerDelta delta : containers) { IRepositoryElement reviewRepoElement = delta.getElement(); if (!(reviewRepoElement instanceof ITask)) { return; } ITask review = (ITask) reviewRepoElement; AbstractRepositoryConnector connector = repositoryManager.getRepositoryConnector(review.getConnectorKind()); if (review != null && connector instanceof ReviewsConnector) { try { String reviewUrl = review.getUrl(); switch (delta.getKind()) { case REMOVED: break; case DELETED: deleteMappingsTo(reviewUrl); break; case ADDED: case CONTENT: TaskData taskData = taskDataManager.getTaskData(review); if (taskData == null) { continue; } TaskAttribute attr = taskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION); if (attr == null) { continue; } String reviewDescription = attr.getValue(); updateMapping(reviewUrl, reviewDescription); break; default: StatusHandler.log(new Status(IStatus.ERROR, ReviewsCoreConstants.PLUGIN_ID, "Unknown change")); } } catch (CoreException e) { StatusHandler.log( new Status(IStatus.ERROR, ReviewsCoreConstants.PLUGIN_ID, "Error getting taskData.", e)); } } } }
Source:
<code>public void setup() { for (int i = 0; i < POSITIONS_PER_PAGE; i++) { longValues[i] = random.nextLong(); ids[i] = random.nextInt(POSITIONS_PER_PAGE / 10); positions[i] = i; <START> if (i % 7 == 0) { <END> nulls[i] = true; } } }</code><technical_language>nit: java nulls[i] = i % 7 == 0</technical_language>

Target:
public void setup() { for (int i = 0; i < POSITIONS_PER_PAGE; i++) { longValues[i] = random.nextLong(); ids[i] = random.nextInt(POSITIONS_PER_PAGE / 10); positions[i] = i; nulls[i] = i % 7 == 0; } }
Source:
<code>private int encodeStringToBufferAt(int pos, String s) { prepareEncoder(); ByteBuffer bb = buffer.sliceAsByteBuffer(pos, buffer.size() - pos); int startPosition = bb.position(); CharBuffer in = CharBuffer.wrap(s); <START> encoder.reset(); <END> CoderResult cr = encoder.encode(in, bb, true); if (cr.isError()) { try { cr.throwException(); } catch (CharacterCodingException e) { throw new MessageStringCodingException(e); } } if (!cr.isUnderflow() || cr.isOverflow()) { return -1; } cr = encoder.flush(bb); if (!cr.isUnderflow()) { return -1; } return bb.position() - startPosition; }</code><technical_language>I slightly move this line prepareEncoder method</technical_language>

Target:
private int encodeStringToBufferAt(int pos, String s) { prepareEncoder(); ByteBuffer bb = buffer.sliceAsByteBuffer(pos, buffer.size() - pos); int startPosition = bb.position(); CharBuffer in = CharBuffer.wrap(s); CoderResult cr = encoder.encode(in, bb, true); if (cr.isError()) { try { cr.throwException(); } catch (CharacterCodingException e) { throw new MessageStringCodingException(e); } } if (!cr.isUnderflow() || cr.isOverflow()) { return -1; } cr = encoder.flush(bb); if (!cr.isUnderflow()) { return -1; } return bb.position() - startPosition; }
Source:
<code>public void fetchAll() throws Exception { VenueService service = new VenueService(venueFinder); <START> final VenueItem item = newVenueItemBuilder().group("test").types(new VenueType("typeOne"), new VenueType("typeTwo")).build(); <END> context.checking(new Expectations() {{ oneOf(venueFinder).findAll(); will(returnValue(Lists.newArrayList(item))); }}); Reply<?> reply = service.fetchAll(); List<VenueItemDTO> dtos = Lists.newArrayList(new VenueItemDTO("test", Lists.newArrayList("typeOne", "typeTwo"))); assertThat(reply, containsValue(dtos)); assertThat(reply, isOk()); }</code><technical_language>builder is unnecessary, constructor</technical_language>

Target:
public void fetchAll() throws Exception { VenueGroup group = new VenueGroup("test"); VenueTypeList types = new VenueTypeList(new VenueType("typeOne"), new VenueType("typeTwo")); final VenueItem item = new VenueItem(group, types); context.checking(new Expectations() {{ oneOf(venueFinder).findAll(); will(returnValue(Lists.newArrayList(item))); }}); Reply<?> reply = service.fetchAll(); List<VenueItemDTO> dtos = Lists.newArrayList(new VenueItemDTO("test", Lists.newArrayList("typeOne", "typeTwo"))); assertThat(reply, containsValue(dtos)); assertThat(reply, isOk()); }
Source:
<code>private static void deploy(Promise<String> startCallback) { log.debug("Deeplearning4j UI server is starting."); Promise<String> promise = Promise.promise(); promise.future().compose( success -> Future.future(prom -> startCallback.complete(success)), failure -> Future.future(prom -> startCallback.fail(new RuntimeException(failure))) ); Vertx vertx = Vertx.vertx(); vertx.deployVerticle(VertxUIServer.class.getName(), promise); VertxUIServer.shutdownHook = new Thread(() -> { if (VertxUIServer.instance != null && !VertxUIServer.instance.isStopped()) { log.info("Deeplearning4j UI server is auto-stopping in shutdown hook."); try { instance.stop(); } catch (InterruptedException e) { <START> e.printStackTrace(); <END> } } }); Runtime.getRuntime().addShutdownHook(shutdownHook); }</code><technical_language>want log this</technical_language>

Target:
private static void deploy(Promise<String> startCallback) { log.debug("Deeplearning4j UI server is starting."); Promise<String> promise = Promise.promise(); promise.future().compose( success -> Future.future(prom -> startCallback.complete(success)), failure -> Future.future(prom -> startCallback.fail(new RuntimeException(failure))) ); Vertx vertx = Vertx.vertx(); vertx.deployVerticle(VertxUIServer.class.getName(), promise); VertxUIServer.shutdownHook = new Thread(() -> { if (VertxUIServer.instance != null && !VertxUIServer.instance.isStopped()) { log.info("Deeplearning4j UI server is auto-stopping in shutdown hook."); try { instance.stop(); } catch (InterruptedException e) { log.error("Interrupted stopping of Deeplearning4j UI server in shutdown hook.", e); } } }); Runtime.getRuntime().addShutdownHook(shutdownHook); }
Source:
<code>private void verifySCN() throws SQLException { if (!HbaseCompatCapabilities.isMaxLookbackTimeSupported()) { return; } PhoenixConnection conn = statement.getConnection(); Long scn = conn.getSCN(); if (scn == null) { return; } ColumnResolver resolver = FromCompiler.getResolverForQuery(select, conn); int maxLookBackAge = conn.getQueryServices(). getConfiguration().getInt(CompatBaseScannerRegionObserver.PHOENIX_MAX_LOOKBACK_AGE_CONF_KEY, CompatBaseScannerRegionObserver.DEFAULT_PHOENIX_MAX_LOOKBACK_AGE); long now = EnvironmentEdgeManager.currentTimeMillis(); <START> if (maxLookBackAge > 0 && now - maxLookBackAge * 1000L > scn){ <END> throw new SQLExceptionInfo.Builder( SQLExceptionCode.CANNOT_QUERY_TABLE_WITH_SCN_OLDER_THAN_MAX_LOOKBACK_AGE) .build().buildException(); } }</code><technical_language>nit: good in understanding if s -> ms conversion of if condition</technical_language>

Target:
private void verifySCN() throws SQLException { if (!HbaseCompatCapabilities.isMaxLookbackTimeSupported()) { return; } PhoenixConnection conn = statement.getConnection(); Long scn = conn.getSCN(); if (scn == null) { return; } ColumnResolver resolver = FromCompiler.getResolverForQuery(select, conn); long maxLookBackAgeInMillis = CompatBaseScannerRegionObserver.getMaxLookbackInMillis(conn.getQueryServices(). getConfiguration()); long now = EnvironmentEdgeManager.currentTimeMillis(); if (maxLookBackAgeInMillis > 0 && now - maxLookBackAgeInMillis > scn){ throw new SQLExceptionInfo.Builder( SQLExceptionCode.CANNOT_QUERY_TABLE_WITH_SCN_OLDER_THAN_MAX_LOOKBACK_AGE) .build().buildException(); } }
Source:
<code>public SolenoidExtend(SolenoidSubsystem system) { <START> super("Extending " + system.getName(), system, SolenoidState.EXTEND); <END> }</code><technical_language>replace this(system)</technical_language>

Target:
public SolenoidExtend(SolenoidSubsystem system) { this("Extending " + system.getName(), system); }
Source:
<code>private void updateMarkerPosition(Location location) { <START> Marker marker = mMapFragment.getMap().addMarker(new MarkerOptions(). <END> position(MapHelpV2.makeLatLng(location.getLatitude(), location.getLongitude()))); issueLocationHelper.handleMarkerUpdate(marker); }</code><technical_language>@cagryInside import Maps API v2 objects in maps package (this is Amazon build flavor is currently failing Travis). able accomplish this adding a single method BaseMapFragment allows add a marker passing in a lat/long. This means need change logic maintaining a reference a Marker object</technical_language>

Target:
private void updateMarkerPosition(Location location) { int markerId = mMapFragment.addMarker(location); issueLocationHelper.handleMarkerUpdate(markerId); }
Source:
<code>public MIValue getMIValue(String name) { <START> for (MIResult r : results) { <END> if (r.getVariable().equals(name)) { return r.getMIValue(); } } return null; }</code><technical_language>This loop triggered for field requested, instead of run before. I if worth build a Map of present variables time this is called optimize things. do think</technical_language>

Target:
public MIValue getMIValue(String name) { if (name2value == null) { name2value = new HashMap<String, MIValue>(); for (MIResult r : results) name2value.put(r.getVariable(), r.getMIValue()); } return name2value.get(name); }
Source:
<code>public void toggleMilestone_hasMilestone_milestoneReplaced() { MilestonePickerState state = prepareAssignedState(); state.toggleExactMatchMilestone("milestone1"); <START> assertEquals(true, state.getCurrentMilestonesList().get(0).isSelected()); <END> assertEquals(false, state.getCurrentMilestonesList().get(1).isSelected()); }</code><technical_language>assertFalse for these</technical_language>

Target:
public void toggleMilestone_hasMilestone_milestoneReplaced() { MilestonePickerState state = prepareAssignedState(); state.toggleExactMatchMilestone("milestone1"); assertTrue(state.getCurrentMilestonesList().get(0).isSelected()); assertFalse(state.getCurrentMilestonesList().get(1).isSelected()); }
Source:
<code>public ADBInfo(HashMap<String,String> env) throws URISyntaxException { this.env = env; <START> String dockerHost = env.get("DOCKER_HOST"); <END> URI url = new URI(dockerHost); String h = url.getHost(); openshiftHost = "https://" + h; }</code><technical_language>NPE afterwards. add assertion required "DOCKER_HOST"</technical_language>

Target:
public ADBInfo(HashMap<String,String> env) throws URISyntaxException { this.env = env; String dockerHost = env.get("DOCKER_HOST"); if( dockerHost != null ) { URI url = new URI(dockerHost); String h = url.getHost(); openshiftHost = "https://" + h; } }
Source:
<code>public ValidationResult.Result calculateValidationStatus() { ValidationResult.Result status = ValidationResult.Result.OK; if (!getErrors().isEmpty()) { status = ValidationResult.Result.ERROR; } else if (!getWarnings().isEmpty()) { status = ValidationResult.Result.WARNING; } return status; <START> } <END></code><technical_language>get rid local variable here: if (!getErrors().isEmpty()) { return ValidationResult.Result.ERROR; } else if (!getWarnings().isEmpty()) { return ValidationResult.Result.WARNING; } return ValidationResult.Result.OK; extract methods: hasErrors() hasWarnings() useful for clients. (you package private for moment. If some client request methods public)</technical_language>

Target:
public ValidationResult.Result calculateValidationStatus() { if (!getErrors().isEmpty()) { return ValidationResult.Result.ERROR; } else if (!getWarnings().isEmpty()) { return ValidationResult.Result.WARNING; } return ValidationResult.Result.OK; }
Source:
<code>public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { IControllableServerBehavior serverBehavior = getServerBehavior(configuration); if( !(serverBehavior instanceof ControllableServerBehavior )) { throw toCoreException("Unable to find a IControllableServerBehavior instance"); } ControllableServerBehavior beh = (ControllableServerBehavior) serverBehavior; beh.setServerStarting(); IServer server = beh.getServer(); IDeploymentConfig dc = OpenShiftServerUtils.getDeploymentConfig(server); <START> DebuggingContext debugContext = OpenShiftDebugUtils.get().getDebuggingContext(dc); <END> if( "debug".equals(mode)) { startDebugging(server, dc, debugContext, monitor); } else { stopDebugging(dc, debugContext, monitor); } int state = pollState(); if( state == IServer.STATE_STARTED) { beh.setServerStarted(); beh.setRunMode(mode); } else { beh.setServerStopped(); ((ControllableServerBehavior)getControllableBehavior()).setRunMode(null); } }</code><technical_language>need a null check in case DC is</technical_language>

Target:
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { IControllableServerBehavior serverBehavior = getServerBehavior(configuration); if( !(serverBehavior instanceof ControllableServerBehavior )) { throw toCoreException("Unable to find a IControllableServerBehavior instance"); } ControllableServerBehavior beh = (ControllableServerBehavior) serverBehavior; beh.setServerStarting(); IServer server = beh.getServer(); IDeploymentConfig dc = OpenShiftServerUtils.getDeploymentConfig(server); if (dc == null) { throw toCoreException("No deployment config was found for "+server.getName()); } DebuggingContext debugContext = OpenShiftDebugUtils.get().getDebuggingContext(dc); if( DEBUG_MODE.equals(mode)) { startDebugging(server, dc, debugContext, monitor); } else { stopDebugging(dc, debugContext, monitor); } int state = pollState(); if( state == IServer.STATE_STARTED) { beh.setServerStarted(); beh.setRunMode(mode); } else { beh.setServerStopped(); ((ControllableServerBehavior)getControllableBehavior()).setRunMode(null); } }
Source:
<code>public static void setup() { Project project = mock(Project.class); ProjectFileSystem pfs = mock(ProjectFileSystem.class); JavaClasspath javaClasspath = mock(JavaClasspath.class); <START> SuppressWarningsFilter suppressWarningsFilter = mock(SuppressWarningsFilter.class); <END> when(javaClasspath.getBinaryDirs()).thenReturn(Lists.newArrayList(new File("target/test-classes"))); when(javaClasspath.getElements()).thenReturn(Lists.newArrayList(new File("target/test-classes"))); File baseDir = new File("src/test/java"); when(project.getFileSystem()).thenReturn(pfs); when(pfs.getBasedir()).thenReturn(baseDir); DefaultJavaResourceLocator jrl = new DefaultJavaResourceLocator(project, javaClasspath, suppressWarningsFilter); JavaAstScanner.scanSingleFile(new File("src/test/java/org/sonar/java/DefaultJavaResourceLocatorTest.java"), new VisitorsBridge(jrl)); javaResourceLocator = jrl; }</code><technical_language>a mock</technical_language>

Target:
public static void setup() { Project project = mock(Project.class); ProjectFileSystem pfs = mock(ProjectFileSystem.class); JavaClasspath javaClasspath = mock(JavaClasspath.class); when(javaClasspath.getBinaryDirs()).thenReturn(Lists.newArrayList(new File("target/test-classes"))); when(javaClasspath.getElements()).thenReturn(Lists.newArrayList(new File("target/test-classes"))); File baseDir = new File("src/test/java"); when(project.getFileSystem()).thenReturn(pfs); when(pfs.getBasedir()).thenReturn(baseDir); SensorContext sensorContext = mock(SensorContext.class); DefaultJavaResourceLocator jrl = new DefaultJavaResourceLocator(project, javaClasspath, new SuppressWarningsFilter()); jrl.setSensorContext(sensorContext); JavaAstScanner.scanSingleFile(new File("src/test/java/org/sonar/java/DefaultJavaResourceLocatorTest.java"), new VisitorsBridge(jrl)); javaResourceLocator = jrl; }
Source:
<code>void getLeaderReplicaList(List<RemoteReplicaInfo> remoteReplicaInfos, List<ExchangeMetadataResponse> exchangeMetadataResponseList, List<RemoteReplicaInfo> leaderReplicaInfosOutput, List<ExchangeMetadataResponse> exchangeMetadataResponseListForLeaderReplicaInfosOutput) throws IllegalArgumentException { if (replicatingFromRemoteColo && leaderBasedReplicationAdmin != null) { if (exchangeMetadataResponseList.size() != remoteReplicaInfos.size()) { throw new IllegalArgumentException("ExchangeMetadataResponseList size " + exchangeMetadataResponseList.size() + " and replicasToReplicatePerNode size " + remoteReplicaInfos.size() + " should be the same"); } for (int i = 0; i < remoteReplicaInfos.size(); i++) { RemoteReplicaInfo remoteReplicaInfo = remoteReplicaInfos.get(i); String partitionName = remoteReplicaInfo.getLocalReplicaId().getPartitionId().toPathString(); ReplicaId remoteReplicaId = remoteReplicaInfo.getReplicaId(); if (leaderBasedReplicationAdmin.isPeerReplicaLeaderForPartition(partitionName, remoteReplicaId)) { <START> leaderReplicaInfosOutput.add(remoteReplicaInfo); <END> exchangeMetadataResponseListForLeaderReplicaInfosOutput.add(exchangeMetadataResponseList.get(i)); } } } else { leaderReplicaInfosOutput.addAll(remoteReplicaInfos); exchangeMetadataResponseListForLeaderReplicaInfosOutput.addAll(exchangeMetadataResponseList); } }</code><technical_language>Actually, I fetches local standby <-> standby, local standby <-> leader in replicate() method</technical_language>

Target:
void getLeaderReplicaList(List<RemoteReplicaInfo> remoteReplicaInfos, List<ExchangeMetadataResponse> exchangeMetadataResponseList, List<RemoteReplicaInfo> leaderReplicaInfosOutput, List<ExchangeMetadataResponse> exchangeMetadataResponseListForLeaderReplicaInfosOutput) throws IllegalArgumentException { if (exchangeMetadataResponseList.size() != remoteReplicaInfos.size()) { throw new IllegalArgumentException("ExchangeMetadataResponseList size " + exchangeMetadataResponseList.size() + " and replicasToReplicatePerNode size " + remoteReplicaInfos.size() + " should be the same"); } for (int i = 0; i < remoteReplicaInfos.size(); i++) { RemoteReplicaInfo remoteReplicaInfo = remoteReplicaInfos.get(i); ReplicaId localReplica = remoteReplicaInfo.getLocalReplicaId(); ReplicaId remoteReplica = remoteReplicaInfo.getReplicaId(); if (leaderBasedReplicationAdmin.isLeaderPair(localReplica, remoteReplica)) { leaderReplicaInfosOutput.add(remoteReplicaInfo); exchangeMetadataResponseListForLeaderReplicaInfosOutput.add(exchangeMetadataResponseList.get(i)); } } }
Source:
<code>private Firmware getFirmware(FirmwareUID firmwareUID, String filename, Locale locale) throws IOException { ThingTypeUID thingTypeUID = firmwareUID.getThingTypeUID(); URL[] urls = { Paths.get(rootPath, thingTypeUID.getBindingId(), thingTypeUID.getId()).toUri().toURL() }; ResourceBundle rb = ResourceBundle.getBundle(filename, locale, new URLClassLoader(urls)); InputStream firmwareImage = getFirmwareImage(firmwareUID, rb.getString("image")); return new Firmware.Builder(firmwareUID).withDescription(getResourceAsString(rb, "description")) .withModel(getResourceAsString(rb, "model")) .withVendor(getResourceAsString(rb, "vendor")).withChangelog(getResourceAsString(rb, "changelog")) .withPrerequisiteVersion(getResourceAsString(rb, "prerequisiteVersion")) <START> .withOnlineChangelog(new URL(getResourceAsString(rb, "onlineChangelog"))).withContent(firmwareImage) <END> .build(); }</code><technical_language>this code throw a NPE if is onlineChanglog in properties file</technical_language>

Target:
private Firmware getFirmware(FirmwareUID firmwareUID, String filename, Locale locale) throws IOException { ThingTypeUID thingTypeUID = firmwareUID.getThingTypeUID(); URL[] urls = { Paths.get(rootPath, thingTypeUID.getBindingId(), thingTypeUID.getId()).toUri().toURL() }; ResourceBundle rb = ResourceBundle.getBundle(filename, locale, new URLClassLoader(urls)); InputStream firmwareImage = getFirmwareImage(firmwareUID, rb.getString("image")); Firmware.Builder builder = new Firmware.Builder(firmwareUID) .withDescription(getResourceAsString(rb, "description")).withModel(getResourceAsString(rb, "model")) .withVendor(getResourceAsString(rb, "vendor")).withChangelog(getResourceAsString(rb, "changelog")) .withPrerequisiteVersion(getResourceAsString(rb, "prerequisiteVersion")).withInputStream(firmwareImage) .withMd5Hash(getResourceAsString(rb, "md5hash")); String onlineChangeLog = getResourceAsString(rb, "onlineChangelog"); if (onlineChangeLog != null) { builder.withOnlineChangelog(new URL(onlineChangeLog)); } return builder.build(); }
Source:
<code>public Optional<String> getComponentId() { if (getIdentifier().equals(CONFIGURATION_IDENTIFIER)) { return of(OBJECT_MULE_CONFIGURATION); } else if (getModel(ConstructModel.class) .map(cm -> cm.getName().equals("object")) .orElse(getIdentifier().equals(ON_ERROR_CONTINE_IDENTIFIER) || getIdentifier().equals(ON_ERROR_PROPAGATE_IDENTIFIER))) { return ofNullable(getRawParameters().get(NAME_ATTRIBUTE_NAME)); <START> } else if (getIdentifier().equals(ERROR_HANDLER_IDENTIFIER) && getRawParameters().get("ref") != null) { <END> return empty(); } else if (getModel(ParameterizedModel.class).isPresent()) { populateParameterAsts(); return ofNullable(componentId); } else { return ofNullable(getRawParameters().get(NAME_ATTRIBUTE_NAME)); } }</code><technical_language>getRawParameters().get("ref") != null -> getRawParameterValue("ref").isPresent()</technical_language>

Target:
public Optional<String> getComponentId() { if (getIdentifier().equals(CONFIGURATION_IDENTIFIER)) { return of(OBJECT_MULE_CONFIGURATION); } else if (getModel(ConstructModel.class) .map(cm -> cm.getName().equals("object")) .orElse(getIdentifier().equals(ON_ERROR_CONTINE_IDENTIFIER) || getIdentifier().equals(ON_ERROR_PROPAGATE_IDENTIFIER))) { return ofNullable(getRawParameters().get(NAME_ATTRIBUTE_NAME)); } else if (getIdentifier().equals(ERROR_HANDLER_IDENTIFIER) && getRawParameterValue("ref").isPresent()) { return empty(); } else if (getModel(ParameterizedModel.class).isPresent()) { populateParameterAsts(); return ofNullable(componentId); } else { return ofNullable(getRawParameters().get(NAME_ATTRIBUTE_NAME)); } }
Source:
<code>public SSHLauncher(String host, int port, String username, String password, String privatekey, String jvmOptions, String javaPath, JDKInstaller jdkInstaller, String prefixStartSlaveCmd, String suffixStartSlaveCmd) { <START> if (host != null) { <END> this.host = host.trim(); } else { this.host = null; } this.jvmOptions = fixEmpty(jvmOptions); this.port = port == 0 ? 22 : port; this.username = fixEmpty(username); this.password = Secret.fromString(fixEmpty(password)); this.privatekey = fixEmpty(privatekey); this.credentials = null; this.credentialsId = null; this.javaPath = fixEmpty(javaPath); if (jdkInstaller != null) { this.jdk = jdkInstaller; } this.prefixStartSlaveCmd = fixEmpty(prefixStartSlaveCmd); this.suffixStartSlaveCmd = fixEmpty(suffixStartSlaveCmd); this.launchTimeoutSeconds = null; this.maxNumRetries = null; this.retryWaitTime = null; this.sshHostKeyVerificationStrategy = null; }</code><technical_language>hudson.Util.fixEmptyAndTrim(). convert blank lines null, is required</technical_language>

Target:
public SSHLauncher(String host, int port, String username, String password, String privatekey, String jvmOptions, String javaPath, JDKInstaller jdkInstaller, String prefixStartSlaveCmd, String suffixStartSlaveCmd) { this.host = Util.fixEmptyAndTrim(host); this.jvmOptions = fixEmpty(jvmOptions); this.port = port == 0 ? 22 : port; this.username = fixEmpty(username); this.password = Secret.fromString(fixEmpty(password)); this.privatekey = fixEmpty(privatekey); this.credentials = null; this.credentialsId = null; this.javaPath = fixEmpty(javaPath); if (jdkInstaller != null) { this.jdk = jdkInstaller; } this.prefixStartSlaveCmd = fixEmpty(prefixStartSlaveCmd); this.suffixStartSlaveCmd = fixEmpty(suffixStartSlaveCmd); this.launchTimeoutSeconds = null; this.maxNumRetries = null; this.retryWaitTime = null; this.sshHostKeyVerificationStrategy = null; }
Source:
<code>public MessageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { <START> LayoutInflater inflater = LayoutInflater.from(parent.getContext()); <END> return new MessageViewHolder((MessageView) inflater.inflate(R.layout.message_item_layout, parent, false)); }</code><technical_language>pass inflater a param in adapter</technical_language>

Target:
public MessageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new MessageViewHolder((MessageView) inflater.inflate(R.layout.message_item_layout, parent, false)); }
Source:
<code>public int executeBackendUpdateQuery(final BackendQuery<MongoDBQueryDescriptor> backendQuery, final QueryParameters queryParameters, final TupleContext tupleContext) { MongoDBQueryDescriptor queryDescriptor = backendQuery.getQuery(); EntityKeyMetadata entityKeyMetadata = backendQuery.getSingleEntityMetadataInformationOrNull() == null ? null : backendQuery.getSingleEntityMetadataInformationOrNull().getEntityKeyMetadata(); String collectionName = getCollectionName( backendQuery, queryDescriptor, entityKeyMetadata ); MongoCollection<Document> collection = provider.getDatabase().getCollection( collectionName ); if ( !queryParameters.getPositionalParameters().isEmpty() ) { throw new UnsupportedOperationException( "Positional parameters are not yet supported for MongoDB native queries." ); } switch ( queryDescriptor.getOperation() ) { case INSERTMANY: case INSERTONE: case INSERT: return doInsert( queryDescriptor, collection ); case REMOVE: <START> return (int) doRemove( queryDescriptor, collection ); <END> case UPDATE: return (int) doUpdate( queryDescriptor, collection ); case FIND: case FINDONE: case FINDANDMODIFY: case AGGREGATE: case AGGREGATE_PIPELINE: case COUNT: case DISTINCT: throw log.readQueryMustBeExecutedViaGetResultList( queryDescriptor ); default: throw new IllegalArgumentException( "Unexpected query operation: " + queryDescriptor ); } }</code><technical_language>if return int. reason for doRemove return a Long</technical_language>

Target:
public int executeBackendUpdateQuery(final BackendQuery<MongoDBQueryDescriptor> backendQuery, final QueryParameters queryParameters, final TupleContext tupleContext) { MongoDBQueryDescriptor queryDescriptor = backendQuery.getQuery(); EntityKeyMetadata entityKeyMetadata = backendQuery.getSingleEntityMetadataInformationOrNull() == null ? null : backendQuery.getSingleEntityMetadataInformationOrNull().getEntityKeyMetadata(); String collectionName = getCollectionName( backendQuery, queryDescriptor, entityKeyMetadata ); MongoCollection<Document> collection = provider.getDatabase().getCollection( collectionName ); if ( !queryParameters.getPositionalParameters().isEmpty() ) { throw new UnsupportedOperationException( "Positional parameters are not yet supported for MongoDB native queries." ); } switch ( queryDescriptor.getOperation() ) { case INSERTMANY: case INSERTONE: case INSERT: return doInsert( queryDescriptor, collection ); case REMOVE: return doRemove( queryDescriptor, collection ); case UPDATE: return doUpdate( queryDescriptor, collection ); case FIND: case FINDONE: case FINDANDMODIFY: case AGGREGATE: case AGGREGATE_PIPELINE: case COUNT: case DISTINCT: throw log.readQueryMustBeExecutedViaGetResultList( queryDescriptor ); default: throw new IllegalArgumentException( "Unexpected query operation: " + queryDescriptor ); } }
Source:
<code>public SimilarToGraphQuery querySimilarTo(Graph graph, String[] similarToFields, String similarToText, Authorizations authorizations) { return new ElasticSearchParentChildGraphQuery( getClient(), getConfig().getIndicesToQuery(), graph, similarToFields, similarToText, getAllPropertyDefinitions(), getConfig().getScoringStrategy(), <START> getConfig().getNameSubstitutionStrategy(), <END> authorizations); }</code><technical_language>this a field create time</technical_language>

Target:
public SimilarToGraphQuery querySimilarTo(Graph graph, String[] similarToFields, String similarToText, Authorizations authorizations) { return new ElasticSearchParentChildGraphQuery( getClient(), getConfig().getIndicesToQuery(), graph, similarToFields, similarToText, getAllPropertyDefinitions(), getConfig().getScoringStrategy(), this.nameSubstitutionStrategy, authorizations); }
Source:
<code>public boolean tick() { long time = this.world.getTotalWorldTime(); Random rand = this.world.rand; for (Cube cube : cubeMap) { <START> cube.tickCubeServer(time, this.world, rand); <END> } return false; }</code><technical_language>This longer a no-op me</technical_language>

Target:
public boolean tick() { profiler.startSection("providerTick("+cubeMap.getSize()+")"); long time = this.world.getTotalWorldTime(); Random rand = this.world.rand; for (Cube cube : cubeMap) { cube.tickCubeServer(time, this.world, rand); } profiler.endSection(); return false; }
Source:
<code>public void testAMeetingCanBeDeleted() { HomeTabletPage home = new HomeTabletPage(); home .clickScheduleBtn() .clickOverMeetingCreated(subject) .clickRemoveBtn() <START> .setPasswordTxtBox(password) <END> .clickOkButton(); Assert.assertTrue(schedule.isMessageMeetingDeletedDisplayed()); }</code><technical_language>confirmCredentials(...)</technical_language>

Target:
public void testAMeetingCanBeDeleted() { String subject = jsonReader.readJsonFile("title", filePath); HomeTabletPage homePage = new HomeTabletPage(); SchedulePage schedulePage = homePage.clickScheduleBtn() .clickOverMeetingCreated(subject) .clickRemoveBtn() .confirmCredentials(password); Assert.assertTrue(schedulePage.isMessageMeetingDeletedDisplayed()); }
Source:
<code>public void verifyMoreInfoUrl(String expectedUrl) { String moreInfoUrl = moreInfoLink.getAttribute("href"); Assertion.assertEquals(expectedUrl, moreInfoUrl); <START> } <END></code><technical_language>consider adding logging assert</technical_language>

Target:
public void verifyMoreInfoUrl(String expectedUrl) { String moreInfoUrl = moreInfoLink.getAttribute("href"); Assertion.assertEquals(expectedUrl, moreInfoUrl); PageObjectLogging.log("verifyMoreInfoUrl", "More Info URL is correct", true); }
Source:
<code>public boolean checkSecurityInfo(String endpoint, Identity clientIdentity, SecurityInfo securityInfo) { if (clientIdentity.isSecure()) { if (securityInfo == null) { LOG.debug("Client '{}' without security info try to connect through the secure endpoint", endpoint); return false; } else if (clientIdentity.isPSK()) { return checkPskIdentity(endpoint, clientIdentity, securityInfo); } else if (clientIdentity.isRPK()) { return checkRpkIdentity(endpoint, clientIdentity, securityInfo); } else if (clientIdentity.isX509()) { return checkX509Identity(endpoint, clientIdentity, securityInfo); } else if (clientIdentity.isOSCORE()) { return checkOscoreIdentity(endpoint, clientIdentity, securityInfo); <START> <END> } else { LOG.debug("Unable to authenticate client '{}': unknown authentication mode", endpoint); return false; } } else { if (securityInfo != null) { LOG.debug("Client '{}' must connect using DTLS", endpoint); return false; } } return true; }</code><technical_language>this check in else block (clientIdentity.isSecure() == false)</technical_language>

Target:
public boolean checkSecurityInfo(String endpoint, Identity clientIdentity, SecurityInfo securityInfo) { if (clientIdentity.isSecure()) { if (securityInfo == null) { LOG.debug("Client '{}' without security info try to connect through the secure endpoint", endpoint); return false; } else if (clientIdentity.isPSK()) { return checkPskIdentity(endpoint, clientIdentity, securityInfo); } else if (clientIdentity.isRPK()) { return checkRpkIdentity(endpoint, clientIdentity, securityInfo); } else if (clientIdentity.isX509()) { return checkX509Identity(endpoint, clientIdentity, securityInfo); } else { LOG.debug("Unable to authenticate client '{}': unknown authentication mode", endpoint); return false; } } else { if (clientIdentity.isOSCORE()) { return checkOscoreIdentity(endpoint, clientIdentity, securityInfo); } else if (securityInfo != null) { LOG.debug("Client '{}' must connect using DTLS", endpoint); return false; } } return true; }
Source:
<code>public ResponseEntity<Counterparty> create(@RequestBody @Valid Counterparty counterparty) { try { <START> Counterparty createdCounterparty = counterpartyDao.saveAndFlush(counterparty); <END> return new ResponseEntity<>(createdCounterparty, HttpStatus.OK); } catch (DataIntegrityViolationException dive) { throw new ConflictException(dive.getMostSpecificCause().getMessage()); } }</code><technical_language>logged AppUser attached saving Counterparty</technical_language>

Target:
public ResponseEntity<CounterpartyDTO> create(@RequestBody @Valid Counterparty counterparty) { try { counterparty.setUser(userUtil.extractLoggedAppUserFromDatabase()); Counterparty createdCounterparty = counterpartyDao.saveAndFlush(counterparty); return new ResponseEntity<>(counterpartyConverter.convertTo(createdCounterparty), HttpStatus.OK); } catch (DataIntegrityViolationException dive) { throw new ConflictException(dive.getMostSpecificCause().getMessage()); } }
Source:
<code>public void testEncodeSpatial() throws Exception { Document doc = encode(FilterMockData.intersects(), FES.Filter); assertEquals("fes:Filter", doc.getDocumentElement().getNodeName()); Element e = getElementByQName(doc, FES.Intersects); assertNotNull(e); <START> print(e); <END> assertNotNull(getElementByQName(e, FES.ValueReference)); assertNotNull(getElementByQName(e, GML.Point)); }</code><technical_language>Please do print stdout/stderr. Please log instead output silenced build infrastructure</technical_language>

Target:
public void testEncodeSpatial() throws Exception { Document doc = encode(FilterMockData.intersects(), FES.Filter); assertEquals("fes:Filter", doc.getDocumentElement().getNodeName()); Element e = getElementByQName(doc, FES.Intersects); assertNotNull(e); assertNotNull(getElementByQName(e, FES.ValueReference)); assertNotNull(getElementByQName(e, GML.Point)); }