auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getGroupObjectCommunityTest() throws Exception { CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService(); Community community = null; Group adminGroup = null; try { context.turnOffAuthorisationSystem(); community = communityService.create(null, context); adminGroup = communityService.createAdministrators(context, community); context.commit(); adminGroup = context.reloadEntity(adminGroup); String authToken = getAuthToken(admin.getEmail(), password); getClient(authToken).perform( get("/api/eperson/groups/" + adminGroup.getID() + "/object") ).andExpect(status().isOk()); } finally { if (community != null) { CommunityBuilder.deleteCommunity(community.getID()); } if (adminGroup != null) { GroupBuilder.deleteGroup(adminGroup.getID()); } } }

Target:
public void getGroupObjectCommunityTest() throws Exception { context.turnOffAuthorisationSystem(); Community community = CommunityBuilder.createCommunity(context) .withName("Parent Community") .withAdminGroup(admin) .build(); Group adminGroup = community.getAdministrators(); context.restoreAuthSystemState(); String authToken = getAuthToken(admin.getEmail(), password); getClient(authToken).perform( get("/api/eperson/groups/" + adminGroup.getID() + "/object") ).andExpect(status().isOk()); }
Source:
public void testAnalyze() { QualifiedName table = QualifiedName.of("foo"); assertStatement("ANALYZE foo", new Analyze(table, ImmutableList.of())); assertStatement("ANALYZE foo WITH ( \"string\" = 'bar', \"long\" = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] )", new Analyze(table, ImmutableList.of( new Property(new Identifier("string"), new StringLiteral("bar")), new Property(new Identifier("long"), new LongLiteral("42")), new Property( new Identifier("computed"), new FunctionCall(QualifiedName.of("concat"), ImmutableList.of(new StringLiteral("ban"), new StringLiteral("ana")))), new Property(new Identifier("a"), new ArrayConstructor(ImmutableList.of(new StringLiteral("v1"), new StringLiteral("v2"))))))); assertStatement("EXPLAIN ANALYZE foo", new Explain(new Analyze(table, ImmutableList.of()), false, false, ImmutableList.of())); assertStatement("EXPLAIN ANALYZE ANALYZE foo", new Explain(new Analyze(table, ImmutableList.of()), true, false, ImmutableList.of())); }

Target:
public void testAnalyze() { QualifiedName table = QualifiedName.of("foo"); assertStatement("ANALYZE foo", new Analyze(table, ImmutableList.of())); assertStatement("ANALYZE foo WITH ( \"string\" = 'bar', \"long\" = 42, computed = concat('ban', 'ana'), a = ARRAY[ 'v1', 'v2' ] )", new Analyze(table, ImmutableList.of( new Property(new Identifier("string"), new StringLiteral("bar")), new Property(new Identifier("long"), new LongLiteral("42")), new Property( new Identifier("computed"), new FunctionCall(QualifiedName.of("concat"), ImmutableList.of(new StringLiteral("ban"), new StringLiteral("ana")))), new Property(new Identifier("a"), new ArrayConstructor(ImmutableList.of(new StringLiteral("v1"), new StringLiteral("v2"))))))); assertStatement("EXPLAIN ANALYZE foo", new Explain(new Analyze(table, ImmutableList.of()), false, false, ImmutableList.of())); assertStatement("EXPLAIN ANALYZE ANALYZE foo", new Explain(new Analyze(table, ImmutableList.of()), true, false, ImmutableList.of())); }
Source:
private Duration processTimeout(Element parentElement, Node timeoutNode) { Duration timeout; try { JAXBContext context = JAXBContext.newInstance(TimeType.class.getPackage().getName()); Unmarshaller unmarshaller = context.createUnmarshaller(); JAXBElement<TimeType> jaxbElement = unmarshaller.unmarshal(timeoutNode, TimeType.class); TimeType timeType = jaxbElement.getValue(); BigInteger amount = timeType.getValue(); if (amount.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0) { throw new XmlConfigurationException( String.format("Value of XML configuration element <%s> in <%s> exceeds allowed value - %s", timeoutNode.getNodeName(), parentElement.getTagName(), amount)); } timeout = Duration.of(amount.longValue(), convertToJavaTimeUnit(timeType.getUnit())); } catch (JAXBException e) { throw new XmlConfigurationException(e); } return timeout; }

Target:
private Duration processTimeout(Element parentElement, Node timeoutNode) { try { JAXBContext context = JAXBContext.newInstance(TimeType.class.getPackage().getName()); Unmarshaller unmarshaller = context.createUnmarshaller(); JAXBElement<TimeType> jaxbElement = unmarshaller.unmarshal(timeoutNode, TimeType.class); TimeType timeType = jaxbElement.getValue(); BigInteger amount = timeType.getValue(); if (amount.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0) { throw new XmlConfigurationException( String.format("Value of XML configuration element <%s> in <%s> exceeds allowed value - %s", timeoutNode.getNodeName(), parentElement.getTagName(), amount)); } return Duration.of(amount.longValue(), convertToJavaTimeUnit(timeType.getUnit())); } catch (JAXBException e) { throw new XmlConfigurationException(e); } }
Source:
public SolrClientFactoryImpl(HttpSolrClientFactory httpSolrClientFactory) { this.clientType = AccessController.doPrivileged( (PrivilegedAction<String>) () -> System.getProperty("solr.client", "HttpSolrClient")); if ("CloudSolrClient".equals(clientType)) { factory = new SolrCloudClientFactory(); isCloud = true; } else { factory = httpSolrClientFactory; } }

Target:
public SolrClientFactoryImpl(HttpSolrClientFactory httpSolrClientFactory) { this.clientType = AccessController.doPrivileged( (PrivilegedAction<String>) () -> System.getProperty("solr.client", "HttpSolrClient")); if ("CloudSolrClient".equals(clientType)) { factory = new SolrCloudClientFactory(); } else { factory = httpSolrClientFactory; } }
Source:
public synchronized void assignFromSubscribed(Collection<TopicPartition> assignments) { if (!this.partitionsAutoAssigned()) throw new IllegalArgumentException("Attempt to dynamically assign partitions while manual assignment in use"); Map<TopicPartition, TopicPartitionState> assignedPartitionStates = partitionToStateMap(assignments); assignmentId++; this.assignment.set(assignedPartitionStates); }

Target:
public synchronized void assignFromSubscribed(Collection<TopicPartition> assignments) { if (!this.hasAutoAssignedPartitions()) throw new IllegalArgumentException("Attempt to dynamically assign partitions while manual assignment in use"); Map<TopicPartition, TopicPartitionState> assignedPartitionStates = new HashMap<>(assignments.size()); for (TopicPartition tp : assignments) { TopicPartitionState state = this.assignment.stateValue(tp); if (state == null) state = new TopicPartitionState(); assignedPartitionStates.put(tp, state); } assignmentId++; this.assignment.set(assignedPartitionStates); }
Source:
public void workbenchSelectionChanged(ISelection selection) { Object o = SelectionUtils.getSelectedObject(selection); if (o instanceof TextSelection) { String text = ((TextSelection) o).getText(); m_sourceGraphControl.setSourceText(text); } else if (o == null) { m_sourceGraphControl.setSourceText(""); } }

Target:
public void workbenchSelectionChanged(ISelection selection) { Object o = SelectionUtils.getSelectedObject(selection); if (o instanceof TextSelection) { String text = ((TextSelection) o).getText(); m_sourceGraphControl.setSourceText(text); } else { m_sourceGraphControl.setSourceText(""); } }
Source:
static void checkGetter(Method getter) { checkNotNull(getter); checkArgument(GETTER_PREFIX_PATTERN.matcher(getter.getName()) .find() && getter.getParameterTypes().length == 0, "Method `%s` is not a getter.", getter); checkArgument(!getter.getName().startsWith(IS) || boolean.class.isAssignableFrom(getter.getReturnType()), "Getter with an `is` prefix should have `boolean` return type."); checkArgument(getAnnotatedVersion(getter).isPresent(), "Entity column getter should be annotated with `%s`.", Column.class.getName()); int modifiers = getter.getModifiers(); checkArgument(isPublic(modifiers) && !isStatic(modifiers), "Entity column getter should be public instance method."); Class<?> returnType = getter.getReturnType(); Class<?> wrapped = wrap(returnType); checkArgument(Serializable.class.isAssignableFrom(wrapped), "Cannot create column of non-serializable type %s by method %s.", returnType, getter); }

Target:
static void checkGetter(Method getter) { checkNotNull(getter); checkArgument(GETTER_PREFIX_PATTERN.matcher(getter.getName()) .find() && getter.getParameterTypes().length == 0, "Method `%s` is not a getter.", getter); Class<?> returnType = getter.getReturnType(); checkArgument(!getter.getName().startsWith(IS_PREFIX) || boolean.class.isAssignableFrom(returnType) || Boolean.class.isAssignableFrom(returnType), "Getter with an `is` prefix should have `boolean` or `Boolean` return type."); checkArgument(getAnnotatedVersion(getter).isPresent(), "Entity column getter should be annotated with `%s`.", Column.class.getName()); int modifiers = getter.getModifiers(); checkArgument(isPublic(modifiers) && !isStatic(modifiers), "Entity column getter should be public instance method."); Class<?> wrapped = wrap(returnType); checkArgument(Serializable.class.isAssignableFrom(wrapped), "Cannot create column of non-serializable type %s by method %s.", returnType, getter); }
Source:
private void assureVectorSize() { int requiredVectorLength = min(nextBatchSize, MAX_BATCH_SIZE); if (nullVector.length < requiredVectorLength) { nullVector = new boolean[requiredVectorLength]; dataVector = new long[requiredVectorLength]; inDictionaryVector = new boolean[requiredVectorLength]; systemMemoryContext.setBytes(requiredVectorLength * 10); } }

Target:
private void assureVectorSize() { int requiredVectorLength = min(nextBatchSize, MAX_BATCH_SIZE); if (nullVector.length < requiredVectorLength) { nullVector = new boolean[requiredVectorLength]; dataVector = new long[requiredVectorLength]; inDictionaryVector = new boolean[requiredVectorLength]; systemMemoryContext.setBytes(getRetainedSizeInBytes()); } }
Source:
public FenceExecutor(VDS vds, FencingPolicy fencingPolicy) { this(vds); this.fencingPolicy = fencingPolicy; }

Target:
public FenceExecutor(VDS vds, FencingPolicy fencingPolicy) { if (! vds.getId().equals(Guid.Empty)) { VDS dbVds = DbFacade.getInstance().getVdsDao().get(vds.getId()); if (vds.getVdsGroupId() == null) { vds.setVdsGroupId(dbVds.getVdsGroupId()); } if (vds.getPmProxyPreferences() == null) { vds.setPmProxyPreferences(dbVds.getPmProxyPreferences()); } } this._vds = vds; this.fencingPolicy = fencingPolicy; this.proxyLocator = new FenceProxyLocator(_vds, fencingPolicy); this.architectureHelper = new VdsArchitectureHelper(); }
Source:
private static void createDatabase() { final String dbUser = getDbUsername(); try (Connection connection = getConnection(getDbRootUri(), dbUser, getDbPassword())) { connection.createStatement().execute("CREATE DATABASE " + PostgresTestDocker.DB_NAME + " WITH owner=" + dbUser + " TEMPLATE postgres"); connection.createStatement().execute("GRANT ALL PRIVILEGES ON DATABASE " + PostgresTestDocker.DB_NAME + " TO " + dbUser); } catch (SQLException e) { throw new PostgresTestDockerException(e); } }

Target:
private static void createDatabase() { final String dbUser = getDbUsername(); try (Connection connection = getConnection(getDbRootUri(), dbUser, getDbPassword())) { connection.createStatement().execute(format("CREATE DATABASE %s WITH owner=%s TEMPLATE postgres", DB_NAME, dbUser)); connection.createStatement().execute(format("GRANT ALL PRIVILEGES ON DATABASE %s TO %s", DB_NAME, dbUser)); } catch (SQLException e) { throw new PostgresTestDockerException(e); } }
Source:
public DiagnosticReport getResourceById(@IdParam IdDt theId) { System.out.println("DiagnosticReport : getResourceByID"); DiagnosticReport result = diagnosticReportResource.getByUniqueId(theId); return result; }

Target:
public DiagnosticReport getResourceById(@IdParam IdDt theId) { DiagnosticReport result = diagnosticReportResource.getByUniqueId(theId); return result; }
Source:
public void createBucket(String volumeName, String bucketName) throws IOException { createBucket(volumeName, bucketName, BucketArgs.newBuilder().setAcls(getAclList()).build()); }

Target:
public void createBucket(String volumeName, String bucketName) throws IOException { createBucket(volumeName, bucketName, BucketArgs.newBuilder().build()); }
Source:
protected synchronized void modified(Map<String, Object> properties) { if (properties != null) { String enabled = (String) properties.get("enabled"); if ("false".equalsIgnoreCase(enabled)) { this.enabled = false; } else { this.enabled = true; } } if (enabled) { Executors.newSingleThreadExecutor().submit(new Runnable() { @Override public void run() { while (lastUpdate > new Date().getTime() - 2000L) { try { Thread.sleep(100L); } catch (InterruptedException e) { } } logger.debug("Enabling channel item provider."); initialized = true; getAll(); addRegistryChangeListeners(); } }); } else { logger.debug("Disabling channel item provider."); for (ProviderChangeListener<Item> listener : listeners) { for (Item item : getAll()) { listener.removed(this, item); } } removeRegistryChangeListeners(); } }

Target:
protected synchronized void modified(Map<String, Object> properties) { if (properties != null) { String enabled = (String) properties.get("enabled"); if ("false".equalsIgnoreCase(enabled)) { this.enabled = false; } else { this.enabled = true; } } if (enabled) { Executors.newSingleThreadExecutor().submit(new Runnable() { @Override public void run() { while (lastUpdate > System.nanoTime() - TimeUnit.SECONDS.toNanos(2)) { try { Thread.sleep(100L); } catch (InterruptedException e) { } } logger.debug("Enabling channel item provider."); initialized = true; getAll(); addRegistryChangeListeners(); } }); } else { logger.debug("Disabling channel item provider."); for (ProviderChangeListener<Item> listener : listeners) { for (Item item : getAll()) { listener.removed(this, item); } } removeRegistryChangeListeners(); } }
Source:
public void testIndeterminate() { assertOperator(INDETERMINATE, "cast(null as boolean)", BOOLEAN, true); assertOperator(INDETERMINATE, "true", BOOLEAN, false); assertOperator(INDETERMINATE, "false", BOOLEAN, false); assertOperator(INDETERMINATE, "true AND false", BOOLEAN, false); assertOperator(INDETERMINATE, "true OR false", BOOLEAN, false); }

Target:
public void testIndeterminate() { assertOperator(INDETERMINATE, "cast(null AS BOOLEAN)", BOOLEAN, true); assertOperator(INDETERMINATE, "true", BOOLEAN, false); assertOperator(INDETERMINATE, "false", BOOLEAN, false); assertOperator(INDETERMINATE, "true AND false", BOOLEAN, false); assertOperator(INDETERMINATE, "true OR false", BOOLEAN, false); }
Source:
public static ResourceSet loadResourceSetWithProxies(URI resourceURI, BasicCommandStack commandStack) { final ResourceSet resourceSet = createResourceSet(commandStack); return loadResourceWithProxies(resourceURI, resourceSet); }

Target:
public static ResourceSet loadResourceSetWithProxies(URI resourceURI, BasicCommandStack commandStack) { try { loadResourceSetWithProxies(resourceURI, commandStack, null); } catch (final IOException ex) { Activator.getDefault().getReportService().report( new StatusReport(new Status(IStatus.ERROR, Activator.PLUGIN_ID, ex.getMessage(), ex))); } return null; }
Source:
protected void handlePost(HttpServletRequest req, HttpServletResponse resp, Session session) throws ServletException, IOException { try { String body = HttpRequestUtils.getBody(req); Project project = objectMapper.readValue(body, Project.class); String projectId = projectService.createProject(project, session.getUser()); sendResponse(resp, HttpServletResponse.SC_CREATED, projectId); return; } catch(Exception e) { log.error("Error while handling POST request for projects. Got Exception: " + e); sendErrorResponse(resp, HttpServletResponse.SC_BAD_REQUEST, "BAD request to create project"); return; } }

Target:
protected void handlePost(HttpServletRequest req, HttpServletResponse resp, Session session) throws ServletException, IOException { if (ALL_PROJECT_URI.equals(req.getRequestURI())) { try { String body = HttpRequestUtils.getBody(req); Project project = objectMapper.readValue(body, Project.class); String projectId = projectService.createProject(project, session.getUser()); resp.setHeader("Location", "/projects/" + projectId); sendResponse(resp, HttpServletResponse.SC_CREATED, ""); return; } catch (Exception e) { log.error("Error while handling POST request for projects. Got Exception: " + e); sendErrorResponse(resp, HttpServletResponse.SC_BAD_REQUEST, "BAD request to create project"); return; } } else { log.error("Invalid route for projects endpoint: " + req.getRequestURI()); sendErrorResponse(resp, HttpServletResponse.SC_NOT_FOUND, "Unsupported projects API " + "endpoint"); return; } }
Source:
protected RemoteOperationResult doInBackground(Object... params) { RemoteOperationResult result; if (params != null && params.length == 2) { String url = (String) params[0]; OwnCloudCredentials credentials = (OwnCloudCredentials) params[1]; Uri uri = Uri.parse(url); OwnCloudClient client = OwnCloudClientFactory.createOwnCloudClient(uri, mContext, true); client.setCredentials(credentials); String REMOTE_PATH = "/"; boolean SUCCESS_IF_ABSENT = false; ExistenceCheckRemoteOperation existenceCheckRemoteOperation = new ExistenceCheckRemoteOperation( REMOTE_PATH, SUCCESS_IF_ABSENT, true ); result = existenceCheckRemoteOperation.execute(client); String targetUrlAfterPermanentRedirection = null; if (existenceCheckRemoteOperation.wasRedirected()) { RedirectionPath redirectionPath = existenceCheckRemoteOperation.getRedirectionPath(); targetUrlAfterPermanentRedirection = redirectionPath.getLastPermanentLocation(); } if (result.isSuccess()) { GetRemoteUserInfoOperation remoteUserNameOperation = new GetRemoteUserInfoOperation(); if (targetUrlAfterPermanentRedirection != null) { client = OwnCloudClientFactory.createOwnCloudClient( Uri.parse(AccountUtils.trimWebdavSuffix( targetUrlAfterPermanentRedirection )), mContext, true ); client.setCredentials(credentials); } result = remoteUserNameOperation.execute(client); } result.setLastPermanentLocation(targetUrlAfterPermanentRedirection); } else { result = new RemoteOperationResult(RemoteOperationResult.ResultCode.UNKNOWN_ERROR); } return result; }

Target:
protected RemoteOperationResult doInBackground(Object... params) { RemoteOperationResult result; if (params != null && params.length == 2) { String url = (String) params[0]; OwnCloudCredentials credentials = (OwnCloudCredentials) params[1]; Uri uri = Uri.parse(url); OwnCloudClient client = OwnCloudClientFactory.createOwnCloudClient(uri, mContext, true); client.setCredentials(credentials); String remotePath = OCFile.ROOT_PATH; boolean successIfAbsent = false; ExistenceCheckRemoteOperation existenceCheckRemoteOperation = new ExistenceCheckRemoteOperation( remotePath, successIfAbsent, true ); result = existenceCheckRemoteOperation.execute(client); String targetUrlAfterPermanentRedirection = null; if (existenceCheckRemoteOperation.wasRedirected()) { RedirectionPath redirectionPath = existenceCheckRemoteOperation.getRedirectionPath(); targetUrlAfterPermanentRedirection = redirectionPath.getLastPermanentLocation(); } if (result.isSuccess()) { GetRemoteUserInfoOperation remoteUserNameOperation = new GetRemoteUserInfoOperation(); if (targetUrlAfterPermanentRedirection != null) { client = OwnCloudClientFactory.createOwnCloudClient( Uri.parse(AccountUtils.trimWebdavSuffix( targetUrlAfterPermanentRedirection )), mContext, true ); client.setCredentials(credentials); } result = remoteUserNameOperation.execute(client); } result.setLastPermanentLocation(targetUrlAfterPermanentRedirection); } else { result = new RemoteOperationResult(RemoteOperationResult.ResultCode.UNKNOWN_ERROR); } return result; }
Source:
private void updateToDeleteCompleted(Stack stack, String terminatedName, String statusReason) { try { transactionService.required(() -> { stack.setName(terminatedName); stack.setTerminated(clock.getCurrentTimeMillis()); stackService.save(stack); stackUpdater.updateStackStatus(stack.getId(), DetailedStackStatus.DELETE_COMPLETED, statusReason); if (stack.getType().equals(StackType.WORKLOAD)) { grpcUmsClient.notifyResourceDeleted(stack.getResourceCrn(), MDCUtils.getRequestId()); } }); } catch (TransactionService.TransactionExecutionException e) { throw e.getCause(); } }

Target:
private void updateToDeleteCompleted(Stack stack, String terminatedName, String statusReason) { try { transactionService.required(() -> { stack.setName(terminatedName); stack.setTerminated(clock.getCurrentTimeMillis()); stackService.save(stack); stackUpdater.updateStackStatus(stack.getId(), DetailedStackStatus.DELETE_COMPLETED, statusReason); }); if (stack.getType().equals(StackType.WORKLOAD)) { grpcUmsClient.notifyResourceDeleted(stack.getResourceCrn(), MDCUtils.getRequestId()); } } catch (TransactionService.TransactionExecutionException e) { throw e.getCause(); } }
Source:
public void testNotAuthorizedException() throws Exception { NotAuthorizedException originalException = new NotAuthorizedException(message, Response.status(Status.UNAUTHORIZED).build()); RemoteException exception = (RemoteException) encodeAndDecode(originalException); assertThat(exception.getCause()).isNull(); assertThat(exception.getStatus()).isEqualTo(Status.UNAUTHORIZED.getStatusCode()); assertThat(exception.getError().errorCode()).isEqualTo(NotAuthorizedException.class.getName()); assertThat(exception.getError().errorName()).isEqualTo("hello"); assertThat(exception.getMessage()) .isEqualTo("RemoteException: javax.ws.rs.NotAuthorizedException (" + message + ")"); }

Target:
public void testNotAuthorizedException() throws Exception { NotAuthorizedException originalException = new NotAuthorizedException(message, Response.status(Status.UNAUTHORIZED).build()); RemoteException exception = (RemoteException) encodeAndDecode(originalException); assertThat(exception.getCause()).isNull(); assertThat(exception.getStatus()).isEqualTo(Status.UNAUTHORIZED.getStatusCode()); assertThat(exception.getError().errorCode()).isEqualTo(NotAuthorizedException.class.getName()); assertThat(exception.getError().errorName()).isEqualTo(message); assertThat(exception.getMessage()) .isEqualTo("RemoteException: javax.ws.rs.NotAuthorizedException (" + message + ")"); }
Source:
public synchronized void initInternal(Configuration conf) throws Exception { super.initInternal(conf); Path rootPath = new Path(fsWorkingPath, ROOT_NAME); myriadPathRoot = new Path(rootPath, RM_MYRIAD_ROOT); updateFileMethod = getUpdateFileMethod(); if (updateFileMethod == null) { throw new RuntimeException("Could not find valid updateFile Method"); } startInternal(); }

Target:
public synchronized void initInternal(Configuration conf) throws Exception { super.initInternal(conf); Path rootPath = new Path(fsWorkingPath, ROOT_NAME); myriadPathRoot = new Path(rootPath, RM_MYRIAD_ROOT); updateFileMethod = getUpdateFileMethod(); if (updateFileMethod == null) { throw new RuntimeException("Could not find valid updateFile Method"); } }
Source:
public Attribute<?> getDestAttribute() throws OseeCoreException { Attribute<?> destAttribute = null; Collection<Attribute<Object>> localAttributes = getDestArtifact().getAttributes(getAttributeType()); for (Attribute<Object> localAttribute : localAttributes) { if (localAttribute.getId() == attrId) { destAttribute = localAttribute; } } if (destAttribute == null) { throw new AttributeDoesNotExist("Attribute %d could not be found on artifact %d on branch %s", attrId, getArtId(), destBranch.getUuid()); } return destAttribute; }

Target:
public Attribute<?> getDestAttribute() throws OseeCoreException { Attribute<?> destAttribute = getDestArtifact().getAttributeById(attrId, false); if (destAttribute == null) { throw new AttributeDoesNotExist("Attribute %d could not be found on artifact %d on branch %s", attrId, getArtId(), destBranch.getUuid()); } return destAttribute; }
Source:
public final void setWorkDirectory(GeneralCommandLine commandLine) { String workDirectory = getWorkDirectory(); commandLine.withWorkDirectory(workDirectory == null || workDirectory.isEmpty() ? myModule.getProject().getBasePath() : workDirectory); }

Target:
public final void setWorkDirectory(GeneralCommandLine commandLine) { String workDirectory = getWorkDirectory(); commandLine.withWorkDirectory(StringUtil.isEmpty(workDirectory) ? myModule.getProject().getBasePath() : workDirectory); }
Source:
public BinaryContent transform(Metacard metacard, Map<String, Serializable> arguments) throws CatalogTransformerException { if (metacard == null) { throw new CatalogTransformerException("Cannot transform null metacard."); } String preview = "No preview text available."; if (metacard.getAttribute(Extracted.EXTRACTED_TEXT) != null && metacard.getAttribute(Extracted.EXTRACTED_TEXT).getValue() != null) { preview = metacard .getAttribute(Extracted.EXTRACTED_TEXT) .getValue() .toString() .replaceAll("<", "&lt;") .replaceAll(">", "&gt;") .replaceAll("[\n|\r]", "<br>"); preview = String.format("<head><meta charset=\"utf-8\"/>%s</head>", preview); } return new BinaryContentImpl(IOUtils.toInputStream(preview)); }

Target:
public BinaryContent transform(Metacard metacard, Map<String, Serializable> arguments) throws CatalogTransformerException { if (metacard == null) { throw new CatalogTransformerException("Cannot transform null metacard."); } String preview = "No preview text available."; if (metacard.getAttribute(Extracted.EXTRACTED_TEXT) != null && metacard.getAttribute(Extracted.EXTRACTED_TEXT).getValue() != null) { preview = StringEscapeUtils.escapeHtml4( metacard.getAttribute(Extracted.EXTRACTED_TEXT).getValue().toString()) .replaceAll("[\n|\r]", "<br>"); preview = String.format("<head><meta charset=\"utf-8\"/>%s</head>", preview); } return new BinaryContentImpl(IOUtils.toInputStream(preview)); }
Source:
public Map<String, String> getFieldMapInfoData() { final Map<String, String> result = new HashMap<>(); final List<FieldMapInfo> fieldMapInfoList = this.userFieldmap.getFieldMapInfo(); String size = "0"; String datasetId = null; String environmentId = null; final String fieldMapInfoJson; Map<String, Boolean> validateFieldMap = new HashMap<>(); for (final FieldMapInfo fieldMapInfo : fieldMapInfoList) { final List<FieldMapDatasetInfo> datasetList = fieldMapInfo.getDatasetsWithFieldMap(); this.validateFieldMapDataSetInfo(datasetList, validateFieldMap); if (datasetList != null && !datasetList.isEmpty()) { final List<FieldMapTrialInstanceInfo> trials = datasetList.get(0).getTrialInstancesWithFieldMap(); if (trials != null && !trials.isEmpty()) { size = String.valueOf(trials.size()); if (trials.size() == 1) { datasetId = datasetList.get(0).getDatasetId().toString(); environmentId = trials.get(0).getInstanceId().toString(); } } } } fieldMapInfoJson = this.convertFieldMapInfoToJson(fieldMapInfoList); result.put("fieldMapInfo", fieldMapInfoJson); result.put("size", size); result.put("hasInvalidValues", String.valueOf(validateFieldMap.get("hasInvalidValues"))); if (datasetId != null) { result.put("datasetId", datasetId); } if (environmentId != null) { result.put("environmentId", environmentId); } return result; }

Target:
public Map<String, String> getFieldMapInfoData() { final Map<String, String> result = new HashMap<>(); final List<FieldMapInfo> fieldMapInfoList = this.userFieldmap.getFieldMapInfo(); String size = "0"; String datasetId = null; String environmentId = null; final String fieldMapInfoJson; boolean hasInvalidValues = false; for (final FieldMapInfo fieldMapInfo : fieldMapInfoList) { final List<FieldMapDatasetInfo> datasetList = fieldMapInfo.getDatasetsWithFieldMap(); if (!hasInvalidValues) { hasInvalidValues = this.validateFieldMapDataSetInfo(datasetList); } if (datasetList != null && !datasetList.isEmpty()) { final List<FieldMapTrialInstanceInfo> trials = datasetList.get(0).getTrialInstancesWithFieldMap(); if (trials != null && !trials.isEmpty()) { size = String.valueOf(trials.size()); if (trials.size() == 1) { datasetId = datasetList.get(0).getDatasetId().toString(); environmentId = trials.get(0).getInstanceId().toString(); } } } } fieldMapInfoJson = this.convertFieldMapInfoToJson(fieldMapInfoList); result.put("fieldMapInfo", fieldMapInfoJson); result.put("size", size); result.put("hasInvalidValues", String.valueOf(hasInvalidValues)); if (datasetId != null) { result.put("datasetId", datasetId); } if (environmentId != null) { result.put("environmentId", environmentId); } return result; }
Source:
public void retrieve_collection_fields_if_required() { requestSampleCustomer(new int[] {Customer.NICKNAMES_FIELD_NUMBER - 1}, new StreamObserver<QueryResponse>() { @Override public void onNext(QueryResponse value) { final List<Any> messages = value.getMessagesList(); assertFalse(messages.isEmpty()); final Customer sampleCustomer = getSampleCustomer(); final Customer customer = AnyPacker.unpack(messages.get(0)); assertEquals(customer.getNicknamesList(), sampleCustomer.getNicknamesList()); assertFalse(customer.hasName()); assertFalse(customer.hasId()); } @Override public void onError(Throwable t) { } @Override public void onCompleted() { } }); }

Target:
public void retrieve_collection_fields_if_required() { requestSampleCustomer(new int[] {Customer.NICKNAMES_FIELD_NUMBER - 1}, new MemoizeQueryResponseObserver() { @Override public void onNext(QueryResponse value) { super.onNext(value); final List<Any> messages = value.getMessagesList(); assertFalse(messages.isEmpty()); final Customer sampleCustomer = getSampleCustomer(); final Customer customer = AnyPacker.unpack(messages.get(0)); assertEquals(customer.getNicknamesList(), sampleCustomer.getNicknamesList()); assertFalse(customer.hasName()); assertFalse(customer.hasId()); } }); }
Source:
public int getLevelSize(final int levelNumber) { if (levelNumber >= getNumIndexLevels()) { throw new SAMException("Level number is too big (" + levelNumber + ")."); } if (levelNumber == getNumIndexLevels()-1) { return GenomicIndexUtil.MAX_BINS - GenomicIndexUtil.LEVEL_STARTS[levelNumber] - 1; } else { return GenomicIndexUtil.LEVEL_STARTS[levelNumber + 1] - GenomicIndexUtil.LEVEL_STARTS[levelNumber]; } }

Target:
public int getLevelSize(final int levelNumber) { assertLevelIsValid(levelNumber); if (levelNumber == getNumIndexLevels()-1) { return GenomicIndexUtil.MAX_BINS - GenomicIndexUtil.LEVEL_STARTS[levelNumber] - 1; } else { return GenomicIndexUtil.LEVEL_STARTS[levelNumber + 1] - GenomicIndexUtil.LEVEL_STARTS[levelNumber]; } }
Source:
public NamedTimeEvent(ITimeGraphEntry entry, long time, long duration, int value, @NonNull String label) { super(entry, time, duration, value); fLabel = label; }

Target:
public NamedTimeEvent(ITimeGraphEntry entry, long time, long duration, int value, @NonNull String label) { super(entry, time, duration, value); fLabel = label.intern(); }
Source:
public static String getThemePageLibClass(Theme theme) { switch (theme.getFunnelName()) { case "light": return "pagelib_theme_light"; case "dark": return "pagelib_theme_dark"; case "black": return "pagelib_theme_black"; case "sepia": return "pagelib_theme_sepia"; default: return "pagelib_theme_light"; } }

Target:
public static String getThemePageLibClass(Theme theme) { switch (theme.getFunnelName()) { case "dark": return "pagelib_theme_dark"; case "black": return "pagelib_theme_black"; case "sepia": return "pagelib_theme_sepia"; default: return "pagelib_theme_light"; } }
Source:
public String formatPdpPayeeName(String lastName, String firstName, String middleInitial) { String fullName = lastName + KFSConstants.COMMA + KFSConstants.BLANK_SPACE + firstName; if (StringUtils.isNotBlank(middleInitial)) { fullName = fullName + KFSConstants.BLANK_SPACE + middleInitial + KFSConstants.DELIMITER; } int payeeNameFieldSize = (getDataDictionaryService().getAttributeMaxLength(PaymentGroup.class, PdpConstants.PaymentDetail.PAYEE_NAME)).intValue(); if (fullName.length() > payeeNameFieldSize) { fullName = StringUtils.substring(fullName, 0, payeeNameFieldSize); fullName = removeLastPayeeNameCharacterWhenComma(fullName, payeeNameFieldSize); } return fullName; }

Target:
public String formatPdpPayeeName(String lastName, String firstName, String middleInitial) { String fullName = lastName + KFSConstants.COMMA + KFSConstants.BLANK_SPACE + firstName; if (StringUtils.isNotBlank(middleInitial)) { fullName = fullName + KFSConstants.BLANK_SPACE + middleInitial + KFSConstants.DELIMITER; } Integer payeeNameFieldSize = getDataDictionaryService().getAttributeMaxLength(PaymentGroup.class, PdpConstants.PaymentDetail.PAYEE_NAME); if (fullName.length() > payeeNameFieldSize.intValue()) { fullName = StringUtils.substring(fullName, 0, payeeNameFieldSize); fullName = removeLastPayeeNameCharacterWhenComma(fullName, payeeNameFieldSize); } return fullName; }
Source:
public void engineInitialize() { createInternalAAAConfigurations(); createKerberosLdapAAAConfigurations(); for (File directory : EngineLocalConfig.getInstance().getExtensionsDirectories()) { if (!directory.exists()) { log.warn("The directory '{}' cotaning configuration files does not exist.", directory.getAbsolutePath()); } else { File[] files = directory.listFiles(); if (files != null) { sort(files); for (File file : files) { if (file.getName().endsWith(".properties")) { try { load(file); } catch (Exception ex) { log.error("Could not load extension based on configuration file '{}'. Please check the configuration file is valid.", file.getAbsolutePath()); } } } } } } for (ExtensionProxy extension : getLoadedExtensions()) { if ( EngineLocalConfig.getInstance().getBoolean( ( ENGINE_EXTENSION_ENABLED + extension.getContext() .<String> get(Base.ContextKeys.INSTANCE_NAME) ), Boolean.parseBoolean( extension.getContext().<Properties> get( Base.ContextKeys.CONFIGURATION ).getProperty(Base.ConfigKeys.ENABLED, "true") ) ) ) { initialize(extension.getContext().<String> get(Base.ContextKeys.INSTANCE_NAME)); } } dump(); }

Target:
public void engineInitialize() { createInternalAAAConfigurations(); createKerberosLdapAAAConfigurations(); for (File directory : EngineLocalConfig.getInstance().getExtensionsDirectories()) { if (!directory.exists()) { log.warn("The directory '{}' cotaning configuration files does not exist.", directory.getAbsolutePath()); } else { File[] files = directory.listFiles(); if (files != null) { sort(files); for (File file : files) { if (file.getName().endsWith(".properties")) { try { load(file); } catch (Exception ex) { log.error("Could not load extension based on configuration file '{}'. Please check the configuration file is valid. Exception message is: {}", file.getAbsolutePath(), ex.getMessage()); log.debug("", ex); } } } } } } for (ExtensionProxy extension : getLoadedExtensions()) { if ( EngineLocalConfig.getInstance().getBoolean( ( ENGINE_EXTENSION_ENABLED + extension.getContext() .<String> get(Base.ContextKeys.INSTANCE_NAME) ), Boolean.parseBoolean( extension.getContext().<Properties> get( Base.ContextKeys.CONFIGURATION ).getProperty(Base.ConfigKeys.ENABLED, "true") ) ) ) { initialize(extension.getContext().<String> get(Base.ContextKeys.INSTANCE_NAME)); } } dump(); }
Source:
public void handle(HttpExchange arg0) throws IOException { String path = arg0.getRequestURI().getPath(); LOG.debug("'{}'", path); StaticResource resource; try { resource = provider.getResource(path).get(); if (resource.isValid()) { writeResponse(arg0, 200, resource.getData(), resource.getMimeType()); return; } else { LOG.debug("'{}' Not Found", path); writeResponse(arg0, 404, "not found".getBytes(), null); } } catch (Exception e) { LOG.debug("'{}' Not Found", path); writeResponse(arg0, 404, "not found".getBytes(), null); } }

Target:
public void handle(HttpExchange arg0) throws IOException { String path = arg0.getRequestURI().getPath(); LOG.debug("'{}'", path); Optional<StaticResource> resource; try { resource = provider.getResource(path).get(); if (resource.isPresent()) { writeResponse(arg0, 200, resource.get().getData(), resource.get().getMimeType()); return; } else { LOG.debug("'{}' Not Found", path); writeResponse(arg0, 404, "not found".getBytes(), null); } } catch (Exception e) { LOG.debug("'{}' Not Found", path); writeResponse(arg0, 404, "not found".getBytes(), null); } }
Source:
protected static ImmutableList<Ds3Request> splitGetPhysicalPlacementForObjects( final Ds3Request ds3Request) { if (!stripPath(ds3Request.getName()).equals(GET_PHYSICAL_PLACEMENT_FOR_OBJECTS)) { throw new IllegalArgumentException("The Ds3Request is not the expected " + GET_PHYSICAL_PLACEMENT_FOR_OBJECTS + ": " + ds3Request.getName()); } final ImmutableList.Builder<Ds3Request> builder = ImmutableList.builder(); builder.add(removeOptionalParam( ds3Request, "FullDetails", 200, "PhysicalPlacementApiBean", null)); builder.add(makeRequiredParam( ds3Request, NAMESPACE_FULL_DETAILS, "FullDetails", 200, "BlobApiBeansContainer", null)); return builder.build(); }

Target:
protected static ImmutableList<Ds3Request> splitGetPhysicalPlacementForObjects( final Ds3Request ds3Request) throws ResponseTypeNotFoundException { if (!stripPath(ds3Request.getName()).equals(GET_PHYSICAL_PLACEMENT_FOR_OBJECTS)) { throw new IllegalArgumentException("The Ds3Request is not the expected " + GET_PHYSICAL_PLACEMENT_FOR_OBJECTS + ": " + ds3Request.getName()); } final ImmutableList.Builder<Ds3Request> builder = ImmutableList.builder(); builder.add(removeOptionalParam( ds3Request, FULL_DETAILS_PARAM, 200, PHYSICAL_PLACEMENT_API_BEAN_PARAM)); builder.add(makeRequiredParam( ds3Request, NAMESPACE_FULL_DETAILS, FULL_DETAILS_PARAM, 200, BLOB_API_BEANS_CONTAINER_PARAM)); return builder.build(); }
Source:
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { long feedId = getArguments().getLong(EXTRA_FEED_ID); disposable = Maybe.create((MaybeOnSubscribe<Feed>) emitter -> { Feed feed = DBReader.getFeed(feedId); if (feed != null) { emitter.onSuccess(feed); } else { emitter.onComplete(); } }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(result -> { feed = result; loadStatistics(); }, error -> Log.d(TAG, Log.getStackTraceString(error)), () -> { }); }

Target:
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { long feedId = getArguments().getLong(EXTRA_FEED_ID); disposable = Maybe.create((MaybeOnSubscribe<Feed>) emitter -> { Feed feed = DBReader.getFeed(feedId); if (feed != null) { emitter.onSuccess(feed); } else { emitter.onComplete(); } }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(result -> { feed = result; showFeed(); loadStatistics(); }, error -> Log.d(TAG, Log.getStackTraceString(error)), () -> { }); }
Source:
private boolean isKerberosClientInstallAllowed(final ClusterTopology topology) { final org.apache.ambari.server.topology.Configuration topologyConfig = topology.getBlueprint().getConfiguration(); final String kdc_type = topologyConfig.getPropertyValue(KerberosHelper.KERBEROS_ENV, KerberosHelper.KDC_TYPE); final String manage_identities = topologyConfig.getPropertyValue(KerberosHelper.KERBEROS_ENV, KerberosHelper.MANAGE_IDENTITIES); return kdc_type != null && !"none".equalsIgnoreCase(kdc_type) || Boolean.parseBoolean(manage_identities); }

Target:
private boolean isKerberosClientInstallAllowed(final ClusterTopology topology) { final org.apache.ambari.server.topology.Configuration topologyConfig = topology.getBlueprint().getConfiguration(); final String kdc_type = topologyConfig.getPropertyValue(KerberosHelper.KERBEROS_ENV, KerberosHelper.KDC_TYPE); final String manage_identities = topologyConfig.getPropertyValue(KerberosHelper.KERBEROS_ENV, KerberosHelper.MANAGE_IDENTITIES); return KDCType.NONE != KDCType.translate(kdc_type) || Boolean.parseBoolean(manage_identities); }
Source:
private static Mono<okhttp3.Request> toOkHttpRequest(HttpRequest request) { return Mono.just(new okhttp3.Request.Builder()) .map(rb -> { rb.url(request.url()); if (request.headers() != null) { return rb.headers(okhttp3.Headers.of(request.headers().toMap())); } else { return rb.headers(okhttp3.Headers.of((new HashMap<>()))); } }) .flatMap((Function<Request.Builder, Mono<Request.Builder>>) rb -> { if (request.httpMethod() == HttpMethod.GET) { return Mono.just(rb.get()); } else if (request.httpMethod() == HttpMethod.HEAD) { return Mono.just(rb.head()); } else { return toOkHttpRequestBody(request.body(), request.headers()) .map(requestBody -> rb.method(request.httpMethod().toString(), requestBody)); } }) .map(rb -> rb.build()); }

Target:
private static Mono<okhttp3.Request> toOkHttpRequest(HttpRequest request) { return Mono.just(new okhttp3.Request.Builder()) .map(rb -> { rb.url(request.url()); if (request.headers() != null) { return rb.headers(okhttp3.Headers.of(request.headers().toMap())); } else { return rb.headers(okhttp3.Headers.of(new HashMap<>())); } }) .flatMap((Function<Request.Builder, Mono<Request.Builder>>) rb -> { if (request.httpMethod() == HttpMethod.GET) { return Mono.just(rb.get()); } else if (request.httpMethod() == HttpMethod.HEAD) { return Mono.just(rb.head()); } else { return toOkHttpRequestBody(request.body(), request.headers()) .map(requestBody -> rb.method(request.httpMethod().toString(), requestBody)); } }) .map(rb -> rb.build()); }
Source:
public void testApplicationID() throws Exception { Map<String, String> metainfo = newHashMap(); metainfo.put("application_id", "myApp"); violationEntity = new ViolationEntity(null, null, null, null, metainfo, null, null, null, null, null); ruleEntity.setApplicationId("myApp"); Boolean apply = evaluator.apply(ruleEntity, violationEntity); assertThat(apply).isEqualTo(true); }

Target:
public void testApplicationID() throws Exception { violationEntity = new ViolationEntity(null, null, null, null, null, null, null, null, null, null); violationEntity.setApplication(new ApplicationEntity("myApp")); ruleEntity.setApplicationId("myApp"); Boolean apply = evaluator.apply(ruleEntity, violationEntity); assertThat(apply).isEqualTo(true); }
Source:
public void mouseUp(MouseEvent mouseEvent, EditPartViewer viewer) { super.mouseUp(mouseEvent, viewer); if (transition && ((AdvancedPanningSelectionTool) getDefaultTool()) .getTargetEditPart() instanceof FreeformGraphicalRootEditPart) { ECState destState = (ECState) new StateCreationFactory().getNewObject(); new CreateECStateCommand(destState, ((ECCPanningSelectionTool) getDefaultTool()).getLastLocation(), ((ECCEditor) getEditorPart()).getFbType().getECC()).execute(); new CreateTransitionCommand(sourceState, destState, null).execute(); } transition = false; }

Target:
public void mouseUp(MouseEvent mouseEvent, EditPartViewer viewer) { super.mouseUp(mouseEvent, viewer); if (transition) { if (createTransitionAndState && ((AdvancedPanningSelectionTool) getDefaultTool()) .getTargetEditPart() instanceof FreeformGraphicalRootEditPart) { transitionStateCreationTool .setLocationActivation(((ECCPanningSelectionTool) getDefaultTool()).getLastLocation()); setActiveTool(transitionStateCreationTool); transitionStateCreationTool.performCreation(); setActiveTool(getDefaultTool()); createTransitionAndState = false; } transition = false; setActiveTool(getDefaultTool()); } }
Source:
public boolean isAvailable(long timeout, long pollInterval, TimeUnit unit) { try { return solr.isAvailable(timeout, pollInterval, unit); } catch (InterruptedException e) { LOGGER.debug("Solr client is available interrupted exception {}", e); return false; } }

Target:
public boolean isAvailable(long timeout, long pollInterval, TimeUnit unit) { try { return solr.isAvailable(timeout, pollInterval, unit); } catch (InterruptedException e) { LOGGER.debug("Solr client is available interrupted exception {}", e); Thread.currentThread().interrupt(); } return false; }
Source:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) { if (Strings.isNullOrEmpty(config.username) ^ Strings.isNullOrEmpty(config.password)) { throw new IllegalArgumentException( String.format("You must either set both username and password " + "or neither username nor password. " + "Currently, they are username: \'%s\', and password: \'%s\'", config.username, config.password)); } try { new InternetAddress(config.senderEmailAddress); } catch (AddressException e) { throw new IllegalArgumentException( String.format("%s is an invalid sender email address. Reason: %s", config.senderEmailAddress, e.getMessage())); } try { new InternetAddress(config.recipientEmailAddress); } catch (AddressException e) { throw new IllegalArgumentException( String.format("%s is an invalid recipient email address. Reason: %s", config.recipientEmailAddress, e.getMessage())); } }

Target:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) { config.validate(); }
Source:
public void testConnectOverProxy_implicit_http_fails() throws Exception { ProxySelector defaultProxySelector = ProxySelector.getDefault(); try { CountingProxy countingProxy = CountingProxy.start(); try { Proxy proxy = countingProxy.asProxy(); SingleProxySelector proxySelector = new SingleProxySelector(proxy); ProxySelector.setDefault(proxySelector); FtpURLConnection connection = (FtpURLConnection) fileUrl.openConnection(); InputStream inputStream = connection.getInputStream(); IOException e = proxySelector.getLastException(); assertEquals("FTP connections over HTTP proxy not supported", e.getMessage()); assertContents(inputStream); } finally { int numConnections = countingProxy.shutdownAndGetConnectionCount(); assertEquals(0, numConnections); } } finally { ProxySelector.setDefault(defaultProxySelector); } }

Target:
public void testConnectOverProxy_implicit_http_fails() throws Exception { URL fileUrl = addFileEntry(FILE_PATH, fileContents); ProxySelector defaultProxySelector = ProxySelector.getDefault(); try { CountingProxy countingProxy = CountingProxy.start(); try { Proxy proxy = countingProxy.asProxy(); SingleProxySelector proxySelector = new SingleProxySelector(proxy); ProxySelector.setDefault(proxySelector); URLConnection connection = fileUrl.openConnection(); InputStream inputStream = connection.getInputStream(); IOException e = proxySelector.getLastException(); assertEquals("FTP connections over HTTP proxy not supported", e.getMessage()); assertContents(fileContents, inputStream); } finally { int numConnections = countingProxy.shutdownAndGetConnectionCount(); assertEquals(0, numConnections); } } finally { ProxySelector.setDefault(defaultProxySelector); } }
Source:
protected ToStringHelper string() { return super.string() .add("networkId", networkId) .add("gatewayIp", gatewayIp) .add("ipVersion", ipVersion) .add("cidr", cidr) .add("enableDHCP", enableDhcp); }

Target:
protected ToStringHelper string() { return super.string() .add("networkId", networkId) .add("gatewayIp", gatewayIp) .add("ipVersion", ipVersion) .add("cidr", cidr) .add("enableDHCP", enableDhcp) .add("allocationPools", allocationPools) .add("dnsNameServers", dnsNameServers) .add("hostRoutes", hostRoutes); }
Source:
public AzureBlobBlockUploadStrategy(AzureBlobClient client, PayloadSlicer slicer, BlobToAzureBlob blobToAzureBlob) { this.client = checkNotNull(client, "client"); this.slicer = checkNotNull(slicer, "slicer"); this.blobToAzureBlob = checkNotNull(blobToAzureBlob, "blobToAzureBlob"); }

Target:
AzureBlobBlockUploadStrategy(AzureBlobClient client, PayloadSlicer slicer, BlobToAzureBlob blobToAzureBlob) { this.client = checkNotNull(client, "client"); this.slicer = checkNotNull(slicer, "slicer"); this.blobToAzureBlob = checkNotNull(blobToAzureBlob, "blobToAzureBlob"); }