auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected static SimpleFeatureCollection getFeatures(String endPoint, String user, String pass, Map<String, String> query, CoordinateReferenceSystem crs, boolean tryGeoJSON, OskariGMLDecoder gmlDecoder) { String url; ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] response; Map<String, String> responseHeaders; SimpleFeatureCollection fc; if (tryGeoJSON) { query.put("OUTPUTFORMAT", "application/json"); url = IOHelper.constructUrl(endPoint, query); responseHeaders = OskariWFSClient.readResponseTo(endPoint, user, pass, query, baos); response = baos.toByteArray(); fc = parseGeoJSON(response, crs, url); if (fc != null) { return fc; } fc = parseGML(response, crs, url, user, pass, gmlDecoder); if (fc != null) { return fc; } } query.remove("OUTPUTFORMAT"); url = IOHelper.constructUrl(endPoint, query); baos.reset(); responseHeaders = OskariWFSClient.readResponseTo(endPoint, user, pass, query, baos); response = baos.toByteArray(); fc = parseGML(response, crs, url, user, pass, gmlDecoder); if (fc != null) { return fc; } throw new ServiceRuntimeException("Failed to get features"); }

Target:
protected static SimpleFeatureCollection getFeatures(String endPoint, String user, String pass, Map<String, String> query, CoordinateReferenceSystem crs, boolean tryGeoJSON, OskariGMLDecoder gmlDecoder) { String url; ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] response; Map<String, String> responseHeaders; SimpleFeatureCollection fc; if (tryGeoJSON) { query.put("OUTPUTFORMAT", "application/json"); url = IOHelper.constructUrl(endPoint, query); responseHeaders = OskariWFSClient.readResponseTo(endPoint, user, pass, query, baos); response = baos.toByteArray(); fc = parseGeoJSON(response, crs, url); if (fc != null) { return fc; } fc = parseGML(response, crs, url, user, pass, gmlDecoder); if (fc != null) { LOG.info("Requested JSON but got GML. Possibly misconfigured service for", url); return fc; } LOG.warn("Requested JSON but didn't get a parseable result. Making a new request for GML. Possibly misconfigured service for", url); } query.remove("OUTPUTFORMAT"); url = IOHelper.constructUrl(endPoint, query); baos.reset(); responseHeaders = OskariWFSClient.readResponseTo(endPoint, user, pass, query, baos); response = baos.toByteArray(); fc = parseGML(response, crs, url, user, pass, gmlDecoder); if (fc != null) { return fc; } throw new ServiceRuntimeException("Failed to get features"); }
Source:
private Module createAndConfigureModuleInstance(ModuleDescriptor moduleDescriptor, ModuleOptions moduleOptions, ModuleDeploymentProperties deploymentProperties) { String name = (String) moduleOptions.asPropertySource().getProperty(MODULE_EXECUTION_FRAMEWORK); if (Processor.MODULE_EXECUTION_FRAMEWORK.equals(name)) { return createSparkModule(moduleDescriptor, moduleOptions, deploymentProperties); } Module module = moduleDescriptor.isComposed() ? createCompositeModule(moduleDescriptor, moduleOptions, deploymentProperties) : createSimpleModule(moduleDescriptor, moduleOptions, deploymentProperties); return module; }

Target:
private Module createAndConfigureModuleInstance(ModuleDescriptor moduleDescriptor, ModuleOptions moduleOptions, ModuleDeploymentProperties deploymentProperties) { Module module = moduleDescriptor.isComposed() ? createCompositeModule(moduleDescriptor, moduleOptions, deploymentProperties) : createSimpleModule(moduleDescriptor, moduleOptions, deploymentProperties); return module; }
Source:
private GroupAwareQueryManagerImpl(final DagGenerator dagGenerator, final ScheduledExecutorServiceWrapper schedulerWrapper, final GroupInfoMap groupInfoMap, @Parameter(NumThreads.class) final int numThreads, final QueryInfoStore planStore, final GroupMetricTracker groupTracker) { this.dagGenerator = dagGenerator; this.scheduler = schedulerWrapper.getScheduler(); this.planStore = planStore; this.groupInfoMap = groupInfoMap; this.numThreads = numThreads; this.groupTracker = groupTracker; groupTracker.start(groupInfoMap); }

Target:
private GroupAwareQueryManagerImpl(final DagGenerator dagGenerator, final ScheduledExecutorServiceWrapper schedulerWrapper, final GroupInfoMap groupInfoMap, @Parameter(NumThreads.class) final int numThreads, final QueryInfoStore planStore, final GroupMetricTracker groupTracker) { this.dagGenerator = dagGenerator; this.scheduler = schedulerWrapper.getScheduler(); this.planStore = planStore; this.groupInfoMap = groupInfoMap; this.numThreads = numThreads; this.groupTracker = groupTracker; groupTracker.start(); }
Source:
public void publish(Exchange message) { Map<Exchange, String> discardedMessages = null; try { mutex.lock(); if (!this.terminating && !this.terminated) { Collection<Exchange> discarded = this.backpressureStrategy.update(buffer, message); if (discarded.iterator().hasNext()) { discardedMessages = new HashMap<>(); for (Exchange ex : discarded) { discardedMessages.put(ex, "Exchange " + ex + " discarded by backpressure strategy " + this.backpressureStrategy); } } } else { discardedMessages = Collections.singletonMap(message, "Exchange " + message + " discarded: subscription closed"); } } finally { mutex.unlock(); } if (discardedMessages != null) { for (Map.Entry<Exchange, String> discarded : discardedMessages.entrySet()) { Exchange exchange = discarded.getKey(); DispatchCallback<Exchange> callback = ReactiveStreamsHelper.getCallback(exchange); if (callback != null) { callback.processed( exchange, new ReactiveStreamsDiscardedException("Discarded by backpressure strategy", exchange, name)); } } } checkAndFlush(); }

Target:
public void publish(Exchange message) { Map<Exchange, String> discardedMessages = null; try { mutex.lock(); if (!this.terminating && !this.terminated) { Collection<Exchange> discarded = this.backpressureStrategy.update(buffer, message); if (!discarded.isEmpty()) { discardedMessages = new HashMap<>(); for (Exchange ex : discarded) { discardedMessages.put(ex, "Exchange " + ex + " discarded by backpressure strategy " + this.backpressureStrategy); } } } else { discardedMessages = Collections.singletonMap(message, "Exchange " + message + " discarded: subscription closed"); } } finally { mutex.unlock(); } if (discardedMessages != null) { for (Exchange exchange: discardedMessages.keySet()) { ReactiveStreamsHelper.invokeDispatchCallback( exchange, new ReactiveStreamsDiscardedException("Discarded by backpressure strategy", exchange, name) ); } } checkAndFlush(); }
Source:
public static DigestSource sha256() { return DigestUtils::sha256Hex; }

Target:
public static DigestSource sha256() { return (data, salt) -> { final byte[] dataDigest = DigestUtils.sha256(data); if (salt == null || salt.length == 0) { return EncodingUtils.BASE64_ENCODER.apply(dataDigest); } else { final byte[] digestedSalt = DigestUtils.sha256(salt); final byte[] result = new byte[digestedSalt.length + dataDigest.length]; System.arraycopy(digestedSalt, 0, result, 0, digestedSalt.length); System.arraycopy(dataDigest, 0, result, digestedSalt.length, dataDigest.length); return EncodingUtils.BASE64_ENCODER.apply(result); } }; }
Source:
public void onPreInit(FMLPreInitializationEvent e) { if (ENABLE_PREINIT) { throw new CustomModLoadingErrorDisplayException("Custom Test Exception", new RuntimeException("Thrown in Pre-Init")) { @Override public void initGui(GuiErrorScreen parent, FontRenderer fontRenderer) { } @Override public void drawScreen(GuiErrorScreen parent, FontRenderer fontRenderer, int mouseRelX, int mouseRelY, float tickTime) { parent.drawCenteredString(parent.mc.fontRenderer, "Custom Test Exception", parent.width / 2, 90, 16777215); parent.drawCenteredString(parent.mc.fontRenderer, LOREM_IPSUM, parent.width / 2, 110, 16777215); } }; } }

Target:
public void onPreInit(FMLPreInitializationEvent e) { if (ENABLE_PREINIT) { throwException("Thrown in Pre-Init"); } }
Source:
private Map<String, List<Mapping>> getMappings(ExecutableElement method) { Map<String, List<Mapping>> mappings = new HashMap<>(); MappingPrism mappingAnnotation = MappingPrism.getInstanceOn( method ); MappingsPrism mappingsAnnotation = MappingsPrism.getInstanceOn( method ); if ( mappingAnnotation != null ) { if ( !mappings.containsKey( mappingAnnotation.target() ) ) { mappings.put( mappingAnnotation.target(), new ArrayList<>() ); } if (mappingAnnotation.source().endsWith( ".*" )) { Type parameterType = typeFactory.getType( method.getParameters().get( 0 ).asType() ); mappings.putAll( getAllMethodsFromClass( new ArrayList<>( Arrays.asList( mappingAnnotation.source().split( "\\." ) ) ), parameterType, "" ) ); } else { Mapping mapping = Mapping.fromMappingPrism( mappingAnnotation, method, messager, typeUtils ); if ( mapping != null ) { mappings.get( mappingAnnotation.target() ).add( mapping ); } } } if ( mappingsAnnotation != null ) { for ( MappingPrism mappingPrism : mappingsAnnotation.value() ) { if (mappingPrism.source().endsWith( ".*" )) { Type parameterType = typeFactory.getType( method.getParameters().get( 0 ).asType() ); mappings.putAll( getAllMethodsFromClass( new ArrayList<>( Arrays.asList( mappingPrism.source().split( "\\." ) ) ), parameterType, "" ) ); } } mappings.putAll( Mapping.fromMappingsPrism( mappingsAnnotation, method, messager, typeUtils ) ); } return mappings; }

Target:
private Map<String, List<Mapping>> getMappings(ExecutableElement method) { Map<String, List<Mapping>> mappings = new HashMap<>(); MappingPrism mappingAnnotation = MappingPrism.getInstanceOn( method ); MappingsPrism mappingsAnnotation = MappingsPrism.getInstanceOn( method ); if ( mappingAnnotation != null ) { if ( !mappings.containsKey( mappingAnnotation.target() ) ) { mappings.put( mappingAnnotation.target(), new ArrayList<>() ); } if ( mappingAnnotation.target().equals( "." ) && mappingAnnotation.source().isEmpty() ) { return mappings; } Mapping mapping = Mapping.fromMappingPrism( mappingAnnotation, method, messager, typeUtils ); if ( mapping != null ) { mappings.get( mappingAnnotation.target() ).add( mapping ); } } if ( mappingsAnnotation != null ) { mappings.putAll( Mapping.fromMappingsPrism( mappingsAnnotation, method, messager, typeUtils ) ); } return mappings; }
Source:
public void register(final Element element) { if (checkNotRegistered(element)) { final Object definition = ((Definition) element.getContent()).getDefinition(); if (!isDecisionServiceDefinition(definition)) { return; } final Canvas<?> canvas = canvasHandler.getCanvas(); final Shape<?> shape = canvas.getShape(element.getUUID()); final ShapeView<?> shapeView = shape.getShapeView(); if (!isDecisionServiceShapeView(shapeView)) { return; } final DecisionServiceSVGShapeView decisionServiceShapeView = (DecisionServiceSVGShapeView) shapeView; final DragHandler dragHandler = new DragHandler() { @Override public void start(final DragEvent event) { } @Override public void handle(final DragEvent event) { } @Override public void end(final DragEvent event) { final CommandResult<CanvasViolation> result = doMoveDivider(element, decisionServiceShapeView.getDividerLineY()); if (CommandUtils.isError(result)) { LOGGER.log(Level.WARNING, "Command failed at resize end [result=" + result + "]"); } } }; decisionServiceShapeView.addDividerDragHandler(dragHandler); registerHandler(element.getUUID(), dragHandler); } }

Target:
public void register(final Element element) { if (checkNotRegistered(element)) { final Object definition = ((Definition) element.getContent()).getDefinition(); if (!isDecisionServiceDefinition(definition)) { return; } final Canvas<?> canvas = canvasHandler.getCanvas(); final Shape<?> shape = canvas.getShape(element.getUUID()); final ShapeView<?> shapeView = shape.getShapeView(); if (!isDecisionServiceShapeView(shapeView)) { return; } final DecisionServiceSVGShapeView decisionServiceShapeView = (DecisionServiceSVGShapeView) shapeView; final DragHandler dragHandler = new DragHandler() { @Override public void end(final DragEvent event) { final CommandResult<CanvasViolation> result = doMoveDivider(element, decisionServiceShapeView.getDividerLineY()); if (CommandUtils.isError(result)) { LOGGER.log(Level.WARNING, "Command failed at resize end [result=" + result + "]"); } } }; decisionServiceShapeView.addDividerDragHandler(dragHandler); registerHandler(element.getUUID(), dragHandler); } }
Source:
private boolean checkCRC(byte[] data, int len) { byte checksum = PowerMaxCommDriver.computeCRC(data, len); byte expected = data[len - 2]; if (checksum != expected) { logger.debug("CRC check failed (expected {}, got {})", String.format("%02X", expected), String.format("%02X", checksum)); } return (checksum == expected); }

Target:
private boolean checkCRC(byte[] data, int len) { byte checksum = PowerMaxCommDriver.computeCRC(data, len); byte expected = data[len - 2]; if (checksum != expected) { byte[] logData = Arrays.copyOf(data, len); logger.warn("PowerMax alarm binding: message CRC check failed (expected {}, got {}, message {})", String.format("%02X", expected), String.format("%02X", checksum), DatatypeConverter.printHexBinary(logData)); } return (checksum == expected); }
Source:
public Iterator<Pair<String,String[]>> iterator() { final Iterator<LabelSchemaDescriptor> iterator = indexMap.keySet().iterator(); return new Iterator<Pair<String,String[]>>() { @Override public boolean hasNext() { return iterator.hasNext(); } @Override public Pair<String,String[]> next() { LabelSchemaDescriptor next = iterator.next(); String label = labels.byIdOrFail( next.getLabelId() ); String[] propertyKey = propertyKeys.byIdOrFail( next.getPropertyIds() ); return Pair.of( label, propertyKey ); } @Override public void remove() { iterator.remove(); } }; }

Target:
public Iterator<Pair<String,String[]>> iterator() { final Iterator<LabelSchemaDescriptor> iterator = indexMap.keySet().iterator(); return new Iterator<Pair<String,String[]>>() { @Override public boolean hasNext() { return iterator.hasNext(); } @Override public Pair<String,String[]> next() { LabelSchemaDescriptor next = iterator.next(); String label = labels.byIdOrFail( next.getLabelId() ); String[] propertyKeyNames = propertyKeys.byIdOrFail( next.getPropertyIds() ); return Pair.of( label, propertyKeyNames ); } @Override public void remove() { iterator.remove(); } }; }
Source:
public void setUp() throws Exception { tournament = new Tournament(); }

Target:
public void setUp() { tournament = new Tournament(); }
Source:
public void testStartWorkflowOperation() throws OperationException { try (OperationContext ctx = new OperationContext(session)) { ctx.setInput(doc); automationService.run(ctx, "Scripting.starytMyRoute"); DocumentModel routeInstance = session.getDocument(new IdRef((String) ctx.get("WorkflowId"))); GraphRoute graph = routeInstance.getAdapter(GraphRoute.class); Map<String, Serializable> vars = graph.getVariables(); assertNotNull(vars.get("datefield")); assertEquals(vars.get("stringfield"), "test"); assertNotNull(vars.get("myassignees")); assertTrue(vars.get("myassignees") instanceof String[]); String[] assignees = (String[]) vars.get("myassignees"); assertEquals(assignees.length, 2); assertEquals(assignees[0], "x"); assertEquals(assignees[1], "y"); } }

Target:
public void testStartWorkflowOperation() throws OperationException { try (OperationContext ctx = new OperationContext(session)) { ctx.setInput(doc); automationService.run(ctx, "Scripting.starytMyRoute"); DocumentModel routeInstance = session.getDocument(new IdRef((String) ctx.get("WorkflowId"))); GraphRoute graph = routeInstance.getAdapter(GraphRoute.class); Map<String, Serializable> vars = graph.getVariables(); assertNotNull(vars.get("datefield")); assertEquals(vars.get("stringfield"), "test"); assertNotNull(vars.get("myassignees")); assertTrue(vars.get("myassignees") instanceof String[]); String[] assignees = (String[]) vars.get("myassignees"); assertArrayEquals(new String[] { "x", "y" }, assignees); } }
Source:
public void onAdvancedUserFilter(ActionEvent actionEvent) { advancedUserFilter.setSelected(userFilterController.isFilterAppliedProperty().getValue()); if (filterUserPopup.isShowing()) { filterUserPopup.hide(); return; } ToggleButton button = (ToggleButton) actionEvent.getSource(); Bounds screenBounds = advancedUserFilter.localToScreen(advancedUserFilter.getBoundsInLocal()); filterUserPopup.show(button.getScene().getWindow(), screenBounds.getMinX(), screenBounds.getMaxY()); }

Target:
public void onAdvancedUserFilter(ActionEvent actionEvent) { advancedUserFilter.setSelected(userFilterController.isFilterApplied()); if (filterUserPopup.isShowing()) { filterUserPopup.hide(); return; } ToggleButton button = (ToggleButton) actionEvent.getSource(); Bounds screenBounds = advancedUserFilter.localToScreen(advancedUserFilter.getBoundsInLocal()); filterUserPopup.show(button.getScene().getWindow(), screenBounds.getMinX(), screenBounds.getMaxY()); }
Source:
public synchronized CustomPrintWriter getPrintWriter() { wasUsed = true; if (writer == null) { clearRemover(); try { this.stream = new IsClosedOutputStream(new FileOutputStream(file, append)); this.writer = getExtendedPrintWriter((OutputStream) this.stream); } catch (FileNotFoundException e) { throw new ConcurrentIOException(e); } } return writer; }

Target:
public synchronized CustomPrintWriter getPrintWriter() { wasUsed = true; if (writer == null) { clearRemover(); try { this.stream = new QueryableOutputStream(new FileOutputStream(file, append)); this.writer = getCustomPrintWriter((OutputStream) this.stream); } catch (FileNotFoundException e) { throw new ConcurrentIOException(e); } } return writer; }
Source:
public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel sourceFile) { XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); Document document = xmlFileService.loadDocumentQuiet(context, sourceFile); String xsdUrl = getXSDSchemaLocationUrl(document); try { if(xsdUrl != null && !xsdUrl.isEmpty() && !isXmlValid(sourceFile,xsdUrl)) { ClassificationService classificationService = new ClassificationService(event.getGraphContext()); ClassificationModel model =classificationService.attachClassification(context, sourceFile, XmlFileModel.NOT_VALID_XML, null); TagSetService tagSetService = new TagSetService(event.getGraphContext()); model.setTagModel(tagSetService.getOrCreate(event, Collections.singleton(NOT_VALID_XML_TAG))); } } catch (MalformedURLException e) { e.printStackTrace(); } catch (SAXException e) { final Throwable cause = e.getCause(); if(cause instanceof UnknownHostException) { } else if(cause instanceof FileNotFoundException) { FileLocationModel rootElementLocation = createLocationModelFromNodeElement(document.getDocumentElement(),event.getGraphContext(),sourceFile); final InlineHintModel inlineHintModel = InlineHintService.addTypeToModel(event.getGraphContext(), rootElementLocation, InlineHintModel.class); inlineHintModel.setTitle(XmlFileModel.XSD_URL_NOT_VALID); inlineHintModel.setHint(xsdUrl + " is not a valid url."); inlineHintModel.setEffort(1); } } }

Target:
public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel sourceFile) { XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); Document document = xmlFileService.loadDocumentQuiet(context, sourceFile); String xsdUrl = getXSDSchemaLocationUrl(document); try { if(xsdUrl != null && !xsdUrl.isEmpty() && !isXmlValid(sourceFile,xsdUrl)) { ClassificationService classificationService = new ClassificationService(event.getGraphContext()); ClassificationModel model =classificationService.attachClassification(context, sourceFile, XmlFileModel.NOT_VALID_XML, null); TagSetService tagSetService = new TagSetService(event.getGraphContext()); model.setTagModel(tagSetService.getOrCreate(event, Collections.singleton(NOT_VALID_XML_TAG))); } } catch (MalformedURLException e) { FileLocationModel rootElementLocation = createLocationModelFromNodeElement(document.getDocumentElement(),event.getGraphContext(),sourceFile); createUrlNotValidHint(event.getGraphContext(), rootElementLocation, xsdUrl); } catch (Exception e) { final Throwable cause = e.getCause(); if(cause instanceof UnknownHostException) { } else if(cause instanceof FileNotFoundException) { FileLocationModel rootElementLocation = createLocationModelFromNodeElement(document.getDocumentElement(),event.getGraphContext(),sourceFile); createUrlNotValidHint(event.getGraphContext(),rootElementLocation,xsdUrl); } } }
Source:
private RestResponse resetCounter(RestRequest request) throws RestResponseException { try { String counterName = request.variables().get("counterName"); NettyRestResponse.Builder responseBuilder = new NettyRestResponse.Builder(); CounterConfiguration configuration = counterManager.getConfiguration(counterName); if (configuration == null) { return responseBuilder.status(HttpResponseStatus.NOT_FOUND.code()).entity("Counter not found").build(); } else { switch (configuration.type()) { case WEAK: counterManager.getWeakCounter(counterName).reset(); break; case BOUNDED_STRONG: case UNBOUNDED_STRONG: counterManager.getStrongCounter(counterName).reset(); break; } } responseBuilder.status(HttpResponseStatus.OK.code()); return responseBuilder.build(); } catch (CacheException e) { throw new RestResponseException(e); } }

Target:
private RestResponse resetCounter(RestRequest request) throws RestResponseException { try { String counterName = request.variables().get("counterName"); NettyRestResponse.Builder responseBuilder = new NettyRestResponse.Builder(); CounterConfiguration configuration = counterManager.getConfiguration(counterName); if (configuration == null) { return responseBuilder.status(HttpResponseStatus.NOT_FOUND.code()).entity("Counter not found").build(); } else { switch (configuration.type()) { case WEAK: counterManager.getWeakCounter(counterName).reset().get(1, TimeUnit.MINUTES); break; case BOUNDED_STRONG: case UNBOUNDED_STRONG: counterManager.getStrongCounter(counterName).reset().get(1, TimeUnit.MINUTES); break; } } responseBuilder.status(HttpResponseStatus.OK.code()); return responseBuilder.build(); } catch (Exception e) { throw new RestResponseException(e); } }
Source:
private void report(ConstraintCheckIssue issue, Kind kind) { String message = errorMessages.getString( issue.getMessageKey() ); if ( issue.getMessageParameters() != null ) { message = new MessageFormat( message, Locale.ENGLISH ).format( issue.getMessageParameters() ); } messager.printMessage( kind, message, issue.getElement(), issue.getAnnotationMirror() ); }

Target:
private void report(ConstraintCheckIssue issue, Kind kind) { String message = errorMessages.getString( issue.getMessageKey() ); if ( issue.getMessageParameters() != null ) { message = MessageFormat.format( message, issue.getMessageParameters() ); } messager.printMessage( kind, message, issue.getElement(), issue.getAnnotationMirror() ); }
Source:
public void update(Observable observable, Object rawMessage) { NativeInterface.Message message = parseMessage(rawMessage); if (message == null) { return; } Object arg = message.value; switch (message.type) { case INSTALL: handleInstallMessage(arg); break; case ADD_BREADCRUMB: handleAddBreadcrumb(arg); break; case ADD_METADATA: handleAddMetadata(arg); break; case CLEAR_BREADCRUMBS: clearBreadcrumbs(); break; case CLEAR_METADATA_TAB: handleClearMetadataTab(arg); break; case NOTIFY_HANDLED: addHandledEvent(); break; case REMOVE_METADATA: handleRemoveMetadata(arg); break; case START_SESSION: handleStartSession(arg); break; case UPDATE_APP_VERSION: handleAppVersionChange(arg); break; case UPDATE_BUILD_UUID: handleBuildUUIDChange(arg); break; case UPDATE_CONTEXT: handleContextChange(arg); break; case UPDATE_IN_FOREGROUND: handleForegroundActivityChange(arg); break; case UPDATE_LOW_MEMORY: handleLowMemoryChange(arg); break; case UPDATE_METADATA: handleUpdateMetadata(arg); break; case UPDATE_ORIENTATION: handleOrientationChange(arg); break; case UPDATE_RELEASE_STAGE: handleReleaseStageChange(arg); break; case UPDATE_USER_ID: handleUserIdChange(arg); break; case UPDATE_USER_NAME: handleUserNameChange(arg); break; case UPDATE_USER_EMAIL: handleUserEmailChange(arg); break; default: } }

Target:
public void update(Observable observable, Object rawMessage) { NativeInterface.Message message = parseMessage(rawMessage); if (message == null) { return; } Object arg = message.value; switch (message.type) { case INSTALL: handleInstallMessage(arg); break; case DELIVER_PENDING: deliverPendingReports(); break; case ADD_BREADCRUMB: handleAddBreadcrumb(arg); break; case ADD_METADATA: handleAddMetadata(arg); break; case CLEAR_BREADCRUMBS: clearBreadcrumbs(); break; case CLEAR_METADATA_TAB: handleClearMetadataTab(arg); break; case NOTIFY_HANDLED: addHandledEvent(); break; case REMOVE_METADATA: handleRemoveMetadata(arg); break; case START_SESSION: handleStartSession(arg); break; case UPDATE_APP_VERSION: handleAppVersionChange(arg); break; case UPDATE_BUILD_UUID: handleBuildUUIDChange(arg); break; case UPDATE_CONTEXT: handleContextChange(arg); break; case UPDATE_IN_FOREGROUND: handleForegroundActivityChange(arg); break; case UPDATE_LOW_MEMORY: handleLowMemoryChange(arg); break; case UPDATE_METADATA: handleUpdateMetadata(arg); break; case UPDATE_ORIENTATION: handleOrientationChange(arg); break; case UPDATE_RELEASE_STAGE: handleReleaseStageChange(arg); break; case UPDATE_USER_ID: handleUserIdChange(arg); break; case UPDATE_USER_NAME: handleUserNameChange(arg); break; case UPDATE_USER_EMAIL: handleUserEmailChange(arg); break; default: } }
Source:
public HttpTGTProfile() { this.ticketGrantingTicketId = null; }

Target:
public HttpTGTProfile() { this.ticketGrantingTicketId = null; this.userName = null; }
Source:
public long calcBuffer(long time, long timespan) { universe.calculateBuffer(time); universe.calculateBuffer(time + timespan); try { Thread.sleep(200); } catch (InterruptedException e) { logger.error("failed to sleep for 200 ms"); } return time + timespan; }

Target:
public long calcBuffer(long time, long timespan) { universe.calculateBuffer(time); universe.calculateBuffer(time + timespan); logger.debug("calculated buffer for to (difference {})", time, time + timespan, timespan); return time + timespan; }
Source:
public MockPort() throws UnknownHostException { super(null, null, new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 21212), pool, null); }

Target:
public MockPort() throws UnknownHostException { super(null, null, new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 21212), pool); }
Source:
private Element processServerSideElements(Document doc, ClusteringServiceConfiguration clusteringServiceConfiguration) { Element serverSideConfigurationElem = createServerSideConfigurationElement(doc, clusteringServiceConfiguration); if (clusteringServiceConfiguration.getServerConfiguration() != null) { ServerSideConfiguration serverSideConfiguration = clusteringServiceConfiguration.getServerConfiguration(); String defaultServerResource = serverSideConfiguration.getDefaultServerResource(); if (!(defaultServerResource == null || defaultServerResource.trim().length() == 0)) { Element defaultResourceElement = createDefaultServerResourceElement(doc, defaultServerResource); serverSideConfigurationElem.appendChild(defaultResourceElement); } Map<String, ServerSideConfiguration.Pool> resourcePools = serverSideConfiguration.getResourcePools(); if (!(resourcePools == null || resourcePools.isEmpty())) { resourcePools.forEach( (key, value) -> { Element poolElement = createSharedPoolElement(doc, key, value); serverSideConfigurationElem.appendChild(poolElement); } ); } } return serverSideConfigurationElem; }

Target:
private Element processServerSideElements(Document doc, ClusteringServiceConfiguration clusteringServiceConfiguration) { Element serverSideConfigurationElem = createServerSideConfigurationElement(doc, clusteringServiceConfiguration); if (clusteringServiceConfiguration.getServerConfiguration() != null) { ServerSideConfiguration serverSideConfiguration = clusteringServiceConfiguration.getServerConfiguration(); String defaultServerResource = serverSideConfiguration.getDefaultServerResource(); if (!(defaultServerResource == null || defaultServerResource.trim().length() == 0)) { Element defaultResourceElement = createDefaultServerResourceElement(doc, defaultServerResource); serverSideConfigurationElem.appendChild(defaultResourceElement); } Map<String, ServerSideConfiguration.Pool> resourcePools = serverSideConfiguration.getResourcePools(); if (resourcePools != null) { resourcePools.forEach( (key, value) -> { Element poolElement = createSharedPoolElement(doc, key, value); serverSideConfigurationElem.appendChild(poolElement); } ); } } return serverSideConfigurationElem; }
Source:
public void setup() { MockitoAnnotations.initMocks(this); msgUtil = Mockito.mock(ErrorMessageUtil.class); Mockito.when(msgUtil.getMessage(ArgumentMatchers.eq("listing.duplicateTestingLab"), ArgumentMatchers.anyString())) .thenAnswer(i -> String.format(ERR_MSG, i.getArgument(1), "")); reviewer = new AtlDuplicateReviewer(msgUtil); }

Target:
public void setup() { msgUtil = Mockito.mock(ErrorMessageUtil.class); Mockito.when(msgUtil.getMessage(ArgumentMatchers.eq("listing.duplicateTestingLab"), ArgumentMatchers.anyString())) .thenAnswer(i -> String.format(ERR_MSG, i.getArgument(1), "")); reviewer = new AtlDuplicateReviewer(msgUtil); }
Source:
@Override public void draw(Canvas canvas) { if (!animating) { super.draw(canvas); } else { boolean useColorMatrixTransition = getPaint().getColorFilter() == null; long duration = useColorMatrixTransition ? TRANSITION.getDuration() : DEFAULT_FADE_DURATION; float fraction = (SystemClock.uptimeMillis() - startTimeMillis) / (float) duration; if (fraction >= 1f) { animating = false; placeholder = null; super.draw(canvas); } else { if (placeholder != null) { placeholder.draw(canvas); } if (useColorMatrixTransition) { colorMatrix.reset(); TRANSITION.apply(colorMatrix, fraction); colorMatrix.getArray()[ROW_ALPHA + COLUMN_ALPHA] *= (alpha / 255); super.setColorFilter(new ColorMatrixColorFilter(colorMatrix)); super.draw(canvas); super.setColorFilter(null); } else { int partialAlpha = (int) (alpha * fraction); super.setAlpha(partialAlpha); super.draw(canvas); super.setAlpha(alpha); } if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD_MR1) { invalidateSelf(); } } } if (debugging) { drawDebugIndicator(canvas); } }

Target:
@Override public void draw(Canvas canvas) { if (!animating) { super.draw(canvas); } else { boolean useColorMatrixTransition = getPaint().getColorFilter() == null; long duration = useColorMatrixTransition ? TRANSITION.getDuration() : DEFAULT_FADE_DURATION; float fraction = (SystemClock.uptimeMillis() - startTimeMillis) / (float) duration; if (fraction >= 1f) { animating = false; placeholder = null; super.draw(canvas); } else { if (placeholder != null) { placeholder.draw(canvas); } if (useColorMatrixTransition) { if (colorMatrix == null) { colorMatrix = new ColorMatrix(); } else { colorMatrix.reset(); } TRANSITION.apply(colorMatrix, fraction); colorMatrix.getArray()[ROW_ALPHA + COLUMN_ALPHA] *= (alpha / 255); super.setColorFilter(new ColorMatrixColorFilter(colorMatrix)); super.draw(canvas); super.setColorFilter(null); } else { int partialAlpha = (int) (alpha * fraction); super.setAlpha(partialAlpha); super.draw(canvas); super.setAlpha(alpha); } if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD_MR1) { invalidateSelf(); } } } if (debugging) { drawDebugIndicator(canvas); } }
Source:
private void print(final Request req, final OutputStream output, final boolean keep) throws IOException { try { final Response res = this.retrieveResponse(req, keep); new RsPrint(res).print(output); } catch (final HttpException ex) { new RsPrint(BkBasic.failure(ex, ex.code())).print(output); } catch (final Throwable ex) { new RsPrint( BkBasic.failure( ex, HttpURLConnection.HTTP_INTERNAL_ERROR ) ).print(output); } finally { output.close(); } }

Target:
private void print(final Request req, final OutputStream output, final boolean keep) throws IOException { try { new RsPrint( this.response(req, keep) ).print(output); } catch (final HttpException ex) { new RsPrint(BkBasic.failure(ex, ex.code())).print(output); } catch (final Throwable ex) { new RsPrint( BkBasic.failure( ex, HttpURLConnection.HTTP_INTERNAL_ERROR ) ).print(output); } finally { output.close(); } }
Source:
public String getDescription() { return "Project name of the file currently selected in editor"; }

Target:
public String getDescription() { return localizationConstants.macroEditorCurrentProjectNameDescription(); }
Source:
public void setLoggingEnabled(boolean enabled) { delegate.setLoggingEnabled(enabled); }

Target:
public void setLoggingEnabled(boolean enabled) { this.delegate.setLoggingEnabled(enabled); }
Source:
private Object convertTextToJson(Object content, Charset contentCharset, Charset destinationCharset, boolean asString) throws IOException { byte[] bytes = content instanceof byte[] ? (byte[]) content : content.toString().getBytes(); try (InputStreamReader isr = new InputStreamReader(new ByteArrayInputStream(bytes), contentCharset)) { String jsonTree = objectMapper.readTree(isr).toString(); return asString ? jsonTree : jsonTree.getBytes(destinationCharset); } catch (IOException e) { String contentAsString = new String(bytes, contentCharset); return asString ? objectMapper.writeValueAsString(contentAsString) : objectMapper.writeValueAsBytes(contentAsString); } }

Target:
private Object convertTextToJson(Object content, Charset contentCharset, Charset destinationCharset, boolean asString) throws IOException { byte[] bytes = content instanceof byte[] ? (byte[]) content : content.toString().getBytes(contentCharset); try (InputStreamReader isr = new InputStreamReader(new ByteArrayInputStream(bytes), contentCharset)) { String jsonTree = objectMapper.readTree(isr).toString(); return asString ? jsonTree : jsonTree.getBytes(destinationCharset); } catch (IOException e) { String contentAsString = new String(bytes, contentCharset); return asString ? objectMapper.writeValueAsString(contentAsString) : objectMapper.writeValueAsBytes(contentAsString); } }
Source:
private boolean hasClassesToNewify() { return (classesToNewify != null && !classesToNewify.getExpressions().isEmpty()) || (classNamePattern != null); }

Target:
private boolean hasClassesToNewify() { return classesToNewify != null && !classesToNewify.getExpressions().isEmpty(); }
Source:
protected void connectAllHostsToStorage(List<String> connectionIds) { final List<StorageServerConnections> connections = getDbFacade().getStorageServerConnectionDao().getByIds(connectionIds); List<VDS> hosts = getVdsDAO().getAllForStoragePoolAndStatus(getIscsiBond().getStoragePoolId(), VDSStatus.Up); for (final VDS host : hosts) { try { final List<StorageServerConnections> conns = ISCSIStorageHelper.updateIfaces(connections, host.getId()); runVdsCommand(VDSCommandType.ConnectStorageServer, new StorageServerConnectionManagementVDSParameters(host.getId(), Guid.Empty, StorageType.ISCSI, conns) ); } catch (VdcBLLException e) { log.errorFormat("Could not connect Host {0} - {1} to Iscsi Storage Server. The exception is: {2}", host.getName(), host.getId(), e); } } }

Target:
protected void connectAllHostsToStorage(List<String> connectionIds) { List<Callable<Void>> tasks = new ArrayList<>(); final List<StorageServerConnections> connections = getDbFacade().getStorageServerConnectionDao().getByIds(connectionIds); List<VDS> hosts = getVdsDAO().getAllForStoragePoolAndStatus(getIscsiBond().getStoragePoolId(), VDSStatus.Up); for (final VDS host : hosts) { tasks.add(new Callable<Void>() { @Override public Void call() throws Exception { try { final List<StorageServerConnections> conns = ISCSIStorageHelper.updateIfaces(connections, host.getId()); runVdsCommand(VDSCommandType.ConnectStorageServer, new StorageServerConnectionManagementVDSParameters(host.getId(), Guid.Empty, StorageType.ISCSI, conns) ); } catch (VdcBLLException e) { log.errorFormat("Could not connect Host {0} - {1} to Iscsi Storage Server. The exception is: {2}", host.getName(), host.getId(), e); } return null; } }); } ThreadPoolUtil.invokeAll(tasks); }
Source:
public void run() { ui.header("Git Repositories"); File d = gerrit.path("Location of Git repositories", "basePath", "git"); if (d == null) { throw die("gerrit.basePath is required"); } mkdirs(d); mkdirs(site.resolve("notedb")); }

Target:
public void run() { ui.header("Git Repositories"); File d = gerrit.path("Location of Git repositories", "basePath", "git"); if (d == null) { throw die("gerrit.basePath is required"); } if (!d.exists() && !d.mkdirs()) { throw die("Cannot create " + d); } }
Source:
public static <T, R> List<R> mappedCopy(List<T> elements, Function<T, R> mapper) { return elements.stream() .map(mapper) .collect(toImmutableList()); }

Target:
public static <T, R> List<R> mappedCopy(List<T> elements, Function<T, R> mapper) { requireNonNull(elements, "elements is null"); requireNonNull(mapper, "mapper is null"); return elements.stream() .map(mapper) .collect(toImmutableList()); }
Source:
public boolean primaryIsManual() { return primaryTarget.exists(manualTargets::contains); }

Target:
public boolean primaryIsManual() { return primaryTarget.isDefined() && !primaryIsBagsTarget(); }
Source:
public void endFile() { if (batchRequest != null) { sendBatch(rows); } BatchUpdateSpreadsheetRequest requestBody = new BatchUpdateSpreadsheetRequest(); requestBody.setIncludeSpreadsheetInResponse(false); requestBody.setRequests(requests); Sheets.Spreadsheets.BatchUpdate request; try { logger.info("spreadsheetId: " + spreadsheetId); logger.info("requestBody:" + requestBody.toString()); request = service.spreadsheets().batchUpdate(spreadsheetId, requestBody); BatchUpdateSpreadsheetResponse response = request.execute(); logger.info("response:" + response.toPrettyString()); } catch (IOException e) { exceptions.add(e); } }

Target:
public void endFile() { if (batchRequest != null) { sendBatch(rows); } BatchUpdateSpreadsheetRequest requestBody = new BatchUpdateSpreadsheetRequest(); requestBody.setIncludeSpreadsheetInResponse(false); requestBody.setRequests(requests); Sheets.Spreadsheets.BatchUpdate request; try { logger.debug("spreadsheetId: " + spreadsheetId); logger.debug("requestBody:" + requestBody.toString()); request = service.spreadsheets().batchUpdate(spreadsheetId, requestBody); BatchUpdateSpreadsheetResponse response = request.execute(); logger.debug("response:" + response.toPrettyString()); } catch (IOException e) { exceptions.add(e); } }
Source:
public static void injectMessageBus(SingleNodeApplication application, AbstractTestMessageBus testMessageBus) { ConfigurableApplicationContext containerContext = application.getContainerContext(); StreamPlugin streamPlugin = containerContext.getBean(StreamPlugin.class); ModuleDeployer moduleDeployer = containerContext.getBean(ModuleDeployer.class); RootBeanDefinition bDefinition = new RootBeanDefinition(TestStreamPlugin.class); ConstructorArgumentValues constructorArgumentValues = new ConstructorArgumentValues(); constructorArgumentValues.addIndexedArgumentValue(0, streamPlugin); constructorArgumentValues.addIndexedArgumentValue(1, testMessageBus); bDefinition.setConstructorArgumentValues(constructorArgumentValues); bDefinition.setAttribute("streamPlugin", streamPlugin); bDefinition.setAttribute("testMessageBus", testMessageBus); BeanDefinitionRegistry bdr = (BeanDefinitionRegistry) containerContext.getBeanFactory(); bdr.removeBeanDefinition(STREAM_PLUGIN_BEAN_ID); bdr.registerBeanDefinition(STREAM_PLUGIN_BEAN_ID, bDefinition); moduleDeployer.onInit(); }

Target:
public static void injectMessageBus(SingleNodeApplication application, AbstractTestMessageBus testMessageBus) { ConfigurableApplicationContext containerContext = application.getContainerContext(); StreamPlugin streamPlugin = containerContext.getBean(StreamPlugin.class); ModuleDeployer moduleDeployer = containerContext.getBean(ModuleDeployer.class); RootBeanDefinition bDefinition = new RootBeanDefinition(TestStreamPlugin.class); ConstructorArgumentValues constructorArgumentValues = new ConstructorArgumentValues(); constructorArgumentValues.addIndexedArgumentValue(0, streamPlugin); constructorArgumentValues.addIndexedArgumentValue(1, testMessageBus); bDefinition.setConstructorArgumentValues(constructorArgumentValues); BeanDefinitionRegistry bdr = (BeanDefinitionRegistry) containerContext.getBeanFactory(); bdr.removeBeanDefinition(STREAM_PLUGIN_BEAN_ID); bdr.registerBeanDefinition(STREAM_PLUGIN_BEAN_ID, bDefinition); moduleDeployer.onInit(); }
Source:
public void close() throws Exception { mutator.close(); session.close(); }

Target:
public AsyncFuture<Void> close() { final AsyncFuture<Void> closeSession = async.call(() -> { session.close(); return null; }); return async.collectAndDiscard(ImmutableList.of(mutator.close(), closeSession)); }
Source:
public static boolean isPacketMarked(byte[] buffer, int offset, int length) { return (buffer[offset + 1] & 0x80) != 0; }

Target:
public static boolean isPacketMarked(byte[] buffer, int offset, int length) { if (buffer == null || buffer.length < offset + length || length < 2) { return false; } return (buffer[offset + 1] & 0x80) != 0; }
Source:
protected Server updateServerStatus(Server server) { try { Thread.sleep(5000); } catch (InterruptedException ex) { Logger.getLogger(ServerApiLiveTest.class.getName()).log(Level.SEVERE, null, ex); } return api.serverApi().get(server.id()); }

Target:
protected Server updateServerStatus(Server server) { assertNodeAvailable(server); return api.serverApi().get(server.id()); }
Source:
ShardConsumer(ShardInfo shardInfo, StreamConfig streamConfig, ICheckpoint checkpoint, IRecordProcessor recordProcessor, RecordProcessorCheckpointer recordProcessorCheckpointer, ILeaseManager<KinesisClientLease> leaseManager, long parentShardPollIntervalMillis, boolean cleanupLeasesOfCompletedShards, ExecutorService executorService, IMetricsFactory metricsFactory, long backoffTimeMillis, boolean skipShardSyncAtWorkerInitializationIfLeasesExist, KinesisDataFetcher kinesisDataFetcher, Optional<Integer> retryGetRecordsInSeconds, Optional<Integer> maxGetRecordsThreadPool, KinesisClientLibConfiguration config) { this.shardInfo = shardInfo; this.streamConfig = streamConfig; this.checkpoint = checkpoint; this.recordProcessor = recordProcessor; this.recordProcessorCheckpointer = recordProcessorCheckpointer; this.leaseManager = leaseManager; this.parentShardPollIntervalMillis = parentShardPollIntervalMillis; this.cleanupLeasesOfCompletedShards = cleanupLeasesOfCompletedShards; this.executorService = executorService; this.metricsFactory = metricsFactory; this.taskBackoffTimeMillis = backoffTimeMillis; this.skipShardSyncAtWorkerInitializationIfLeasesExist = skipShardSyncAtWorkerInitializationIfLeasesExist; this.config = config; this.dataFetcher = kinesisDataFetcher; this.getRecordsCache = config.getRecordsFetcherFactory().createRecordsFetcher( makeStrategy(this.dataFetcher, retryGetRecordsInSeconds, maxGetRecordsThreadPool, this.shardInfo), this.getShardInfo().getShardId(), metricsFactory, "ProcessTask"); }

Target:
ShardConsumer(ShardInfo shardInfo, StreamConfig streamConfig, ICheckpoint checkpoint, IRecordProcessor recordProcessor, RecordProcessorCheckpointer recordProcessorCheckpointer, ILeaseManager<KinesisClientLease> leaseManager, long parentShardPollIntervalMillis, boolean cleanupLeasesOfCompletedShards, ExecutorService executorService, IMetricsFactory metricsFactory, long backoffTimeMillis, boolean skipShardSyncAtWorkerInitializationIfLeasesExist, KinesisDataFetcher kinesisDataFetcher, Optional<Integer> retryGetRecordsInSeconds, Optional<Integer> maxGetRecordsThreadPool, KinesisClientLibConfiguration config) { this.shardInfo = shardInfo; this.streamConfig = streamConfig; this.checkpoint = checkpoint; this.recordProcessor = recordProcessor; this.recordProcessorCheckpointer = recordProcessorCheckpointer; this.leaseManager = leaseManager; this.parentShardPollIntervalMillis = parentShardPollIntervalMillis; this.cleanupLeasesOfCompletedShards = cleanupLeasesOfCompletedShards; this.executorService = executorService; this.metricsFactory = metricsFactory; this.taskBackoffTimeMillis = backoffTimeMillis; this.skipShardSyncAtWorkerInitializationIfLeasesExist = skipShardSyncAtWorkerInitializationIfLeasesExist; this.config = config; this.dataFetcher = kinesisDataFetcher; this.getRecordsCache = config.getRecordsFetcherFactory().createRecordsFetcher( makeStrategy(this.dataFetcher, retryGetRecordsInSeconds, maxGetRecordsThreadPool, this.shardInfo), this.getShardInfo().getShardId(), this.metricsFactory); }
Source:
default void contextInitialized(ServletContextEvent event) { if (event.getServletContext().getAttribute(ATTR) == null) { try { init(event); } catch (Exception e) { event.getServletContext().setAttribute(ATTR, true); throw new RuntimeException("Unable to initialize " + this.getClass().getName(), e); } } }

Target:
default void contextInitialized(ServletContextEvent event) { if (event.getServletContext().getAttribute(ATTR) == null) { try { failFastContextInitialized(event); } catch (Exception e) { event.getServletContext().setAttribute(ATTR, true); throw new RuntimeException("Unable to initialize " + this.getClass().getName(), e); } } }
Source:
public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, ProjectionFactory factory, NamedQueries namedQueries) { GraphQueryMethod queryMethod = new GraphQueryMethod(method, metadata, factory); queryMethod.setMappingContext(this.mappingContext); String namedQueryName = queryMethod.getNamedQueryName(); String namedCountQueryName = queryMethod.getNamedCountQueryName(); if (namedQueries.hasQuery(namedQueryName)) { String cypherQuery = namedQueries.getQuery(namedQueryName); String countQuery = ""; if (namedQueries.hasQuery(namedCountQueryName)){ countQuery = namedQueries.getQuery(namedCountQueryName); } return new NamedGraphRepositoryQuery(queryMethod, metaData, session, cypherQuery, countQuery, evaluationContextProvider); } else if (queryMethod.hasAnnotatedQuery()) { return new GraphRepositoryQuery(queryMethod, metaData, session, evaluationContextProvider); } else { return new PartTreeNeo4jQuery(queryMethod, metaData, session); } }

Target:
public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, ProjectionFactory factory, NamedQueries namedQueries) { GraphQueryMethod queryMethod = new GraphQueryMethod(method, metadata, factory); queryMethod.setMappingContext(this.mappingContext); String namedQueryName = queryMethod.getNamedQueryName(); String namedCountQueryName = queryMethod.getNamedCountQueryName(); if (namedQueries.hasQuery(namedQueryName)) { String cypherQuery = namedQueries.getQuery(namedQueryName); if (namedQueries.hasQuery(namedCountQueryName)){ String countQuery = namedQueries.getQuery(namedCountQueryName); return new NamedGraphRepositoryQuery(queryMethod, metaData, session, cypherQuery, countQuery, evaluationContextProvider); } return new NamedGraphRepositoryQuery(queryMethod, metaData, session, cypherQuery, evaluationContextProvider); } else if (queryMethod.hasAnnotatedQuery()) { return new GraphRepositoryQuery(queryMethod, metaData, session, evaluationContextProvider); } else { return new PartTreeNeo4jQuery(queryMethod, metaData, session); } }
Source:
private void deleteServer() { System.out.format("Delete Server%n"); Set<? extends NodeMetadata> servers = computeService.destroyNodesMatching(inGroup(NAME)); for (NodeMetadata nodeMetadata: servers) { System.out.format(" %s%n", nodeMetadata); } }

Target:
private void deleteServer() { System.out.format("Delete Servers in group %s%n", NAME); Set<? extends NodeMetadata> servers = computeService.destroyNodesMatching(inGroup(NAME)); for (NodeMetadata server : servers) { System.out.format(" %s%n", server); } }