auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testJointPrefetchSQLSelectToMany() throws Exception { createJointPrefetchDataSet(); SQLSelect sqlSelect = 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"); 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()); } } }); }

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:
PyExpressionTree expression(AstNode astNode) { if (astNode.is(PythonGrammar.TEST) && astNode.getChildren().size() == 1) { return expression(astNode.getFirstChild()); } 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); }

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:
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(schedule.getMiddlePoint()), 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); } } } } }

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:
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()) { handleAddAnnotations(lines); } else { TiMessenger.sendBlockingMainMessage(getMainHandler() .obtainMessage(MSG_ADD_POLYLINES), lines); } } }

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:
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, 0); assertRows(execute(String.format("SELECT * FROM %s", tbl1)), row(0, 1)); assertRows(execute(String.format("SELECT * FROM %s", tbl2)), row(0, 2)); }

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:
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; activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); eventEmitter.fullscreenWillDismiss(); decorView.setSystemUiVisibility(uiOptions); eventEmitter.fullscreenDidDismiss(); } }

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:
private void setUsbConfig(String config) { if (DEBUG) Slog.d(TAG, "setUsbConfig(" + config + ")"); SystemProperties.set(USB_CONFIG_PROPERTY, config); return; }

Target:
private void setUsbConfig(String config) { if (DEBUG) Slog.d(TAG, "setUsbConfig(" + config + ")"); SystemProperties.set(USB_CONFIG_PROPERTY, config); }
Source:
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", null, null)); 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(); } }

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:
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 = false; if (magicBranch != null && magicBranch.edit) { edit = true; } for (ReplaceRequest u : updated) { addMessage(formatChangeUrl(canonicalWebUrl, u.change, edit)); } addMessage(""); } }

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:
private void initPythonProcess() { exit(); String home = System.getenv(ENV_BEAKERX_HOME); 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(); } } }

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:
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; } } return null; }

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:
protected void executeQueryCommand() { List<VM> vms = DbFacade.getInstance().getVmDAO().getAllVmsRelatedToQuotaId( getParameters().getQuotaId()); for (VM vm : vms) { VmHandler.updateDisksFromDb(vm); } getQueryReturnValue().setReturnValue(vms); }

Target:
protected void executeQueryCommand() { List<VmTemplate> vmTemplates = DbFacade.getInstance().getVmTemplateDAO().getAllTemplatesRelatedToQuotaId( getParameters().getQuotaId()); for (VmTemplate vmTemplate : vmTemplates) { VmTemplateHandler.UpdateDisksFromDb(vmTemplate); } getQueryReturnValue().setReturnValue(vmTemplates); }
Source:
public void run() throws Exception { Object targetService = getNodeEngine().getService(namespace.getServiceName()); if (targetService instanceof LockInterceptorService) { ((LockInterceptorService) targetService).onBeforeLock(namespace.getObjectName(), key); } 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)); } } }

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:
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'."); } } else { return assertShouldNeverHappen("unhandled type " + graphQLType); } }

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:
public static void init(Configuration configuration) { init(configuration, StramHTTPAuthentication.FOLLOW_HADOOP_AUTH); }

Target:
public static void init(Configuration configuration) { init(configuration, null); }
Source:
public PagedIterable<String> query(String query) { return new PagedIterable<>(digitalTwinsAsyncClient.query(query)); }

Target:
public PagedIterable<String> query(String query) { return query(query, Context.NONE); }
Source:
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) { cf.delete().guaranteed().forPath(taskPath); } 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()); } } }

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:
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( Level.ALL ); 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" ); } }

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:
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 < Cube.SIZE; cubeY++) { ((IColumn) chunk).getCube(cubeY); } } return chunk; }

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; }
Source:
private static Object serializeQueryCondition( SerializerProvider serializerProvider, JsonSerializer<?> serializer, String key, QueryCondition condition) { if (condition instanceof SimpleQueryCondition) { SimpleQueryCondition simple = (SimpleQueryCondition) condition; if (!simple.requiresSerialization() || simple.getValue() == null) { return simple.getValue(); } else { if (!isOperator(key)) { serializer = findQuerySerializer(false, key, serializerProvider, serializer); } return serializeQueryField(simple.getValue(), serializer, serializerProvider, key); } } else if (condition instanceof CollectionQueryCondition) { CollectionQueryCondition coll = (CollectionQueryCondition) condition; if (!isOperator(key)) { serializer = findQuerySerializer(coll.targetIsCollection(), key, serializerProvider, serializer); } List<Object> serializedConditions = new ArrayList<Object>(); for (QueryCondition item : coll.getValues()) { serializedConditions.add(serializeQueryCondition( serializerProvider, serializer, "$", item)); } return serializedConditions; } else { CompoundQueryCondition compound = (CompoundQueryCondition) condition; if (!key.startsWith("$")) { serializer = findQuerySerializer(compound.targetIsCollection(), key, serializerProvider, serializer); } return serializeQuery(serializerProvider, serializer, compound.getQuery()); } }

Target:
private static Object serializeQueryCondition( SerializerProvider serializerProvider, JsonSerializer<?> serializer, String key, QueryCondition condition) { if (condition instanceof SimpleQueryCondition) { SimpleQueryCondition simple = (SimpleQueryCondition) condition; if (!simple.requiresSerialization() || simple.getValue() == null) { return simple.getValue(); } else { if (!isOperator(key)) { serializer = findQuerySerializer(false, key, serializerProvider, serializer); } return serializeQueryField(simple.getValue(), serializer, serializerProvider, key); } } else if (condition instanceof CollectionQueryCondition) { CollectionQueryCondition coll = (CollectionQueryCondition) condition; if (!isOperator(key)) { serializer = findQuerySerializer(coll.targetIsCollection(), key, serializerProvider, serializer); } List<Object> serializedConditions = new ArrayList<Object>(); for (QueryCondition item : coll.getValues()) { serializedConditions.add(serializeQueryCondition( serializerProvider, serializer, "$", item)); } return serializedConditions; } else { CompoundQueryCondition compound = (CompoundQueryCondition) condition; if (!isOperator(key)) { serializer = findQuerySerializer(compound.targetIsCollection(), key, serializerProvider, serializer); } return serializeQuery(serializerProvider, serializer, compound.getQuery()); } }
Source:
public boolean hasSubTypes() { if (linkedType!=null) { return linkedType.hasSubTypes(); } else return false; }

Target:
public boolean hasSubTypes() { return linkedType.hasSubTypes(); }
Source:
public FirebaseIndexListAdapter(Activity activity, Class<T> modelClass, @LayoutRes int modelLayout, Query keyQuery, DatabaseReference dataRef) { init(activity, new FirebaseIndexArray<>(keyQuery, dataRef, this), modelClass, modelLayout); }

Target:
public FirebaseIndexListAdapter(Activity activity, Class<T> modelClass, @LayoutRes int modelLayout, Query keyQuery, DatabaseReference dataRef) { this(activity, new ClassSnapshotParser<>(modelClass), modelLayout, keyQuery, dataRef); }
Source:
private ValueMetaInterface getValueFromSQLType( ResultSetMetaData rm, int i, boolean ignoreLength, boolean lazyConversion ) throws KettleDatabaseException, SQLException { String name = null; if ( databaseMeta.isMySQLVariant() ) { name = databaseMeta.getDatabaseInterface().getLegacyColumnName( getDatabaseMetaData(), rm, i ); } if ( Utils.isEmpty( name ) || Const.onlySpaces( name ) ) { name = "Field" + ( i + 1 ); } ValueMetaInterface valueMeta = null; for ( ValueMetaInterface valueMetaClass : valueMetaPluginClasses ) { ValueMetaInterface v = valueMetaClass.getValueFromSQLType( databaseMeta, name, rm, i, ignoreLength, lazyConversion ); if ( v != null ) { valueMeta = v; break; } } if ( valueMeta != null ) { return valueMeta; } throw new KettleDatabaseException( "Unable to handle database column '" + name + "', on column index " + i + " : not a handled data type" ); }

Target:
private ValueMetaInterface getValueFromSQLType( ResultSetMetaData rm, int i, boolean ignoreLength, boolean lazyConversion ) throws KettleDatabaseException, SQLException { String name; if ( databaseMeta.isMySQLVariant() ) { name = databaseMeta.getDatabaseInterface().getLegacyColumnName( getDatabaseMetaData(), rm, i ); } else { name = new String( rm.getColumnName( i ) ); } if ( Utils.isEmpty( name ) || Const.onlySpaces( name ) ) { name = "Field" + ( i + 1 ); } ValueMetaInterface valueMeta = null; for ( ValueMetaInterface valueMetaClass : valueMetaPluginClasses ) { ValueMetaInterface v = valueMetaClass.getValueFromSQLType( databaseMeta, name, rm, i, ignoreLength, lazyConversion ); if ( v != null ) { valueMeta = v; break; } } if ( valueMeta != null ) { return valueMeta; } throw new KettleDatabaseException( "Unable to handle database column '" + name + "', on column index " + i + " : not a handled data type" ); }
Source:
public RepositoryObject setModel(Model model) { this.model = model; return this; }

Target:
public void setModel(Model model) { this.model = model; }
Source:
public static @CheckForNull Fingerprint load(@NonNull File file) throws IOException { XmlFile configFile = getConfigFile(file); if(!configFile.exists()) return null; try { Object loaded = configFile.read(); if (!(loaded instanceof Fingerprint)) { throw new IOException("Unexpected Fingerprint type. Expected " + Fingerprint.class + " or subclass but got " + (loaded != null ? loaded.getClass() : "null")); } Fingerprint f = (Fingerprint) loaded; return f; } catch (IOException e) { if(file.exists() && file.length()==0) { logger.log(Level.WARNING, "Size zero fingerprint. Disk corruption? {0}", configFile); file.delete(); return null; } String parseError = messageOfParseException(e); if (parseError != null) { logger.log(Level.WARNING, "Malformed XML in {0}: {1}", new Object[] {configFile, parseError}); file.delete(); return null; } logger.log(Level.WARNING, "Failed to load "+configFile,e); throw e; } }

Target:
public static @CheckForNull Fingerprint load(@NonNull File file) throws IOException { XmlFile configFile = getConfigFile(file); if(!configFile.exists()) { return null; } try { Object loaded = configFile.read(); if (!(loaded instanceof Fingerprint)) { throw new IOException("Unexpected Fingerprint type. Expected " + Fingerprint.class + " or subclass but got " + (loaded != null ? loaded.getClass() : "null")); } Fingerprint f = (Fingerprint) loaded; return f; } catch (IOException e) { if(file.exists() && file.length() == 0) { logger.log(Level.WARNING, "Size zero fingerprint. Disk corruption? {0}", configFile); file.delete(); return null; } String parseError = messageOfParseException(e); if (parseError != null) { logger.log(Level.WARNING, "Malformed XML in {0}: {1}", new Object[] {configFile, parseError}); file.delete(); return null; } logger.log(Level.WARNING, "Failed to load " + configFile, e); throw e; } }
Source:
public static OGCGeometry createFromEsriGeometry(Geometry geometry, boolean multiType) { Geometry.Type type = geometry.getType(); switch (type) { case Polygon: { if (!multiType && ((Polygon) geometry).getExteriorRingCount() <= 1) { return new OGCPolygon((Polygon) geometry, null); } else { return new OGCMultiPolygon((Polygon) geometry, null); } } case Polyline: { if (!multiType && ((Polyline) geometry).getPathCount() <= 1) { return new OGCLineString((Polyline) geometry, 0, null); } else { return new OGCMultiLineString((Polyline) geometry, null); } } case MultiPoint: { if (!multiType && ((MultiPoint) geometry).getPointCount() <= 1) { if (geometry.isEmpty()) { return new OGCPoint(new Point(), null); } else { return new OGCPoint(((MultiPoint) geometry).getPoint(0), null); } } else { return new OGCMultiPoint((MultiPoint) geometry, null); } } case Point: { if (!multiType) { return new OGCPoint((Point) geometry, null); } else { return new OGCMultiPoint((Point) geometry, null); } } default: throw new IllegalArgumentException("Unexpected geometry type: " + type); } }

Target:
private static OGCGeometry createFromEsriGeometry(Geometry geometry, boolean multiType) { Geometry.Type type = geometry.getType(); switch (type) { case Polygon: { if (!multiType && ((Polygon) geometry).getExteriorRingCount() <= 1) { return new OGCPolygon((Polygon) geometry, null); } return new OGCMultiPolygon((Polygon) geometry, null); } case Polyline: { if (!multiType && ((Polyline) geometry).getPathCount() <= 1) { return new OGCLineString((Polyline) geometry, 0, null); } return new OGCMultiLineString((Polyline) geometry, null); } case MultiPoint: { if (!multiType && ((MultiPoint) geometry).getPointCount() <= 1) { if (geometry.isEmpty()) { return new OGCPoint(new Point(), null); } return new OGCPoint(((MultiPoint) geometry).getPoint(0), null); } return new OGCMultiPoint((MultiPoint) geometry, null); } case Point: { if (!multiType) { return new OGCPoint((Point) geometry, null); } return new OGCMultiPoint((Point) geometry, null); } default: throw new IllegalArgumentException("Unexpected geometry type: " + type); } }
Source:
public boolean checkPreConditions(Vendor<? extends T> vendor, IEclipseContext context) { final List<PreCondition> preConditionList = new ArrayList<PreCondition>(); final PreCondition[] preConditions = vendor.getClass().getAnnotationsByType(PreCondition.class); preConditionList.addAll(Arrays.asList(preConditions)); final PreConditions conditions = vendor.getClass().getAnnotation(PreConditions.class); if (conditions != null) { preConditionList.addAll(Arrays.asList(conditions.preConditions())); } for (final PreCondition preCondition : preConditionList) { if (!checkPreCondition(preCondition, vendor, context)) { return false; } } return true; }

Target:
public boolean checkPreConditions(Vendor<? extends T> vendor, IEclipseContext context) { final List<PreCondition> preConditionList = new ArrayList<PreCondition>(); final PreCondition preConditionAnnotation = vendor.getClass().getAnnotation(PreCondition.class); if (preConditionAnnotation != null) { preConditionList.add(preConditionAnnotation); } final PreConditions conditions = vendor.getClass().getAnnotation(PreConditions.class); if (conditions != null) { preConditionList.addAll(Arrays.asList(conditions.preConditions())); } for (final PreCondition preCondition : preConditionList) { if (!checkPreCondition(preCondition, vendor, context)) { return false; } } return true; }
Source:
public int run() throws IOException { Preconditions.checkArgument(targets != null && targets.size() == 1, "A data file is required."); String source = targets.get(0); CodecFactory codecFactory = Codecs.avroCodec(compressionCodecName); Schema schema; if (avroSchemaFile != null) { schema = Schemas.fromAvsc(open(avroSchemaFile)); } else { schema = getAvroSchema(source); } Schema projection = filterSchema(schema, columns); Path outPath = qualifiedPath(outputPath); FileSystem outFS = outPath.getFileSystem(getConf()); if (!overwrite && outFS.exists(outPath)) { throw new FileAlreadyExistsException("Output file " + outputPath + " already exists"); } Iterable<Record> reader = openDataFile(source, projection); boolean threw = true; long count = 0; try { DatumWriter<Record> datumWriter = new GenericDatumWriter<>(schema); DataFileWriter<Record> w = new DataFileWriter<>(datumWriter); w.setCodec(codecFactory); try (DataFileWriter<Record> writer = w.create(projection, create(outputPath))) { for (Record record : reader) { writer.append(record); count += 1; } } threw = false; } catch (RuntimeException e) { throw new RuntimeException("Failed on record " + count, e); } finally { if (reader instanceof Closeable) { Closeables.close((Closeable) reader, threw); } } return 0; }

Target:
public int run() throws IOException { Preconditions.checkArgument(targets != null && targets.size() == 1, "A data file is required."); String source = targets.get(0); CodecFactory codecFactory = Codecs.avroCodec(compressionCodecName); final Schema schema; if (avroSchemaFile != null) { schema = Schemas.fromAvsc(open(avroSchemaFile)); } else { schema = getAvroSchema(source); } final Schema projection = filterSchema(schema, columns); Iterable<Record> reader = openDataFile(source, projection); boolean threw = true; long count = 0; DatumWriter<Record> datumWriter = new GenericDatumWriter<>(schema); try (DataFileWriter<Record> fileWriter = new DataFileWriter<>(datumWriter)) { fileWriter.setCodec(codecFactory); try (OutputStream os = overwrite ? create(outputPath) : createWithNoOverwrite(outputPath); DataFileWriter<Record> writer = fileWriter.create(projection, os)) { for (Record record : reader) { writer.append(record); count += 1; } } threw = false; } catch (RuntimeException e) { throw new RuntimeException("Failed on record " + count, e); } finally { if (reader instanceof Closeable) { Closeables.close((Closeable) reader, threw); } } return 0; }
Source:
private void handleError(Exception e, VDSStatus status) { log.errorFormat( "Host installation failed for host {0}, {1}.", getVds().getId(), getVds().getName(), e ); setVdsStatus(status); setSucceeded(false); _failureMessage = getErrorMessage(e.getMessage()); addCustomValue("FailedInstallMessage", _failureMessage); }

Target:
private void handleError(Exception e, VDSStatus status) { log.errorFormat( "Host installation failed for host {0}, {1}.", getVds().getId(), getVds().getName(), e ); setVdsStatus(status); setSucceeded(false); _failureMessage = e.getMessage(); }
Source:
public void handleClusterCreationFailure(StackView stackView, Exception exception) { if (stackView.getClusterView() != null) { String errorMessage = getErrorMessageFromException(exception); clusterService.updateClusterStatusByStackId(stackView.getId(), CREATE_FAILED, errorMessage); stackUpdater.updateStackStatus(stackView.getId(), DetailedStackStatus.AVAILABLE); flowMessageService.fireEventAndLog(stackView.getId(), CREATE_FAILED.name(), CLUSTER_CREATE_FAILED, errorMessage); } else { LOGGER.info("Cluster was null. Flow action was not required."); } }

Target:
public void handleClusterCreationFailure(StackView stackView, Exception exception) { if (stackView.getClusterView() != null) { String errorMessage = clusterCreationService.getErrorMessageFromException(exception); clusterService.updateClusterStatusByStackId(stackView.getId(), UPDATE_FAILED, errorMessage); stackUpdater.updateStackStatus(stackView.getId(), DetailedStackStatus.AVAILABLE); flowMessageService.fireEventAndLog(stackView.getId(), UPDATE_FAILED.name(), CLUSTER_SALT_UPDATE_FAILED, errorMessage); } else { LOGGER.info("Cluster was null. Flow action was not required."); } }
Source:
public static Status fromValue(String value) { Optional<Status> status = Enums.getIfPresent(Status.class, value.toUpperCase()); checkArgument(status.isPresent(), "%s is not a valid value", value); return status.get(); }

Target:
public static Status fromValue(String value) { Optional<Status> status = Enums.getIfPresent(Status.class, value.toUpperCase()); checkArgument(status.isPresent(), "Expected one of %s but was %s", Joiner.on(',').join(Status.values()), value); return status.get(); }
Source:
protected ChartDataBase(Chart chartContainer) { this.container = chartContainer; chartContainer.addDataComponent(this); initChartData(); DataSourceValue(""); threadRunner = Executors.newSingleThreadExecutor(); container.$form().registerForOnBeforeInitialize(this); }

Target:
protected ChartDataBase(Chart chartContainer) { this.container = chartContainer; chartContainer.addDataComponent(this); initChartData(); DataSourceKey(""); threadRunner = Executors.newSingleThreadExecutor(); }
Source:
public ConceptName getShortNameInLocale(Locale locale) { ConceptName bestMatch = null; if (locale != null && !getShortNames().isEmpty()) { for (ConceptName shortName : getShortNames()) { Locale nameLocale = shortName.getLocale(); if (nameLocale.equals(locale)) { return shortName; } if (OpenmrsUtil.nullSafeEquals(locale.getLanguage(), nameLocale.getLanguage())) { bestMatch = shortName; } else if (bestMatch == null && StringUtils.isNotBlank(locale.getCountry()) && locale.getCountry().equals(nameLocale.getCountry())) { bestMatch = shortName; } } } return bestMatch; }

Target:
public ConceptName getShortNameInLocale(Locale locale) { ConceptName bestMatch = null; if (locale != null && CollectionUtils.isNotEmpty(getShortNames())) { for (ConceptName shortName : getShortNames()) { Locale nameLocale = shortName.getLocale(); if (nameLocale.equals(locale)) { return shortName; } if (OpenmrsUtil.nullSafeEquals(locale.getLanguage(), nameLocale.getLanguage())) { bestMatch = shortName; } else if (bestMatch == null && StringUtils.isNotBlank(locale.getCountry()) && locale.getCountry().equals(nameLocale.getCountry())) { bestMatch = shortName; } } } return bestMatch; }
Source:
private JLoadProfileRps(Builder builder) { Objects.nonNull(builder); this.requestsPerSecond = builder.requestsPerSecond; this.maxLoadThreads = builder.maxLoadThreads; this.warmUpTimeInSeconds = builder.warmUpTimeInSeconds; this.tickInterval = builder.tickInterval; }

Target:
private JLoadProfileRps(Builder builder) { Objects.requireNonNull(builder); this.requestsPerSecond = builder.requestsPerSecond; this.maxLoadThreads = builder.maxLoadThreads; this.warmUpTimeInSeconds = builder.warmUpTimeInSeconds; this.tickInterval = builder.tickInterval; }
Source:
protected void onPostExecute(LoginStatus status) { super.onPostExecute(status); if (status!=LoginStatus.OK) { Toast.makeText(appContext, appContext.getString(R.string.error_sync, appContext.getString(status.str)), Toast.LENGTH_LONG).show(); for (Throwable e : exceptions) { Toast.makeText(appContext, e.getClass().getName() + ": " + e.getMessage(), Toast.LENGTH_LONG).show(); } } syncActive = false; for (ICallback callback : callbacks) { callback.onFinish(); } if(syncScheduled) { scheduleSync(false); } }

Target:
protected void onPostExecute(LoginStatus status) { super.onPostExecute(status); if (status!=LoginStatus.OK) { Toast.makeText(appContext, appContext.getString(R.string.error_sync, appContext.getString(status.str)), Toast.LENGTH_LONG).show(); for (Throwable e : exceptions) { Toast.makeText(appContext, e.getClass().getName() + ": " + e.getMessage(), Toast.LENGTH_LONG).show(); } } syncActive = false; for (ICallback callback : callbacks) { callback.onFinish(); } dbHelper.notifyNotesChanged(); if(syncScheduled) { scheduleSync(false); } }
Source:
public DispatchCall(ExceptionHandler exceptionHandler, SecurityCookieAccessor securityCookieAccessor, A action, AsyncCallback<R> callback) { this.action = action; this.callback = callback; this.exceptionHandler = exceptionHandler; this.securityCookieAccessor = securityCookieAccessor; prepareCall(); }

Target:
public DispatchCall( ExceptionHandler exceptionHandler, SecurityCookieAccessor securityCookieAccessor, A action, AsyncCallback<R> callback) { this.action = action; this.callback = callback; this.exceptionHandler = exceptionHandler; this.securityCookieAccessor = securityCookieAccessor; }
Source:
public Object compute(Map<String, Object> combinedAggregators) { fn = getCompiledScript(); final Object[] args = new Object[fieldNames.size()]; int i = 0; for (String field : fieldNames) { args[i++] = combinedAggregators.get(field); } return fn.apply(args); }

Target:
public Object compute(Map<String, Object> combinedAggregators) { Function fn = getCompiledScript(); final Object[] args = new Object[fieldNames.size()]; int i = 0; for (String field : fieldNames) { args[i++] = combinedAggregators.get(field); } return fn.apply(args); }