auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void setRestApiBaseUris(List<String> restApis) { <START> StringBuilder sb = new StringBuilder(); <END> for (String restEndpoint:restApis){ sb.append(restEndpoint); sb.append(" "); } preferences.edit().putString(PreferenceKeys.API_URIS,sb.toString().trim()).commit(); }</code><technical_language>Check out guava class Joiner. This section reduced Joiner.on(' ').join(restApis);</technical_language>

Target:
public void setRestApiBaseUris(List<String> restApis) { preferences.edit().putString(PreferenceKeys.API_URIS, Joiner.on(' ').join(restApis)).commit(); }
Source:
<code>public ComputerLauncher createLauncher(@Nonnull JCloudsSlave slave) throws IOException { int maxNumRetries = 5; int retryWaitTime = 15; SlaveOptions opts = slave.getSlaveOptions(); String credentialsId = opts.getCredentialsId(); if (credentialsId == null) { <START> throw new ProvisioningFailedException("No ssh credentials selected", new Throwable()); <END> } String publicAddress = slave.getPublicAddress(); if (publicAddress == null) { throw new IOException("The slave is likely deleted"); } if ("0.0.0.0".equals(publicAddress)) { throw new IOException("Invalid host 0.0.0.0, your host is most likely waiting for an ip address."); } Integer timeout = opts.getStartTimeout(); timeout = timeout == null ? 0 : (timeout / 1000); return new SSHLauncher(publicAddress, 22, credentialsId, opts.getJvmOptions(), null, "", "", timeout, maxNumRetries, retryWaitTime); }</code><technical_language>Why</technical_language>

Target:
public ComputerLauncher createLauncher(@Nonnull JCloudsSlave slave) throws IOException { int maxNumRetries = 5; int retryWaitTime = 15; SlaveOptions opts = slave.getSlaveOptions(); String credentialsId = opts.getCredentialsId(); if (credentialsId == null) { throw new ProvisioningFailedException("No ssh credentials selected"); } String publicAddress = slave.getPublicAddress(); if (publicAddress == null) { throw new IOException("The slave is likely deleted"); } if ("0.0.0.0".equals(publicAddress)) { throw new IOException("Invalid host 0.0.0.0, your host is most likely waiting for an ip address."); } Integer timeout = opts.getStartTimeout(); timeout = timeout == null ? 0 : (timeout / 1000); return new SSHLauncher(publicAddress, 22, credentialsId, opts.getJvmOptions(), null, "", "", timeout, maxNumRetries, retryWaitTime); }
Source:
<code>public static <K extends Comparable<? super K>, V> TreeMap<K, V> ofAll(java.util.Map<? extends K, ? extends V> map) { Objects.requireNonNull(map, "map is null"); <START> RedBlackTree<Tuple2<K, V>> result = RedBlackTree.empty(new EntryComparator<>(Comparator.naturalOrder())); <END> for (java.util.Map.Entry<? extends K, ? extends V> entry : map.entrySet()) { result = result.insert(Tuple.of(entry.getKey(), entry.getValue())); } return new TreeMap<>(result); }</code><technical_language>**is** comparable extends Comparable<? super K>. natural comparator here. I this is correct fix: java final Comparator<Tuple2<K, V>> comparator = new EntryComparator<>((Comparator<? super K> & Serializable) K::compareTo); RedBlackTree<Tuple2<K, V>> result = RedBlackTree.empty(comparator);</technical_language>

Target:
public static <K extends Comparable<? super K>, V> TreeMap<K, V> ofAll(java.util.Map<? extends K, ? extends V> map) { Objects.requireNonNull(map, "map is null"); RedBlackTree<Tuple2<K, V>> result = RedBlackTree.empty(new EntryComparator<>((Comparator<? super K> & Serializable) K::compareTo)); for (java.util.Map.Entry<? extends K, ? extends V> entry : map.entrySet()) { result = result.insert(Tuple.of(entry.getKey(), entry.getValue())); } return new TreeMap<>(result); }
Source:
<code>public TypedOutput toBody(Object source) { OutputStreamWriter osw = null; try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); osw = new OutputStreamWriter(bos, CHARSET); serializer.write(source, osw); osw.flush(); return new TypedByteArray(MIME_TYPE, bos.toByteArray()); } catch (final NullPointerException e) { throw new AssertionError(e); <START> } catch (IOException e) { <END> throw new AssertionError(e); } catch (Exception e) { throw new AssertionError(e); } finally { try { if (osw != null) { osw.close(); } } catch (IOException e) { throw new AssertionError(e); } } }</code><technical_language>This catch is redundant it</technical_language>

Target:
public TypedOutput toBody(Object source) { OutputStreamWriter osw = null; try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); osw = new OutputStreamWriter(bos, CHARSET); serializer.write(source, osw); osw.flush(); return new TypedByteArray(MIME_TYPE, bos.toByteArray()); } catch (Exception e) { throw new AssertionError(e); } finally { try { if (osw != null) { osw.close(); } } catch (IOException e) { throw new AssertionError(e); } } }
Source:
<code>public void cancel() { <START> cancelAt = System.nanoTime(); <END> }</code><technical_language>rename cancelAt cancelAtNs</technical_language>

Target:
public void cancel() { cancelAtNs = System.nanoTime(); }
Source:
<code><START> public void testRegister() { <END> abstractRegistry.register(mockUrl); assert abstractRegistry.getRegistered().contains(mockUrl); abstractRegistry.getRegistered().clear(); List<URL> urlList = getList(); for (URL url : urlList) { abstractRegistry.register(url); } Assert.assertThat(abstractRegistry.getRegistered().size(), Matchers.equalTo(urlList.size())); }</code><technical_language>pls. consider enhance registerTest, unregisterTest, subscribeTest, unsubsribeTest, etc, instead of introducing new test methods. method naming is more recommended, pls. stick it</technical_language>

Target:
public void testRegister() throws Exception { abstractRegistry.register(mockUrl); assert abstractRegistry.getRegistered().contains(mockUrl); abstractRegistry.getRegistered().clear(); List<URL> urlList = getList(); for (URL url : urlList) { abstractRegistry.register(url); } Assert.assertThat(abstractRegistry.getRegistered().size(), Matchers.equalTo(urlList.size())); }
Source:
<code>public boolean setTypeId(int type, boolean applyPhysics) { <START> return setTypeIdAndData(type, getData(), applyPhysics); <END> }</code><technical_language>functionality Craftbukkit/Spigot, get reset default data of new block</technical_language>

Target:
public boolean setTypeId(int type, boolean applyPhysics) { return setTypeIdAndData(type, (byte) 0, applyPhysics); }
Source:
<code>private void updateKernelCmdlineAccordingToCheckboxes() { final CpuVendor cpuVendor = getCurrentCpuVendor(); if (cpuVendor == null || getKernelCmdlineBlacklistNouveau().getEntity() == null || getKernelCmdlineIommu().getEntity() == null || getKernelCmdlineKvmNested().getEntity() == null || getKernelCmdlineUnsafeInterrupts().getEntity() == null || getKernelCmdlinePciRealloc().getEntity() == null || getKernelCmdlineFips().getEntity() == null || getKernelCmdlineSmtDisabled().getEntity() == null) { return; } final String kernelCmdline = KernelCmdlineUtil.create( cpuVendor, getKernelCmdlineBlacklistNouveau().getEntity(), getKernelCmdlineIommu().getEntity(), getKernelCmdlineKvmNested().getEntity(), getKernelCmdlineUnsafeInterrupts().getEntity(), getKernelCmdlinePciRealloc().getEntity(), getKernelCmdlineFips().getEntity(), <START> getCurrentKernelCmdLine().getEntity().toLowerCase().contains("boot=uuid=") ? "" : getKernelCmdlineBootUuid().getEntity(), END> getKernelCmdlineSmtDisabled().getEntity()); kernelCmdlineListener.whilePaused(() -> getKernelCmdline().setEntity(kernelCmdline)); }</code><technical_language>This line much, hard follow. this logic is part of object? nicer if call: getKernelCmdlineBootUuid().getEntity()</technical_language>

Target:
private void updateKernelCmdlineAccordingToCheckboxes() { final CpuVendor cpuVendor = getCurrentCpuVendor(); if (cpuVendor == null || getKernelCmdlineBlacklistNouveau().getEntity() == null || getKernelCmdlineIommu().getEntity() == null || getKernelCmdlineKvmNested().getEntity() == null || getKernelCmdlineUnsafeInterrupts().getEntity() == null || getKernelCmdlinePciRealloc().getEntity() == null || getKernelCmdlineFips().getEntity() == null || getKernelCmdlineSmtDisabled().getEntity() == null) { return; } final String kernelCmdline = KernelCmdlineUtil.create( cpuVendor, getKernelCmdlineBlacklistNouveau().getEntity(), getKernelCmdlineIommu().getEntity(), getKernelCmdlineKvmNested().getEntity(), getKernelCmdlineUnsafeInterrupts().getEntity(), getKernelCmdlinePciRealloc().getEntity(), getKernelCmdlineFips().getEntity(), getKernelCmdlineBootUuid().getEntity(), getKernelCmdlineSmtDisabled().getEntity()); kernelCmdlineListener.whilePaused(() -> getKernelCmdline().setEntity(kernelCmdline)); }
Source:
<code>protected <A extends NuageVspApiClient, B extends NuageVspElementClient, C extends NuageVspSyncClient, D extends NuageVspGuruClient> void loadNuageClient() { try { NuageVspPluginClientLoader clientLoader = NuageVspPluginClientLoader.getClientLoader(_relativePath, _cmsUserInfo, _numRetries, _retryInterval, _nuageVspCmsId); _nuageVspApiClient = clientLoader.getNuageVspApiClient(); _nuageVspSyncClient = clientLoader.getNuageVspSyncClient(); _nuageVspGuruClient = clientLoader.getNuageVspGuruClient(); _nuageVspElementClient = clientLoader.getNuageVspElementClient(); _nuageVspManagerClient = clientLoader.getNuageVspManagerClient(); _isNuageVspClientLoaded = true; } catch (ConfigurationException e) { _isNuageVspClientLoaded = false; String errorMessage = "Nuage Vsp Plugin client is not yet installed. Please install NuageVsp plugin client to use NuageVsp plugin in Cloudstack. "; <START> s_logger.warn(errorMessage + e.getMessage()); <END> throw new CloudRuntimeException(errorMessage, e); } }</code><technical_language>Add exception log statement ensure stack trace is added log. Also, if throwing exception, logging WARN ERROR</technical_language>

Target:
protected <A extends NuageVspApiClient, B extends NuageVspElementClient, C extends NuageVspSyncClient, D extends NuageVspGuruClient> void loadNuageClient() { try { NuageVspPluginClientLoader clientLoader = NuageVspPluginClientLoader.getClientLoader(_relativePath, _cmsUserInfo, _numRetries, _retryInterval, _nuageVspCmsId); _nuageVspApiClient = clientLoader.getNuageVspApiClient(); _nuageVspSyncClient = clientLoader.getNuageVspSyncClient(); _nuageVspGuruClient = clientLoader.getNuageVspGuruClient(); _nuageVspElementClient = clientLoader.getNuageVspElementClient(); _nuageVspManagerClient = clientLoader.getNuageVspManagerClient(); _isNuageVspClientLoaded = true; } catch (ConfigurationException e) { _isNuageVspClientLoaded = false; String errorMessage = "Nuage Vsp Plugin client is not yet installed. Please install NuageVsp plugin client to use NuageVsp plugin in Cloudstack. "; s_logger.error(errorMessage, e); throw new CloudRuntimeException(errorMessage, e); } }
Source:
<code>private Event getPayoutEvent(Class<? extends PayoutEvent> eventClass, String connectAccount, StripePayout payout) { if (eventClass == PayoutCreated.class) { GatewayAccountEntity gatewayAccount = gatewayAccountDao.findByCredentialsKeyValue( STRIPE_ACCOUNT_ID_KEY, connectAccount) <START> .orElseThrow(() -> new GatewayAccountNotFoundException( <END> format("Gateway account with Stripe connect account ID %s not found.", connectAccount))); return PayoutCreated.from(gatewayAccount.getId(), payout); } logger.warn("Unsupported payout event class for payout ", eventClass, payout.getId()); return null; }</code><technical_language>Is this respond a 400 notification? Is this want do</technical_language>

Target:
private Event getPayoutEvent(Class<? extends PayoutEvent> eventClass, String connectAccount, StripePayout payout) { if (eventClass == PayoutCreated.class) { Optional<GatewayAccountEntity> mayBeGatewayAccount = gatewayAccountDao.findByCredentialsKeyValue( STRIPE_ACCOUNT_ID_KEY, connectAccount); if (mayBeGatewayAccount.isPresent()) { return PayoutCreated.from(mayBeGatewayAccount.get().getId(), payout); } else { logger.error("Gateway account with Stripe connect account ID not found", connectAccount); throw new GatewayAccountNotFoundException( format("Gateway account with Stripe connect account ID %s not found.", connectAccount)); } } logger.warn("Unsupported payout event class for payout ", eventClass, payout.getId()); return null; }
Source:
<code>RunTaskRequest buildRunTaskRequest( final CommandContext commandContext, final CommandRequest commandRequest, final EcsClientConfig clientConfig, final TaskDefinition td) throws ConfigException { final RunTaskRequest runTaskRequest = new RunTaskRequest(); setEcsCluster(clientConfig, runTaskRequest); setEcsGroup(runTaskRequest); setEcsTaskDefinition(commandContext, commandRequest, td, runTaskRequest); setEcsTaskCount(runTaskRequest); setEcsTaskOverride(commandContext, commandRequest, td, runTaskRequest); setEcsTaskLaunchType(clientConfig, runTaskRequest); setEcsNetworkConfiguration(clientConfig, runTaskRequest); setCapacityProviderStrategy(clientConfig, runTaskRequest); <START> return runTaskRequest; <END> }</code><technical_language>set [startedBy](<LINK_1> well? <LINK_2> Setting digdag session attempt ID task id (commandContext.getTaskRequest().getTaskID() getAttemptId()) beneficial orphan ECS tasks. I assume search ECS task <LINK_0> in AWS console</technical_language>

Target:
RunTaskRequest buildRunTaskRequest( final CommandContext commandContext, final CommandRequest commandRequest, final EcsClientConfig clientConfig, final TaskDefinition td) throws ConfigException { final RunTaskRequest runTaskRequest = new RunTaskRequest(); setEcsCluster(clientConfig, runTaskRequest); setEcsGroup(runTaskRequest); setEcsTaskDefinition(commandContext, commandRequest, td, runTaskRequest); setEcsTaskCount(runTaskRequest); setEcsTaskOverride(commandContext, commandRequest, td, runTaskRequest, clientConfig); setEcsTaskLaunchType(clientConfig, runTaskRequest); setEcsTaskStartedBy(clientConfig, runTaskRequest); setEcsNetworkConfiguration(clientConfig, runTaskRequest); setCapacityProviderStrategy(clientConfig, runTaskRequest); return runTaskRequest; }
Source:
<code>public void testCreatedAt() throws Exception { final MkOrganizations orgs = new MkOrganizations( new MkStorage.InFile(), "testCreatedAt" ); final String createdat = "created_at"; <START> final java.util.Date early = new Github.Time(orgs <END> .get("testCreatedAt").json().getString(createdat) ).date(); final long sleepfor = 1000; Thread.sleep(sleepfor); final java.util.Date later = new Github.Time(orgs .get("testCreatedAt").json().getString(createdat) ).date(); MatcherAssert.assertThat(later, Matchers.greaterThanOrEqualTo(early)); }</code><technical_language>Qulice complain this line? Run mvn clean install -Pqulice check if static analysis errors</technical_language>

Target:
public void testCreatedAt() throws Exception { final MkOrganizations orgs = new MkOrganizations( new MkStorage.InFile(), "testCreatedAt" ); final String created = "created_at"; final Date early = new Github.Time( orgs.get("testCreatedAt") .json() .getString(created) ).date(); TimeUnit.SECONDS.sleep(1L); final Date later = new Github.Time( orgs.get("testCreatedAt") .json() .getString(created) ).date(); MatcherAssert.assertThat(later, Matchers.greaterThanOrEqualTo(early)); }
Source:
<code>public void close() throws Exception { <START> super.close(); <END> if (checkpointLock != null) { synchronized (checkpointLock) { currentReadTime = Long.MAX_VALUE; isRunning = false; } } }</code><technical_language>Need close HMS client somewhere</technical_language>

Target:
public void close() { cancel(); }
Source:
<code>public void testJointPrefetchSQLSelectToMany() throws Exception { createJointPrefetchDataSet(); <START> SQLSelect sqlSelect = SQLSelect.query(Artist.class, "SELECT " <END> + "#result('PAINTING_ID' 'int' '' 'paintingArray.PAINTING_ID'), " + "#result('ARTIST_NAME' 'String'), " + "#result('DATE_OF_BIRTH' 'java.util.Date'), " + "#result('t0.ARTIST_ID' 'int' '' 'ARTIST_ID') " + "FROM ARTIST t0, PAINTING t1 " + "WHERE t0.ARTIST_ID = t1.ARTIST_ID"); sqlSelect.addPrefetch(Artist.PAINTING_ARRAY.joint()); @SuppressWarnings("unchecked") final List<Artist> objects = (List<Artist>)sqlSelect.select(context); queryInterceptor.runWithQueriesBlocked(() -> { assertNotNull(objects); assertEquals(2, objects.size()); for (Artist artist : objects) { List<Painting> paintings = artist.getPaintingArray(); assertTrue(paintings.size() > 0); for (Painting painting : paintings) { assertEquals(PersistenceState.COMMITTED, painting.getPersistenceState()); } } }); }</code><technical_language>This code nicer if sqlSelect defined SQLSelect<Artist> chained method calls. test code clear, serve example</technical_language>

Target:
public void testJointPrefetchSQLSelectToMany() throws Exception { createJointPrefetchDataSet(); @SuppressWarnings("unchecked") final List<Artist> objects = SQLSelect.query(Artist.class, "SELECT " + "#result('PAINTING_ID' 'int' '' 'paintingArray.PAINTING_ID'), " + "#result('ARTIST_NAME' 'String'), " + "#result('DATE_OF_BIRTH' 'java.util.Date'), " + "#result('t0.ARTIST_ID' 'int' '' 'ARTIST_ID') " + "FROM ARTIST t0, PAINTING t1 " + "WHERE t0.ARTIST_ID = t1.ARTIST_ID") .addPrefetch(Artist.PAINTING_ARRAY.joint()) .select(context); queryInterceptor.runWithQueriesBlocked(() -> { assertNotNull(objects); assertEquals(2, objects.size()); for (Artist artist : objects) { List<Painting> paintings = artist.getPaintingArray(); assertTrue(paintings.size() > 0); for (Painting painting : paintings) { assertEquals(PersistenceState.COMMITTED, painting.getPersistenceState()); } } }); }
Source:
<code>PyExpressionTree expression(AstNode astNode) { if (astNode.is(PythonGrammar.TEST) && astNode.getChildren().size() == 1) { <START> return expression(astNode.getFirstChild()); <END> } if (astNode.is(PythonGrammar.ATOM) && astNode.getChildren().size() == 1) { return expression(astNode.getFirstChild()); } if (astNode.is(PythonGrammar.YIELD_EXPR)) { return yieldExpression(astNode); } if (astNode.is(PythonGrammar.NAME)) { return name(astNode); } if (astNode.is(PythonGrammar.ATTRIBUTE_REF)) { return qualifiedExpression(astNode); } if (astNode.is(PythonGrammar.CALL_EXPR)) { return callExpression(astNode); } return new PyExpressionTreeImpl(astNode); }</code><technical_language>I return expression(astNode.getFirstChild()) in cases astNode.getChildren().size() == 1</technical_language>

Target:
PyExpressionTree expression(AstNode astNode) { if (astNode.is(PythonGrammar.ATOM) && astNode.getChildren().size() == 1) { return expression(astNode.getFirstChild()); } if (astNode.is(PythonGrammar.YIELD_EXPR)) { return yieldExpression(astNode); } if (astNode.is(PythonGrammar.NAME)) { return name(astNode); } if (astNode.is(PythonGrammar.ATTRIBUTE_REF)) { return qualifiedExpression(astNode); } if (astNode.is(PythonGrammar.CALL_EXPR)) { return callExpression(astNode); } if (astNode.is(PythonGrammar.EXPR) && astNode.getChildren().size() == 1) { return expression(astNode.getFirstChild()); } if (astNode.is(PythonGrammar.TEST) && astNode.getChildren().size() == 1) { return expression(astNode.getFirstChild()); } return new PyExpressionTreeImpl(astNode); }
Source:
<code>public void propertyChange(PropertyChangeEvent evt) { Variant variant = (Variant) evt.getSource(); Schedule schedule = variant.getSchedule(); MarkerManager markerManager = schedule.getMarkerManager(); markerManager.clearMarkers(this, variant); ApproximateAngle windConstraint = variant.getWindConstraint(); if (windConstraint != null) { for (Alloc a: variant.getAllocs()) { <START> AzimuthSolver solver = new AzimuthSolver(schedule.getSite(), a.getObs().getCoords(schedule.getMiddlePoint()), windConstraint); <END> Union<Interval> windyBits = solver.solve(a.getInterval()); if (!windyBits.isEmpty()) { long timePointedIntoWind = 0; for (Interval i: windyBits) timePointedIntoWind += i.getLength(); if (timePointedIntoWind > TimeUtils.MS_PER_SECOND) { String msg = "Telescope will be pointed into the wind for " + TimeUtils.msToHHMMSS(timePointedIntoWind) + "."; markerManager.addMarker(false, this, Severity.Warning, msg, variant, a); } } } } }</code><technical_language>AzimuthSolver get treatment ElevationConstraintSolvers? This is, construct a function takes a time returns coordinates instead of coordinates a fixed time</technical_language>

Target:
public void propertyChange(PropertyChangeEvent evt) { Variant variant = (Variant) evt.getSource(); Schedule schedule = variant.getSchedule(); MarkerManager markerManager = schedule.getMarkerManager(); markerManager.clearMarkers(this, variant); ApproximateAngle windConstraint = variant.getWindConstraint(); if (windConstraint != null) { for (Alloc a: variant.getAllocs()) { AzimuthSolver solver = new AzimuthSolver(schedule.getSite(), a.getObs()::getCoords, windConstraint); Union<Interval> windyBits = solver.solve(a.getInterval()); if (!windyBits.isEmpty()) { long timePointedIntoWind = 0; for (Interval i: windyBits) timePointedIntoWind += i.getLength(); if (timePointedIntoWind > TimeUtils.MS_PER_SECOND) { String msg = "Telescope will be pointed into the wind for " + TimeUtils.msToHHMMSS(timePointedIntoWind) + "."; markerManager.addMarker(false, this, Severity.Warning, msg, variant, a); } } } } }
Source:
<code>public void addPolylines(Object polylinesObject) { if (!(polylinesObject instanceof Object[])) { Log.e(TAG, "Invalid argument to addPolylines", Log.DEBUG_MODE); return; } Object[] lines = (Object[])polylinesObject; Object polylines = getProperty(MapModule.PROPERTY_POLYLINES); if (polylines instanceof Object[]) { ArrayList<Object> polylinesList = new ArrayList<Object>( Arrays.asList((Object[]) polylines)); for (int i = 0; i < lines.length; i++) { Object polylineObject = lines[i]; if (polylineObject instanceof AnnotationProxy) { polylinesList.add(polylineObject); } } setProperty(MapModule.PROPERTY_POLYLINES, polylinesList.toArray()); } else { setProperty(MapModule.PROPERTY_POLYLINES, lines); } TiUIView view = peekView(); if (view instanceof TiUIMapView) { if (TiApplication.isUIThread()) { <START> handleAddAnnotations(lines); <END> } else { TiMessenger.sendBlockingMainMessage(getMainHandler() .obtainMessage(MSG_ADD_POLYLINES), lines); } } }</code><technical_language>this handleAddPolylines</technical_language>

Target:
public void addPolylines(Object polylinesObject) { if (!(polylinesObject instanceof Object[])) { Log.e(TAG, "Invalid argument to addPolylines", Log.DEBUG_MODE); return; } Object[] lines = (Object[])polylinesObject; Object polylines = getProperty(MapModule.PROPERTY_POLYLINES); if (polylines instanceof Object[]) { ArrayList<Object> polylinesList = new ArrayList<Object>( Arrays.asList((Object[]) polylines)); for (int i = 0; i < lines.length; i++) { Object polylineObject = lines[i]; if (polylineObject instanceof AnnotationProxy) { polylinesList.add(polylineObject); } } setProperty(MapModule.PROPERTY_POLYLINES, polylinesList.toArray()); } else { setProperty(MapModule.PROPERTY_POLYLINES, lines); } TiUIView view = peekView(); if (view instanceof TiUIMapView) { if (TiApplication.isUIThread()) { handleAddPolylines(lines); } else { TiMessenger.sendBlockingMainMessage(getMainHandler() .obtainMessage(MSG_ADD_POLYLINES), lines); } } }
Source:
<code>public void testBatchMultipleTablePrepare() throws Throwable { String tbl1 = KEYSPACE + "." + createTableName(); String tbl2 = KEYSPACE + "." + createTableName(); schemaChange(String.format("CREATE TABLE %s (k1 int PRIMARY KEY, v1 int)", tbl1)); schemaChange(String.format("CREATE TABLE %s (k2 int PRIMARY KEY, v2 int)", tbl2)); String query = "BEGIN BATCH " + String.format("UPDATE %s SET v1 = 1 WHERE k1 = ?;", tbl1) + String.format("UPDATE %s SET v2 = 2 WHERE k2 = ?;", tbl2) + "APPLY BATCH;"; prepare(query); <START> execute(query, 0, 0); <END> assertRows(execute(String.format("SELECT * FROM %s", tbl1)), row(0, 1)); assertRows(execute(String.format("SELECT * FROM %s", tbl2)), row(0, 2)); }</code><technical_language>Nit: keys for tables here</technical_language>

Target:
public void testBatchMultipleTablePrepare() throws Throwable { String tbl1 = KEYSPACE + "." + createTableName(); String tbl2 = KEYSPACE + "." + createTableName(); schemaChange(String.format("CREATE TABLE %s (k1 int PRIMARY KEY, v1 int)", tbl1)); schemaChange(String.format("CREATE TABLE %s (k2 int PRIMARY KEY, v2 int)", tbl2)); String query = "BEGIN BATCH " + String.format("UPDATE %s SET v1 = 1 WHERE k1 = ?;", tbl1) + String.format("UPDATE %s SET v2 = 2 WHERE k2 = ?;", tbl2) + "APPLY BATCH;"; prepare(query); execute(query, 0, 1); assertRows(execute(String.format("SELECT * FROM %s", tbl1)), row(0, 1)); assertRows(execute(String.format("SELECT * FROM %s", tbl2)), row(1, 2)); }
Source:
<code>public void setFullscreen(boolean fullscreen) { if (fullscreen == isFullscreen) { return; } updateFullScreenIcon(fullscreen); isFullscreen = fullscreen; Activity activity = themedReactContext.getCurrentActivity(); if (activity == null) { return; } Window window = activity.getWindow(); View decorView = window.getDecorView(); int uiOptions; if (isFullscreen) { if (Util.SDK_INT >= 19) { uiOptions = SYSTEM_UI_FLAG_HIDE_NAVIGATION | SYSTEM_UI_FLAG_IMMERSIVE_STICKY | SYSTEM_UI_FLAG_FULLSCREEN; } else { uiOptions = SYSTEM_UI_FLAG_HIDE_NAVIGATION | SYSTEM_UI_FLAG_FULLSCREEN; } activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); eventEmitter.fullscreenWillPresent(); decorView.setSystemUiVisibility(uiOptions); eventEmitter.fullscreenDidPresent(); } else { uiOptions = View.SYSTEM_UI_FLAG_VISIBLE; <START> activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); <END> eventEmitter.fullscreenWillDismiss(); decorView.setSystemUiVisibility(uiOptions); eventEmitter.fullscreenDidDismiss(); } }</code><technical_language>thought: Forcing this protrait break some cases. track initial orientation restore here? I mean, if app is forced landscape in fullscreen video, returning FS force portrait, desired behaviour</technical_language>

Target:
public void setFullscreen(boolean fullscreen) { if (fullscreen == isFullscreen) { return; } updateFullScreenIcon(fullscreen); isFullscreen = fullscreen; Activity activity = themedReactContext.getCurrentActivity(); if (activity == null) { return; } Window window = activity.getWindow(); View decorView = window.getDecorView(); int uiOptions; if (isFullscreen) { if (Util.SDK_INT >= 19) { uiOptions = SYSTEM_UI_FLAG_HIDE_NAVIGATION | SYSTEM_UI_FLAG_IMMERSIVE_STICKY | SYSTEM_UI_FLAG_FULLSCREEN; } else { uiOptions = SYSTEM_UI_FLAG_HIDE_NAVIGATION | SYSTEM_UI_FLAG_FULLSCREEN; } activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); eventEmitter.fullscreenWillPresent(); decorView.setSystemUiVisibility(uiOptions); eventEmitter.fullscreenDidPresent(); } else { uiOptions = View.SYSTEM_UI_FLAG_VISIBLE; if(this.initialOrientation == 1) activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); else activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); eventEmitter.fullscreenWillDismiss(); decorView.setSystemUiVisibility(uiOptions); eventEmitter.fullscreenDidDismiss(); } }
Source:
<code>private void setUsbConfig(String config) { if (DEBUG) Slog.d(TAG, "setUsbConfig(" + config + ")"); SystemProperties.set(USB_CONFIG_PROPERTY, config); <START> return; <END> }</code><technical_language>Please remove return statement</technical_language>

Target:
private void setUsbConfig(String config) { if (DEBUG) Slog.d(TAG, "setUsbConfig(" + config + ")"); SystemProperties.set(USB_CONFIG_PROPERTY, config); }
Source:
<code>public void testDateFormatTransform() throws Exception { Catalog cat = getCatalog(); File dir = unpack("shape/ivan.zip"); SpatialFile file = new SpatialFile(new File(dir, "ivan.shp")); file.prepare(); ImportContext context = importer.createContext(file, store); assertEquals(1, context.getTasks().size()); context.setTargetStore(store); ImportTask task = context.getTasks().get(0); <START> task.getTransform().add(new DateFormatTransform("timestamp", "yyyy-MM-dd HH:mm:ss.S", null, null)); <END> importer.run(context); assertEquals(ImportContext.State.COMPLETE, context.getState()); FeatureTypeInfo ft = cat.getFeatureTypeByDataStore(store, "ivan"); assertNotNull(ft); SimpleFeatureType schema = (SimpleFeatureType) ft.getFeatureType(); assertTrue(Date.class.isAssignableFrom(schema.getDescriptor("timestamp").getType().getBinding())); FeatureIterator it = ft.getFeatureSource(null, null).getFeatures().features(); try { assertTrue(it.hasNext()); while(it.hasNext()) { SimpleFeature f = (SimpleFeature) it.next(); assertTrue(f.getAttribute("timestamp") instanceof Date); } } finally { it.close(); } }</code><technical_language>overloaded constructor, this change is longer necessary</technical_language>

Target:
public void testDateFormatTransform() throws Exception { Catalog cat = getCatalog(); File dir = unpack("shape/ivan.zip"); SpatialFile file = new SpatialFile(new File(dir, "ivan.shp")); file.prepare(); ImportContext context = importer.createContext(file, store); assertEquals(1, context.getTasks().size()); context.setTargetStore(store); ImportTask task = context.getTasks().get(0); task.getTransform().add(new DateFormatTransform("timestamp", "yyyy-MM-dd HH:mm:ss.S")); importer.run(context); assertEquals(ImportContext.State.COMPLETE, context.getState()); FeatureTypeInfo ft = cat.getFeatureTypeByDataStore(store, "ivan"); assertNotNull(ft); SimpleFeatureType schema = (SimpleFeatureType) ft.getFeatureType(); assertTrue(Date.class.isAssignableFrom(schema.getDescriptor("timestamp").getType().getBinding())); FeatureIterator it = ft.getFeatureSource(null, null).getFeatures().features(); try { assertTrue(it.hasNext()); while(it.hasNext()) { SimpleFeature f = (SimpleFeature) it.next(); assertTrue(f.getAttribute("timestamp") instanceof Date); } } finally { it.close(); } }
Source:
<code>private void reportMessages() { Iterable<CreateRequest> created = Iterables.filter(newChanges, new Predicate<CreateRequest>() { @Override public boolean apply(CreateRequest input) { return input.created; } }); if (!Iterables.isEmpty(created)) { addMessage(""); addMessage("New Changes:"); for (CreateRequest c : created) { addMessage(formatChangeUrl(canonicalWebUrl, c.change, false)); } addMessage(""); } List<ReplaceRequest> updated = FluentIterable .from(replaceByChange.values()) .filter(new Predicate<ReplaceRequest>() { @Override public boolean apply(ReplaceRequest input) { return !input.skip && input.inputCommand.getResult() == OK; } }) .toSortedList(Ordering.natural().onResultOf( new Function<ReplaceRequest, Integer>() { @Override public Integer apply(ReplaceRequest in) { return in.change.getId().get(); } })); if (!updated.isEmpty()) { addMessage(""); addMessage("Updated Changes:"); <START> boolean edit = false; if (magicBranch != null && magicBranch.edit) { edit = true; } <END> for (ReplaceRequest u : updated) { addMessage(formatChangeUrl(canonicalWebUrl, u.change, edit)); } addMessage(""); } }</code><technical_language>this a one-liner boolean edit = magicBranch != null && magicBranch.edit;</technical_language>

Target:
private void reportMessages() { Iterable<CreateRequest> created = Iterables.filter(newChanges, new Predicate<CreateRequest>() { @Override public boolean apply(CreateRequest input) { return input.created; } }); if (!Iterables.isEmpty(created)) { addMessage(""); addMessage("New Changes:"); for (CreateRequest c : created) { addMessage(formatChangeUrl(canonicalWebUrl, c.change, false)); } addMessage(""); } List<ReplaceRequest> updated = FluentIterable .from(replaceByChange.values()) .filter(new Predicate<ReplaceRequest>() { @Override public boolean apply(ReplaceRequest input) { return !input.skip && input.inputCommand.getResult() == OK; } }) .toSortedList(Ordering.natural().onResultOf( new Function<ReplaceRequest, Integer>() { @Override public Integer apply(ReplaceRequest in) { return in.change.getId().get(); } })); if (!updated.isEmpty()) { addMessage(""); addMessage("Updated Changes:"); boolean edit = magicBranch != null && magicBranch.edit; for (ReplaceRequest u : updated) { addMessage(formatChangeUrl(canonicalWebUrl, u.change, edit)); } addMessage(""); } }
Source:
<code>private void initPythonProcess() { exit(); <START> String home = System.getenv(ENV_BEAKERX_HOME); <END> if (home != null) { port = findFreePort(); pythonPort = findFreePort(); try { String pyScriptPath = new File(home).getParentFile().toString(); String[] cmd = { PYTHON, pyScriptPath + PY4J_SCRIPT_NAME, port == null ? DEFAULT_PORT : String.valueOf(port), pythonPort == null ? DEFAULT_PYTHON_PORT : String.valueOf(pythonPort)}; this.pythonProcess = new ProcessBuilder(cmd).start(); } catch (IOException e) { e.printStackTrace(); } } }</code><technical_language>is this envar doing</technical_language>

Target:
private void initPythonProcess() { exit(); port = findFreePort(); pythonPort = findFreePort(); try { ProcessBuilder pb = new ProcessBuilder(getPy4jCommand()); pb.redirectError(ProcessBuilder.Redirect.INHERIT); pythonProcess = pb.start(); new BufferedReader(new InputStreamReader(pythonProcess.getInputStream())).readLine(); } catch (IOException e) { e.printStackTrace(); } }
Source:
<code>public String validateNetworkLinkExistenceForDnsZones(String networkLinkId, List<AzurePrivateDnsZoneServiceEnum> services) { PagedList<PrivateZone> privateDnsZoneList = getPrivateDnsZoneList(); for (AzurePrivateDnsZoneServiceEnum service : services) { String dnsZoneName = service.getDnsZoneName(); Optional<PrivateZone> privateZoneWithNetworkLink = privateDnsZoneList.stream() .filter(privateZone -> privateZone.name().equals(dnsZoneName)) .filter(privateZone -> privateZone.provisioningState().equals(SUCCEEDED)) .filter(privateZone -> Objects.nonNull(getNetworkLinkByPrivateDnsZone(privateZone.resourceGroupName(), dnsZoneName, networkLinkId))) .findFirst(); if (privateZoneWithNetworkLink.isPresent()) { PrivateZone privateZone = privateZoneWithNetworkLink.get(); String validationMessage = String.format("Network link for the network %s already exists for Private DNS Zone %s in resource group %s. " + "Please ensure that there is no existing network link and try again!", networkLinkId, dnsZoneName, privateZone.resourceGroupName()); LOGGER.warn(validationMessage); return validationMessage; } } <START> return null; <END> }</code><technical_language>instead of returning null please consider a way, Optional</technical_language>

Target:
public ValidationResult validateNetworkLinkExistenceForDnsZones(String networkLinkId, List<AzurePrivateDnsZoneServiceEnum> services) { ValidationResult.ValidationResultBuilder resultBuilder = new ValidationResult.ValidationResultBuilder(); PagedList<PrivateZone> privateDnsZoneList = getPrivateDnsZoneList(); for (AzurePrivateDnsZoneServiceEnum service : services) { String dnsZoneName = service.getDnsZoneName(); Optional<PrivateZone> privateZoneWithNetworkLink = privateDnsZoneList.stream() .filter(privateZone -> privateZone.name().equals(dnsZoneName)) .filter(privateZone -> privateZone.provisioningState().equals(SUCCEEDED)) .filter(privateZone -> Objects.nonNull(getNetworkLinkByPrivateDnsZone(privateZone.resourceGroupName(), dnsZoneName, networkLinkId))) .findFirst(); if (privateZoneWithNetworkLink.isPresent()) { PrivateZone privateZone = privateZoneWithNetworkLink.get(); String validationMessage = String.format("Network link for the network %s already exists for Private DNS Zone %s in resource group %s. " + "Please ensure that there is no existing network link and try again!", networkLinkId, dnsZoneName, privateZone.resourceGroupName()); LOGGER.warn(validationMessage); resultBuilder.error(validationMessage); } } return resultBuilder.build(); }
Source:
<code>protected void executeQueryCommand() { <START> List<VM> vms = DbFacade.getInstance().getVmDAO().getAllVmsRelatedToQuotaId( <END> getParameters().getQuotaId()); for (VM vm : vms) { VmHandler.updateDisksFromDb(vm); } getQueryReturnValue().setReturnValue(vms); }</code><technical_language>return templates</technical_language>

Target:
protected void executeQueryCommand() { List<VmTemplate> vmTemplates = DbFacade.getInstance().getVmTemplateDAO().getAllTemplatesRelatedToQuotaId( getParameters().getQuotaId()); for (VmTemplate vmTemplate : vmTemplates) { VmTemplateHandler.UpdateDisksFromDb(vmTemplate); } getQueryReturnValue().setReturnValue(vmTemplates); }
Source:
<code>public void run() throws Exception { Object targetService = getNodeEngine().getService(namespace.getServiceName()); if (targetService instanceof LockInterceptorService) { <START> ((LockInterceptorService) targetService).onBeforeLock(namespace.getObjectName(), key); <END> } final boolean lockResult = getLockStore().lock(key, getCallerUuid(), threadId, getReferenceCallId(), leaseTime); response = lockResult; ILogger logger = getLogger(); if (logger.isFinestEnabled()) { if (lockResult) { logger.finest("Acquired lock " + namespace.getObjectName() + " for " + getCallerAddress() + " - " + getCallerUuid() + ", thread ID: " + threadId); } else { logger.finest("Could not acquire lock " + namespace.getObjectName() + " as owned by " + getLockStore().getOwnerInfo(key)); } } }</code><technical_language>This code-block put in LockBackupOperation</technical_language>

Target:
public void run() throws Exception { interceptLockOperation(); final boolean lockResult = getLockStore().lock(key, getCallerUuid(), threadId, getReferenceCallId(), leaseTime); response = lockResult; ILogger logger = getLogger(); if (logger.isFinestEnabled()) { if (lockResult) { logger.finest("Acquired lock " + namespace.getObjectName() + " for " + getCallerAddress() + " - " + getCallerUuid() + ", thread ID: " + threadId); } else { logger.finest("Could not acquire lock " + namespace.getObjectName() + " as owned by " + getLockStore().getOwnerInfo(key)); } } }
Source:
<code>private Object coerceValue(VariableDefinition variableDefinition, GraphQLType graphQLType, Object value) { if (graphQLType instanceof GraphQLNonNull) { Object returnValue = coerceValue(variableDefinition, ((GraphQLNonNull) graphQLType).getWrappedType(), value); if (returnValue == null) { throw new NonNullableValueCoercedAsNullException(variableDefinition, graphQLType); } return returnValue; } if (value == null) { return null; } if (graphQLType instanceof GraphQLScalarType) { return coerceValueForScalar((GraphQLScalarType) graphQLType, value); } else if (graphQLType instanceof GraphQLEnumType) { return coerceValueForEnum((GraphQLEnumType) graphQLType, value); } else if (graphQLType instanceof GraphQLList) { return coerceValueForList(variableDefinition, (GraphQLList) graphQLType, value); } else if (graphQLType instanceof GraphQLInputObjectType) { if (value instanceof Map) { return coerceValueForInputObjectType(variableDefinition, (GraphQLInputObjectType) graphQLType, (Map<String, Object>) value); } else { <START> throw new CoercingParseValueException("Expected type 'Map'."); <END> } } else { return assertShouldNeverHappen("unhandled type " + graphQLType); } }</code><technical_language>please put extended error message here. some trouble this in (whereby people pass Java object spec cant...) "Variables for input objects instance of a Map graphql specification."</technical_language>

Target:
private Object coerceValue(VariableDefinition variableDefinition, GraphQLType graphQLType, Object value) { if (graphQLType instanceof GraphQLNonNull) { Object returnValue = coerceValue(variableDefinition, ((GraphQLNonNull) graphQLType).getWrappedType(), value); if (returnValue == null) { throw new NonNullableValueCoercedAsNullException(variableDefinition, graphQLType); } return returnValue; } if (value == null) { return null; } if (graphQLType instanceof GraphQLScalarType) { return coerceValueForScalar((GraphQLScalarType) graphQLType, value); } else if (graphQLType instanceof GraphQLEnumType) { return coerceValueForEnum((GraphQLEnumType) graphQLType, value); } else if (graphQLType instanceof GraphQLList) { return coerceValueForList(variableDefinition, (GraphQLList) graphQLType, value); } else if (graphQLType instanceof GraphQLInputObjectType) { if (value instanceof Map) { return coerceValueForInputObjectType(variableDefinition, (GraphQLInputObjectType) graphQLType, (Map<String, Object>) value); } else { throw new CoercingParseValueException( "Expected type 'Map' but was '" + value.getClass().getSimpleName() + "'. Variables for input objects must be an instance of a 'Map'." ); } } else { return assertShouldNeverHappen("unhandled type " + graphQLType); } }
Source:
<code>public static void init(Configuration configuration) { <START> init(configuration, StramHTTPAuthentication.FOLLOW_HADOOP_AUTH); <END> }</code><technical_language>is this change necessary? null corresponds default is StramHTTPAuthentication.FOLLOW_HADOOP_AUTH? Is static block line 44 necessary? stramWebSecurityEnabled explicitly initialized UserGroupInformation.isSecurityEnabled()</technical_language>

Target:
public static void init(Configuration configuration) { init(configuration, null); }
Source:
<code>public PagedIterable<String> query(String query) { <START> return new PagedIterable<>(digitalTwinsAsyncClient.query(query)); <END> }</code><technical_language>nit: pattern sync APIs call next max overloads -> this sync API call sync API overload Context.NONE</technical_language>

Target:
public PagedIterable<String> query(String query) { return query(query, Context.NONE); }
Source:
<code>private void removeWorker(final Worker worker) { ZkWorker zkWorker = zkWorkers.get(worker.getHost()); if (zkWorker != null) { try { Set<String> tasksToRetry = Sets.newHashSet( cf.getChildren() .forPath(JOINER.join(config.getIndexerTaskPath(), worker.getHost())) ); tasksToRetry.addAll( cf.getChildren() .forPath(JOINER.join(config.getIndexerStatusPath(), worker.getHost())) ); log.info("%s has %d tasks to retry", worker.getHost(), tasksToRetry.size()); for (String taskId : tasksToRetry) { TaskRunnerWorkItem taskRunnerWorkItem = runningTasks.get(taskId); if (taskRunnerWorkItem != null) { String taskPath = JOINER.join(config.getIndexerTaskPath(), worker.getHost(), taskId); if (cf.checkExists().forPath(taskPath) != null) { <START> cf.delete().guaranteed().forPath(taskPath); <END> } failTask(taskRunnerWorkItem); } else { log.warn("RemoteTaskRunner has no knowledge of task %s", taskId); } } zkWorker.close(); } catch (Exception e) { throw Throwables.propagate(e); } finally { zkWorkers.remove(worker.getHost()); } } }</code><technical_language>if I it, close zkWorker if get exception</technical_language>

Target:
private void removeWorker(final Worker worker) { log.info("Kaboom! Worker[%s] removed!", worker.getHost()); ZkWorker zkWorker = zkWorkers.get(worker.getHost()); if (zkWorker != null) { try { for (String assignedTask : cf.getChildren() .forPath(JOINER.join(config.getIndexerTaskPath(), worker.getHost()))) { RemoteTaskRunnerWorkItem taskRunnerWorkItem = runningTasks.get(assignedTask); if (taskRunnerWorkItem != null) { String taskPath = JOINER.join(config.getIndexerTaskPath(), worker.getHost(), assignedTask); if (cf.checkExists().forPath(taskPath) != null) { cf.delete().guaranteed().forPath(taskPath); } taskRunnerWorkItem.setResult(TaskStatus.failure(taskRunnerWorkItem.getTask().getId())); } else { log.warn("RemoteTaskRunner has no knowledge of task %s", assignedTask); } } } catch (Exception e) { throw Throwables.propagate(e); } finally { try { zkWorker.close(); } catch (Exception e) { log.error(e, "Exception closing worker %s!", worker.getHost()); } zkWorkers.remove(worker.getHost()); } } }
Source:
<code>public Interpreter( Configuration configuration, File programDirectory ) throws IOException { TracerUtils.TracerLevels tracerLevel = TracerUtils.TracerLevels.ALL; this.configuration = configuration; this.symbolTables = new HashMap<>(); switch( configuration.tracerLevel() ) { case "comm": tracerLevel = TracerUtils.TracerLevels.COMM; break; case "comp": tracerLevel = TracerUtils.TracerLevels.COMP; break; } this.correlationEngine = configuration.correlationAlgorithm().createInstance( this ); commCore = new CommCore( this, configuration.connectionsLimit() ); includePaths = configuration.includePaths(); logPrefix = '[' + configuration.programFilepath().getName() + "] "; if( configuration.tracer() ) { if( configuration.tracerMode().equals( "file" ) ) { tracer = new FileTracer( this, tracerLevel ); } else { tracer = new PrintingTracer( this, tracerLevel ); } } else { tracer = new DummyTracer(); } <START> LOGGER.setLevel( Level.ALL ); <END> exitingLock = new ReentrantLock(); exitingCondition = exitingLock.newCondition(); if( configuration.programDirectory() == null ) { this.programDirectory = programDirectory; } else { this.programDirectory = configuration.programDirectory(); } if( this.programDirectory == null ) { throw new IOException( "Could not localize the service execution directory. This is probably a bug in the JOLIE interpreter, please report it to jolie-devel@lists.sf.net" ); } }</code><technical_language>Why</technical_language>

Target:
public Interpreter( Configuration configuration, File programDirectory ) throws IOException { TracerUtils.TracerLevels tracerLevel = TracerUtils.TracerLevels.ALL; this.configuration = configuration; this.symbolTables = new HashMap<>(); switch( configuration.tracerLevel() ) { case "comm": tracerLevel = TracerUtils.TracerLevels.COMM; break; case "comp": tracerLevel = TracerUtils.TracerLevels.COMP; break; } this.correlationEngine = configuration.correlationAlgorithm().createInstance( this ); commCore = new CommCore( this, configuration.connectionsLimit() ); includePaths = configuration.includePaths(); logPrefix = '[' + configuration.programFilepath().getName() + "] "; if( configuration.tracer() ) { if( configuration.tracerMode().equals( "file" ) ) { tracer = new FileTracer( this, tracerLevel ); } else { tracer = new PrintingTracer( this, tracerLevel ); } } else { tracer = new DummyTracer(); } LOGGER.setLevel( configuration.logLevel() ); exitingLock = new ReentrantLock(); exitingCondition = exitingLock.newCondition(); if( configuration.programDirectory() == null ) { this.programDirectory = programDirectory; } else { this.programDirectory = configuration.programDirectory(); } if( this.programDirectory == null ) { throw new IOException( "Could not localize the service execution directory. This is probably a bug in the JOLIE interpreter, please report it to jolie-devel@lists.sf.net" ); } }
Source:
<code>private static Chunk getChunk(World world, Vec3d pos) { Chunk chunk = world.getChunkFromChunkCoords(MathHelper.floor(pos.x / Cube.SIZE_D), MathHelper.floor(pos.z / Cube.SIZE_D)); if (((IColumn) chunk).getCubicWorld().isCubicWorld()) { <START> for (int cubeY = 0; cubeY < Cube.SIZE; cubeY++) { <END> ((IColumn) chunk).getCube(cubeY); } } return chunk; }</code><technical_language>Again, "16" - vanilla chunk height in EBS-s</technical_language>

Target:
private static Chunk getChunk(World world, Vec3d pos) { Chunk chunk = world.getChunkFromChunkCoords(MathHelper.floor(pos.x / Cube.SIZE_D), MathHelper.floor(pos.z / Cube.SIZE_D)); if (((IColumn) chunk).getCubicWorld().isCubicWorld()) { for (int cubeY = 0; cubeY < 16; cubeY++) { ((IColumn) chunk).getCube(cubeY); } } return chunk; }