auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private CompletionStage<RestResponse> getAllDetails(RestRequest request) { NettyRestResponse.Builder responseBuilder = new NettyRestResponse.Builder(); String cacheName = request.variables().get("cacheName"); <START> Cache<?, ?> cache = invocationHelper.getRestCacheManager().getCache(cacheName, APPLICATION_JSON, APPLICATION_JSON, request); <END> if (cache == null) { responseBuilder.status(HttpResponseStatus.NOT_FOUND); return CompletableFuture.completedFuture(responseBuilder.build()); } Stats stats = cache.getAdvancedCache().getStats(); Configuration configuration = cache.getCacheConfiguration(); int size = cache.getAdvancedCache().size(); boolean rehashInProgress = cache.getAdvancedCache().getDistributionManager().isRehashInProgress(); String version = cache.getVersion(); LocalizedCacheTopology cacheTopology = cache.getAdvancedCache().getDistributionManager().getCacheTopology(); Set<Address> membersSet = cacheTopology.getMembersSet(); ConsistentHash currentCH = cacheTopology.getCurrentCH(); try { CacheFullDetail fullDetail = new CacheFullDetail(); fullDetail.stats = stats; fullDetail.configuration = configuration; fullDetail.size = size; fullDetail.rehashInProgress = rehashInProgress; fullDetail.version = version; fullDetail.members = membersSet; fullDetail.consistentHash = currentCH; byte[] detailsResponse = invocationHelper.getMapper().writeValueAsBytes(fullDetail); responseBuilder.contentType(APPLICATION_JSON) .entity(detailsResponse) .status(OK); } catch (JsonProcessingException e) { responseBuilder.status(HttpResponseStatus.INTERNAL_SERVER_ERROR); } return CompletableFuture.completedFuture(responseBuilder.build()); }</code><technical_language>APPLICATION_JSON here? understanding is this method read cache data, need decorate cache JSON</technical_language>

Target:
private CompletionStage<RestResponse> getAllDetails(RestRequest request) { NettyRestResponse.Builder responseBuilder = new NettyRestResponse.Builder(); String cacheName = request.variables().get("cacheName"); Cache<?, ?> cache = invocationHelper.getRestCacheManager().getCache(cacheName, request); if (cache == null) { responseBuilder.status(HttpResponseStatus.NOT_FOUND); return CompletableFuture.completedFuture(responseBuilder.build()); } return CompletableFuture.supplyAsync(() -> getDetailResponse(responseBuilder, cache), invocationHelper.getExecutor()); }
Source:
<code>public StorageDRModel() { setFrequency(new ListModel<StorageSyncSchedule.Frequency>()); setHour(new ListModel<Integer>()); setMins(new ListModel<Integer>()); setGeoRepSession(new ListModel<GlusterGeoRepSession>()); setNoSync(new EntityModel<Boolean>()); setStorageDomain(new EntityModel<StorageDomain>()); getNoSync().setEntity(false); frequency.setItems(Arrays.asList(StorageSyncSchedule.Frequency.values())); days = new ListModel<>(); List<StorageSyncSchedule.Day> daysList = Arrays.asList(StorageSyncSchedule.Day.values()); List<List<StorageSyncSchedule.Day>> list = new ArrayList<>(); list.add(daysList); days.setItems(list, new ArrayList<StorageSyncSchedule.Day>()); List<Integer> hours = new ArrayList<>(); <START> for (int i=0; i < 24; i++) { <END> hours.add(i); } hour.setItems(hours); List<Integer> minutes = new ArrayList<>(); for (int i=0; i < 60; i++) { minutes.add(i); } mins.setItems(minutes); getFrequency().getSelectedItemChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { if (getFrequency().getSelectedItem() == StorageSyncSchedule.Frequency.WEEKLY) { getDays().setIsAvailable(true); getHour().setIsAvailable(true); getMins().setIsAvailable(true); } else if (getFrequency().getSelectedItem() == StorageSyncSchedule.Frequency.DAILY) { getDays().setIsAvailable(false); getHour().setIsAvailable(true); getMins().setIsAvailable(true); } else { getDays().setIsAvailable(false); getHour().setIsAvailable(false); getMins().setIsAvailable(false); } } }); }</code><technical_language>* formatter * consider extracting a constant (just for readability)</technical_language>

Target:
public StorageDRModel() { setFrequency(new ListModel<StorageSyncSchedule.Frequency>()); setHour(new ListModel<Integer>()); setMins(new ListModel<Integer>()); setGeoRepSession(new ListModel<GlusterGeoRepSession>()); setNoSync(new EntityModel<Boolean>()); setStorageDomain(new EntityModel<StorageDomain>()); getNoSync().setEntity(false); frequency.setItems(Arrays.asList(StorageSyncSchedule.Frequency.values())); days = new ListModel<>(); List<StorageSyncSchedule.Day> daysList = Arrays.asList(StorageSyncSchedule.Day.values()); List<List<StorageSyncSchedule.Day>> list = new ArrayList<>(); list.add(daysList); days.setItems(list, new ArrayList<StorageSyncSchedule.Day>()); List<Integer> hours = new ArrayList<>(); for (int i = 0; i < MAX_HOUR; i++) { hours.add(i); } hour.setItems(hours); List<Integer> minutes = new ArrayList<>(); for (int i = 0; i < MAX_MINUTE; i++) { minutes.add(i); } mins.setItems(minutes); getFrequency().getSelectedItemChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { boolean weekly = getFrequency().getSelectedItem() == StorageSyncSchedule.Frequency.WEEKLY; boolean daily = getFrequency().getSelectedItem() == StorageSyncSchedule.Frequency.DAILY; getDays().setIsAvailable(weekly); getHour().setIsAvailable(weekly || daily); getMins().setIsAvailable(weekly || daily); } }); }
Source:
<code>public Button(Composite parent, String imageUri, String tooltip, ButtonViewModel model) { super(parent, SWT.SHADOW_OUT); setLayout(new GridLayout()); setRightMargin(0); GridData gridData = new GridData(SWT.LEFT, SWT.CENTER, false, false); model.addPropertyChangeListener("width", new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { <START> gridData.widthHint = model.getWidth(); <END> requestLayout(); } }); } }); setLayoutData(gridData); setToolTipText(tooltip); setImage(ResourceManager.getPluginImageFromUri(imageUri)); addMouseMoveListener(new MouseMoveListener() { @Override public void mouseMove(MouseEvent arg0) { mouseEnterAction(); } }); addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { mouseClickAction(); } @Override public void mouseDoubleClick(MouseEvent e) { mouseClickAction(); } }); addMouseTrackListener(new MouseTrackAdapter() { @Override public void mouseExit(MouseEvent e) { mouseExitAction(); } }); this.model = model; bindingContext.bindValue(WidgetProperties.background().observe(this), BeanProperties.value("color").observe(model)); bindingContext.bindValue(WidgetProperties.text().observe(this), BeanProperties.value("text").observe(model)); bindingContext.bindValue(WidgetProperties.font().observe(this), BeanProperties.value("font").observe(model)); }</code><technical_language>If (int) evt.getNewValue() model store width</technical_language>

Target:
public Button(Composite parent, String imageUri, String tooltip, ButtonViewModel model) { super(parent, SWT.SHADOW_OUT); setLayout(new GridLayout()); setRightMargin(0); GridData gridData = new GridData(SWT.LEFT, SWT.CENTER, false, false); model.addPropertyChangeListener("width", new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { gridData.widthHint = (int) evt.getNewValue(); requestLayout(); } }); } }); setLayoutData(gridData); setToolTipText(tooltip); setImage(ResourceManager.getPluginImageFromUri(imageUri)); addMouseMoveListener(new MouseMoveListener() { @Override public void mouseMove(MouseEvent arg0) { mouseEnterAction(); } }); addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { mouseClickAction(); } @Override public void mouseDoubleClick(MouseEvent e) { mouseClickAction(); } }); addMouseTrackListener(new MouseTrackAdapter() { @Override public void mouseExit(MouseEvent e) { mouseExitAction(); } }); this.model = model; bindingContext.bindValue(WidgetProperties.background().observe(this), BeanProperties.value("color").observe(model)); bindingContext.bindValue(WidgetProperties.text().observe(this), BeanProperties.value("text").observe(model)); bindingContext.bindValue(WidgetProperties.font().observe(this), BeanProperties.value("font").observe(model)); }
Source:
<code>protected void registerDefaultFuelTypes() { registerFuel(new MachineFuel(80, new ItemStack(Material.COAL_BLOCK))); registerFuel(new MachineFuel(12, new ItemStack(Material.BLAZE_ROD))); registerFuel(new MachineFuel(20, new ItemStack(Material.DRIED_KELP_BLOCK))); for (Material mat : Tag.ITEMS_BOATS.getValues()) { <START> registerFuel(new MachineFuel(6, new ItemStack(mat))); <END> } registerFuel(new MachineFuel(8, new ItemStack(Material.COAL))); registerFuel(new MachineFuel(8, new ItemStack(Material.CHARCOAL))); for (Material mat : Tag.LOGS.getValues()) { registerFuel(new MachineFuel(2, new ItemStack(mat))); } for (Material mat : Tag.PLANKS.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_SLABS.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_BUTTONS.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_FENCES.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_TRAPDOORS.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_PRESSURE_PLATES.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_DOORS.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.SIGNS.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } }</code><technical_language>5 planks craft a boat, 5 here</technical_language>

Target:
protected void registerDefaultFuelTypes() { registerFuel(new MachineFuel(80, new ItemStack(Material.COAL_BLOCK))); registerFuel(new MachineFuel(12, new ItemStack(Material.BLAZE_ROD))); registerFuel(new MachineFuel(20, new ItemStack(Material.DRIED_KELP_BLOCK))); for (Material mat : Tag.ITEMS_BOATS.getValues()) { registerFuel(new MachineFuel(5, new ItemStack(mat))); } registerFuel(new MachineFuel(8, new ItemStack(Material.COAL))); registerFuel(new MachineFuel(8, new ItemStack(Material.CHARCOAL))); for (Material mat : Tag.LOGS.getValues()) { registerFuel(new MachineFuel(4, new ItemStack(mat))); } for (Material mat : Tag.PLANKS.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_SLABS.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_BUTTONS.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_FENCES.getValues()) { registerFuel(new MachineFuel(1, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_TRAPDOORS.getValues()) { registerFuel(new MachineFuel(3, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_PRESSURE_PLATES.getValues()) { registerFuel(new MachineFuel(2, new ItemStack(mat))); } for (Material mat : Tag.WOODEN_DOORS.getValues()) { registerFuel(new MachineFuel(2, new ItemStack(mat))); } for (Material mat : Tag.SIGNS.getValues()) { registerFuel(new MachineFuel(2, new ItemStack(mat))); } }
Source:
<code>private void pollExecution() { if (this.pollingCriteria.shouldPoll()) { if (this.pollingCriteria.satisfiesUnsavedDataAvailableCriteria()) { <START> LOGGER.info("Saving Ramp Setting to Database."); <END> FlowRampManager.this.saveSettings(); } LOGGER.info("Load Ramp Setting from Database."); FlowRampManager.this.loadSettings(); } }</code><technical_language>For uniformity, "Saving Loading" "Save Load". I prefer latter</technical_language>

Target:
private void pollExecution() { if (this.pollingCriteria.shouldPoll()) { if (this.pollingCriteria.satisfiesUnsavedDataAvailableCriteria()) { LOGGER.info("Save Ramp Setting to Database."); FlowRampManager.this.saveSettings(); } LOGGER.info("Load Ramp Setting from Database."); FlowRampManager.this.loadSettings(); } }
Source:
<code>private List<Flight> searchByTime(SearchParams searchParams) { try { allFlights = dao.getAllFlights(); } catch (SQLException e) { <START> e.printStackTrace(); <END> } searchParams.setHour(Integer.parseInt(searchParams.getDate().substring(8, 10))); searchParams.setMinute(Integer.parseInt(searchParams.getDate().substring(10, 12))); for(int i=0; i < allFlights.size(); i++ ) { searchParams.setSearchDate(allFlights.get(i).getDate()); searchParams.setSearchHour(Integer.parseInt(searchParams.getSearchDate().substring(8, 10))); searchParams.setSearchMinute(Integer.parseInt(searchParams.getSearchDate().substring(10, 12))); if(searchParams.getSearchHour() == searchParams.getHour()){ if(searchParams.getSearchMinute() == searchParams.getMinute()){ searchFlights.add(allFlights.get(i)); } } } return searchFlights; }</code><technical_language>this catch block</technical_language>

Target:
private List<Flight> searchByTime(SearchParams searchParams) throws ParseException { try { allFlights = dao.getAllFlights(); } catch (SQLException e) { e.printStackTrace(); } searchParams.setHour(Integer.parseInt(searchParams.getDate().substring(8, 10))); searchParams.setMinute(Integer.parseInt(searchParams.getDate().substring(10, 12))); for(int i=0; i < allFlights.size(); i++ ) { searchParams.setSearchDate(allFlights.get(i).getDate()); searchParams.setSearchHour(Integer.parseInt(searchParams.getSearchDate().substring(8, 10))); searchParams.setSearchMinute(Integer.parseInt(searchParams.getSearchDate().substring(10, 12))); if(searchParams.getSearchHour() == searchParams.getHour()){ if(searchParams.getSearchMinute() == searchParams.getMinute()){ searchFlights.add(allFlights.get(i)); } } } return searchFlights; }
Source:
<code>private static boolean directoryIsValidGitRepo(File f) { Repository subRepo = null; try { File gitDir = new File(f, Constants.DOT_GIT); <START> if (gitDir.isDirectory()) { <END> subRepo = new RepositoryBuilder().setGitDir(gitDir) .setMustExist(true).build(); subRepo.resolve(Constants.HEAD); return true; } else return false; } catch (IOException e) { return false; } finally { if (subRepo != null) subRepo.close(); } }</code><technical_language>is .git files (not directories). Text files named '.git' content is line path in local filesystem real .git file located. E.g. cd /tmp git clone --recursive <LINK_0> ls -la /tmp/gerrit/plugins/download-commands cat /tmp/gerrit/plugins/download-commands/.git jgit debug-show-dir-cache | grep download-commands</technical_language>

Target:
private static boolean directoryIsValidGitRepo(File f) { Repository subRepo = null; try { File dotGit = new File(f, Constants.DOT_GIT); subRepo = new RepositoryBuilder().setGitDir(dotGit) .setMustExist(true).build(); subRepo.resolve(Constants.HEAD); return true; } catch (IOException e) { return false; } finally { if (subRepo != null) subRepo.close(); } }
Source:
<code>@Override public Object execute(GridClientConfiguration cfg, Logger logger) throws Exception { logger.warning("Command deprecated. Use " + SET_STATE.toString() + " instead."); try (GridClient client = Command.startClient(cfg)) { GridClientClusterState state = client.state(); <START> state.state(ACTIVE, true); <END> logger.info("Cluster activated"); } catch (Throwable e) { logger.severe("Failed to activate cluster."); throw e; } return null; }</code><technical_language>forceDeactivation true for cluster activate</technical_language>

Target:
@Override public Object execute(GridClientConfiguration cfg, Logger logger) throws Exception { logger.warning("Command deprecated. Use " + SET_STATE.toString() + " instead."); try (GridClient client = Command.startClient(cfg)) { GridClientClusterState state = client.state(); state.state(ACTIVE, false); logger.info("Cluster activated"); } catch (Throwable e) { logger.severe("Failed to activate cluster."); throw e; } return null; }
Source:
<code><START> public Iterable<@NonNull ITmfEventAspect> getEventAspects() { <END> return CTF_ASPECTS; }</code><technical_language>annotate base method in TmfTrace directly</technical_language>

Target:
public Iterable<ITmfEventAspect> getEventAspects() { return CTF_ASPECTS; }
Source:
<code>public boolean implies(Permission permission) { if (!(permission instanceof PrincipalPermission)) { return false; } PrincipalPermission permissionToRespect = (PrincipalPermission) permission; <START> if (permissionToRespect.principals.isEmpty()) <END> return true; int nbPrincipals = permissionToRespect.principals.size(); long nbExcludedPrincipals = permissionToRespect.principals.stream() .filter(c -> c instanceof NotIdentityPrincipal) .count(); if (nbExcludedPrincipals == 0) { for (Permission p : permissions) { if (p.implies(permission)) { return true; } } return false; } else if (nbExcludedPrincipals == nbPrincipals) { for (Permission p : permissions) { if (!p.implies(permission)) { return false; } } return true; } else { throw new IllegalArgumentException("Not supposed to find mixed included/excluded principals in permission"); } }</code><technical_language>please put {</technical_language>

Target:
public boolean implies(Permission permission) { if (!(permission instanceof PrincipalPermission)) { return false; } PrincipalPermission permissionToRespect = (PrincipalPermission) permission; if (permissionToRespect.principals.isEmpty()) { return true; } int nbPrincipals = permissionToRespect.principals.size(); long nbExcludedPrincipals = permissionToRespect.principals.stream() .filter(c -> c instanceof ExcludedIdentityPrincipal) .count(); if (nbExcludedPrincipals == 0) { return permissions.stream().anyMatch(p -> p.implies(permission)); } else if (nbExcludedPrincipals == nbPrincipals) { return !permissions.stream().anyMatch(p -> !p.implies(permission)); } else { return false; } }
Source:
<code>public boolean equals(Object other) { if (this == other) { return true; } <START> if (other == null || !(other instanceof Features)) { <END> return false; } final Features that = (Features) other; return Objects.equals(this.features, that.features); }</code><technical_language>need check other == null here, next condition check covers it</technical_language>

Target:
public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Features)) { return false; } final Features that = (Features) other; return Objects.equals(this.features, that.features); }
Source:
<code>private void offerInternal(Mailbox mailbox, Item item, long handle) { if (item.getSpHandle() <= handle) { mailbox.send(item.getResponseHSId(), item.getMessage()); } else { m_bufferedReads.add(item); <START> releaseBufferedReads(mailbox, handle); <END> } }</code><technical_language>want call releaseBufferedReads() of current item released not</technical_language>

Target:
private void offerInternal(Mailbox mailbox, Item item, long handle) { m_bufferedReads.add(item); releaseBufferedReads(mailbox, handle); }
Source:
<code>public void onAttachFragment(Fragment fragment) { if (fragment instanceof FavoritesFragmentStateHolder) { if (intentParams != null && intentParams.getInt(TAB_ID, -1) != -1) { Bundle b = new Bundle(); int tabId = intentParams.getInt(TAB_ID, FAV_TAB); if (tabId == FAV_TAB && fragment instanceof FavoritesTreeFragment) { <START> b.putString(FavoritesFragmentStateHolder.GROUP_NAME_TO_SHOW, <END> intentParams.getString(FavoritesFragmentStateHolder.GROUP_NAME_TO_SHOW)); b.putInt(FavoritesFragmentStateHolder.GROUP_POSITION, intentParams.getInt( FavoritesFragmentStateHolder.GROUP_POSITION, 0)); b.putInt(FavoritesFragmentStateHolder.ITEM_POSITION, intentParams.getInt(FavoritesFragmentStateHolder.ITEM_POSITION, 0)); } else if (tabId == GPX_TAB && fragment instanceof AvailableGPXFragment) { b.putInt(FavoritesFragmentStateHolder.GROUP_POSITION, intentParams.getInt(FavoritesFragmentStateHolder.GROUP_POSITION, 0)); b.putInt(FavoritesFragmentStateHolder.ITEM_POSITION, intentParams.getInt(FavoritesFragmentStateHolder.ITEM_POSITION, 0)); } else if (tabId == NOTES_TAB && fragment instanceof NotesFragment) { b.putInt(FavoritesFragmentStateHolder.ITEM_POSITION, intentParams.getInt(FavoritesFragmentStateHolder.ITEM_POSITION, 0)); } else if (tabId == OSM_TAB && fragment instanceof OsmEditsFragment) { b.putInt(FavoritesFragmentStateHolder.ITEM_POSITION, intentParams.getInt(FavoritesFragmentStateHolder.ITEM_POSITION, 0)); } fragment.setArguments(b); } fragList.add(new WeakReference<>((FavoritesFragmentStateHolder) fragment)); } }</code><technical_language>OOP. logic of putInt, getInt hidden FavoritesFragmentStateHolder. NotesFragment belongs Plugin !!</technical_language>

Target:
public void onAttachFragment(Fragment fragment) { if (fragment instanceof FavoritesFragmentStateHolder) { if (intentParams != null && intentParams.getInt(TAB_ID, -1) != -1) { Bundle b = new Bundle(); int tabId = intentParams.getInt(TAB_ID, FAV_TAB); b.putInt(TAB_ID, intentParams.getInt(TAB_ID, FAV_TAB)); if (tabId == FAV_TAB) { b.putString(FavoritesFragmentStateHolder.GROUP_NAME_TO_SHOW, intentParams.getString(FavoritesFragmentStateHolder.GROUP_NAME_TO_SHOW)); b.putInt(FavoritesFragmentStateHolder.GROUP_POSITION, intentParams.getInt( FavoritesFragmentStateHolder.GROUP_POSITION, 0)); } b.putInt(FavoritesFragmentStateHolder.ITEM_POSITION, intentParams.getInt(FavoritesFragmentStateHolder.ITEM_POSITION, 0)); fragment.setArguments(b); } fragList.add(new WeakReference<>((FavoritesFragmentStateHolder) fragment)); } }
Source:
<code>public Pair<Double, Double> getRawExtrema(LayerConfiguration config) throws ConfigurationException { if (_minVals == null) { String layer = config.getPropertyValue(LayerConfiguration.LAYER_ID); _minVals = parseExtremum(config, LayerConfiguration.LEVEL_MINIMUMS, "minimum", layer, 0.0); _maxVals = parseExtremum(config, LayerConfiguration.LEVEL_MAXIMUMS, "maximum", layer, 1000.0); if (_startBucket == null) { _startBucket = 0; _endBucket = _minVals.size(); } } double minimumValue = Double.MIN_VALUE; double maximumValue = -Double.MAX_VALUE; if (_startBucket == _endBucket) { minimumValue = _minVals.get(_startBucket); maximumValue = _maxVals.get(_startBucket); } else { <START> if (_endBucket <= _minVals.size()) { <END> for (int i = _startBucket; i < _endBucket; i++) { Double val = _minVals.get(i); if (val < minimumValue) { minimumValue = val; } val = _maxVals.get(i); if (val > maximumValue) { maximumValue = val; } } } else { minimumValue = maximumValue = 0; } } return new Pair<>(minimumValue, maximumValue); }</code><technical_language>This extema 0 buckets requested... want instead return buckets do exist, instead of returning (i.e. for i = starbucket min(endBucket, minVals.size))</technical_language>

Target:
public Pair<Double, Double> getRawExtrema(LayerConfiguration config) throws ConfigurationException { if (_minVals == null) { String layer = config.getPropertyValue(LayerConfiguration.LAYER_ID); _minVals = parseExtremum(config, LayerConfiguration.LEVEL_MINIMUMS, "minimum", layer, 0.0); _maxVals = parseExtremum(config, LayerConfiguration.LEVEL_MAXIMUMS, "maximum", layer, 1000.0); if (_startBucket == null) { _startBucket = 0; _endBucket = _minVals.size(); } } double minimumValue = Double.MIN_VALUE; double maximumValue = -Double.MAX_VALUE; if (_startBucket == _endBucket) { minimumValue = _minVals.get(_startBucket); maximumValue = _maxVals.get(_startBucket); } else { _endBucket = (_endBucket <= _minVals.size()) ? _endBucket : _minVals.size(); for (int i = _startBucket; i < _endBucket; i++) { Double val = _minVals.get(i); if (val < minimumValue) { minimumValue = val; } val = _maxVals.get(i); if (val > maximumValue) { maximumValue = val; } } } return new Pair<>(minimumValue, maximumValue); }
Source:
<code>public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { super.doGet(request, response); String jsonp = request.getParameter(HTTPClientInterface.JSONP); AuthenticationResult authResult = null; String target = request.getPathInfo(); if (target == null) target = "/"; try { response.setContentType(HTTPAdminListener.JSON_CONTENT_TYPE); if (!HTTPClientInterface.validateJSONP(jsonp, (Request )request, response)) { return; } response.setStatus(HttpServletResponse.SC_OK); authResult = authenticate(request); if (!authResult.isAuthenticated()) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, authResult.m_message)); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); return; } if (!target.equals("/")) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, "Resource not found")); response.setStatus(HttpServletResponse.SC_NOT_FOUND); return; } if (jsonp != null) { response.getWriter().write(jsonp + "("); } m_mapper.writeValue(response.getWriter(), new Profile(authResult.m_user, authResult.m_perms)); if (jsonp != null) { response.getWriter().write(")"); } } catch (Exception ex) { <START> m_log.info("Not servicing url: " + target + " Details: " + ex.getMessage(), ex); <END> } }</code><technical_language>Do leak if hit this? need handle error? rate-limited logging? Is "info" is "warn"</technical_language>

Target:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { super.doGet(request, response); String jsonp = request.getParameter(HTTPClientInterface.JSONP); AuthenticationResult authResult = null; String target = request.getPathInfo(); if (target == null) target = "/"; try { response.setContentType(HTTPAdminListener.JSON_CONTENT_TYPE); if (!HTTPClientInterface.validateJSONP(jsonp, (Request )request, response)) { return; } response.setStatus(HttpServletResponse.SC_OK); authResult = authenticate(request); if (!authResult.isAuthenticated()) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, authResult.m_message)); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); return; } if (!target.equals("/")) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, "Resource not found")); response.setStatus(HttpServletResponse.SC_NOT_FOUND); return; } if (jsonp != null) { response.getWriter().write(jsonp + "("); } m_mapper.writeValue(response.getWriter(), new Profile(authResult.m_user, authResult.m_perms)); if (jsonp != null) { response.getWriter().write(")"); } } catch (Exception ex) { rateLimitedLogWarn("Not servicing url: %s Details: ", target, ex.getMessage()); response.setStatus(HttpServletResponse.SC_BAD_REQUEST); response.getWriter().print(buildClientResponse(null, ClientResponse.UNEXPECTED_FAILURE, Throwables.getStackTraceAsString(ex))); } }
Source:
<code>public HeroicConfig.Builder build(final ExtraParameters params) throws Exception { final BigtableMetricModule.Builder module = BigtableMetricModule.builder(); params.get("project").map(module::project); params.get("instance").map(module::instance); final String credentials = params.get("credential").orElse(DEFAULT_CREDENTIALS); switch (credentials) { case "json": final JsonCredentialsBuilder.Builder j = JsonCredentialsBuilder.builder(); params.get("json").map(Paths::get).ifPresent(j::path); module.credentials(j.build()); break; case "service-account": final ServiceAccountCredentialsBuilder.Builder sa = ServiceAccountCredentialsBuilder.builder(); params.get("serviceAccount").ifPresent(sa::serviceAccount); params.get("keyFile").ifPresent(sa::keyFile); module.credentials(sa.build()); break; case "compute-engine": module.credentials(new ComputeEngineCredentialsBuilder()); break; <START> default: <END> case "default": module.credentials(new DefaultCredentialsBuilder()); break; } return HeroicConfig.builder() .metrics( MetricManagerModule.builder() .backends(ImmutableList.<MetricModule>of(module.build())) ); }</code><technical_language>default IllegalArgumentException</technical_language>

Target:
public HeroicConfig.Builder build(final ExtraParameters params) throws Exception { final BigtableMetricModule.Builder module = BigtableMetricModule.builder(); params.get("project").map(module::project); params.get("instance").map(module::instance); final String credentials = params.get("credential").orElse(DEFAULT_CREDENTIALS); switch (credentials) { case "json": final JsonCredentialsBuilder.Builder j = JsonCredentialsBuilder.builder(); params.get("json").map(Paths::get).ifPresent(j::path); module.credentials(j.build()); break; case "service-account": final ServiceAccountCredentialsBuilder.Builder sa = ServiceAccountCredentialsBuilder.builder(); params.get("serviceAccount").ifPresent(sa::serviceAccount); params.get("keyFile").ifPresent(sa::keyFile); module.credentials(sa.build()); break; case "compute-engine": module.credentials(new ComputeEngineCredentialsBuilder()); break; case "default": module.credentials(new DefaultCredentialsBuilder()); break; default: throw new IllegalArgumentException("credentials: invalid value: " + credentials); } return HeroicConfig.builder() .metrics( MetricManagerModule.builder() .backends(ImmutableList.<MetricModule>of(module.build())) ); }
Source:
<code>public void testAdminLogQuery() { ______TS("Test constructor with parameters"); List<String> versionList = new ArrayList<>(); versionList.add("5-44"); Calendar cal = new GregorianCalendar(); cal.set(1994, Calendar.MAY, 7, 15, 30, 12); long startTime = cal.getTimeInMillis(); cal.add(Calendar.YEAR, 22); long endTime = cal.getTimeInMillis(); AdminLogQuery query = new AdminLogQuery(versionList, startTime, endTime); assertEquals(startTime, query.getStartTime()); assertEquals(endTime, query.getEndTime()); assertNotNull(query.getQuery()); ______TS("Test setTimePeriod"); query = new AdminLogQuery(versionList, null, null); assertEquals(0, query.getStartTime()); <START> AssertJUnit.assertNotSame(endTime, query.getStartTime()); <END> query.setTimePeriod(startTime, endTime); assertEquals(startTime, query.getStartTime()); assertEquals(endTime, query.getEndTime()); assertNotNull(query.getQuery()); }</code><technical_language>assertNotSame checks objects refer Object, checking for inequality. If want fix this issue, correct assertion is assertNotEquals, define method in BaseTestCase done for assertion methods</technical_language>

Target:
public void testAdminLogQuery() { ______TS("Test constructor with parameters"); List<String> versionList = new ArrayList<>(); versionList.add("5-44"); Calendar cal = new GregorianCalendar(); cal.set(1994, Calendar.MAY, 7, 15, 30, 12); long startTime = cal.getTimeInMillis(); cal.add(Calendar.YEAR, 22); long endTime = cal.getTimeInMillis(); AdminLogQuery query = new AdminLogQuery(versionList, startTime, endTime); assertEquals(startTime, query.getStartTime()); assertEquals(endTime, query.getEndTime()); assertNotNull(query.getQuery()); ______TS("Test setTimePeriod"); query = new AdminLogQuery(versionList, null, null); assertEquals(0, query.getStartTime()); assertNotEquals(endTime, query.getStartTime()); query.setTimePeriod(startTime, endTime); assertEquals(startTime, query.getStartTime()); assertEquals(endTime, query.getEndTime()); assertNotNull(query.getQuery()); }
Source:
<code><START> private void onChannelClose(Channel channel) <END> { if (channels.remove(channel.id()) != null && channels.isEmpty()) messageSender.close(); }</code><technical_language>This is called channels, possibly event loop threads, synchronized</technical_language>

Target:
private synchronized void onChannelClose(Channel channel) { if (channels.remove(channel.id()) != null && channels.isEmpty()) messageSender.close(); }
Source:
<code>public PieceCount getPieceCount() { <START> return new PieceCount(1); <END> }</code><technical_language>0</technical_language>

Target:
public PieceCount getPieceCount() { return new PieceCount(0); }
Source:
<code>public void shouldRegisterAndUnregisterMetric() { healthCheckRegistryService.register("foo", new HealthCheck() { @Override public Result check() throws HealthCheckException { return null; } }); Set<String> registered = healthCheckRegistryService.getNames(); assertNotNull(registered); <START> assertTrue(registered.size() == 2); <END> assertTrue(registered.contains("foo")); healthCheckRegistryService.unregister("foo"); Set<String> unregistered = healthCheckRegistryService.getNames(); assertTrue(unregistered.size() == 1); assertFalse(unregistered.contains("foo")); }</code><technical_language>assertEquals</technical_language>

Target:
public void shouldRegisterAndUnregisterMetric() { healthCheckRegistryService.register("foo", new HealthCheck() { @Override public Result check() throws HealthCheckException { return null; } }); Set<String> registered = healthCheckRegistryService.getNames(); assertNotNull(registered); assertEquals(2, registered.size()); assertTrue(registered.contains("foo")); healthCheckRegistryService.unregister("foo"); Set<String> unregistered = healthCheckRegistryService.getNames(); assertEquals(1, unregistered.size()); assertFalse(unregistered.contains("foo")); }
Source:
<code>public FileSystemWatcher createFileSystemWatcher(String name, OptionMap options) { boolean useWatchService = options.get(Options.USE_WATCH_SERVICE, true); boolean daemonThread = options.get(Options.THREAD_DAEMON, true); if(useWatchService) { try { return new WatchServiceFileSystemWatcher(name, daemonThread); } catch (LinkageError e) { } <START> } <END> int pollInterval = options.get(Options.WATCHER_POLL_INTERVAL, 5000); return new PollingFileSystemWatcher(name, pollInterval, daemonThread); }</code><technical_language>delegate super.createFileSystemWatcher()</technical_language>

Target:
public FileSystemWatcher createFileSystemWatcher(String name, OptionMap options) { try { boolean daemonThread = options.get(Options.THREAD_DAEMON, true); return new WatchServiceFileSystemWatcher(name, daemonThread); } catch (LinkageError e) { } return super.createFileSystemWatcher(name, options); }
Source:
<code>private RemoteTenantManagerServiceStub getStub() throws UserStoreException { if (stub == null) { try { stub = new RemoteTenantManagerServiceStub(UserMgtWSAPIDSComponent .getCcServiceInstance().getClientConfigContext(), url + SERVICE_NAME); ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); LoginSender sender = new LoginSender(); String sessionCookie = sender.login(); if (sessionCookie == null) { throw new UserStoreException(SERVER_LOGIN_ERROR); } option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie); } catch (AxisFault axisFault) { <START> if (log.isDebugEnabled()) { <END> log.debug(AXIS_FAULT_MESSAGE, axisFault); } } } return stub; }</code><technical_language>axis falut is need thrown wrapping UserStoreException</technical_language>

Target:
private RemoteTenantManagerServiceStub getStub() throws UserStoreException { if (stub == null) { try { stub = new RemoteTenantManagerServiceStub(UserMgtWSAPIDSComponent .getCcServiceInstance().getClientConfigContext(), url + SERVICE_NAME); ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); LoginSender sender = new LoginSender(); String sessionCookie = sender.login(); if (sessionCookie == null) { throw new UserStoreException(SERVER_LOGIN_ERROR); } option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie); } catch (AxisFault axisFault) { throw new UserStoreException("Axis error occurred while creating service client stub",axisFault); } } return stub; }
Source:
<code>private static void handleEDTException(Throwable t) { <START> Logging.error("Exception raised in EDT: {0}", t); <END> }</code><technical_language>display stacktrace? need</technical_language>

Target:
private static void handleEDTException(Throwable t) { Logging.logWithStackTrace(Logging.LEVEL_ERROR, t, "Exception raised in EDT"); }
Source:
<code>public void testOnTimerDurationChange() { String value = ""; editor.setValue(value); when(view.getTimeDuration()).thenReturn(VALUE_1); editor.onTimerDurationChange(); verify(changeHandler, times(1)).onValueChange(oldValueCaptor.capture(), newValueCaptor.capture()); assertEquals(value, oldValueCaptor.getValue()); value = VALUE_1; <START> assertEquals(value, newValueCaptor.getValue()); <END> }</code><technical_language>put VALUE_1 assert</technical_language>

Target:
public void testOnTimerDurationChange() { String value = ""; editor.setValue(value); when(view.getTimeDuration()).thenReturn("P6D"); when(view.isValid()).thenReturn(true); editor.onTimerDurationChange(); verify(changeHandler, times(1)).onValueChange(oldValueCaptor.capture(), newValueCaptor.capture()); assertEquals(value, oldValueCaptor.getValue()); assertEquals("P6D", newValueCaptor.getValue()); }
Source:
<code><K extends Exception> void handleRequest( RetryableCassandraRequest<?, K> req, InetSocketAddress hostTried, Exception ex) throws K { req.incrementNumberOfAttempts(); <START> req.triedOnHost(hostTried); <END> this.handleExceptionInternal(req, hostTried, ex); if (isRetriableWithBackoffException(ex)) { int sleepDuration = req.getNumberOfAttempts() * 1000 + (ThreadLocalRandom.current().nextInt(1000) - 500); log.warn("Retrying a query, {}, with backoff of {}ms, intended for host {}.", UnsafeArg.of("queryString", req.getFunction().toString()), SafeArg.of("sleepDuration", sleepDuration), SafeArg.of("hostName", CassandraLogHelper.host(hostTried))); try { Thread.sleep(sleepDuration); } catch (InterruptedException i) { throw new RuntimeException(i); } if (req.getNumberOfAttempts() >= maxTriesSameHost.get()) { req.giveUpOnPreferredHost(); } } else if (isFastFailoverException(ex)) { log.info("Retrying with fast failover a query intended for host {}.", SafeArg.of("hostName", CassandraLogHelper.host(hostTried))); req.giveUpOnPreferredHost(); } }</code><technical_language>calls heavily coupled - I triedOnHost incrementNumberOfAttempts itself, need method call here</technical_language>

Target:
<K extends Exception> void handleRequest( RetryableCassandraRequest<?, K> req, InetSocketAddress hostTried, Exception ex) throws K { req.triedOnHost(hostTried); this.handleExceptionInternal(req, hostTried, ex); if (isRetriableWithBackoffException(ex)) { int sleepDuration = req.getNumberOfAttempts() * 1000 + (ThreadLocalRandom.current().nextInt(1000) - 500); log.info("Retrying a query, {}, with backoff of {}ms, intended for host {}.", UnsafeArg.of("queryString", req.getFunction().toString()), SafeArg.of("sleepDuration", sleepDuration), SafeArg.of("hostName", CassandraLogHelper.host(hostTried))); try { Thread.sleep(sleepDuration); } catch (InterruptedException i) { throw new RuntimeException(i); } if (req.getNumberOfAttempts() >= maxTriesSameHost.get()) { req.giveUpOnPreferredHost(); } } else if (isFastFailoverException(ex)) { log.info("Retrying with fast failover a query intended for host {}.", SafeArg.of("hostName", CassandraLogHelper.host(hostTried))); req.giveUpOnPreferredHost(); } }
Source:
<code>void moveToCatch() throws CommandLineException { <START> if(catchList == null) { <END> catchList = new ArrayList<>(); } switch(state) { case IN_TRY: state = IN_CATCH; break; case IN_CATCH: throw new CommandLineException("Already in catch block. Only one catch block is allowed."); case IN_FINALLY: throw new CommandLineException("Catch block is not allowed in finally"); default: throw new IllegalStateException("Unexpected block id: " + state); } }</code><technical_language>move list initialisation in switch (IN_TRY). so, need check for null initialise list needed</technical_language>

Target:
void moveToCatch() throws CommandLineException { switch(state) { case IN_TRY: catchList = new ArrayList<>(); state = IN_CATCH; break; case IN_CATCH: throw new CommandLineException("Already in catch block. Only one catch block is allowed."); case IN_FINALLY: throw new CommandLineException("Catch block is not allowed in finally"); default: throw new IllegalStateException("Unexpected block id: " + state); } }
Source:
<code><START> public KeyPair generateAndAddKeyPairs() throws NoSuchAlgorithmException { <END> KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); keyGen.initialize(1024, new SecureRandom()); return keyGen.generateKeyPair(); }</code><technical_language>I this method private</technical_language>

Target:
private KeyPair generateAndAddKeyPairs() throws NoSuchAlgorithmException { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); keyGen.initialize(1024, new SecureRandom()); return keyGen.generateKeyPair(); }
Source:
<code>public static Predicate<BlockRayHit> blockTypeFilter(final BlockType type) { return new Predicate<BlockRayHit>() { @Override public boolean apply(BlockRayHit lastHit) { <START> return lastHit.getLocation().getType().equals(type); <END> } }; }</code><technical_language>I reduce object creation a bit here</technical_language>

Target:
public static Predicate<BlockRayHit> blockTypeFilter(final BlockType type) { return new Predicate<BlockRayHit>() { @Override public boolean apply(BlockRayHit lastHit) { return lastHit.getExtent().getBlockType(lastHit.getBlockX(), lastHit.getBlockY(), lastHit.getBlockZ()).equals(type); } }; }
Source:
<code><START> private void showSlot(String selector, WebDriver driver) { <END> changeVisibility(selector, "visible", driver); }</code><technical_language>is this private? show slot is public</technical_language>

Target:
public void showSlot(String selector, WebDriver driver) { changeVisibility(selector, "visible", driver); }
Source:
<code><START> boolean evaluate(Object principal, Action action, Node graphIRI) <END> throws AuthenticationRequiredException; public boolean evaluate(Object principal, Action action, Node graphIRI, Triple triple) throws AuthenticationRequiredException; public default boolean evaluate(Object principal, Set<Action> actions, Node graphIRI) throws AuthenticationRequiredException { return actions.stream().allMatch(action -> evaluate(principal, action, graphIRI)); }</code><technical_language>Minor: "public" is interface methods</technical_language>

Target:
public boolean evaluate(Object principal, Action action, Node graphIRI) throws AuthenticationRequiredException; public boolean evaluate(Object principal, Action action, Node graphIRI, Triple triple) throws AuthenticationRequiredException; public default boolean evaluate(Object principal, Set<Action> actions, Node graphIRI) throws AuthenticationRequiredException { return actions.stream().allMatch(action -> evaluate(principal, action, graphIRI)); }
Source:
<code>public Option<QuickOutlinePageDescriptor> getFirstPage() { QuickOutlinePageDescriptor firstPage = null; if (!this.pages.isEmpty()) { firstPage = this.pages.get(0); } <START> return Options.newSome(firstPage); <END> }</code><technical_language>This produce a Options.newSome() a null value, breaks contract. a newNone() if is null. Options.fromNullable() this automatically</technical_language>

Target:
public Option<QuickOutlinePageDescriptor> getFirstPage() { QuickOutlinePageDescriptor firstPage = null; if (!this.pages.isEmpty()) { firstPage = this.pages.get(0); } return Options.fromNullable(firstPage); }
Source:
<code><START> public void testExpandDims(){ <END> INDArray array = Nd4j.create(2, 3); assertArrayEquals(Nd4j.expandDims(array, 0).shape(), new int[]{1,2,3}); assertArrayEquals(Nd4j.expandDims(array, 1).shape(), new int[]{2,1,3}); assertArrayEquals(Nd4j.expandDims(array, 2).shape(), new int[]{2,3,1}); assertArrayEquals(Nd4j.expandDims(array, -1).shape(), new int[]{2,1,3}); }</code><technical_language>Test is a good start - need test 'weird stride' cases IMO... this + loop test cases: <LINK_0> Furthermore, prefer if checked acutal values, *not* shapes here. test result is a view in cases. (Yes, this is more detailed testing originally had, necessary IMO)</technical_language>

Target:
public void testExpandDims(){ final List<Pair<INDArray, String>> testMatricesC = NDArrayCreationUtil.getAllTestMatricesWithShape('c', 3, 5, 0xDEAD); final List<Pair<INDArray, String>> testMatricesF = NDArrayCreationUtil.getAllTestMatricesWithShape('f', 7, 11, 0xBEEF); final ArrayList<Pair<INDArray, String>> testMatrices = new ArrayList<>(testMatricesC); testMatrices.addAll(testMatricesF); for (Pair<INDArray, String> testMatrixPair : testMatrices) { final String recreation = testMatrixPair.getSecond(); final INDArray testMatrix = testMatrixPair.getFirst(); final char ordering = testMatrix.ordering(); final int[] shape = testMatrix.shape(); final int rank = testMatrix.rank(); for (int i = -rank; i <= rank; i++) { final INDArray expanded = Nd4j.expandDims(testMatrix, i); final String message = "Expanding in Dimension " + i + "; Shape before expanding: " + Arrays.toString(shape) + " "+ordering+" Order; Shape after expanding: " + Arrays.toString(expanded.shape()) + " "+expanded.ordering()+"; Input Created via: " + recreation; assertEquals(message, 1, expanded.shape()[i < 0 ? i + rank : i]); assertEquals(message, testMatrix.ravel(), expanded.ravel()); assertEquals(message, ordering, expanded.ordering()); testMatrix.assign(Nd4j.rand(shape)); assertEquals(message, testMatrix.ravel(), expanded.ravel()); } } }
Source:
<code>public void notifyUserOfStreakChange(final RegisteredUserDTO user) { long userId = user.getId(); try { IUserAlert alert = new PgUserAlert(null, userId, objectMapper.writeValueAsString(ImmutableMap.of("streakRecord", this.getCurrentStreakRecord(user))), "progress", new Timestamp(System.currentTimeMillis()), null, null, null); UserAlertsWebSocket.notifyUserOfAlert(userId, alert); } catch (JsonProcessingException e) { <START> e.printStackTrace(); <END> } }</code><technical_language>do printing stack trace while fixing things? :)</technical_language>

Target:
public void notifyUserOfStreakChange(final RegisteredUserDTO user) { long userId = user.getId(); try { IUserAlert alert = new PgUserAlert(null, userId, objectMapper.writeValueAsString(ImmutableMap.of("streakRecord", this.getCurrentStreakRecord(user))), "progress", new Timestamp(System.currentTimeMillis()), null, null, null); UserAlertsWebSocket.notifyUserOfAlert(userId, alert); } catch (JsonProcessingException e) { log.error(String.format("Unable to serialize user streak change JSON for user {}: {}", user.getId(), e.getMessage())); } }
Source:
<code>public String getLocalNameByStandardVariableId(final Integer projectId, final Integer standardVariableId) <START> throws MiddlewareQueryException { <END> DmsProject dmsProject = new DmsProject(); dmsProject.setProjectId(projectId); ProjectProperty projectProperty = getProjectPropertyDao().getByStandardVariableId(dmsProject, standardVariableId); return (projectProperty == null) ? null : projectProperty.getAlias(); }</code><technical_language>Cleanup: Remove **throws MiddlewareQueryException** clauses</technical_language>

Target:
public String getLocalNameByStandardVariableId(final Integer projectId, final Integer standardVariableId) { DmsProject dmsProject = new DmsProject(); dmsProject.setProjectId(projectId); ProjectProperty projectProperty = getProjectPropertyDao().getByStandardVariableId(dmsProject, standardVariableId); return (projectProperty == null) ? null : projectProperty.getAlias(); }
Source:
<code>private void addDefaultContracts() { contracts.add(EqualsTransitive.getInstance()); <START> contracts.add(new EqualsReflexive()); <END> contracts.add(new EqualsSymmetric()); contracts.add(new EqualsHashcode()); contracts.add(new EqualsToNullRetFalse()); }</code><technical_language>other contracts singletons, too? If so, create a separate pull request change</technical_language>

Target:
private void addDefaultContracts() { contracts.add(new EqualsReflexive()); contracts.add(new EqualsSymmetric()); contracts.add(new EqualsHashcode()); contracts.add(new EqualsToNullRetFalse()); contracts.add(EqualsTransitive.getInstance()); }