auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private IAnimationHandle animate(final com.ait.lienzo.client.core.shape.Shape<?> shape, final ShapeStateAttributes attributes, final long duration) { final AnimationProperties properties = new AnimationProperties(); attributes.consume((attr, value) -> { switch (attr) { case FILL_COLOR: properties.push(FILL_COLOR((String) value)); break; case FILL_ALPHA: properties.push(FILL_ALPHA((double) value)); break; case STROKE_COLOR: properties.push(STROKE_COLOR((String) value)); break; case STROKE_ALPHA: properties.push(STROKE_ALPHA((double) value)); break; case STROKE_WIDTH: properties.push(STROKE_WIDTH((double) value)); break; } }); return shape.animate( AnimationTweener.LINEAR, properties, duration, new AnimationCallback() { @Override public void onClose(IAnimation animation, <START> IAnimationHandle handle) { <END> super.onClose(animation, handle); if (!animationHandle.isRunning()) { setAnimationHandle(null); completeCallback.execute(); } } }); }</code><technical_language>final IAnimation animation final IAnimationHandle handle</technical_language>

Target:
private IAnimationHandle animate(final com.ait.lienzo.client.core.shape.Shape<?> shape, final ShapeStateAttributes attributes, final long duration) { final AnimationProperties properties = new AnimationProperties(); attributes.consume((attr, value) -> { switch (attr) { case FILL_COLOR: properties.push(FILL_COLOR((String) value)); break; case FILL_ALPHA: properties.push(FILL_ALPHA((double) value)); break; case STROKE_COLOR: properties.push(STROKE_COLOR((String) value)); break; case STROKE_ALPHA: properties.push(STROKE_ALPHA((double) value)); break; case STROKE_WIDTH: properties.push(STROKE_WIDTH((double) value)); break; } }); return shape.animate( AnimationTweener.LINEAR, properties, duration, new AnimationCallback() { @Override public void onClose(final IAnimation animation, final IAnimationHandle handle) { super.onClose(animation, handle); if (!animationHandle.isRunning()) { setAnimationHandle(null); completeCallback.execute(); } } }); }
Source:
<code><START> private void analyzeClass(final byte[] source) { <END> final long classId = CRC64.classId(source); final int version = BytecodeVersion.read(source); final byte[] b = BytecodeVersion.downgradeIfNeeded(version, source); final ClassReader reader = new ClassReader(b); final ClassVisitor visitor = createAnalyzingVisitor(classId, reader.getClassName()); reader.accept(visitor, 0); }</code><technical_language>Move this private method public analyze* methods</technical_language>

Target:
private void analyzeClass(final byte[] source) { final long classId = CRC64.classId(source); final int version = BytecodeVersion.get(source); final byte[] b = BytecodeVersion.downgradeIfNeeded(version, source); final ClassReader reader = new ClassReader(b); final ClassVisitor visitor = createAnalyzingVisitor(classId, reader.getClassName()); reader.accept(visitor, 0); }
Source:
<code>AsyncKijiTable( AsyncKiji kiji, String name, HBaseClient hbClient, TableLayoutMonitor layoutMonitor) throws IOException { mConstructorStack = (CLEANUP_LOG.isDebugEnabled()) ? Debug.getStackTrace() : ENABLE_CONSTRUCTOR_STACK_LOGGING_MESSAGE; mKiji = kiji; mKiji.retain(); mName = name; mHBClient = hbClient; mTableURI = KijiURI.newBuilder(mKiji.getURI()).withTableName(mName).build(); LOG.debug("Opening Kiji table '{}' with client version '{}'.", mTableURI, VersionInfo.getSoftwareVersion()); mHBaseTableName = KijiManagedHBaseTableName.getKijiTableName(mTableURI.getInstance(), mName).toString(); <START> Deferred<Object> ensureTableExists = mHBClient.ensureTableExists(mHBaseTableName); <END> try { ensureTableExists.joinUninterruptibly(); } catch (Exception e) { e.printStackTrace(); } if (!mKiji.getTableNames().contains(mName)) { closeResources(); throw new KijiTableNotFoundException(mTableURI); } mWriterFactory = new AsyncKijiWriterFactory(this); mReaderFactory = new AsyncKijiReaderFactory(this); mLayoutMonitor = layoutMonitor; mEntityIdFactory = createEntityIdFactory(mLayoutMonitor.getLayoutCapsule()); mRetainCount.set(1); DebugResourceTracker.get().registerResource(this, mConstructorStack); final State oldState = mState.getAndSet(State.OPEN); Preconditions.checkState(oldState == State.UNINITIALIZED, "Cannot open KijiTable instance in state %s.", oldState); }</code><technical_language>This a bit off, join() wrapAndRethrow pattern else</technical_language>

Target:
AsyncKijiTable( AsyncKiji kiji, String name, HBaseClient hbClient, TableLayoutMonitor layoutMonitor) throws IOException { mConstructorStack = (CLEANUP_LOG.isDebugEnabled()) ? Debug.getStackTrace() : ENABLE_CONSTRUCTOR_STACK_LOGGING_MESSAGE; mKiji = kiji; mKiji.retain(); mName = name; mHBClient = hbClient; mTableURI = KijiURI.newBuilder(mKiji.getURI()).withTableName(mName).build(); LOG.debug("Opening Kiji table '{}' with client version '{}'.", mTableURI, VersionInfo.getSoftwareVersion()); mHBaseTableName = KijiManagedHBaseTableName.getKijiTableName(mTableURI.getInstance(), mName).toString(); try { mHBClient.ensureTableExists(mHBaseTableName).join(); } catch (Exception e) { ZooKeeperUtils.wrapAndRethrow(e); } if (!mKiji.getTableNames().contains(mName)) { closeResources(); throw new KijiTableNotFoundException(mTableURI); } mWriterFactory = new AsyncKijiWriterFactory(this); mReaderFactory = new AsyncKijiReaderFactory(this); mLayoutMonitor = layoutMonitor; mEntityIdFactory = createEntityIdFactory(mLayoutMonitor.getLayoutCapsule()); mRetainCount.set(1); DebugResourceTracker.get().registerResource(this, mConstructorStack); final State oldState = mState.getAndSet(State.OPEN); Preconditions.checkState(oldState == State.UNINITIALIZED, "Cannot open KijiTable instance in state %s.", oldState); }
Source:
<code>public static String formatIso8601ForCCTray(Date date) { if (date == null) { return null; } <START> return formatter.withZoneUTC().print(date.getTime()); <END> }</code><technical_language>a reasonable change. extract formatter.withZoneUTC() another constant avoid additional overhead time</technical_language>

Target:
public static String formatIso8601ForCCTray(Date date) { if (date == null) { return null; } return formatterUtc.print(date.getTime()); }
Source:
<code>public String toString() { <START> return format("buckets=%s, hiveTypes=%s, types=%s, bucketingType=%s", bucketCount, hiveTypes, types, bucketingType); <END> }</code><technical_language>This is is printed in plan. In a current form a hard read. merge hiveTypes types print one? e.g.: format("bucketFunctionType=%s, buckets=%s, types=%s", bucketingType, bucketCount, hiveTypes types);</technical_language>

Target:
public String toString() { return format( "buckets=%s, bucketFunctionType=%s, types=%s", bucketCount, bucketFunctionType, bucketFunctionType.equals(HIVE_COMPATIBLE) ? hiveTypes.get() : types.get()); }
Source:
<code>public void begin() { ComponentSystemManager manager = context.get(ComponentSystemManager.class); final List<ComponentSystem> componentSystemList = manager.iterateAll(); componentSystems = componentSystemList.iterator(); <START> setTotalSteps(componentSystemList.size()); <END> }</code><technical_language>Ah, this is changed Iterable List? size information</technical_language>

Target:
public void begin() { ComponentSystemManager manager = context.get(ComponentSystemManager.class); final List<ComponentSystem> componentSystemList = manager.getAllSystems(); componentSystems = componentSystemList.iterator(); setTotalSteps(componentSystemList.size()); }
Source:
<code>public Operation exec(Prolog engine) throws PrologException { <START> engine.setB0(); <END> PatchSetInfo psInfo = StoredValues.PATCH_SET_INFO.get(engine); UserIdentity author = psInfo.getAuthor(); return exec(engine, author); }</code><technical_language>setB0() twice, in super.exec(). set predicate</technical_language>

Target:
public Operation exec(Prolog engine) throws PrologException { PatchSetInfo psInfo; try { psInfo = getPatchSetInfo(engine); } catch (PatchSetInfoNotAvailableException err) { throw new JavaException(this, 1, err); } UserIdentity author = psInfo.getAuthor(); return exec(engine, author); }
Source:
<code><START> protected int poll(Duration timeout) throws InterruptedException { <END> records.clear(); try { for (ConsumerRecord<String, Bytes> record : consumer.poll(timeout.toMillis())) { if (log.isDebugEnabled() && records.isEmpty()) { log.debug("Poll first record: " + getNameForTopic(record.topic()) + ":" + record.partition() + ":+" + record.offset()); } records.add(record); } } catch (org.apache.kafka.common.errors.InterruptException e) { Thread.currentThread().interrupt(); throw new InterruptedException(e.getMessage()); } catch (WakeupException e) { log.debug("Receiving wakeup from another thread to close the tailer"); try { close(); } catch (Exception e1) { log.warn("Error while closing the tailer " + this); } throw new IllegalStateException("poll interrupted because tailer has been closed"); } if (log.isDebugEnabled()) { String msg = "Polling " + id + " returns " + records.size() + " records"; if (records.size() > 0) { log.debug(msg); } else { log.trace(msg); } } return records.size(); }</code><technical_language>replace this commons-lang3 SerializationUtils.deserialize</technical_language>

Target:
protected int poll(Duration timeout) throws InterruptedException { records.clear(); try { for (ConsumerRecord<String, Bytes> record : consumer.poll(timeout.toMillis())) { if (log.isDebugEnabled() && records.isEmpty()) { log.debug("Poll first record: " + getNameForTopic(record.topic()) + ":" + record.partition() + ":+" + record.offset()); } records.add(record); } } catch (org.apache.kafka.common.errors.InterruptException e) { throw new InterruptedException(e.getMessage()); } catch (WakeupException e) { log.debug("Receiving wakeup from another thread to close the tailer"); close(); throw new IllegalStateException("poll interrupted because tailer has been closed"); } if (log.isDebugEnabled()) { String msg = "Polling " + id + " returns " + records.size() + " records"; if (records.size() > 0) { log.debug(msg); } else { log.trace(msg); } } return records.size(); }
Source:
<code>public CompletableFuture<Boolean> remove(K key, V value) { <START> return readWriteMap.eval(key, new RemoveFunction<>(key, value)); <END> }</code><technical_language>emptyCollectionWhenNull need serializable... thenApply instead of handle return Collections.emptySet()</technical_language>

Target:
public CompletableFuture<Boolean> remove(K key, V value) { requireNonNull(key, "key can't be null"); requireNonNull(value, "value can't be null"); return readWriteMap.eval(key, new RemoveFunction<>(value)); }
Source:
<code>public String getIpAddress() { <START> String publicIpv4Addr = amazonInfoHolder.get().get(MetaDataKey.publicIpv4); <END> return this.shouldBroadcastPublicIpv4Addr() ? getPublicIpv4Addr() : getPrivateIpv4Addr(); }</code><technical_language>Dead code</technical_language>

Target:
public String getIpAddress() { return this.shouldBroadcastPublicIpv4Addr() ? getPublicIpv4Addr() : getPrivateIpv4Addr(); }
Source:
<code>public JsonMessageParser(SecorConfig config) { super(config); <START> fieldName = config.getMessageTimestampName(); <END> }</code><technical_language>is a Secor coding convention extract config values in constructor call config.getX() appropriate. a small performance penalty of this approach I prefer due reduction of number of object variables</technical_language>

Target:
public JsonMessageParser(SecorConfig config) { super(config); }
Source:
<code>private boolean <START> connectAudio(String address) { <END> BluetoothHeadsetProxy bluetoothHeadset = mDeviceManager.getHeadsetService(); if (bluetoothHeadset == null) { Log.w(this, "Trying to connect audio but no headset service exists."); return false; } BluetoothDevice device = mDeviceManager.getDeviceFromAddress(address); if (device == null) { Log.w(this, "Attempting to turn on audio for a disconnected device"); return false; } boolean success = bluetoothHeadset.setActiveDevice(device); if (!success) { Log.w(LOG_TAG, "Couldn't set active device to %s", address); return false; } if (!bluetoothHeadset.isAudioOn()) { return bluetoothHeadset.connectAudio(); } return true; }</code><technical_language>string instead of BluetoothDevice</technical_language>

Target:
private boolean connectAudio(String address) { BluetoothHeadsetProxy bluetoothHeadset = mDeviceManager.getHeadsetService(); if (bluetoothHeadset == null) { Log.w(this, "Trying to connect audio but no headset service exists."); return false; } BluetoothDevice device = mDeviceManager.getDeviceFromAddress(address); if (device == null) { Log.w(this, "Attempting to turn on audio for a disconnected device"); return false; } if (!bluetoothHeadset.setActiveDevice(device)) { Log.w(LOG_TAG, "Couldn't set active device to %s", address); return false; } if (!bluetoothHeadset.isAudioOn()) { return bluetoothHeadset.connectAudio(); } return true; }
Source:
<code>public void testObtainCertificateWithUnsupportedPublicKey() throws Exception { addKeyStore(ACCOUNTS_KEYSTORE, ACCOUNTS_KEYSTORE_NAME, ACCOUNTS_KEYSTORE_PASSWORD); <START> addCertificateAuthorityAccount("account7v2", "mailto:admin@anexample.com"); <END> addKeyStore(); server = setupTestObtainCertificateWithUnsupportedPublicKey(); try { ModelNode operation = new ModelNode(); operation.get(ClientConstants.OP_ADDR).add("subsystem", "elytron").add("key-store", KEYSTORE_NAME); operation.get(ClientConstants.OP).set(ElytronDescriptionConstants.OBTAIN_CERTIFICATE); operation.get(ElytronDescriptionConstants.ALIAS).set("server"); operation.get(ElytronDescriptionConstants.DOMAIN_NAMES).add("iraclzlcqgaymrc.com"); operation.get(ElytronDescriptionConstants.ALGORITHM).set("DSA"); operation.get(ElytronDescriptionConstants.KEY_SIZE).set(2048); operation.get(ElytronDescriptionConstants.AGREE_TO_TERMS_OF_SERVICE).set(true); operation.get(ElytronDescriptionConstants.CERTIFICATE_AUTHORITY_ACCOUNT).set(CERTIFICATE_AUTHORITY_ACCOUNT_NAME); assertFailed(services.executeOperation(operation)); } finally { removeCertificateAuthorityAccount(); removeKeyStore(ACCOUNTS_KEYSTORE_NAME); removeKeyStore(KEYSTORE_NAME); } }</code><technical_language>noticed contact url for "account7v2" is in previous test. Is a reason for this</technical_language>

Target:
public void testObtainCertificateWithUnsupportedPublicKey() throws Exception { addKeyStore(ACCOUNTS_KEYSTORE, ACCOUNTS_KEYSTORE_NAME, ACCOUNTS_KEYSTORE_PASSWORD); addCertificateAuthorityWithoutStagingUrl(); addCertificateAuthorityAccountWithCustomCA("account7v2", "mailto:admin@myexample.com"); addKeyStore(); server = setupTestObtainCertificateWithUnsupportedPublicKey(); try { ModelNode operation = new ModelNode(); operation.get(ClientConstants.OP_ADDR).add("subsystem", "elytron").add("key-store", KEYSTORE_NAME); operation.get(ClientConstants.OP).set(ElytronDescriptionConstants.OBTAIN_CERTIFICATE); operation.get(ElytronDescriptionConstants.ALIAS).set("server"); operation.get(ElytronDescriptionConstants.DOMAIN_NAMES).add("iraclzlcqgaymrc.com"); operation.get(ElytronDescriptionConstants.ALGORITHM).set("DSA"); operation.get(ElytronDescriptionConstants.KEY_SIZE).set(2048); operation.get(ElytronDescriptionConstants.AGREE_TO_TERMS_OF_SERVICE).set(true); operation.get(ElytronDescriptionConstants.CERTIFICATE_AUTHORITY_ACCOUNT).set(CERTIFICATE_AUTHORITY_ACCOUNT_NAME); ModelNode result = services.executeOperation(operation); assertFailed(result); String failureDescription = result.get(FAILURE_DESCRIPTION).asString(); assertTrue(failureDescription.contains("WFLYCTL0129")); } finally { removeCertificateAuthorityAccount(); removeCertificateAuthority(); removeKeyStore(ACCOUNTS_KEYSTORE_NAME); removeKeyStore(KEYSTORE_NAME); } }
Source:
<code>public String getGID(URL url) throws MalformedURLException { Pattern p = Pattern.compile("^https?://buttsmithy.com/archives/comic/([a-zA-Z0-9-]*)/?$"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(1); } <START> throw new MalformedURLException("Expected imgur.com URL format: " + <END> "https?://buttsmithy.com/archives/comic/ - got " + url + " instead"); }</code><technical_language>Replace imgur.com buttsmithy.com</technical_language>

Target:
public String getGID(URL url) throws MalformedURLException { Pattern p = Pattern.compile("^https?://buttsmithy.com/archives/comic/([a-zA-Z0-9-]*)/?$"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(1); } throw new MalformedURLException("Expected buttsmithy.com URL format: " + "buttsmithy.com/archives/comic/ - got " + url + " instead"); }
Source:
<code>private void testCancelAddingNewQuestion() { ______TS("Cancelling the adding of a new question"); feedbackEditPage.clickNewQuestionButton(); feedbackEditPage.selectNewQuestionType("MCQ"); ______TS("Click cancel but click no to confirmation prompt"); feedbackEditPage.getDiscardChangesLink(-1).click(); feedbackEditPage.waitForConfirmationModalAndClickCancel(); assertTrue(feedbackEditPage.verifyNewMcqQuestionFormIsDisplayed()); ______TS("Click cancel and click yes to confirmation prompt"); feedbackEditPage.getDiscardChangesLink(-1).click(); feedbackEditPage.waitForConfirmationModalAndClickOk(); assertFalse(feedbackEditPage.verifyNewMcqQuestionFormIsDisplayed()); ______TS("Make sure controls disabled by Team Contribution questions are re-enabled after cancelling"); feedbackEditPage.clickNewQuestionButton(); feedbackEditPage.selectNewQuestionType("CONTRIB"); feedbackEditPage.getDiscardChangesLink(-1).click(); feedbackEditPage.waitForConfirmationModalAndClickOk(); feedbackEditPage.clickNewQuestionButton(); feedbackEditPage.selectNewQuestionType("NUMSCALE"); <START> assertTrue(feedbackEditPage.isAllFeedbackPathOptionsEnabledForNewQuestion()); <END> feedbackEditPage.getDiscardChangesLink(-1).click(); feedbackEditPage.waitForConfirmationModalAndClickOk(); }</code><technical_language>Similar FeedbackMcqQuestionUiTest.java above, this method is</technical_language>

Target:
private void testCancelAddingNewQuestion() { ______TS("Cancelling the adding of a new question"); feedbackEditPage.clickNewQuestionButton(); feedbackEditPage.selectNewQuestionType("MCQ"); ______TS("Click cancel but click no to confirmation prompt"); feedbackEditPage.clickDiscardChangesLink(-1); feedbackEditPage.waitForConfirmationModalAndClickCancel(); assertTrue(feedbackEditPage.verifyNewMcqQuestionFormIsDisplayed()); ______TS("Click cancel and click yes to confirmation prompt"); feedbackEditPage.clickDiscardChangesLink(-1); feedbackEditPage.waitForConfirmationModalAndClickOk(); assertFalse(feedbackEditPage.verifyNewMcqQuestionFormIsDisplayed()); ______TS("Make sure controls disabled by Team Contribution questions are re-enabled after cancelling"); feedbackEditPage.clickNewQuestionButton(); feedbackEditPage.selectNewQuestionType("CONTRIB"); feedbackEditPage.clickDiscardChangesLink(-1); feedbackEditPage.waitForConfirmationModalAndClickOk(); feedbackEditPage.clickNewQuestionButton(); feedbackEditPage.selectNewQuestionType("NUMSCALE"); assertTrue(feedbackEditPage.isAllFeedbackPathOptionsEnabledForNewQuestion()); feedbackEditPage.clickDiscardChangesLink(-1); feedbackEditPage.waitForConfirmationModalAndClickOk(); }
Source:
<code>public HTableDescriptor[] listTables(Pattern pattern) throws IOException { if (pattern == null) { return getTableDescriptorsIgnoreFailure(listTableNames()); } <START> return getTableDescriptors(listTableNames(pattern)); <END> }</code><technical_language>this suppress errors race condition</technical_language>

Target:
public HTableDescriptor[] listTables(Pattern pattern) throws IOException { return getTableDescriptorsIgnoreFailure(listTableNames(pattern)); }
Source:
<code>public void testDecode() throws Exception { OwnTracksProtocolDecoder decoder = new OwnTracksProtocolDecoder(new OwnTracksProtocol()); verifyPosition(decoder, request(HttpMethod.POST, "/", buffer("{\"lon\":2.29513,\"lat\":48.85833,\"tst\":1497349316,\"_type\":\"location\",\"tid\":\"JJ\"}"))); verifyPosition(decoder, request(HttpMethod.POST, "/", buffer("{\"cog\":271,\"lon\":2.29513,\"acc\":5,\"vel\":61,\"vac\":21,\"lat\":48.85833,\"tst\":1497349316,\"alt\":167,\"_type\":\"location\",\"tid\":\"JJ\",\"t\":\"u\",\"batt\":67}"))); verifyPosition(decoder, request(HttpMethod.POST, "/", <START> buffer(text("{\"lat\":48.85,\"lon\":2.295,\"_type\":\"location\",\"tid\":\"JJ\"}")))); <END> }</code><technical_language>Please remove text here</technical_language>

Target:
public void testDecode() throws Exception { OwnTracksProtocolDecoder decoder = new OwnTracksProtocolDecoder(new OwnTracksProtocol()); verifyPosition(decoder, request(HttpMethod.POST, "/", buffer("{\"lon\":2.29513,\"lat\":48.85833,\"tst\":1497349316,\"_type\":\"location\",\"tid\":\"JJ\"}"))); verifyPosition(decoder, request(HttpMethod.POST, "/", buffer("{\"cog\":271,\"lon\":2.29513,\"acc\":5,\"vel\":61,\"vac\":21,\"lat\":48.85833,\"tst\":1497349316,\"alt\":167,\"_type\":\"location\",\"tid\":\"JJ\",\"t\":\"u\",\"batt\":67}"))); verifyPosition(decoder, request(HttpMethod.POST, "/", buffer("{\"lat\":48.85,\"lon\":2.295,\"_type\":\"location\",\"tid\":\"JJ\",\"tst\":1497476456}"))); }
Source:
<code>public List<Element> getSettingsSection( String xpath ) { if ( hasSettingsXML() ) { try { List<Node> nodes = XmlDom4JUtils.getDocumentFromFile( pluginDirAccess, SETTINGS_XML_FILENAME ).selectNodes( "/settings" + xpath ); List<Element> elements = new ArrayList<>( nodes.size() ); for ( Node node : nodes ) { if ( node.getNodeType() == Node.ELEMENT_NODE ) { <START> elements.add( (DefaultElement) node ); <END> } } return elements; } catch ( IOException e ) { logger.error( e ); } } return Collections.<Element>emptyList(); }</code><technical_language>DefaultElement instead of Element</technical_language>

Target:
public List<Element> getSettingsSection( String xpath ) { if ( hasSettingsXML() ) { try { Node documentNode = XmlDom4JUtils.getDocumentFromFile( pluginDirAccess, SETTINGS_XML_FILENAME ); return (List<Element>) (List<?>) documentNode.selectNodes( "/settings" + xpath ); } catch ( IOException e ) { logger.error( e ); } } return Collections.<Element>emptyList(); }
Source:
<code>private List<Parameter> getParameters(Class<?> cls, Method method, Route route) { List<Parameter> parameters = new ArrayList<>(); if (!route.call().parameters().isDefined()) { return parameters; } scala.collection.Iterator<play.routes.compiler.Parameter> iter = route.call().parameters().get().iterator(); int fieldPosition = 0; while (iter.hasNext()) { play.routes.compiler.Parameter p = iter.next(); if (!p.fixed().isEmpty()) continue; Parameter parameter; String def = CrossUtil.getParameterDefaultField(p); if (def.startsWith("\"") && def.endsWith("\"")){ def = def.substring(1,def.length()-1); } Type type = getParamType(cls, method, p.typeName()); Property schema = createProperty(type); if (route.path().has(p.name())) { parameter = new PathParameter(); if (def != null) ((PathParameter)parameter).setDefaultValue(def); if (schema != null) ((PathParameter)parameter).setProperty(schema); } else { parameter = new QueryParameter(); if (def != null) ((QueryParameter)parameter).setDefaultValue(def); if (schema != null) ((QueryParameter)parameter).setProperty(schema); } parameter.setName(p.name()); <START> List<Annotation> annotations = getParamAnnotations(cls, method, p.typeName(), fieldPosition++); <END> ParameterProcessor.applyAnnotations(getSwagger(), parameter, type, annotations); parameters.add(parameter); } return parameters; }</code><technical_language>I slightly clearer increment fieldPosition in a separate operation, incrementing do this line is post-increment</technical_language>

Target:
private List<Parameter> getParameters(Class<?> cls, Method method, Route route) { List<Parameter> parameters = new ArrayList<>(); if (!route.call().parameters().isDefined()) { return parameters; } scala.collection.Iterator<play.routes.compiler.Parameter> iter = route.call().parameters().get().iterator(); int fieldPosition = 0; while (iter.hasNext()) { play.routes.compiler.Parameter p = iter.next(); if (!p.fixed().isEmpty()) continue; Parameter parameter; String def = CrossUtil.getParameterDefaultField(p); if (def.startsWith("\"") && def.endsWith("\"")){ def = def.substring(1,def.length()-1); } Type type = getParamType(cls, method, p.typeName()); Property schema = createProperty(type); if (route.path().has(p.name())) { parameter = new PathParameter(); ((PathParameter)parameter).setDefaultValue(def); if (schema != null) ((PathParameter)parameter).setProperty(schema); } else { parameter = new QueryParameter(); ((QueryParameter)parameter).setDefaultValue(def); if (schema != null) ((QueryParameter)parameter).setProperty(schema); } parameter.setName(p.name()); List<Annotation> annotations = getParamAnnotations(cls, method, p.typeName(), fieldPosition); ParameterProcessor.applyAnnotations(getSwagger(), parameter, type, annotations); parameters.add(parameter); fieldPosition++; } return parameters; }
Source:
<code>public void visitFunctionType(VisitableXmlElement<FunctionType> visitable) { JAXBElement<FunctionType> element = visitable.getElement(); LOGGER.debug(element.getName().getLocalPart()); FunctionType functionType = element.getValue(); String functionName = functionType.getName(); if (FORMS_FUNCTION_V1.equals(functionName)) { List<Optional<Serializable>> args = functionType .getExpression() .stream() .map(JAXBElement::getValue) .map(LiteralType.class::cast) .flatMap( t -> (t.getContent() == null || t.getContent().isEmpty()) ? Stream.of(Optional.<Serializable>empty()) : t.getContent().stream().map(Optional::of)) .collect(Collectors.toList()); <START> args.forEach(o -> LOGGER.debug(o.toString())); <END> Function<Serializable, Boolean> boolFunc = s -> Boolean.parseBoolean((String) s); builder.setTemplatedValues( get(args, 0, String.class), get(args, 1, String.class), get(args, 2, boolFunc), get(args, 3, boolFunc)); } else { throw new FilterProcessingException("Could not find a valid function name"); } }</code><technical_language>o? a more meaningful variable name</technical_language>

Target:
public void visitFunctionType(VisitableXmlElement<FunctionType> visitable) { JAXBElement<FunctionType> element = visitable.getElement(); traceLocalPart(element.getName().getLocalPart()); FunctionType functionType = element.getValue(); String functionName = functionType.getName(); if (TEMPLATE_SUBSTITUTIONS_V1.equals(functionName)) { List<Optional<Serializable>> args = functionType .getExpression() .stream() .map(JAXBElement::getValue) .map(LiteralType.class::cast) .flatMap( literalType -> (literalType.getContent() == null || literalType.getContent().isEmpty()) ? Stream.of(Optional.<Serializable>empty()) : literalType.getContent().stream().map(Optional::of)) .collect(Collectors.toList()); if (LOGGER.isTraceEnabled()) { args.stream().map(optional -> optional.orElse(null)).forEach(this::traceValue); } builder.setTemplatedValues( get(args, DEFAULT_VALUE_INDEX, String.class), get(args, NODE_ID_INDEX, String.class), get(args, IS_VISIBLE_INDEX, BOOL_FUNC), get(args, IS_READONLY_INDEX, BOOL_FUNC)); } else { throw new FilterProcessingException("Unrecognized function: " + functionName); } }
Source:
<code>public void testUriWithSessionProperties() throws SQLException { String sessionProperties = "sessionProp1:sessionValue1;sessionProp2:sessionValue2"; PrestoDriverUri parameters = createDriverUri("presto://localhost:8080?extraCredentials=" + sessionProperties); Properties properties = parameters.getProperties(); <START> assertEquals(properties.getProperty(EXTRA_CREDENTIALS.getKey()), sessionProperties); <END> }</code><technical_language>SESSION_PROPERTIES.getKey rename test tests extra credentials. another test for SESSION_PROPERTIES if behavior changes for SESSION_PROPERTIES, test breaks need fixed</technical_language>

Target:
public void testUriWithSessionProperties() throws SQLException { String sessionProperties = "sessionProp1:sessionValue1;sessionProp2:sessionValue2"; PrestoDriverUri parameters = createDriverUri("presto://localhost:8080?sessionProperties=" + sessionProperties); Properties properties = parameters.getProperties(); assertEquals(properties.getProperty(SESSION_PROPERTIES.getKey()), sessionProperties); }
Source:
<code>public void execute() { String inviterId = getRequestParamValue(ParamsNames.INVITER_ID); Assumption.assertPostParamNotNull(ParamsNames.INVITER_ID, inviterId); String courseId = getRequestParamValue(ParamsNames.COURSE_ID); Assumption.assertPostParamNotNull(ParamsNames.COURSE_ID, courseId); String instructorEmail = getRequestParamValue(ParamsNames.INSTRUCTOR_EMAIL); Assumption.assertPostParamNotNull(ParamsNames.INSTRUCTOR_EMAIL, instructorEmail); AccountAttributes inviter = logic.getAccount(inviterId); Assumption.assertNotNull(inviter); CourseAttributes course = logic.getCourse(courseId); Assumption.assertNotNull(course); <START> RetryManager rm = new RetryManager(5); <END> InstructorAttributes instructor = null; try { instructor = rm.runUntilNotNull(new RetryableTaskReturns<InstructorAttributes>("getInstructor") { @Override public InstructorAttributes run() { return logic.getInstructorById(courseId, instructorEmail); } }); } catch (MaximumRetriesExceededException e) { Assumption.fail("If the instructor hasn't been retrieved yet there is some problem in adding of instructor" + TeammatesException.toStringWithStackTrace(e)); } Assumption.assertNotNull(instructor); EmailWrapper email = new EmailGenerator() .generateInstructorCourseJoinEmail(inviter, instructor, course); try { emailSender.sendEmail(email); } catch (Exception e) { Assumption.fail("Unexpected error while sending email" + TeammatesException.toStringWithStackTrace(e)); } }</code><technical_language>fail, wait for 1s, fail, wait for 2s, fail, wait for 4s, fail (no retry 8s > 5s). I enough set maxDelayInSto 4s (multiple of 2)</technical_language>

Target:
public void execute() { String inviterId = getRequestParamValue(ParamsNames.INVITER_ID); Assumption.assertPostParamNotNull(ParamsNames.INVITER_ID, inviterId); String courseId = getRequestParamValue(ParamsNames.COURSE_ID); Assumption.assertPostParamNotNull(ParamsNames.COURSE_ID, courseId); String instructorEmail = getRequestParamValue(ParamsNames.INSTRUCTOR_EMAIL); Assumption.assertPostParamNotNull(ParamsNames.INSTRUCTOR_EMAIL, instructorEmail); AccountAttributes inviter = logic.getAccount(inviterId); Assumption.assertNotNull(inviter); CourseAttributes course = logic.getCourse(courseId); Assumption.assertNotNull(course); RetryManager rm = new RetryManager(4); InstructorAttributes instructor = null; try { instructor = rm.runUntilNotNull(new RetryableTaskReturns<InstructorAttributes>("getInstructor") { @Override public InstructorAttributes run() { return logic.getInstructorById(courseId, instructorEmail); } }); } catch (MaximumRetriesExceededException e) { Assumption.fail("If the instructor hasn't been retrieved yet there is some problem in adding of instructor" + TeammatesException.toStringWithStackTrace(e)); } Assumption.assertNotNull(instructor); EmailWrapper email = new EmailGenerator() .generateInstructorCourseJoinEmail(inviter, instructor, course); try { emailSender.sendEmail(email); } catch (Exception e) { Assumption.fail("Unexpected error while sending email" + TeammatesException.toStringWithStackTrace(e)); } }
Source:
<code>protected void verifyMetadataSourceAssigned(Model model, Resource primaryResource, File depositDirectory, String sourceType, String fileSuffix) { Property stagingLoc = CdrDeposit.stagingLocation; Property hasSourceMetadata = Cdr.hasSourceMetadataProfile; <START> Property sourceMD = RDF.type; <END> Property hasDS = CdrDeposit.hasDatastream; assertEquals("Did not have metadata source type", sourceType, primaryResource.getProperty(hasSourceMetadata) .getLiteral().getString()); Resource sourceMDResource = primaryResource.getProperty(sourceMD).getResource(); assertNotNull("Source metdata was not assigned to main resource", sourceMDResource); File sourceMDFile = verifyStagingLocationExists(sourceMDResource, stagingLoc, depositDirectory, "Original metadata"); assertTrue("Original metadata file did not have the correct suffix, most likely the wrong file", sourceMDFile .getName().endsWith(fileSuffix)); String sourceMDDatastream = primaryResource.getProperty(hasDS).getResource().getURI(); assertEquals("Source datastream path did not match the sourceMetadata", sourceMDResource.getURI(), sourceMDDatastream); }</code><technical_language>line 109 is tested is object RDF.type, specific type want, Cdr.SourceMetadata. Also, i a bit confusing assigning RDF.type a variable named sourceMD, I remove sourceMD RDF.type</technical_language>

Target:
protected void verifyMetadataSourceAssigned(Model model, Resource primaryResource, File depositDirectory, String sourceType, String fileSuffix) { Property stagingLoc = CdrDeposit.stagingLocation; Property hasMetadataProfile = Cdr.hasSourceMetadataProfile; Property hasDS = CdrDeposit.hasDatastream; Property hasSourceMD = CdrDeposit.hasSourceMetadata; assertEquals("Did not have metadata source type", sourceType, primaryResource.getProperty(hasMetadataProfile) .getLiteral().getString()); Resource sourceMDResource = primaryResource.getProperty(hasSourceMD).getResource(); assertNotNull("Source metdata was not assigned to main resource", sourceMDResource); File sourceMDFile = verifyStagingLocationExists(sourceMDResource, stagingLoc, depositDirectory, "Original metadata"); assertTrue("Original metadata file did not have the correct suffix, most likely the wrong file", sourceMDFile .getName().endsWith(fileSuffix)); String sourceMDDatastream = primaryResource.getProperty(hasDS).getResource().getURI(); assertEquals("Source datastream path did not match the sourceMetadata", sourceMDResource.getURI(), sourceMDDatastream); }
Source:
<code>public void killTask(ExecutorDriver driver, TaskID taskId) { LOGGER.info("Killing task : " + taskId.getValue()); if (task.process != null) { LOGGER.info("Found task to kill: " + taskId.getValue()); int pid = task.pid(); if (pid == -1) { <START> LOGGER.debug("Graceful shutdown failed. Could not read crate.pid."); <END> task.process.destroy(); task.process = null; return; } boolean success = task.gracefulStop(); if (success) { driver.sendStatusUpdate(TaskStatus.newBuilder() .setTaskId(taskId) .setState(TaskState.TASK_KILLED) .build()); driver.stop(); } else { driver.sendStatusUpdate(TaskStatus.newBuilder() .setTaskId(taskId) .setState(TaskState.TASK_RUNNING) .build()); } } else { LOGGER.debug("No running task found :("); } }</code><technical_language>log exception level</technical_language>

Target:
public void killTask(ExecutorDriver driver, TaskID taskId) { LOGGER.info("Killing task : " + taskId.getValue()); if (task.process != null) { LOGGER.debug("Found task to kill: " + taskId.getValue()); int pid = task.pid(); if (pid == -1) { LOGGER.error("Graceful shutdown failed. Could not read crate.pid."); task.process.destroy(); task.process = null; return; } boolean success = task.gracefulStop(); if (success) { driver.sendStatusUpdate(TaskStatus.newBuilder() .setTaskId(taskId) .setState(TaskState.TASK_KILLED) .build()); driver.stop(); } else { driver.sendStatusUpdate(TaskStatus.newBuilder() .setTaskId(taskId) .setState(TaskState.TASK_RUNNING) .build()); } } else { LOGGER.error("No running task found."); } }
Source:
<code><START> public GenericRecord getGenericRecord(Object tuple) throws Exception <END> { GenericRecord rec = new GenericData.Record(getSchema()); for (int i = 0; i < columnNames.size(); i++) { try { rec.put(columnNames.get(i).name(), AvroRecordHelper.convertValueStringToAvroKeyType(getSchema(), columnNames.get(i).name(), keyMethodMap.get(i).get(tuple).toString())); } catch (AvroRuntimeException e) { LOG.error("Could not set Field [" + columnNames.get(i).name() + "] in the generic record"); fieldErrorCnt++; } catch (Exception e) { LOG.error("Parse Exception"); fieldErrorCnt++; } } return rec; }</code><technical_language>public</technical_language>

Target:
private GenericRecord getGenericRecord(Object tuple) throws Exception { int writeErrorCount = 0; GenericRecord rec = new GenericData.Record(getSchema()); for (int i = 0; i < columnNames.size(); i++) { try { rec.put(columnNames.get(i).name(), AvroRecordHelper.convertValueStringToAvroKeyType(getSchema(), columnNames.get(i).name(), keyMethodMap.get(i).get(tuple).toString())); } catch (AvroRuntimeException e) { LOG.error("Could not set Field [" + columnNames.get(i).name() + "] in the generic record", e); fieldErrorCount++; } catch (Exception e) { LOG.error("Parse Exception", e); fieldErrorCount++; writeErrorCount++; } } if (columnNames.size() == writeErrorCount) { errorCount++; return null; } else { return rec; } }
Source:
<code>public void connect(MessageContext messageContext) { Object ejbObj; String methodName = (String) getParameter(messageContext, EJBConstants.METHOD_NAME); String returnName = (String) getParameter(messageContext, EJBConstants.RETURN); if (getParameter(messageContext, EJBConstants.RETURN) == null) { returnName = EJBConstants.RESPONSE; } <START> if (messageContext.getProperty(messageContext.getMessageID()) == null) { <END> ejbObj = EJBUtil.getEJBObject(messageContext, EJBConstants.JNDI_NAME); messageContext.setProperty(messageContext.getMessageID(), ejbObj); } else { ejbObj = messageContext.getProperty(messageContext.getMessageID()); } Object[] args = EJBUtil.buildArguments(messageContext, EJBConstants.STATEFUL); Method method = EJBUtil.resolveMethod(ejbObj.getClass(), methodName, args.length); Object obj = EJBUtil.invokeInstanceMethod(ejbObj, method, args); if (!method.getReturnType().toString().equals(EJBConstants.VOID)) { messageContext.setProperty(returnName, obj); } else { messageContext.setProperty(EJBConstants.RESPONSE, EJBConstants.SUCCESS); } }</code><technical_language>discussed this code reviews changed. Please a fixed name store ejbobject in messagecontext</technical_language>

Target:
public void connect(MessageContext messageContext) { Object ejbObj; String methodName = (String) getParameter(messageContext, EJBConstants.METHOD_NAME); String returnName = (String) getParameter(messageContext, EJBConstants.RETURN); if (getParameter(messageContext, EJBConstants.RETURN) == null) { returnName = EJBConstants.RESPONSE; } if (messageContext.getProperty(EJBConstants.EJB_OBJECT) == null) { ejbObj = EJBUtil.getEJBObject(messageContext, EJBConstants.JNDI_NAME); messageContext.setProperty(EJBConstants.EJB_OBJECT, ejbObj); } else { ejbObj = messageContext.getProperty(EJBConstants.EJB_OBJECT); } Object[] args = EJBUtil.buildArguments(messageContext, EJBConstants.STATEFUL); Method method = EJBUtil.resolveMethod(ejbObj.getClass(), methodName, args.length); Object obj = EJBUtil.invokeInstanceMethod(ejbObj, method, args); if (!method.getReturnType().toString().equals(EJBConstants.VOID)) { messageContext.setProperty(returnName, obj); } else { messageContext.setProperty(EJBConstants.RESPONSE, EJBConstants.SUCCESS); } }
Source:
<code>public ColdMergeVDSCommandParameters(Guid storageJobId, SubchainInfo subchainInfo) { <START> super(); <END> this.storageJobId = storageJobId; this.subchainInfo = subchainInfo; }</code><technical_language>needed</technical_language>

Target:
public ColdMergeVDSCommandParameters(Guid storageJobId, SubchainInfo subchainInfo) { this.storageJobId = storageJobId; this.subchainInfo = subchainInfo; }
Source:
<code>private void assertGeneratingDifferentNumbers(RandomFactory factory1, RandomFactory factory2) { Random random = factory1.createRandom(); Random random2 = factory2.createRandom(); for (int i = 0; i < EnvironmentModeTest.NUMBER_OF_RANDOM_NUMBERS_GENERATED; i++) { <START> Assertions.assertThat(random.nextInt()).as("Random factories should not generate exactly the same results " <END> + "in the non-reproducible environment mode. " + "It can happen but the probability is very low. Run test again") .isNotEqualTo(random2.nextInt()); } }</code><technical_language>Check SoftAssertions pattern. able get entire loop covered assertion</technical_language>

Target:
private void assertGeneratingDifferentNumbers(RandomFactory factory1, RandomFactory factory2) { Random random = factory1.createRandom(); Random random2 = factory2.createRandom(); SoftAssertions.assertSoftly(softly -> IntStream.range(0, NUMBER_OF_RANDOM_NUMBERS_GENERATED) .forEach(i -> softly.assertThat(random.nextInt()) .as("Random factories should not generate exactly the same results " + "in the non-reproducible environment mode. " + "It can happen but the probability is very low. Run test again") .isNotEqualTo(random2.nextInt()))); }
Source:
<code>public int compareTo(CorfuRecordId o) { if ((this.sequence != Address.NON_ADDRESS && o.sequence == Address.NON_ADDRESS) || (this.sequence == Address.NON_ADDRESS && o.sequence != Address.NON_ADDRESS)) { <START> throw new IllegalStateException("CorfuQueue cannot mix transactional and non-transactional types"); <END> } return Comparator.comparing(CorfuRecordId::getEpoch) .thenComparing(CorfuRecordId::getSequence) .thenComparing(CorfuRecordId::getEntryId) .compare(this, o); }</code><technical_language>0, 0 for non-transactional entries (the else branch in enqueue)</technical_language>

Target:
public int compareTo(CorfuRecordId o) { return Comparator.comparing(CorfuRecordId::getEpoch) .thenComparing(CorfuRecordId::getSequence) .thenComparing(CorfuRecordId::getEntryId) .compare(this, o); }
Source:
<code>public ResponseEntity enableRLS( HttpServletRequest request, @PathVariable(value = TYPE_ID) String typeId) throws URISyntaxException { permissionService.addType(typeId); <START> return ResponseEntity.created(new URI(request.getRequestURI())).build(); <END> }</code><technical_language>ServletUriComponentsBuilder get 'user' request URI instead of a request URI a proxy servlet container (see other code in code base)</technical_language>

Target:
public ResponseEntity enableRLS( HttpServletRequest request, @PathVariable(value = TYPE_ID) String typeId) { permissionService.addType(typeId); return ResponseEntity.created(getUriFromRequest(request)).build(); }
Source:
<code>protected void importFile(String parserType, URL url) { Parser<E> parser = parsers.get(parserType); if (parser != null) { InputStream is = null; InputStreamReader inputStreamReader = null; try { is = url.openStream(); BufferedInputStream bis = new BufferedInputStream(is); inputStreamReader = new InputStreamReader(bis); Set<E> providedObjects = parser.parse(inputStreamReader); if (providedObjects != null) { updateProvidedObjectsHolder(url, providedObjects); } } catch (ParsingException e) { logger.debug(e.getMessage(), e); } catch (IOException e) { logger.debug(e.getMessage(), e); } finally { try { if (inputStreamReader != null) { <START> inputStreamReader.close(); <END> } if (is != null) { is.close(); } } catch (IOException e) { } } } else { synchronized (urls) { List<URL> value = urls.get(parserType); if (value == null) { value = new ArrayList<URL>(); urls.put(parserType, value); } value.add(url); } logger.debug("Parser not available", parserType, new Exception()); } }</code><technical_language>this close throw exception? If is is is closed</technical_language>

Target:
protected void importFile(String parserType, URL url) { Parser<E> parser = parsers.get(parserType); if (parser != null) { InputStream is = null; InputStreamReader inputStreamReader = null; try { is = url.openStream(); BufferedInputStream bis = new BufferedInputStream(is); inputStreamReader = new InputStreamReader(bis); Set<E> providedObjects = parser.parse(inputStreamReader); updateProvidedObjectsHolder(url, providedObjects); } catch (ParsingException e) { logger.debug(e.getMessage(), e); } catch (IOException e) { logger.debug(e.getMessage(), e); } finally { if (inputStreamReader != null) { try { inputStreamReader.close(); } catch (IOException e) { } } if (is != null) { try { is.close(); } catch (IOException e) { } } } } else { synchronized (urls) { List<URL> value = urls.get(parserType); if (value == null) { value = new ArrayList<URL>(); urls.put(parserType, value); } value.add(url); } logger.debug("Parser not available", parserType, new Exception()); } }
Source:
<code>public String getContentAccessModeList() { String[] modeList = contentAccessModeList == null ? new String[0] : contentAccessModeList.split(","); String ammend = ""; <START> if (!ArrayUtils.contains(modeList, ContentAccessCertServiceAdapter.DEFAULT_CONTENT_ACCESS_MODE)) { <END> ammend = modeList.length > 0 ? "," : ""; ammend += ContentAccessCertServiceAdapter.DEFAULT_CONTENT_ACCESS_MODE; } return modeList.length > 0 ? this.contentAccessModeList + ammend : ammend; }</code><technical_language>@wottop this "entitlement" mode is included? if a mode list set owner include it? If so, right is valid set list entitlements option, if list is empty means set entitlement</technical_language>

Target:
public String getContentAccessModeList() { return this.contentAccessModeList; }
Source:
<code>private MixedSqlNode parseDynamicTags(XNode node) { <START> List<SqlNode> contents = new ArrayList<SqlNode>(); <END> NodeList children = node.getNode().getChildNodes(); for (int i = 0; i < children.getLength(); i++) { XNode child = node.newXNode(children.item(i)); if (child.getNode().getNodeType() == Node.CDATA_SECTION_NODE || child.getNode().getNodeType() == Node.TEXT_NODE) { String data = child.getStringBody(""); TextSqlNode textSqlNode = new TextSqlNode(data); if (textSqlNode.isDynamic()) { contents.add(textSqlNode); isDynamic = true; } else { contents.add(new StaticTextSqlNode(data)); } } else if (child.getNode().getNodeType() == Node.ELEMENT_NODE) { String nodeName = child.getNode().getNodeName(); NodeHandler handler = nodeHandlerMap.get(nodeName); if (handler == null) { throw new BuilderException("Unknown element <" + nodeName + "> in SQL statement."); } handler.handleNode(child, contents); isDynamic = true; } } return new MixedSqlNode(contents); }</code><technical_language>This method is declared package private purpose avoid synthetic method generated compiler. a warning depending IDE setting (it disabled in Eclipse). So, revert <strike>this line</strike> visibility, please? (Actually, nodeHandlerMap package private for reason.)</technical_language>

Target:
protected MixedSqlNode parseDynamicTags(XNode node) { List<SqlNode> contents = new ArrayList<SqlNode>(); NodeList children = node.getNode().getChildNodes(); for (int i = 0; i < children.getLength(); i++) { XNode child = node.newXNode(children.item(i)); if (child.getNode().getNodeType() == Node.CDATA_SECTION_NODE || child.getNode().getNodeType() == Node.TEXT_NODE) { String data = child.getStringBody(""); TextSqlNode textSqlNode = new TextSqlNode(data); if (textSqlNode.isDynamic()) { contents.add(textSqlNode); isDynamic = true; } else { contents.add(new StaticTextSqlNode(data)); } } else if (child.getNode().getNodeType() == Node.ELEMENT_NODE) { String nodeName = child.getNode().getNodeName(); NodeHandler handler = nodeHandlerMap.get(nodeName); if (handler == null) { throw new BuilderException("Unknown element <" + nodeName + "> in SQL statement."); } handler.handleNode(child, contents); isDynamic = true; } } return new MixedSqlNode(contents); }