auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public StudentAttributes getCopy() { return builder(course, name, email) .withComments(comments) .withCreatedAt(createdAt) .withUpdatedAt(updatedAt) .withGoogleId(googleId) .withKey(key) .withLastName(lastName) .withSection(section) .withTeam(team) .withUpdateStatus(updateStatus) .build(); }

Target:
public StudentAttributes getCopy() { StudentAttributes studentAttributes = valueOf(toEntity()); studentAttributes.updateStatus = updateStatus; studentAttributes.key = key; studentAttributes.createdAt = createdAt; studentAttributes.updatedAt = updatedAt; return studentAttributes; }
Source:
public int compare(Viewer viewer, Object o1, Object o2) { if(o1 instanceof ImportNode && o2 instanceof ImportNode) { if(((ImportNode)o1).getItemRecord() != null && ((ImportNode)o2).getItemRecord() != null && ((ImportNode)o1).getItemRecord().getProperty() != null && ((ImportNode)o2).getItemRecord().getProperty() != null) { String label1 = ((ImportNode)o1).getItemRecord().getProperty().getLabel(); String label2 = ((ImportNode)o2).getItemRecord().getProperty().getLabel(); if (label1 == null) { return -1; } if (label2 == null) { return 1; } if(label1.equals(label2)) { String version1 = ((ImportNode)o1).getItemRecord().getProperty().getVersion(); String version2 = ((ImportNode)o2).getItemRecord().getProperty().getVersion(); if (version1 == null) { return -1; } if (version2 == null) { return 1; } try { float v1 = Float.parseFloat(version1); float v2 = Float.parseFloat(version2); if(v1 > v2) { return 1; }else if(v1 < v2) { return -1; } } catch (Exception e) { return 0; } } } } return super.compare(viewer, o1, o2); }

Target:
public int compare(Viewer viewer, Object o1, Object o2) { if(o1 instanceof ImportNode && o2 instanceof ImportNode) { if(((ImportNode)o1).getItemRecord() != null && ((ImportNode)o2).getItemRecord() != null && ((ImportNode)o1).getItemRecord().getProperty() != null && ((ImportNode)o2).getItemRecord().getProperty() != null) { String label1 = ((ImportNode)o1).getItemRecord().getProperty().getLabel(); String label2 = ((ImportNode)o2).getItemRecord().getProperty().getLabel(); if (label1 == null) { return -1; } if (label2 == null) { return 1; } if(label1.equals(label2)) { String version1 = ((ImportNode)o1).getItemRecord().getProperty().getVersion(); String version2 = ((ImportNode)o2).getItemRecord().getProperty().getVersion(); if (version1 == null) { return -1; } if (version2 == null) { return 1; } return new Version(version1).compareTo(new Version(version2)); } } } return super.compare(viewer, o1, o2); }
Source:
ListeningUser checkPermissionReturningListeningUser(String methodName, String permissionMsg) throws NotConnectedException, PermissionException { Pair<ListeningUser, UserIdentificationImpl> pair = renewSession(false); final String fullMethodName = SchedulerFrontend.class.getName() + "." + methodName; final MethodCallPermission methodCallPermission = new MethodCallPermission(fullMethodName); try { pair.getRight().checkPermission(methodCallPermission, permissionMsg); } catch (PermissionException ex) { logger.debug(permissionMsg); throw ex; } return pair.getLeft(); }

Target:
ListeningUser checkPermissionReturningListeningUser(String methodName, String permissionMsg) throws NotConnectedException, PermissionException { Pair<ListeningUser, UserIdentificationImpl> userSessionInfo = renewSession(false); final String fullMethodName = SchedulerFrontend.class.getName() + "." + methodName; final MethodCallPermission methodCallPermission = new MethodCallPermission(fullMethodName); try { userSessionInfo.getRight().checkPermission(methodCallPermission, permissionMsg); } catch (PermissionException ex) { logger.debug(permissionMsg); throw ex; } return userSessionInfo.getLeft(); }
Source:
private Optional<AssignableNode> getNodeWithHighestPoints(AssignableReplica replica, List<AssignableNode> assignableNodes, ClusterContext clusterContext, OptimalAssignment optimalAssignment) { Map<AssignableNode, List<HardConstraint>> hardConstraintFailures = new HashMap<>(); List<AssignableNode> candidateNodes = assignableNodes.stream().filter(candidateNode -> { boolean isValid = true; for (HardConstraint hardConstraint : _hardConstraints) { if (!hardConstraint.isAssignmentValid(candidateNode, replica, clusterContext)) { hardConstraintFailures.computeIfAbsent(candidateNode, node -> new ArrayList<>()).add(hardConstraint); isValid = false; } } return isValid; }).collect(Collectors.toList()); if (candidateNodes.isEmpty()) { optimalAssignment.recordAssignmentFailure(replica, hardConstraintFailures); return Optional.empty(); } Function<AssignableNode, Double> calculatePoints = (candidateNode) -> _softConstraints.stream().map(softConstraint -> softConstraint .getAssignmentOriginScore(candidateNode, replica, clusterContext)) .mapToDouble(score -> score).sum(); return candidateNodes.stream().max(Comparator.comparing(calculatePoints)); }

Target:
private Optional<AssignableNode> getNodeWithHighestPoints(AssignableReplica replica, List<AssignableNode> assignableNodes, ClusterContext clusterContext, OptimalAssignment optimalAssignment) { Map<AssignableNode, List<HardConstraint>> hardConstraintFailures = new HashMap<>(); List<AssignableNode> candidateNodes = assignableNodes.stream().filter(candidateNode -> { boolean isValid = true; for (HardConstraint hardConstraint : _hardConstraints) { if (!hardConstraint.isAssignmentValid(candidateNode, replica, clusterContext)) { hardConstraintFailures.computeIfAbsent(candidateNode, node -> new ArrayList<>()) .add(hardConstraint); isValid = false; } } return isValid; }).collect(Collectors.toList()); if (candidateNodes.isEmpty()) { optimalAssignment.recordAssignmentFailure(replica, Maps.transformValues(hardConstraintFailures, this::convertFailureReasons)); return Optional.empty(); } Function<AssignableNode, Float> calculatePoints = (candidateNode) -> _softConstraintsWeightModel.getSumOfScores(_softConstraints.stream() .collect(Collectors.toMap(Function.identity(), softConstraint -> softConstraint .getAssignmentOriginScore(candidateNode, replica, clusterContext)))); return candidateNodes.stream().max(Comparator.comparing(calculatePoints)); }
Source:
private Type handleResolvedField(Expression node, FieldId fieldId, Field field, StackableAstVisitorContext<Context> context) { if (context.getContext().isInLambda()) { LambdaArgumentDeclaration lambdaArgumentDeclaration = context.getContext().getFieldToLambdaArgumentDeclaration().get(fieldId); if (lambdaArgumentDeclaration != null) { lambdaArgumentReferences.put(NodeRef.of((Identifier) node), lambdaArgumentDeclaration); return setExpressionType(node, field.getType()); } } if (field.getOriginTable().isPresent() && field.getName().isPresent() && !field.isAliased()) { tableColumnReferences.put(field.getOriginTable().get(), field.getName().get()); } FieldId previous = columnReferences.put(NodeRef.of(node), fieldId); checkState(previous == null, "%s already known to refer to %s", node, previous); return setExpressionType(node, field.getType()); }

Target:
private Type handleResolvedField(Expression node, FieldId fieldId, Field field, StackableAstVisitorContext<Context> context) { if (context.getContext().isInLambda()) { LambdaArgumentDeclaration lambdaArgumentDeclaration = context.getContext().getFieldToLambdaArgumentDeclaration().get(fieldId); if (lambdaArgumentDeclaration != null) { lambdaArgumentReferences.put(NodeRef.of((Identifier) node), lambdaArgumentDeclaration); return setExpressionType(node, field.getType()); } } if (field.getOriginTable().isPresent() && field.getOriginColumnName().isPresent()) { tableColumnReferences.put(field.getOriginTable().get(), field.getOriginColumnName().get()); } FieldId previous = columnReferences.put(NodeRef.of(node), fieldId); checkState(previous == null, "%s already known to refer to %s", node, previous); return setExpressionType(node, field.getType()); }
Source:
private void emitBacklinkFieldAccessors(JavaWriter writer) throws IOException { for (Backlink backlink : metadata.getBacklinkFields()) { String cacheFieldName = backlink.getTargetField() + BACKLINKS_FIELD_EXTENSION; String realmResultsType = "RealmResults<" + backlink.getSourceClass() + ">"; writer.beginMethod(realmResultsType, metadata.getInternalGetter(backlink.getTargetField()), EnumSet.of(Modifier.PUBLIC)); writer.emitStatement("BaseRealm realm = proxyState.getRealm$realm()"); writer.emitStatement("realm.checkIfValid()"); writer.beginControlFlow("if (" + cacheFieldName + " == null)"); writer.emitStatement( cacheFieldName + " = RealmResults.createBacklinkResults(realm, proxyState.getRow$realm(), %s.class, \"%s\")", backlink.getSourceClass(), backlink.getSourceField()); writer.endControlFlow(); writer.emitStatement("return " + cacheFieldName); writer.endMethod(); writer.emitEmptyLine(); writer.beginMethod("void", metadata.getInternalSetter(backlink.getTargetField()), EnumSet.of(Modifier.PUBLIC), realmResultsType, "value"); writer.emitStatement("throw new UnsupportedOperationException(\"Fields that are @LinkingObjects cannot be modified. They are managed by Realm.\")"); writer.endMethod(); writer.emitEmptyLine(); } }

Target:
private void emitBacklinkFieldAccessors(JavaWriter writer) throws IOException { for (Backlink backlink : metadata.getBacklinkFields()) { String cacheFieldName = backlink.getTargetField() + BACKLINKS_FIELD_EXTENSION; String realmResultsType = "RealmResults<" + backlink.getSourceClass() + ">"; writer.beginMethod(realmResultsType, metadata.getInternalGetter(backlink.getTargetField()), EnumSet.of(Modifier.PUBLIC)) .emitStatement("BaseRealm realm = proxyState.getRealm$realm()") .emitStatement("realm.checkIfValid()") .beginControlFlow("if (" + cacheFieldName + " == null)") .emitStatement(cacheFieldName + " = RealmResults.createBacklinkResults(realm, proxyState.getRow$realm(), %s.class, \"%s\")", backlink.getSourceClass(), backlink.getSourceField()) .endControlFlow() .emitStatement("return " + cacheFieldName) .endMethod() .emitEmptyLine(); } }
Source:
protected View inflateDialogView(LayoutInflater inflater, ViewGroup container) { pageTitle = getArguments().getParcelable("title"); selectedText = getArguments().getString("selected_text"); rootView = inflater.inflate(R.layout.dialog_wiktionary, container); progressBar = (ProgressBar) rootView.findViewById(R.id.dialog_wiktionary_progress); View overlayRootView = addOverlay(inflater, R.layout.dialog_wiktionary_overlay); Button fullDefinitionButton = (Button) overlayRootView.findViewById(R.id.wiktionary_full_definition_button); fullDefinitionButton.setOnClickListener(viewDefinitionButtonClickListener); fullDefinitionButton.setText(getStringForArticleLanguage(pageTitle, R.string.wiktionary_full_definition)); TextView titleText = (TextView) rootView.findViewById(R.id.wiktionary_definition_dialog_title); titleText.setText(selectedText); setConditionalLayoutDirection(rootView, pageTitle.getSite().getLanguageCode()); progressBar.setVisibility(View.VISIBLE); loadDefinitions(); return rootView; }

Target:
protected View inflateDialogView(LayoutInflater inflater, ViewGroup container) { pageTitle = getArguments().getParcelable(TITLE); selectedText = getArguments().getString(SELECTED_TEXT); rootView = inflater.inflate(R.layout.dialog_wiktionary, container); progressBar = (ProgressBar) rootView.findViewById(R.id.dialog_wiktionary_progress); View overlayRootView = addOverlay(inflater, R.layout.dialog_wiktionary_overlay); Button fullDefinitionButton = (Button) overlayRootView.findViewById(R.id.wiktionary_full_definition_button); fullDefinitionButton.setOnClickListener(viewDefinitionButtonClickListener); fullDefinitionButton.setText(getStringForArticleLanguage(pageTitle, R.string.wiktionary_full_definition)); TextView titleText = (TextView) rootView.findViewById(R.id.wiktionary_definition_dialog_title); titleText.setText(selectedText); setConditionalLayoutDirection(rootView, pageTitle.getSite().getLanguageCode()); loadDefinitions(); return rootView; }
Source:
protected void onResume() { super.onResume(); }

Target:
protected void onResume() { super.onResume(); registerReceiver(); }
Source:
public void anonUserOnMobileCanSeeAppPromotion() { Promoting promoting = findPromoting(); Assertion.assertTrue(promoting.isMobileBannerDisplayed()); Assertion.assertStringContains(promoting.getPromotionAppMobileText(), MOBILE_PROMOTION_TEXT); }

Target:
public void anonUserOnMobileCanSeeAppPromotion() { Promoting promoting = findPromoting(); assertTrue(promoting.isMobileBannerDisplayed()); assertStringContains(promoting.getPromotionAppMobileText(), MOBILE_PROMOTION_TEXT); }
Source:
public void run() { TestCasesConfig config = new TestCasesConfig("/cases-config.properties"); Map<String, TestCase> cases = new TestCasesProvider(config).getCases(); Map<String, TestCaseResult> results = new HashMap<>(); ClientConfig clientConfig = new ClientConfig(); clientConfig.register(new LoggingFilter(Logger.getLogger(getClass().getName()), true)); Client client = ClientBuilder.newClient(clientConfig); for (Map.Entry<String, TestCase> entry : cases.entrySet()) { results.put(entry.getKey(), entry.getValue().execute(client)); } for (Map.Entry<String, TestCaseResult> entry : results.entrySet()) { System.out.println(String.format("%s: %s", entry.getKey(), entry.getValue().isSuccessful()? "OK":"FAILED")); for (String errorMessage : entry.getValue().getErrorMessages()) { System.out.println(String.format(" %s", errorMessage)); } } }

Target:
public void run() { TestCasesConfig config = new TestCasesConfig("/cases-config.properties"); Map<String, TestCase> cases = new TestCasesProvider(config).getCases(); Map<String, TestCaseResult> results = new HashMap<>(); ClientConfig clientConfig = new ClientConfig(); clientConfig.register(new LoggingFilter(java.util.logging.Logger.getLogger(getClass().getSimpleName()), true)); Client client = ClientBuilder.newClient(clientConfig); for (Map.Entry<String, TestCase> entry : cases.entrySet()) { results.put(entry.getKey(), entry.getValue().execute(client)); } for (Map.Entry<String, TestCaseResult> entry : results.entrySet()) { if (entry.getValue().isSuccessful()) { logger.info(String.format("%s: OK", entry.getKey())); } else { logger.error(String.format("%s: FAILED", entry.getKey())); for (String errorMessage : entry.getValue().getErrorMessages()) { logger.error(String.format(" %s", errorMessage)); } } } }
Source:
public static void main(String[] args) { Scanner in = new Scanner(System.in); OAuthService service = new ServiceBuilder() .provider(VimeoApi.class) .apiKey(APIKEY) .apiSecret(API_SECRET) .callback(CALLBACK) .signatureType(SignatureType.QueryString) .build(); System.out.println("Fetching the Request Token..."); Token requestToken = service.getRequestToken(); System.out.println("Got the Request Token!"); String authUrl = String.format(AUTHORIZE_URL, requestToken.getToken(), CALLBACK); System.out.println("Now go and authorize Scribe here:"); System.out.println(authUrl); System.out.println("And paste the verifier here"); System.out.print(">>"); Verifier verifier = new Verifier(in.nextLine()); System.out.println(); System.out.println("Trading the Request Token for an Access Token..."); Token accessToken = service.getAccessToken(requestToken, verifier); System.out.println("Got the Access Token!"); System.out.println("(if your curious it looks like this: " + accessToken + " )"); System.out.println("Now we're going to access a protected resource..."); String protectedResourceURL = String.format(VIMEO_BASE, VIMEO_METHOD); OAuthRequest orequest = new OAuthRequest(Verb.GET, protectedResourceURL); service.signRequest(accessToken, orequest); Response oresponse = orequest.send(); System.out.println("Got it! Lets see what we found..."); System.out.println(oresponse.getCode()); System.out.println(oresponse.getBody()); System.out.println(); System.out.println("Thats it man! Go and build something awesome with Scribe! :)"); }

Target:
public static void main(String[] args) { OAuthService service = new ServiceBuilder() .provider(VimeoApi.class) .apiKey(APIKEY) .apiSecret(API_SECRET) .signatureType(SignatureType.QueryString) .build(); Scanner in = new Scanner(System.in); System.out.println("=== " + NETWORK_NAME + "'s OAuth Workflow ==="); System.out.println(); System.out.println("Fetching the Request Token..."); Token requestToken = service.getRequestToken(); System.out.println("Got the Request Token!"); String authorizationUrl = service.getAuthorizationUrl(requestToken); System.out.println("Now go and authorize Scribe here:"); System.out.println(authorizationUrl); System.out.println("And paste the verifier here"); System.out.print(">>"); Verifier verifier = new Verifier(in.nextLine()); System.out.println(); System.out.println("Trading the Request Token for an Access Token..."); Token accessToken = service.getAccessToken(requestToken, verifier); System.out.println("Got the Access Token!"); System.out.println("(if your curious it looks like this: " + accessToken + " )"); System.out.println("Now we're going to access a protected resource..."); String protectedResourceURL = String.format(VIMEO_BASE, VIMEO_METHOD); OAuthRequest orequest = new OAuthRequest(Verb.GET, protectedResourceURL); service.signRequest(accessToken, orequest); Response oresponse = orequest.send(); System.out.println("Got it! Lets see what we found..."); System.out.println(oresponse.getCode()); System.out.println(oresponse.getBody()); System.out.println(); System.out.println("Thats it man! Go and build something awesome with Scribe! :)"); }
Source:
public DistinctCountBufferAggregator( DimensionSelector selector ) { this.selector = selector; this.idForNull = selector.nameLookupPossibleInAdvance() ? selector.idLookup().lookupId(null) : -1; }

Target:
public DistinctCountBufferAggregator( DimensionSelector selector ) { this.selector = selector; Preconditions.checkArgument( selector.nameLookupPossibleInAdvance() || selector.getValueCardinality() != DimensionSelector.CARDINALITY_UNKNOWN, "DistinctCountBufferAggregator not supported for selector" ); this.idForNull = selector.nameLookupPossibleInAdvance() ? selector.idLookup().lookupId(null) : UNKNOWN; }
Source:
public Response createDataset(@Auth AuthUser user, @Context UriInfo info, String json) { DataSetDTO ds = new Gson().fromJson(json, DataSetDTO.class); if (Objects.isNull(ds)) { throw new BadRequestException("Dataset is required"); } if (Objects.isNull(ds.getProperties())) { throw new BadRequestException("Dataset must contain required properties"); } List<DataSetPropertyDTO> invalidProperties = datasetService.findInvalidProperties(ds.getProperties()); if (invalidProperties.size() > 0) { List<String> invalidKeys = invalidProperties.stream().map(p -> p.getPropertyName()).collect( Collectors.toList()); throw new BadRequestException("Dataset contains invalid properties that could not be recognized or associated with a key: " + invalidKeys.toString()); } String name = ds.getPropertyValue("Dataset Name"); if (Objects.isNull(name)) { throw new BadRequestException("Dataset name is required"); } DataSet datasetNameAlreadyUsed = datasetService.getDatasetByName(name); if (Objects.nonNull(datasetNameAlreadyUsed)) { throw new NotFoundException("Dataset name: " + name + " is already in use"); } DataSet dataset = datasetService.createDataset(ds, name); URI uri = info.getRequestUriBuilder().replacePath("api/dataset/{datasetId}").build(ds.getDataSetId()); return Response.created(uri).entity(dataset).build(); }

Target:
public Response createDataset(@Auth AuthUser user, @Context UriInfo info, String json) { DataSetDTO ds = new Gson().fromJson(json, DataSetDTO.class); if (Objects.isNull(ds)) { throw new BadRequestException("Dataset is required"); } if (Objects.isNull(ds.getProperties()) || ds.getProperties().isEmpty()) { throw new BadRequestException("Dataset must contain required properties"); } List<DataSetPropertyDTO> invalidProperties = datasetService.findInvalidProperties(ds.getProperties()); if (invalidProperties.size() > 0) { List<String> invalidKeys = invalidProperties.stream().map(p -> p.getPropertyName()).collect( Collectors.toList()); throw new BadRequestException("Dataset contains invalid properties that could not be recognized or associated with a key: " + invalidKeys.toString()); } String name = ds.getPropertyValue("Dataset Name"); if (Objects.isNull(name)) { throw new BadRequestException("Dataset name is required"); } DataSet datasetNameAlreadyUsed = datasetService.getDatasetByName(name); if (Objects.nonNull(datasetNameAlreadyUsed)) { throw new NotFoundException("Dataset name: " + name + " is already in use"); } DataSet dataset = datasetService.createDataset(ds, name); URI uri = info.getRequestUriBuilder().replacePath("api/dataset/{datasetId}").build(ds.getDataSetId()); return Response.created(uri).entity(dataset).build(); }
Source:
public void execute() throws MojoExecutionException, MojoFailureException { if (skip || skipExec || skipTests) { getLog().info("Skipping tests"); return; } if (!"eclipse-test-plugin".equals(project.getPackaging())) { getLog().warn("Unsupported packaging type " + project.getPackaging()); return; } if (testSuite != null || testClass != null) { if (testSuite == null || testClass == null) { throw new MojoExecutionException("Both testSuite and testClass must be provided or both should be null"); } MavenProject suite = getTestSuite(testSuite); if (suite == null) { throw new MojoExecutionException("Cannot find test suite project with Bundle-SymbolicName " + testSuite); } if (!suite.equals(project)) { getLog().info("Not executing tests, testSuite=" + testSuite + " and project is not the testSuite"); return; } } EquinoxInstallation testRuntime; if (provisionInstallation) { testRuntime = createProvisionedInstallation(); } else { testRuntime = createEclipseInstallation(DefaultReactorProject.adapt(session)); } runTest(testRuntime); }

Target:
public void execute() throws MojoExecutionException, MojoFailureException { if (skip || skipExec || skipTests) { getLog().info("Skipping tests"); return; } if (!"eclipse-test-plugin".equals(project.getPackaging())) { getLog().warn("Unsupported packaging type " + project.getPackaging()); return; } if (testSuite != null || testClass != null) { if (testSuite == null || testClass == null) { throw new MojoExecutionException("Both testSuite and testClass must be provided or both should be null"); } MavenProject suite = getTestSuite(testSuite); if (suite == null) { throw new MojoExecutionException("Cannot find test suite project with Bundle-SymbolicName " + testSuite); } if (!suite.equals(project)) { getLog().info("Not executing tests, testSuite=" + testSuite + " and project is not the testSuite"); return; } } EquinoxInstallation testRuntime; if (provisionInstallation) { testRuntime = createProvisionedInstallation(); } else { testRuntime = createEclipseInstallation(); } runTest(testRuntime); }
Source:
public void corruptedCustomMovesTest() { setSolverConfigCalculatorClass(TestdataDifferentValuesCalculator.class); switch (environmentMode) { case FULL_ASSERT: case FAST_ASSERT: setSolverConfigMoveListFactoryClassToCorrupted(TestdataChangeMoveWithCorruptedUndoMoveFactory.class); assertIllegalStateExceptionWhileSolving("corrupted undoMove"); break; case NON_INTRUSIVE_FULL_ASSERT: setSolverConfigMoveListFactoryClassToCorrupted(TestdataCorruptedEntityUndoMoveFactory.class); assertIllegalStateExceptionWhileSolving("not the uncorruptedScore"); break; case REPRODUCIBLE: case NON_REPRODUCIBLE: case PRODUCTION: break; default: throw new AssertionError("Missing case for " + environmentMode); } }

Target:
public void corruptedCustomMovesTest() { setSolverConfigCalculatorClass(TestdataDifferentValuesCalculator.class); switch (environmentMode) { case FULL_ASSERT: case FAST_ASSERT: setSolverConfigMoveListFactoryClassToCorrupted(TestdataCorruptedUndoMoveFactory.class); assertIllegalStateExceptionWhileSolving("corrupted undoMove"); break; case NON_INTRUSIVE_FULL_ASSERT: setSolverConfigMoveListFactoryClassToCorrupted(TestdataCorruptedEntityUndoMoveFactory.class); assertIllegalStateExceptionWhileSolving("not the uncorruptedScore"); break; case REPRODUCIBLE: case NON_REPRODUCIBLE: case PRODUCTION: break; default: Assertions.fail("Environment mode not covered: " + environmentMode); } }
Source:
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) { if (stack.hasTagCompound()) { Binding binding = getBinding(stack); if (binding != null) { tooltip.add(new TextComponentTranslation("tooltip.bloodmagic.currentOwner", binding.getOwnerName()).getFormattedText()); } } }

Target:
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) { if (!stack.hasTagCompound()) return; Binding binding = getBinding(stack); if (binding != null) tooltip.add(new TextComponentTranslation("tooltip.bloodmagic.currentOwner", binding.getOwnerName()).getFormattedText()); }
Source:
public void refresh() { if (patchSet.getId().equals(diffBaseId)) { if (patchTable != null) { patchTable.setVisible(false); } if (actionsPanel != null) { actionsPanel.setVisible(false); } } else { if (patchTable != null) { if (patchTable.getBase() == null && diffBaseId == null || patchTable.getBase() != null && patchTable.getBase().equals(diffBaseId)) { actionsPanel.setVisible(true); patchTable.setVisible(true); return; } } AccountDiffPreference diffPrefs; if (patchTable == null) { diffPrefs = new ListenableAccountDiffPreference().get(); } else { diffPrefs = patchTable.getPreferences().get(); patchTable.setVisible(false); } Util.DETAIL_SVC.patchSetDetail2(diffBaseId, patchSet.getId(), diffPrefs, new GerritCallback<PatchSetDetail>() { @Override public void onSuccess(PatchSetDetail result) { if (actionsPanel != null) { actionsPanel.setVisible(true); } else { loadedActionPanel(result); } loadedPatchTable(result); } }); } }

Target:
public void refresh() { if (patchSet.getId().equals(diffBaseId)) { if (patchTable != null) { patchTable.setVisible(false); } if (actionsPanel != null) { actionsPanel.setVisible(false); } } else { if (patchTable != null) { if (patchTable.getBase() == null && diffBaseId == null || patchTable.getBase() != null && patchTable.getBase().equals(diffBaseId)) { actionsPanel.setVisible(true); patchTable.setVisible(true); return; } } AccountDiffPreference diffPrefs; if (patchTable == null) { diffPrefs = new ListenableAccountDiffPreference().get(); } else { diffPrefs = patchTable.getPreferences().get(); patchTable.setVisible(false); } Util.DETAIL_SVC.patchSetDetail2(diffBaseId, patchSet.getId(), diffPrefs, new GerritCallback<PatchSetDetail>() { @Override public void onSuccess(PatchSetDetail result) { if (actionsPanel != null) { actionsPanel.setVisible(true); } else { loadActionPanel(result); } loadPatchTable(result); } }); } }
Source:
public void deleteServiceAccounts(Collection<ServiceAccount> serviceAccountsToDelete) { serviceAccountsToDelete.stream() .forEach( sa -> { serviceAccountDAO().delete(sa.getId()); try { if (fiatService.isPresent()) { fiatService.get().logoutUser(sa.getId()); } } catch (RetrofitError re) { log.warn("Could not delete service account user $serviceAccountId", re); } }); if (!serviceAccountsToDelete.isEmpty()) syncUsers(serviceAccountsToDelete); }

Target:
public void deleteServiceAccounts(Collection<ServiceAccount> serviceAccountsToDelete) { serviceAccountsToDelete.stream() .forEach( sa -> { try { serviceAccountDAO.delete(sa.getId()); if (fiatService.isPresent()) { fiatService.get().logoutUser(sa.getId()); } } catch (Exception e) { log.warn("Could not delete service account user {}", sa.getId(), e); } }); if (!serviceAccountsToDelete.isEmpty()) { syncUsers(serviceAccountsToDelete); } }
Source:
private static int findGroupStart(String pattern, int currentIndex, Character invalidWildgetCharacter) { if (invalidWildgetCharacter != null && invalidWildgetCharacter == '\\') { return pattern.indexOf('[', currentIndex); } return findNotEscapedCharacterPosition(pattern, currentIndex, '['); }

Target:
private static int findGroupStart(String pattern, int currentIndex, Character invalidWildgetCharacter) { if (invalidWildgetCharacter != null && invalidWildgetCharacter == '\\') return pattern.indexOf('[', currentIndex); return findNotEscapedCharacterPosition(pattern, currentIndex, '['); }
Source:
public List<TaskDTO> findOpenTasksForCurrentUser(String sort) throws DataException { LoginForm login = (LoginForm) Helper.getManagedBeanValue("#{LoginForm}"); if (login == null) { return new ArrayList<>(); } List<JSONObject> results = findByProcessingStatusAndUser(TaskStatus.INWORK, login.getMyBenutzer().getId(), sort); return convertJSONObjectsToDTOs(results, false); }

Target:
public List<TaskDTO> findOpenTasksForCurrentUser(String sort) throws DataException { User user = Helper.getCurrentUser(); if (user == null) { return new ArrayList<>(); } List<JSONObject> results = findByProcessingStatusAndUser(TaskStatus.INWORK, user.getId(), sort); return convertJSONObjectsToDTOs(results, false); }
Source:
public void leaveToken(DetailAST ast) { Map<String, DetailAST> scope = null; switch (ast.getType()) { case TokenTypes.OBJBLOCK: case TokenTypes.CTOR_DEF: case TokenTypes.METHOD_DEF: scope = scopeStack.pop().scope; break; case TokenTypes.SLIST: final PrevScopeUnitializedVariableData prevScopeUnitializedVariableData = prevScopeUninitializedVariableStack.peek(); if (ast.getParent().getType() != TokenTypes.CASE_GROUP || findLastChildWhichContainsSpecifiedToken(ast.getParent().getParent(), TokenTypes.CASE_GROUP, TokenTypes.SLIST) == ast.getParent()) { scope = scopeStack.pop().scope; prevScopeUninitializedVariableStack.pop(); } final DetailAST parent = ast.getParent(); if (!isTryCatchOrFinallyToken(parent) && (parent.getType() != TokenTypes.LITERAL_ELSE || findLastToken(parent.getParent(), TokenTypes.LITERAL_ELSE) != parent)) { updateUninitializedVariable(prevScopeUnitializedVariableData); } break; default: } if (scope != null) { for (DetailAST node : scope.values()) { log(node.getLineNo(), node.getColumnNo(), MSG_KEY, node.getText()); } } }

Target:
public void leaveToken(DetailAST ast) { Map<String, DetailAST> scope = null; switch (ast.getType()) { case TokenTypes.OBJBLOCK: case TokenTypes.CTOR_DEF: case TokenTypes.METHOD_DEF: scope = scopeStack.pop().scope; break; case TokenTypes.SLIST: final Deque<DetailAST> prevScopeUnitializedVariableData = prevScopeUninitializedVariables.peek(); if (ast.getParent().getType() != TokenTypes.CASE_GROUP || findLastChildWhichContainsSpecifiedToken(ast.getParent().getParent(), TokenTypes.CASE_GROUP, TokenTypes.SLIST) == ast.getParent()) { scope = scopeStack.pop().scope; prevScopeUninitializedVariables.pop(); } final DetailAST parent = ast.getParent(); if (shouldUpdateUninitializedVariables(parent)) { updateUninitializedVariables(prevScopeUnitializedVariableData); } break; default: } if (scope != null) { for (DetailAST node : scope.values()) { log(node.getLineNo(), node.getColumnNo(), MSG_KEY, node.getText()); } } }
Source:
private void enableAllFields() { languageLabel.setEnabled(true); if(algorithmGroup != null) algorithmGroup.setEnabled(true); commentLabel.setEnabled(true); commentText.setEnabled(true); languageCombo.setEnabled(true); }

Target:
protected void enableAllFields() { languageLabel.setEnabled(true); algorithmGroup.setEnabled(true); commentLabel.setEnabled(true); commentText.setEnabled(true); languageCombo.setEnabled(true); }
Source:
public <T extends Descriptor> List<T> getDescriptors(String target, String xp) { Map<String, List<Descriptor>> descriptorsByXP = descriptors.getOrDefault(target, Collections.emptyMap()) .getOrDefault(xp, Collections.emptyMap()); List<T> result = new ArrayList<>(descriptorsByXP.size()); descriptorsByXP.values() .stream() .forEachOrdered(l -> { T o = (T) merge(l); if (o != null) { result.add(o); } }); Collections.sort(result); return result; }

Target:
public <T extends Descriptor> List<T> getDescriptors(String target, String xp) { return (List<T>) descriptors.getOrDefault(target, Collections.emptyMap()) .getOrDefault(xp, Collections.emptyMap()) .values() .stream() .map(this::merge) .filter(Objects::nonNull) .collect(Collectors.toList()); }
Source:
public ImmutableSpongeGravityData(boolean value) { super(ImmutableGravityData.class, value, Keys.ENTITY_HAS_GRAVITY, SpongeGravityData.class, false); }

Target:
public ImmutableSpongeGravityData(boolean value) { super(ImmutableGravityData.class, value, Keys.HAS_GRAVITY, SpongeGravityData.class, DataConstants.DEFAULT_HAS_GRAVITY); }
Source:
public void changeQuestionAnswer(User u, String question, String answer) throws DAOException { log.info("Updating secret question and answer for " + u.getUsername()); LoginCredential credentials = getLoginCredential(u); credentials.setSecretQuestion(question); String hashedAnswer = Security.encodeString(answer + credentials.getSalt()); credentials.setSecretAnswer(hashedAnswer); credentials.setDateChanged(new Date()); credentials.setChangedBy(u); updateLoginCredential(credentials); }

Target:
public void changeQuestionAnswer(User u, String question, String answer) throws DAOException { log.info("Updating secret question and answer for " + u.getUsername()); LoginCredential credentials = getLoginCredential(u); credentials.setSecretQuestion(question); String hashedAnswer = Security.encodeString(answer.toLowerCase() + credentials.getSalt()); credentials.setSecretAnswer(hashedAnswer); credentials.setDateChanged(new Date()); credentials.setChangedBy(u); updateLoginCredential(credentials); }
Source:
public void afterEach(ExtensionContext context) throws Exception { BrokerRunningSupport brokerRunning = BROKER_RUNNING_HOLDER.get(); if (brokerRunning != null && brokerRunning.isPurgeAfterEach()) { brokerRunning.purgeTestQueues(); } }

Target:
public void afterEach(ExtensionContext context) { BrokerRunningSupport brokerRunning = BROKER_RUNNING_HOLDER.get(); if (brokerRunning != null && brokerRunning.isPurgeAfterEach()) { brokerRunning.purgeTestQueues(); } }
Source:
public List<WorkspaceImpl> getByNamespace(String namespace, boolean includeRuntimes) throws ServerException { requireNonNull(namespace, "Required non-null namespace"); final List<WorkspaceImpl> workspaces = workspaceDao.getByNamespace(namespace); if (includeRuntimes) { for (WorkspaceImpl workspace : workspaces) { normalizeState(workspace); } } else { for (WorkspaceImpl workspace : workspaces) { workspace.setStatus(runtimes.getStatus(workspace.getId())); } } return workspaces; }

Target:
public List<WorkspaceImpl> getByNamespace(String namespace, boolean includeRuntimes) throws ServerException { requireNonNull(namespace, "Required non-null namespace"); final List<WorkspaceImpl> workspaces = workspaceDao.getByNamespace(namespace); for (WorkspaceImpl workspace : workspaces) { normalizeState(workspace, includeRuntimes); } return workspaces; }
Source:
private SortBuffer getSortBuffer() { if (currentSortBuffer != null) { return currentSortBuffer; } currentSortBuffer = new PartitionSortedBuffer(bufferPool, numSubpartitions, networkBufferSize); return currentSortBuffer; }

Target:
private SortBuffer getSortBuffer() { if (currentSortBuffer != null && !currentSortBuffer.isFinished()) { return currentSortBuffer; } currentSortBuffer = new PartitionSortedBuffer( lock, bufferPool, numSubpartitions, networkBufferSize, null); return currentSortBuffer; }
Source:
private double computeKappa(HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider, double[] discountedCashFlow, double[] alpha, double omega) { double kappa = 0d; if (DoubleArrayMath.fuzzyEqualsZero(alpha, SMALL)) { double totalPv = DoubleArrayMath.sum(discountedCashFlow); kappa = totalPv * omega > 0d ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY; } else { kappa = hwProvider.getModel().kappa(DoubleArray.copyOf(discountedCashFlow), DoubleArray.copyOf(alpha)); } return kappa; }

Target:
private double computeKappa(HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider, double[] discountedCashFlow, double[] alpha, double omega) { double kappa = 0d; if (DoubleArrayMath.fuzzyEqualsZero(alpha, SMALL)) { double totalPv = DoubleArrayMath.sum(discountedCashFlow); kappa = totalPv * omega > 0d ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY; } else { kappa = hwProvider.getModel().kappa(DoubleArray.ofUnsafe(discountedCashFlow), DoubleArray.ofUnsafe(alpha)); } return kappa; }
Source:
public <T, F extends Future<T>> Callable<T> decorateFutureSupplier(Supplier<F> futureSupplier) { return () -> { Future<T> future = futureSupplier.get(); try { T result = future.get(getTimeLimiterConfig().getTimeoutDuration().toMillis(), TimeUnit.MILLISECONDS); onSuccess(); return result; } catch (TimeoutException e) { TimeoutException timeoutException = createdTimeoutExceptionWithName(name); onError(timeoutException); if (getTimeLimiterConfig().shouldCancelRunningFuture()) { future.cancel(true); } throw timeoutException; } catch (ExecutionException e) { Throwable t = e.getCause(); if (t == null) { onError(e); throw e; } onError(t); if (t instanceof Error) { throw (Error) t; } throw (Exception) t; } }; }

Target:
public <T, F extends Future<T>> Callable<T> decorateFutureSupplier(Supplier<F> futureSupplier) { return () -> { Future<T> future = futureSupplier.get(); try { T result = future.get(getTimeLimiterConfig().getTimeoutDuration().toMillis(), TimeUnit.MILLISECONDS); onSuccess(); return result; } catch (TimeoutException e) { TimeoutException timeoutException = createdTimeoutExceptionWithName(name); timeoutException.setStackTrace(e.getStackTrace()); onError(timeoutException); if (getTimeLimiterConfig().shouldCancelRunningFuture()) { future.cancel(true); } throw timeoutException; } catch (ExecutionException e) { Throwable t = e.getCause(); if (t == null) { onError(e); throw e; } onError(t); if (t instanceof Error) { throw (Error) t; } throw (Exception) t; } }; }
Source:
public void testDeleteOpenProjectLinux() throws IOException { if (!Platform.getOS().equals(Platform.OS_LINUX)) { return; } IProject project = null; File projectRoot = null; IFolder folder = null; try { IWorkspace workspace = getWorkspace(); project = workspace.getRoot().getProject(getUniqueString()); folder = project.getFolder("a_folder"); IFile file1 = folder.getFile("file1.txt"); IFile file2 = project.getFile("file2.txt"); ensureExistsInWorkspace(new IResource[] {file1, file2}, true); projectRoot = project.getLocation().toFile(); setReadOnly(folder, true); IFile projectFile = project.getFile(".project"); assertTrue("1.2", projectFile.exists()); assertTrue("1.3", projectFile.isSynchronized(IResource.DEPTH_INFINITE)); try { project.delete(IResource.FORCE, getMonitor()); } catch (CoreException ce) { ce.printStackTrace(); fail("2.0 - shouldn't have failed: " + ce.getMessage(), ce); } assertTrue("5.1", !project.exists()); assertTrue("5.2", !file1.exists()); assertTrue("5.3", file1.isSynchronized(IResource.DEPTH_INFINITE)); assertTrue("5.4", project.isSynchronized(IResource.DEPTH_INFINITE)); assertTrue("6.0", !projectRoot.exists()); } finally { if (folder != null && folder.exists()) setReadOnly(folder, false); if (projectRoot != null) ensureDoesNotExistInFileSystem(projectRoot); } }

Target:
public void testDeleteOpenProjectLinux() throws Exception { if (!Platform.getOS().equals(Platform.OS_LINUX)) { return; } IProject project = null; File projectRoot = null; IFolder folder = null; try { IWorkspace workspace = getWorkspace(); project = workspace.getRoot().getProject(getUniqueString()); folder = project.getFolder("a_folder"); IFile file1 = folder.getFile("file1.txt"); IFile file2 = project.getFile("file2.txt"); ensureExistsInWorkspace(new IResource[] {file1, file2}, true); projectRoot = project.getLocation().toFile(); setReadOnly(folder, true); IFile projectFile = project.getFile(".project"); assertTrue("1.2", projectFile.exists()); assertTrue("1.3", projectFile.isSynchronized(IResource.DEPTH_INFINITE)); try { project.delete(IResource.FORCE, getMonitor()); } catch (CoreException ce) { ce.printStackTrace(); fail("2.0 - shouldn't have failed: " + ce.getMessage(), ce); } assertTrue("5.1", !project.exists()); assertTrue("5.2", !file1.exists()); assertTrue("5.3", file1.isSynchronized(IResource.DEPTH_INFINITE)); assertTrue("5.4", project.isSynchronized(IResource.DEPTH_INFINITE)); assertTrue("6.0", !projectRoot.exists()); } finally { if (folder != null && folder.exists()) setReadOnly(folder, false); if (projectRoot != null) ensureDoesNotExistInFileSystem(projectRoot); } }
Source:
public synchronized long getReservedRevocableBytes() { return operatorMemoryContext.getRevocableMemory(); }

Target:
public long getReservedRevocableBytes() { return operatorMemoryContext.getRevocableMemory(); }
Source:
StatsManager(StorageManager storageManager, List<? extends ReplicaId> replicaIds, MetricRegistry registry, StatsManagerConfig config, Time time) throws IOException { this.storageManager = storageManager; statsOutputFile = new File(config.outputFilePath); publishPeriodInSecs = config.publishPeriodInSecs; initialDelayInSecs = config.initialDelayUpperBoundInSecs; metrics = new StatsManagerMetrics(registry); mapper.setVisibilityChecker(mapper.getVisibilityChecker().withFieldVisibility(JsonAutoDetect.Visibility.ANY)); totalPartitionIds = new ArrayList<>(); partitionToReplicaMap = new HashMap<>(); PartitionId partitionId; for (ReplicaId replicaId : replicaIds) { partitionId = replicaId.getPartitionId(); totalPartitionIds.add(partitionId); partitionToReplicaMap.put(partitionId, replicaId); } this.time = time; }

Target:
StatsManager(StorageManager storageManager, List<? extends ReplicaId> replicaIds, MetricRegistry registry, StatsManagerConfig config, Time time) throws IOException { this.storageManager = storageManager; statsOutputFile = new File(config.outputFilePath); publishPeriodInSecs = config.publishPeriodInSecs; initialDelayInSecs = config.initialDelayUpperBoundInSecs; metrics = new StatsManagerMetrics(registry); partitionToReplicaMap = replicaIds.stream().collect(Collectors.toMap(ReplicaId::getPartitionId, Function.identity())); this.time = time; }
Source:
public ValidationResult initialize(RuntimeContainer container, ComponentProperties properties) { CouchbaseOutputProperties outputProperties = (CouchbaseOutputProperties) properties; this.bootstrapNodes = outputProperties.bootstrapNodes.getStringValue(); this.bucket = outputProperties.bucket.getStringValue(); this.password = outputProperties.password.getStringValue(); this.idFieldName = outputProperties.idFieldName.getStringValue(); return ValidationResult.OK; }

Target:
public ValidationResult initialize(RuntimeContainer container, ComponentProperties properties) { if (properties instanceof CouchbaseOutputProperties) { CouchbaseOutputProperties outputProperties = (CouchbaseOutputProperties) properties; this.bootstrapNodes = outputProperties.bootstrapNodes.getStringValue(); this.bucket = outputProperties.bucket.getStringValue(); this.password = outputProperties.password.getStringValue(); this.idFieldName = outputProperties.idFieldName.getStringValue(); this.dieOnError = outputProperties.dieOnError.getValue(); return ValidationResult.OK; } return new ValidationResult(Result.ERROR, "Wrong component properties, must be instanceof CouchbaseOutputProperties class"); }
Source:
public List<String> getJavaOptsArray() { return javaOptsArray == null ? ImmutableList.<String>of() : javaOptsArray; }

Target:
public List<String> getJavaOptsArray() { return javaOptsArray; }
Source:
protected void activate(ComponentContext context) { context.getBundleContext().registerService(EventHandler.class.getName(), new AccountLockEventHandler(), null); context.getBundleContext().registerService(TenantMgtListener.class.getName(), new TenantCreationEventListener(), null); init(); listener = new IdentityMgtEventListener(); serviceRegistration = context.getBundleContext().registerService(UserOperationEventListener.class.getName(), listener, null); log.debug("Identity Management Listener is enabled"); }

Target:
protected void activate(ComponentContext context) { context.getBundleContext().registerService(EventHandler.class.getName(), new AccountLockEventHandler(), null); context.getBundleContext().registerService(TenantMgtListener.class.getName(), new TenantCreationEventListener(), null); init(); listener = new IdentityMgtEventListener(); serviceRegistration = context.getBundleContext().registerService(UserOperationEventListener.class.getName(), listener, null); if(log.isDebugEnabled()){ log.debug("Identity Management Listener is enabled"); } }
Source:
public void before() { CacheEventListenerConfigurationBuilder cacheEventListenerConfiguration = CacheEventListenerConfigurationBuilder .newEventListenerConfiguration((CacheEventListener<Long, String>) expirations::add, EventType.EXPIRED) .unordered() .synchronous(); CacheConfiguration<Long, String> cacheConfiguration = CacheConfigurationBuilder.newCacheConfigurationBuilder(Long.class, String.class, heap(10)) .withLoaderWriter(new CacheLoaderWriter<Long, String>() { @Override public String load(Long key) throws Exception { sleep(latency.get()); return sor.get(key); } @Override public void write(Long key, String value) { sor.put(key, value); } @Override public void delete(Long key) { sor.remove(key); } }) .withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofMillis(TIME_TO_EXPIRATION))) .add(cacheEventListenerConfiguration) .build(); cacheManager = CacheManagerBuilder.newCacheManagerBuilder() .withCache("aCache", cacheConfiguration) .using(new TimeSourceConfiguration(timeSource)) .build(true); cache = (InternalCache<Long, String>) cacheManager.getCache("aCache", Long.class, String.class); cacheStatistics = new DefaultCacheStatistics(cache, new DefaultStatisticsServiceConfiguration() .withLatencyHistorySize(2) .withLatencyHistoryWindow(400, MILLISECONDS), timeSource); }

Target:
public void before() { CacheEventListenerConfigurationBuilder cacheEventListenerConfiguration = CacheEventListenerConfigurationBuilder .newEventListenerConfiguration((CacheEventListener<Long, String>) expirations::add, EventType.EXPIRED) .unordered() .synchronous(); CacheLoaderWriter<Long, String> loaderWriter = new CacheLoaderWriter<Long, String>() { @Override public String load(Long key) throws Exception { sleep(latency.get()); return sor.get(key); } @Override public void write(Long key, String value) { sor.put(key, value); } @Override public void delete(Long key) { sor.remove(key); } }; CacheConfiguration<Long, String> cacheConfiguration = CacheConfigurationBuilder.newCacheConfigurationBuilder(Long.class, String.class, heap(10)) .withLoaderWriter(loaderWriter) .withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofMillis(TIME_TO_EXPIRATION))) .add(cacheEventListenerConfiguration) .build(); cacheManager = CacheManagerBuilder.newCacheManagerBuilder() .withCache("aCache", cacheConfiguration) .using(new TimeSourceConfiguration(timeSource)) .build(true); cache = (InternalCache<Long, String>) cacheManager.getCache("aCache", Long.class, String.class); cacheStatistics = new DefaultCacheStatistics(cache, new DefaultStatisticsServiceConfiguration() .withLatencyHistorySize(2) .withLatencyHistoryWindow(400, MILLISECONDS), timeSource); }
Source:
public IndexMappingLoader(final Settings settings) { try { }catch(Exception e){ } appMappingsTemplate = loadMapping(settings, OPENSHIFT_ES_KIBANA_SEED_MAPPINGS_APP,DEFAULT_APPLICATIONS_MAPPING); opsMappingsTemplate = loadMapping(settings, OPENSHIFT_ES_KIBANA_SEED_MAPPINGS_OPERATIONS,DEFAULT_OPERATIONS_MAPPING); emptyProjectMappingsTemplate = loadMapping(settings, OPENSHIFT_ES_KIBANA_SEED_MAPPINGS_EMPTY,DEFAULT_EMPTY_MAPPING); }

Target:
public IndexMappingLoader(final Settings settings) { appMappingsTemplate = loadMapping(settings, OPENSHIFT_ES_KIBANA_SEED_MAPPINGS_APP,DEFAULT_APPLICATIONS_MAPPING); opsMappingsTemplate = loadMapping(settings, OPENSHIFT_ES_KIBANA_SEED_MAPPINGS_OPERATIONS,DEFAULT_OPERATIONS_MAPPING); emptyProjectMappingsTemplate = loadMapping(settings, OPENSHIFT_ES_KIBANA_SEED_MAPPINGS_EMPTY,DEFAULT_EMPTY_MAPPING); }
Source:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Role role = (Role) o; return Objects.equal(name, role.name); }

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Role role = (Role) o; return Objects.equal(name, role.name); }
Source:
protected List<Annotation> getTypeAnnotations(Mapper mapper) { if ( mapper.getDecorator() == null ) { return Arrays.asList( singleton(), named() ); } else { return Collections.singletonList( namedDelegate( mapper ) ); } }

Target:
protected List<Annotation> getTypeAnnotations(Mapper mapper) { if ( mapper.getDecorator() == null ) { return Arrays.asList( singleton(), named() ); } else { return Arrays.asList( singleton(), namedDelegate( mapper ) ); } }