auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void setup() throws Exception { TypeRegistry typeRegistry = new TypeRegistry(); DBI dbi = new DBI("jdbc:h2:mem:test" + System.nanoTime()); dbi.registerMapper(new TableColumn.Mapper(typeRegistry)); dummyHandle = dbi.open(); metadataDao = dbi.onDemand(MetadataDao.class); createTablesWithRetry(dbi); dataDir = Files.createTempDir(); RaptorConnectorId connectorId = new RaptorConnectorId("test"); NodeManager nodeManager = new TestingNodeManager(); NodeSupplier nodeSupplier = nodeManager::getWorkerNodes; ShardManager shardManager = createShardManager(dbi); StorageManager storageManager = createOrcStorageManager(dbi, dataDir); StorageManagerConfig config = new StorageManagerConfig().setDataDirectory(dataDir).setShardDayBoundaryTimeZone("America/Los_Angeles"); connector = new RaptorConnector( new LifeCycleManager(ImmutableList.of(), null), new TestingNodeManager(), new RaptorMetadataFactory(connectorId, dbi, shardManager), new RaptorSplitManager(connectorId, nodeSupplier, shardManager, false), new RaptorPageSourceProvider(storageManager), new RaptorPageSinkProvider(storageManager, new PagesIndexPageSorter(new PagesIndex.TestingFactory(false)), new TemporalFunctionFactory(config), config), new RaptorNodePartitioningProvider(nodeSupplier), new RaptorSessionProperties(config), new RaptorTableProperties(typeRegistry), ImmutableSet.of(), dbi); }

Target:
public void setup() throws Exception { TypeRegistry typeRegistry = new TypeRegistry(); DBI dbi = new DBI("jdbc:h2:mem:test" + System.nanoTime()); dbi.registerMapper(new TableColumn.Mapper(typeRegistry)); dummyHandle = dbi.open(); metadataDao = dbi.onDemand(MetadataDao.class); createTablesWithRetry(dbi); dataDir = Files.createTempDir(); RaptorConnectorId connectorId = new RaptorConnectorId("test"); NodeManager nodeManager = new TestingNodeManager(); NodeSupplier nodeSupplier = nodeManager::getWorkerNodes; ShardManager shardManager = createShardManager(dbi); StorageManager storageManager = createOrcStorageManager(dbi, dataDir); StorageManagerConfig config = new StorageManagerConfig(); connector = new RaptorConnector( new LifeCycleManager(ImmutableList.of(), null), new TestingNodeManager(), new RaptorMetadataFactory(connectorId, dbi, shardManager), new RaptorSplitManager(connectorId, nodeSupplier, shardManager, false), new RaptorPageSourceProvider(storageManager), new RaptorPageSinkProvider(storageManager, new PagesIndexPageSorter(new PagesIndex.TestingFactory(false)), new TemporalFunction(DateTimeZone.forID("America/Los_Angeles")), config), new RaptorNodePartitioningProvider(nodeSupplier), new RaptorSessionProperties(config), new RaptorTableProperties(typeRegistry), ImmutableSet.of(), dbi); }
Source:
public boolean setMaxUploadFileSize(String maxUploadSizeString) throws SizeFormatValidationException { if (!(this.multipartConfigElement instanceof UpdatableMultipartConfigElement)) { return false; } maxUploadSizeString.replaceAll("\\s+",""); maxUploadSizeString = maxUploadSizeString.toUpperCase(); Long uploadSize; if(maxUploadSizeString.equals("UNLIMITED")) { uploadSize = -1l; maxUploadSizeString = maxUploadSizeString.toLowerCase(); } else { uploadSize = parseUploadSize(maxUploadSizeString); } ((UpdatableMultipartConfigElement) multipartConfigElement).setMaxFileSize(uploadSize); this.configuration.setMaxFileUploadSize(maxUploadSizeString); return true; }

Target:
public boolean setMaxUploadFileSize(String maxUploadSizeString) throws SizeFormatValidationException { if (!(this.multipartConfigElement instanceof UpdatableMultipartConfigElement)) { return false; } maxUploadSizeString = maxUploadSizeString.replaceAll("\\s+", ""); maxUploadSizeString = maxUploadSizeString.toUpperCase(); long uploadSize; if (maxUploadSizeString.equals("UNLIMITED")) { uploadSize = -1L; maxUploadSizeString = maxUploadSizeString.toLowerCase(); } else { uploadSize = parseUploadSize(maxUploadSizeString); } ((UpdatableMultipartConfigElement) multipartConfigElement).setMaxFileSize(uploadSize); this.configuration.setMaxFileUploadSize(maxUploadSizeString); return true; }
Source:
public void revealDefaultPlace() { revealPlace(new PlaceRequest(NameTokens.getHome())); }

Target:
public void revealDefaultPlace() { revealPlace(new PlaceRequest(NameTokens.getHome()), false); }
Source:
public void shouldAutomapAndHandleSourceAndTargetPropertyNestingAndExpresion() { FishTank source = createFishTank(); FishTankDto target = FishTankMapperExpression.INSTANCE.map( source ); assertThat( target.getFish().getName() ).isEqualTo( "Jaws" ); assertThat( target.getMaterial() ).isNull(); assertThat( target.getOrnament() ).isNull(); assertThat( target.getPlant() ).isNull(); assertThat( target.getQuality() ).isNotNull(); assertThat( target.getQuality().getReport() ).isNotNull(); assertThat( target.getQuality().getReport().getVerdict() ).isNull(); assertThat( target.getQuality().getReport().getOrganisation() ).isNotNull(); assertThat( target.getQuality().getReport().getOrganisation().getName() ).isEqualTo( "Dunno" ); }

Target:
public void shouldAutomapAndHandleSourceAndTargetPropertyNestingAndExpresion() { FishTank source = createFishTank(); FishTankDto target = FishTankMapperExpression.INSTANCE.map( source ); assertThat( target.getFish().getName() ).isEqualTo( "Jaws" ); assertThat( target.getMaterial() ).isNull(); assertThat( target.getOrnament() ).isNull(); assertThat( target.getPlant() ).isNull(); assertThat( target.getQuality() ).isNotNull(); assertThat( target.getQuality().getReport() ).isNotNull(); assertThat( target.getQuality().getReport().getVerdict() ) .isEqualTo( source.getQuality().getReport().getVerdict() ); assertThat( target.getQuality().getReport().getOrganisation() ).isNotNull(); assertThat( target.getQuality().getReport().getOrganisation().getApproval() ).isNull(); assertThat( target.getQuality().getReport().getOrganisation().getName() ).isEqualTo( "Dunno" ); }
Source:
public Observable<Response> finishActivityObservable(){ return this.postSucces.compose(ResponseOrError.<Response>onlySuccess()); }

Target:
public Observable<Object> finishActivityObservable() { return closeActivitySubject; }
Source:
public void castIntToUnsighedShort() { assertEquals(1, safeCastIntToUnsignedShort( 1 )); assertEquals(10, safeCastIntToUnsignedShort( 10 )); assertEquals(Short.MAX_VALUE, safeCastIntToUnsignedShort( Short.MAX_VALUE )); }

Target:
public void castIntToUnsighedShort() { assertEquals(1, safeCastIntToUnsignedShort( 1 )); assertEquals(10, safeCastIntToUnsignedShort( 10 )); assertEquals( -1, safeCastIntToUnsignedShort( (Short.MAX_VALUE << 1) + 1 ) ); }
Source:
public DimensionSpec toDimensionSpec( final RowSignature rowSignature, final String outputName, final ValueType outputType ) { final ValueType columnType = rowSignature.getColumnType(column); if (columnType == null) { return null; } if (columnType == ValueType.STRING || (column.equals(Column.TIME_COLUMN_NAME) && extractionFn != null)) { return extractionFn == null ? new DefaultDimensionSpec(column, outputName, outputType) : new ExtractionDimensionSpec(column, outputName, outputType, extractionFn); } else if (columnType == ValueType.LONG || columnType == ValueType.FLOAT) { if (extractionFn == null) { return new DefaultDimensionSpec(column, outputName, outputType); } else { return new ExtractionDimensionSpec(column, outputName, outputType, extractionFn); } } else { return null; } }

Target:
public DimensionSpec toDimensionSpec( final RowSignature rowSignature, final String outputName, final ValueType outputType ) { Preconditions.checkNotNull(outputType, "outputType"); final ValueType columnType = rowSignature.getColumnType(column); if (columnType == null) { return null; } if (columnType == ValueType.STRING || (column.equals(Column.TIME_COLUMN_NAME) && extractionFn != null)) { return extractionFn == null ? new DefaultDimensionSpec(column, outputName, outputType) : new ExtractionDimensionSpec(column, outputName, outputType, extractionFn); } else if (columnType == ValueType.LONG || columnType == ValueType.FLOAT) { if (extractionFn == null) { return new DefaultDimensionSpec(column, outputName, outputType); } else { return new ExtractionDimensionSpec(column, outputName, outputType, extractionFn); } } else { return null; } }
Source:
private RepresentationDescription getRepDescription(String name) { final Collection<RepresentationDescription> descriptions = DialectManager.INSTANCE.getAvailableRepresentationDescriptions(session.getSelectedViewpoints(false), semanticModel); Iterator<RepresentationDescription> it = descriptions.iterator(); while (it.hasNext()) { RepresentationDescription currentDescription = it.next(); if (currentDescription.getName().equals(name)) { return currentDescription; } } return null; }

Target:
private RepresentationDescription getRepDescription(String name) { final Collection<RepresentationDescription> descriptions = DialectManager.INSTANCE.getAvailableRepresentationDescriptions(session.getSelectedViewpoints(false), semanticModel); Optional<RepresentationDescription> description = descriptions.stream().filter(d -> d.getName().equals(name)).findFirst(); if (description.isPresent()) { return description.get(); } else { return null; } }
Source:
public void testInputOutputArgsWithMoreParameters() throws Exception { try { SpringApplication.run(TestInputOutputArgsWithMoreParameters.class, "--server.port=0"); fail("Declarative StreamListener method should throw IllegalStateException for invalid method parameters"); } catch (Exception e) { assertThat(e.getMessage()).contains("Declarative StreamListener method should only have " + "inbound or outbound targets as method parameters"); } }

Target:
public void testInputOutputArgsWithMoreParameters() { try { SpringApplication.run(TestInputOutputArgsWithMoreParameters.class, "--server.port=0"); fail("Expected exception: "+ INVALID_DECLARATIVE_METHOD_PARAMETERS); } catch (Exception e) { assertThat(e.getMessage()).contains(INVALID_DECLARATIVE_METHOD_PARAMETERS); } }
Source:
public void testProjectNameInAListView() throws Exception { MockFolder myMockFolder = j.createFolder("folder"); FreeStyleProject freeStyleProject = myMockFolder.createProject(FreeStyleProject.class, "myJob"); ListView listView = new ListView("ListView", j.jenkins); listView.setRecurse(true); listView.add(myMockFolder); listView.add(freeStyleProject); j.jenkins.addView(listView); j.jenkins.setPrimaryView(listView); assertEquals(2, j.jenkins.getPrimaryView().getAllItems().size()); WebClient wc = j.createWebClient(); Page result = wc.goTo("search/suggest?query=" + freeStyleProject.getName(), "application/json"); assertNotNull(result); j.assertGoodStatus(result); String content = result.getWebResponse().getContentAsString(); System.out.println(content); JSONObject jsonContent = (JSONObject)JSONSerializer.toJSON(content); assertNotNull(jsonContent); JSONArray jsonArray = jsonContent.getJSONArray("suggestions"); assertNotNull(jsonArray); assertEquals(2, jsonArray.size()); Page searchResult = wc.goTo("search?q=" + myMockFolder.getName() + "%2F" + freeStyleProject.getName()); assertNotNull(searchResult); j.assertGoodStatus(searchResult); URL resultUrl = searchResult.getUrl(); assertTrue(resultUrl.toString().equals(j.getInstance().getRootUrl() + freeStyleProject.getUrl())); }

Target:
public void testProjectNameInAListView() throws Exception { MockFolder myMockFolder = j.createFolder("folder"); FreeStyleProject freeStyleProject = myMockFolder.createProject(FreeStyleProject.class, "myJob"); ListView listView = new ListView("ListView", j.jenkins); listView.setRecurse(true); listView.add(myMockFolder); listView.add(freeStyleProject); j.jenkins.addView(listView); j.jenkins.setPrimaryView(listView); assertEquals(2, j.jenkins.getPrimaryView().getAllItems().size()); WebClient wc = j.createWebClient(); Page result = wc.goTo("search/suggest?query=" + freeStyleProject.getName(), "application/json"); assertNotNull(result); j.assertGoodStatus(result); String content = result.getWebResponse().getContentAsString(); JSONObject jsonContent = (JSONObject)JSONSerializer.toJSON(content); assertNotNull(jsonContent); JSONArray jsonArray = jsonContent.getJSONArray("suggestions"); assertNotNull(jsonArray); assertEquals(2, jsonArray.size()); Page searchResult = wc.goTo("search?q=" + myMockFolder.getName() + "%2F" + freeStyleProject.getName()); assertNotNull(searchResult); j.assertGoodStatus(searchResult); URL resultUrl = searchResult.getUrl(); assertTrue(resultUrl.toString().equals(j.getInstance().getRootUrl() + freeStyleProject.getUrl())); }
Source:
public AsyncPrettyPrinter getInstance(final String headerName, final String headerValue) { final MatchResult result = matchAndParseHeader(headerName, headerValue); String uri = result.getSchemaUri(); URL schemaURL = parseURL(uri); if (schemaURL == null) { return getErrorAsyncPrettyPrinter(headerName, headerValue); } else { final Future<String> response = sExecutorService.submit(new Request(schemaURL)); return new AsyncPrettyPrinter() { public void printTo(PrintWriter output, InputStream payload) throws IOException { try { String schema = response.get(); if (schema != null) { doPrint(output, payload, schema); } else { doErrorPrint( output, payload, "http get request for schema url fails to return a valid response"); } } catch (InterruptedException e) { doErrorPrint( output, payload, "Error while downloading schema for pretty printing: " + e.getMessage()); } catch (ExecutionException e) { Throwable cause = e.getCause(); ExceptionUtil.propagateIfInstanceOf(cause, IOException.class); throw ExceptionUtil.propagate(cause); } } public DownloadingAsyncPrettyPrinterFactory.PrettyPrinterDisplayType getPrettifiedType() { return result.getDisplayType(); } }; } }

Target:
public AsyncPrettyPrinter getInstance(final String headerName, final String headerValue) { final MatchResult result = matchAndParseHeader(headerName, headerValue); if (result == null) { return null; } String uri = result.getSchemaUri(); URL schemaURL = parseURL(uri); if (schemaURL == null) { return getErrorAsyncPrettyPrinter(headerName, headerValue); } else { final Future<String> response = sExecutorService.submit(new Request(schemaURL)); return new AsyncPrettyPrinter() { public void printTo(PrintWriter output, InputStream payload) throws IOException { try { String schema; try { schema = response.get(); } catch (ExecutionException e) { Throwable cause = e.getCause(); if (IOException.class.isInstance(cause)) { doErrorPrint( output, payload, "Cannot successfully download schema: " + e.getMessage()); return; } else { throw e; } } doPrint(output, payload, schema); } catch (InterruptedException e) { doErrorPrint( output, payload, "Encountered spurious interrupt while downloading schema for pretty printing: " + e.getMessage()); } catch (ExecutionException e) { Throwable cause = e.getCause(); throw ExceptionUtil.propagate(cause); } } public PrettyPrinterDisplayType getPrettifiedType() { return result.getDisplayType(); } }; } }
Source:
public Response pngButton(@PathParam("rule") final String rule) throws Exception { GraphicsEnvironment.getLocalGraphicsEnvironment() .registerFont( Font.createFont( Font.TRUETYPE_FONT, UriBuilder.fromPath("<LINK_0>") .build().toURL().openStream() ) ); final PNGTranscoder transcoder = new PNGTranscoder(); transcoder.addTranscodingHint( PNGTranscoder.KEY_WIDTH, (float) Tv.HUNDRED ); transcoder.addTranscodingHint( PNGTranscoder.KEY_HEIGHT, (float) Tv.FIFTY ); final ByteArrayOutputStream png = new ByteArrayOutputStream(); transcoder.transcode( new TranscoderInput(IOUtils.toInputStream(this.svg(rule))), new TranscoderOutput(png) ); return Response .ok(png.toByteArray(), MediaType.PNG.toString()) .build(); }

Target:
public Response pngButton(@PathParam("rule") final String rule) throws Exception { final PNGTranscoder transcoder = new PNGTranscoder(); transcoder.addTranscodingHint( PNGTranscoder.KEY_WIDTH, (float) Tv.HUNDRED ); transcoder.addTranscodingHint( PNGTranscoder.KEY_HEIGHT, (float) Tv.FIFTY ); final ByteArrayOutputStream png = new ByteArrayOutputStream(); transcoder.transcode( new TranscoderInput(IOUtils.toInputStream(this.svg(rule))), new TranscoderOutput(png) ); return Response .ok(png.toByteArray(), MediaType.PNG.toString()) .build(); }
Source:
public boolean isAnnotationsEnabled(DocumentModel doc) { ConfigurationService cs = Framework.getService(ConfigurationService.class); if (!cs.getBoolean(ConverterBasedHtmlPreviewAdapter.OLD_PREVIEW_PROPERTY, false)) { return false; } BlobHolder blobHolder = doc.getAdapter(BlobHolder.class); Blob blob = blobHolder.getBlob(); if (blob == null || blob.getMimeType() == null) { return false; } return blob.getMimeType().startsWith("image") || isTextAnnotationsEnabled(); }

Target:
public boolean isAnnotationsEnabled(DocumentModel doc) { ConfigurationService cs = Framework.getService(ConfigurationService.class); if (cs.isBooleanFalse(ConverterBasedHtmlPreviewAdapter.OLD_PREVIEW_PROPERTY)) { return false; } BlobHolder blobHolder = doc.getAdapter(BlobHolder.class); Blob blob = blobHolder.getBlob(); if (blob == null || blob.getMimeType() == null) { return false; } return blob.getMimeType().startsWith("image") || isTextAnnotationsEnabled(); }
Source:
public void set(Object instance, String propName, Object value) throws IOException { try { if (_setter instanceof AnnotatedMethod) { ((AnnotatedMethod) _setter).getAnnotated().invoke(instance, propName, value); } else if (_setter instanceof AnnotatedField) { AnnotatedField field = ((AnnotatedField) _setter); if (!Map.class.isAssignableFrom(field.getRawType())) { throw new IllegalArgumentException( "Expecting a java.util.Map type in JsonAnySetter field, but got " + field.getRawType()); } Object val = field.getValue(instance); if (val == null) { val = new HashMap(); } ((Map)val).put(propName, value); field.setValue(instance, val); } } catch (Exception e) { _throwAsIOE(e, propName, value); } }

Target:
public void set(Object instance, String propName, Object value) throws IOException { try { if (_setter instanceof AnnotatedMethod) { ((AnnotatedMethod) _setter).getAnnotated().invoke(instance, propName, value); } else if (_setter instanceof AnnotatedField) { AnnotatedField field = ((AnnotatedField) _setter); Object val = field.getValue(instance); if (val != null) { ((Map) val).put(propName, value); field.setValue(instance, val); } } } catch (Exception e) { _throwAsIOE(e, propName, value); } }
Source:
public org.eclipse.che.plugin.docker.client.json.Actor getActor() { return Actor; }

Target:
public Actor getActor() { return actor; }
Source:
public Map<String, ContextSensitiveTokenType> getAdditionalContextSensitiveKeywords() { return new HashMap<String, ContextSensitiveTokenType>(); }

Target:
public Map<String, ContextSensitiveTokenType> getAdditionalContextSensitiveKeywords() { return Collections.emptyMap(); }
Source:
void configureRequest(final HttpURLConnection conn) throws IOException { final Map<String, String> p = new HashMap<String, String>(params); p.put("username", user); final String realm = p.get("realm"); final String nonce = p.get("nonce"); final String uri = p.get("uri"); final String qop = p.get("qop"); final String method = conn.getRequestMethod(); final String A1 = user + ":" + realm + ":" + pass; final String A2 = method + ":" + uri; final String expect; if ("auth".equals(qop)) { final String c = p.get("cnonce"); final String nc = String.format("%8x", ++requestCount); p.put("nc", nc); expect = KD(H(A1), nonce + ":" + nc + ":" + c + ":" + qop + ":" + H(A2)); } else { expect = KD(H(A1), nonce + ":" + H(A2)); } p.put("response", expect); StringBuilder v = new StringBuilder(); for (Map.Entry<String, String> e : p.entrySet()) { if (v.length() > 0) { v.append(", "); } v.append(e.getKey()); v.append('='); v.append('"'); v.append(e.getValue()); v.append('"'); } conn.setRequestProperty(HDR_AUTHORIZATION, NAME + " " + v); }

Target:
void configureRequest(final HttpURLConnection conn) throws IOException { final Map<String, String> p = new HashMap<String, String>(params); p.put("username", user); final String realm = p.get("realm"); final String nonce = p.get("nonce"); final String uri = p.get("uri"); final String qop = p.get("qop"); final String method = conn.getRequestMethod(); final String A1 = user + ":" + realm + ":" + pass; final String A2 = method + ":" + uri; final String expect; if ("auth".equals(qop)) { final String c = p.get("cnonce"); final String nc = String.format("%08x", ++requestCount); p.put("nc", nc); expect = KD(H(A1), nonce + ":" + nc + ":" + c + ":" + qop + ":" + H(A2)); } else { expect = KD(H(A1), nonce + ":" + H(A2)); } p.put("response", expect); StringBuilder v = new StringBuilder(); for (Map.Entry<String, String> e : p.entrySet()) { if (v.length() > 0) { v.append(", "); } v.append(e.getKey()); v.append('='); v.append('"'); v.append(e.getValue()); v.append('"'); } conn.setRequestProperty(HDR_AUTHORIZATION, NAME + " " + v); }
Source:
public void stopScreencast(JsonRpcPeer peer, JSONObject params) { mScreencastDispatcher.stopScreencast(); mScreencastDispatcher = null; }

Target:
public void stopScreencast(JsonRpcPeer peer, JSONObject params) { if (mScreencastDispatcher != null) { mScreencastDispatcher.stopScreencast(); mScreencastDispatcher = null; } }
Source:
public Resource build() { if (built) throw new IllegalStateException("Resource already built"); built = true; resource.setCapabilities(getCapabilities()); resource.setRequirements(getRequirements()); return resource; }

Target:
public Resource build() { if (built) throw new IllegalStateException("Resource already built"); built = true; resource.setCapabilities(capabilities.values()); resource.setRequirements(requirements.values()); return resource; }
Source:
public boolean set(ItemStack itemStack, Map<Key<?>, Object> keyValues) { itemStack.setItemDamage(itemStack.getMaxDamage() - (int) keyValues.get(Keys.ITEM_DURABILITY)); final boolean unbreakable = (boolean) keyValues.get(Keys.UNBREAKABLE); if (unbreakable) { itemStack.setItemDamage(0); } if (!itemStack.hasTagCompound()) { itemStack.setTagCompound(new NBTTagCompound()); } itemStack.getTagCompound().setBoolean("Unbreakable", unbreakable); return true; }

Target:
public boolean set(ItemStack itemStack, Map<Key<?>, Object> keyValues) { itemStack.setItemDamage(itemStack.getMaxDamage() - (int) keyValues.get(Keys.ITEM_DURABILITY)); final boolean unbreakable = (boolean) keyValues.get(Keys.UNBREAKABLE); if (unbreakable) { itemStack.setItemDamage(0); } if (!itemStack.hasTagCompound()) { itemStack.setTagCompound(new NBTTagCompound()); } itemStack.getTagCompound().setBoolean(NbtDataUtil.ITEM_UNBREAKABLE, unbreakable); return true; }
Source:
protected void publishEvents(ZbResponse zbResponse) { String zbResponseStr = zbResponse.getMessage(); String id = this.extractIdFromZbResponse(zbResponseStr); logger.debug("Found event from ID {}", id); if (id == null) { logger.debug(" => ignoring null ID"); return; } Vector<String> listOfItemNames = ZibaseBinding.getBindingProvider().getItemNamesById(id); if (listOfItemNames == null) { return; } logger.debug("trying to publish events for {}", id); for (String itemName : listOfItemNames) { Item item = ZibaseBinding.getBindingProvider().getItemByName(itemName); if (item != null) { ZibaseBindingConfig config = ZibaseBinding.getBindingProvider() .getItemConfigByUniqueId(itemName + "_" + id); logger.debug("Getting config for (id = {}) ", itemName, id); if (config != null) { synchronized (item) { org.openhab.core.types.State value = config.getOpenhabStateFromZibaseValue(zibase, zbResponseStr); logger.debug("publishing update for : {}", itemName, value); eventPubisher.postUpdate(itemName, value); } } } } }

Target:
protected void publishEvents(ZbResponse zbResponse) { String zbResponseStr = zbResponse.getMessage(); String id = this.extractIdFromZbResponse(zbResponseStr); logger.debug("Found event from ID {}", id); if (id == null) { logger.debug(" => ignoring null ID"); return; } Vector<String> listOfItemNames = ZibaseBinding.getBindingProvider().getItemNamesById(id); if (listOfItemNames == null) { return; } logger.debug("trying to publish events for {}", id); for (String itemName : listOfItemNames) { Item item = ZibaseBinding.getBindingProvider().getItemByName(itemName); if (item == null) { continue; } ZibaseBindingConfig config = ZibaseBinding.getBindingProvider() .getItemConfigByUniqueId(itemName + "_" + id); logger.debug("Getting config for (id = {}) ", itemName, id); if (config == null) { continue; } synchronized (item) { org.openhab.core.types.State value = config.getOpenhabStateFromZibaseValue(zibase, zbResponseStr); logger.debug("publishing update for : {}", itemName, value); eventPublisher.postUpdate(itemName, value); } } }
Source:
@Override public GlusterLocalLogicalVolumeListReturn glusterLogicalVolumeList() { JsonRpcRequest request = new RequestBuilder("GlusterHost.logicalVolumeList").build(); Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey(); return new GlusterLocalLogicalVolumeListReturn(response); }

Target:
public GlusterLocalLogicalVolumeListReturn glusterLogicalVolumeList() { JsonRpcRequest request = new RequestBuilder("GlusterHost.logicalVolumeList").build(); Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey(); return new GlusterLocalLogicalVolumeListReturn(response); }
Source:
protected void makeInstallButton() { actionButton.classList.add("btn-primary"); actionButton.classList.remove("btn-danger"); actionButton.textContent = "Install"; }

Target:
protected void makeInstallButton() { actionButton.classList.add("btn-primary"); actionButton.classList.remove("btn-danger"); actionButton.textContent = constants.InstallServiceTask(); }
Source:
ImmutableList<TransferSegmentRange> updateNotTransferredSegmentRangeStatus(TransferSegmentStatus newStatus, List<TransferSegmentRange> beforeTransferRanges) { return beforeTransferRanges.stream().map(range -> { if (range.getStatus().getSegmentState() == NOT_TRANSFERRED) { return range.updateStatus(newStatus); } return range; }).collect(ImmutableList.toImmutableList()); }

Target:
private ImmutableList<TransferSegmentRange> updateNotTransferredSegmentRangeStatus( TransferSegmentStatus newStatus, List<TransferSegmentRange> beforeTransferRanges) { return beforeTransferRanges.stream().map(range -> { if (range.getStatus().getSegmentState() == NOT_TRANSFERRED) { return range.updateStatus(newStatus); } return range; }).collect(ImmutableList.toImmutableList()); }
Source:
protected boolean validateComponents(Map<Component, List<ComponentProcess>> components) { long filteredComponentCount = components.entrySet().stream().filter(componentEntry -> { Component component = componentEntry.getKey(); List<ComponentProcess> componentProcesses = componentEntry.getValue(); if (component.getName().equals(COMPONENT_STORM_UI_SERVER)) { return validateComponentProcesses(componentProcesses); } else if (component.getName().equals(COMPONENT_NIMBUS)) { return validateComponentProcesses(componentProcesses); } else { return false; } }).count(); return filteredComponentCount == 2; }

Target:
protected boolean validateComponents(Map<Component, List<ComponentProcess>> components) { long filteredComponentCount = components.entrySet().stream().filter(componentEntry -> { Component component = componentEntry.getKey(); List<ComponentProcess> componentProcesses = componentEntry.getValue(); if (component.getName().equals(COMPONENT_STORM_UI_SERVER) || component.getName().equals(COMPONENT_NIMBUS)) { return isComponentProcessesValid(componentProcesses); } else { return false; } }).count(); return filteredComponentCount == 2; }
Source:
public void invoke(Long value, Context context) throws Exception { int parallelism = state.lastRecordInPartitions.length; int partition = (int) (value % parallelism); long lastRecord = state.lastRecordInPartitions[partition]; if (value < lastRecord) { state.numOutOfOrderness++; if (firstOutOfOrder) { LOG.info( "Out of order records current={} and last={} @ subtask ({} attempt)", value, lastRecord, getRuntimeContext().getIndexOfThisSubtask(), getRuntimeContext().getAttemptNumber()); firstOutOfOrder = false; } } else if (value == lastRecord) { state.numDuplicates++; if (firstDuplicate) { LOG.info( "Duplicate record @ subtask ({} attempt)", value, getRuntimeContext().getIndexOfThisSubtask(), getRuntimeContext().getAttemptNumber()); firstDuplicate = false; } } else if (lastRecord != -1) { long expectedValue = lastRecord + parallelism * parallelism; if (value != expectedValue) { state.numLostValues++; if (firstLostValue) { LOG.info( "Lost records current={}, expected={}, and last={} @ subtask ({} attempt)", value, expectedValue, lastRecord, getRuntimeContext().getIndexOfThisSubtask(), getRuntimeContext().getAttemptNumber()); firstLostValue = false; } } } state.lastRecordInPartitions[partition] = value; state.numOutput++; if (backpressure) { if (random.nextInt(100) == 42) { Thread.sleep(100); } } }

Target:
public void invoke(Long value, Context context) throws Exception { int parallelism = state.lastRecordInPartitions.length; int partition = (int) (value % parallelism); long lastRecord = state.lastRecordInPartitions[partition]; if (value < lastRecord) { state.numOutOfOrderness++; if (firstOutOfOrder) { LOG.info( "Out of order records current={} and last={} @ subtask ({} attempt)", value, lastRecord, getRuntimeContext().getIndexOfThisSubtask(), getRuntimeContext().getAttemptNumber()); firstOutOfOrder = false; } } else if (value == lastRecord) { state.numDuplicates++; if (firstDuplicate) { LOG.info( "Duplicate record @ subtask ({} attempt)", value, getRuntimeContext().getIndexOfThisSubtask(), getRuntimeContext().getAttemptNumber()); firstDuplicate = false; } } else if (lastRecord != -1) { long expectedValue = lastRecord + parallelism * parallelism; if (value != expectedValue) { state.numLostValues++; if (firstLostValue) { LOG.info( "Lost records current={}, expected={}, and last={} @ subtask ({} attempt)", value, expectedValue, lastRecord, getRuntimeContext().getIndexOfThisSubtask(), getRuntimeContext().getAttemptNumber()); firstLostValue = false; } } } state.lastRecordInPartitions[partition] = value; state.numOutput++; if (backpressure) { Thread.sleep(1); } }
Source:
public void shouldDownloadProxyRepositoryIndex(@MavenRepository(repositoryId = REPOSITORY_RELEASES_4, setup = MavenIndexedRepositorySetup.class) Repository repository, @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_4, id = "org.carlspring.strongbox.indexes:strongbox-test", versions = { "1.0", "1.1" }, classifiers = { "javadoc", "sources" }) List<Path> artifactPaths, @MavenRepository(repositoryId = REPOSITORY_PROXY_4) @Remote(url = PROXY_4_REPOSITORY_URL) Repository proxyRepository) throws IOException { hostedRepositoryIndexCreator.apply(repository); proxyRepositoryIndexCreator.apply(proxyRepository); String url = getContextBaseUrl() + "/storages/" + STORAGE0 + "/" + REPOSITORY_PROXY_4 + "/.index/nexus-maven-repository-index.gz"; mockMvc.header(new Header("User-Agent", "Maven/*")) .get(url) .peek() .then() .statusCode(HttpStatus.OK.value()) .contentType(org.carlspring.strongbox.net.MediaType.APPLICATION_X_GZIP_VALUE) .body(CoreMatchers.notNullValue()); }

Target:
public void shouldDownloadProxyRepositoryIndex(@MavenRepository(repositoryId = REPOSITORY_RELEASES_4, setup = MavenIndexedRepositorySetup.class) Repository repository, @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_4, id = "org.carlspring.strongbox.indexes:strongbox-test", versions = { "1.0", "1.1" }, classifiers = { "javadoc", "sources" }) List<Path> artifactPaths, @MavenRepository(repositoryId = REPOSITORY_PROXY_4) @Remote(url = PROXY_4_REPOSITORY_URL) Repository proxyRepository) throws IOException { hostedRepositoryIndexCreator.apply(repository); proxyRepositoryIndexCreator.apply(proxyRepository); String url = getContextBaseUrl() + "/storages/" + STORAGE0 + "/" + REPOSITORY_PROXY_4 + "/.index/nexus-maven-repository-index.gz"; mockMvc.header(new Header("User-Agent", "Maven/*")) .get(url) .peek() .then() .statusCode(HttpStatus.OK.value()) .contentType(APPLICATION_X_GZIP_VALUE) .body(CoreMatchers.notNullValue()); }
Source:
private void buildPathFilters(List<Filter> filters, String fieldName, Set<String> values) throws ZepException { if (values == null || values.isEmpty()) return; final Analyzer analyzer = new LucenePathAnalyzer(); for (String value : values) { final Filter filter; String value_without_leading_wildcard = StringUtils.trimLeadingCharacter(value, '*'); if (value_without_leading_wildcard.startsWith("/")) { value = value_without_leading_wildcard.toLowerCase(); if (value.endsWith("/")) { filter = filterCache.get(PREFIX, new Term(nonAnalyzed(fieldName), value)); } else if (value.endsWith("*")) { value = value.substring(0, value.length() - 1); if (value.endsWith("*")) { value = value.substring(0, value.length() - 1); } filter = filterCache.get(PREFIX, new Term(nonAnalyzed(fieldName), value)); } else { filter = filterCache.get(TERMS, new Term(nonAnalyzed(fieldName), value + "/")); } } else { final MultiPhraseQuery pq = new MultiPhraseQuery(); filter = new QueryWrapperFilter(pq); List<String> tokens = getTokens(fieldName, analyzer, value); for (String token : tokens) { Term[] terms = getMatchingTerms(fieldName, reader, token); if (terms.length == 0) { pq.add(new Term(fieldName, token)); } else { pq.add(terms); } } } filters.add(filter); } }

Target:
private void buildPathFilters(List<Filter> filters, String fieldName, Set<String> values) throws ZepException { if (values == null || values.isEmpty()) return; final Analyzer analyzer = new LucenePathAnalyzer(); for (String value : values) { final Filter filter; String value_without_leading_wildcard = StringUtils.trimLeadingCharacter(value, '*'); if (value_without_leading_wildcard.startsWith("/")) { value = value_without_leading_wildcard.toLowerCase(); if (value.endsWith("/")) { filter = filterCache.get(PREFIX, new Term(nonAnalyzed(fieldName), value)); } else if (value.endsWith("*")) { value = StringUtils.trimTrailingCharacter(value, '*'); filter = filterCache.get(PREFIX, new Term(nonAnalyzed(fieldName), value)); } else { filter = filterCache.get(TERMS, new Term(nonAnalyzed(fieldName), value + "/")); } } else { final MultiPhraseQuery pq = new MultiPhraseQuery(); filter = new QueryWrapperFilter(pq); List<String> tokens = getTokens(fieldName, analyzer, value); for (String token : tokens) { Term[] terms = getMatchingTerms(fieldName, reader, token); if (terms.length == 0) { pq.add(new Term(fieldName, token)); } else { pq.add(terms); } } } filters.add(filter); } }
Source:
private final boolean closeOpenStatements() { boolean success = true; final int size = openStatements.size(); if (size > 0) { for (int i = 0; i < size; i++) { try { final Statement statement = openStatements.get(i); if (statement != null) { statement.close(); } } catch (SQLException e) { checkException(e); success = success ? !poolEntry.evict : false; } } openStatements.clear(); } return success; }

Target:
private final boolean closeOpenStatements() { final int size = openStatements.size(); if (size <= 0) { return true; } boolean success = true; for (int i = 0; i < size; i++) { try { final Statement statement = openStatements.get(i); if (statement != null) { statement.close(); } } catch (SQLException e) { checkException(e); success &= !poolEntry.evict; } } openStatements.clear(); return success; }
Source:
public TaskTracker tasks() throws SemanticException { try { Database dbInMetadata = readDbMetadata(); String dbName = dbInMetadata.getName(); Task<? extends Serializable> dbRootTask = null; LoadOpType opType = getLoadOpType(dbName); switch (opType) { case LOAD_NEW: dbRootTask = createDbTask(dbInMetadata); break; case LOAD_REPLACE: case LOAD_INVALID: if (existEmptyDb(dbName)) { dbRootTask = alterDbTask(dbInMetadata); } else { throw new InvalidOperationException( "Database " + dbName + " is not empty. One or more tables/functions exist."); } break; case LOAD_SKIP: return tracker; } dbRootTask.addDependentTask(setOwnerInfoTask(dbInMetadata)); tracker.addTask(dbRootTask); return tracker; } catch (Exception e) { throw new SemanticException(e); } }

Target:
public TaskTracker tasks() throws SemanticException { try { Database dbInMetadata = readDbMetadata(); String dbName = dbInMetadata.getName(); Task<? extends Serializable> dbRootTask = null; ReplLoadOpType loadDbType = getLoadDbType(dbName); switch (loadDbType) { case LOAD_NEW: dbRootTask = createDbTask(dbInMetadata); break; case LOAD_REPLACE: dbRootTask = alterDbTask(dbInMetadata); break; default: break; } if (dbRootTask != null) { dbRootTask.addDependentTask(setOwnerInfoTask(dbInMetadata)); tracker.addTask(dbRootTask); } return tracker; } catch (Exception e) { throw new SemanticException(e); } }
Source:
protected void execute() { logger.debug("Querying Netatmo API"); for (String userid : credentialsCache.keySet()) { OAuthCredentials oauthCredentials = getOAuthCredentials(userid); if (oauthCredentials.noAccessToken()) { oauthCredentials.refreshAccessToken(); } weatherBinding.execute(oauthCredentials, this.providers, this.eventPublisher); welcomeBinding.execute(oauthCredentials, this.providers, this.eventPublisher); } }

Target:
protected void execute() { logger.debug("Querying Netatmo API"); for (String userid : credentialsCache.keySet()) { OAuthCredentials oauthCredentials = getOAuthCredentials(userid); if (oauthCredentials.noAccessToken()) { oauthCredentials.refreshAccessToken(); } boolean bWeather = false; boolean bCamera = false; for (final NetatmoBindingProvider provider : providers) { for (final String itemName : provider.getItemNames()) { final String sItemType = provider.getItemType(itemName); if (NETATMO_WEATHER.equals(sItemType)) { bWeather = true; } else if (NETATMO_CAMERA.equals(sItemType)) { bCamera = true; } if (bWeather && bCamera) { break; } } } if (bWeather) { weatherBinding.execute(oauthCredentials, this.providers, this.eventPublisher); } if (bCamera) { cameraBinding.execute(oauthCredentials, this.providers, this.eventPublisher); } } }
Source:
public OutputBufferMemoryManager(long maxBufferedBytes, Supplier<LocalMemoryContext> systemMemoryContextSupplier, Executor notificationExecutor) { requireNonNull(systemMemoryContextSupplier, "systemMemoryContextSupplier is null"); checkArgument(maxBufferedBytes > 0, "maxBufferedBytes must be > 0"); this.maxBufferedBytes = maxBufferedBytes; this.systemMemoryContextSupplier = Suppliers.memoize(() -> systemMemoryContextSupplier.get()); this.notificationExecutor = requireNonNull(notificationExecutor, "notificationExecutor is null"); notFull = SettableFuture.create(); notFull.set(null); }

Target:
public OutputBufferMemoryManager(long maxBufferedBytes, Supplier<LocalMemoryContext> systemMemoryContextSupplier, Executor notificationExecutor) { requireNonNull(systemMemoryContextSupplier, "systemMemoryContextSupplier is null"); checkArgument(maxBufferedBytes > 0, "maxBufferedBytes must be > 0"); this.maxBufferedBytes = maxBufferedBytes; this.systemMemoryContextSupplier = Suppliers.memoize(systemMemoryContextSupplier::get); this.notificationExecutor = requireNonNull(notificationExecutor, "notificationExecutor is null"); notFull = SettableFuture.create(); notFull.set(null); }
Source:
private List<TmfTraceElement> filterTraceElementByTimeRange(List<TmfTraceElement> elements, IProgressMonitor progressMonitor) { SubMonitor subMonitor = SubMonitor.convert(progressMonitor, elements.size()); List<TmfTraceElement> filteredElements = new ArrayList<>(); for (TmfTraceElement tmfTraceElement : elements) { ITmfTimestamp traceStartTime = tmfTraceElement.getStartTime(); ITmfTimestamp traceEndTime = tmfTraceElement.getEndTime(); if (traceStartTime == null || traceEndTime == null) { Queue<TmfTraceElement> queue = new ConcurrentLinkedQueue<>(); queue.add(tmfTraceElement); UpdateTraceBoundsJob job = new UpdateTraceBoundsJob(Messages.SelectTracesWizardPage_UpdateTraceBoundsJobName, queue); job.run(subMonitor.newChild(1)); try { job.join(); } catch (InterruptedException e) { subMonitor.setCanceled(true); } traceStartTime = tmfTraceElement.getStartTime(); traceEndTime = tmfTraceElement.getEndTime(); } else { subMonitor.worked(1); } if (subMonitor.isCanceled()) { return elements; } if (isInTimeRange(traceStartTime, traceEndTime)) { filteredElements.add(tmfTraceElement); } } return filteredElements; }

Target:
private List<TmfTraceElement> filterTraceElementByTimeRange(List<TmfTraceElement> elements, IProgressMonitor progressMonitor) { SubMonitor subMonitor = SubMonitor.convert(progressMonitor, elements.size()); List<TmfTraceElement> filteredElements = new ArrayList<>(); List<TmfTraceElement> knownBounds = new ArrayList<>(); Queue<TmfTraceElement> unknownBounds = new ConcurrentLinkedQueue<>(); Iterable<TmfTraceElement> traceElements = Iterables.concat(knownBounds, unknownBounds); for (TmfTraceElement tmfTraceElement : elements) { if (tmfTraceElement.getStartTime() == null || tmfTraceElement.getEndTime() == null) { unknownBounds.add(tmfTraceElement); } else { knownBounds.add(tmfTraceElement); } } if (!unknownBounds.isEmpty()) { UpdateTraceBoundsJob job = new UpdateTraceBoundsJob(Messages.SelectTracesWizardPage_UpdateTraceBoundsJobName, new ConcurrentLinkedQueue<>(unknownBounds)); job.run(subMonitor.newChild(1)); } for (TmfTraceElement element : traceElements) { if (isInTimeRange(element.getStartTime(), element.getEndTime())) { filteredElements.add(element); } } return filteredElements; }
Source:
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { for(Permanent permanent : game.getState().getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { switch (layer) { case TypeChangingEffects_4: if(!permanent.getSubtype(game).contains("Zombie")) { permanent.getSubtype(game).add("Zombie"); } break; case ColorChangingEffects_5: permanent.getColor(game).setColor(ObjectColor.BLACK); break; } } return true; }

Target:
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { for(Permanent permanent : game.getState().getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { switch (layer) { case TypeChangingEffects_4: if(!permanent.hasSubtype("Zombie", game)) { permanent.getSubtype(game).add("Zombie"); } break; case ColorChangingEffects_5: permanent.getColor(game).setColor(ObjectColor.BLACK); break; } } return true; }
Source:
private void removeGeoNamesMetacardsFromCatalog( String resource, ProgressCallback extractionCallback) { extractionCallback.updateProgress(0); Optional<CatalogProvider> catalogProviderOptional = catalogProviders.stream().findFirst(); if (catalogProviderOptional.isPresent()) { CatalogProvider catalogProvider = catalogProviderOptional.get(); if (StringUtils.isNotBlank(resource)) { filter = filterBuilder.allOf( filterBuilder .attribute(GeoEntryAttributes.IMPORT_LOCATION) .is() .equalTo() .text(resource), filter); } Query query = new QueryImpl( filter, 1, BATCH_SIZE, SortBy.NATURAL_ORDER, false, TimeUnit.SECONDS.toMillis(90)); QueryRequest queryRequest = new QueryRequestImpl(query); LOGGER.trace("Removing existing geonames data with filter: {}", filter); int retries = 0; while (retries < maxRetries) { boolean errorOccurred = false; List<Serializable> metacardsToDelete = null; try { QueryResponse response = catalogFramework.query(queryRequest); metacardsToDelete = response .getResults() .stream() .map(Result::getMetacard) .map(Metacard::getId) .collect(Collectors.toList()); } catch (Exception e) { LOGGER.debug("Unable to query for metacards.", e); errorOccurred = true; } if (!errorOccurred && CollectionUtils.isEmpty(metacardsToDelete)) { break; } if (!errorOccurred) { LOGGER.trace("Deleting GeoNames metacards", metacardsToDelete.size()); try { removeMetacards(catalogProvider, extractionCallback, metacardsToDelete); } catch (IngestException e) { LOGGER.debug("Unable to delete metacards.", e); errorOccurred = true; } } retries++; if (errorOccurred && retries < maxRetries) { try { Thread.sleep(WAIT_TIME_MSEC); } catch (InterruptedException ignore) { } } } } extractionCallback.updateProgress(50); }

Target:
private void removeGeoNamesMetacardsFromCatalog( String resource, ProgressCallback extractionCallback) throws UnsupportedQueryException, SourceUnavailableException, FederationException, IngestException { extractionCallback.updateProgress(0); Optional<CatalogProvider> catalogProviderOptional = catalogProviders.stream().findFirst(); if (catalogProviderOptional.isPresent()) { CatalogProvider catalogProvider = catalogProviderOptional.get(); if (StringUtils.isNotBlank(resource)) { filter = filterBuilder.allOf( filterBuilder .attribute(GeoEntryAttributes.IMPORT_LOCATION) .is() .equalTo() .text(resource), filter); } while (true) { Query query = new QueryImpl( filter, 1, BATCH_SIZE, SortBy.NATURAL_ORDER, false, TimeUnit.SECONDS.toMillis(90)); QueryRequest queryRequest = new QueryRequestImpl(query); LOGGER.trace("Removing existing geonames data with filter: {}", filter); QueryResponse response = catalogFramework.query(queryRequest); List<Serializable> metacardsToDelete = response .getResults() .stream() .map(Result::getMetacard) .map(Metacard::getId) .collect(Collectors.toList()); if (CollectionUtils.isEmpty(metacardsToDelete)) { break; } LOGGER.trace("Deleting GeoNames metacards", metacardsToDelete.size()); removeMetacards(catalogProvider, extractionCallback, metacardsToDelete); } } extractionCallback.updateProgress(50); }
Source:
public boolean validate() { getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new AsciiNameValidation() }); List<IValidation> cidrValidations = new ArrayList<IValidation>(); cidrValidations.add(new NotEmptyValidation()); if (getIpVersion().getSelectedItem() == IpVersion.IPV4) { cidrValidations.add(new CidrValidation()); } getCidr().validateEntity(cidrValidations.toArray(new IValidation[0])); getIpVersion().validateSelectedItem(new IValidation[] { new NotEmptyValidation() }); return getName().getIsValid() && getCidr().getIsValid() && getIpVersion().getIsValid(); }

Target:
public boolean validate() { getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new AsciiNameValidation() }); getCidr().validateEntity(new IValidation[] { getIpVersion().getSelectedItem() == IpVersion.IPV4 ? new CidrValidation() : new NotEmptyValidation() }); getIpVersion().validateSelectedItem(new IValidation[] { new NotEmptyValidation() }); return getName().getIsValid() && getCidr().getIsValid() && getIpVersion().getIsValid(); }
Source:
public boolean equals(Object other) { if (this.getClass() == other.getClass()) { FeedbackResponseAttributes otherFeedbackResponse = (FeedbackResponseAttributes) other; return customEquals(this.feedbackSessionName, otherFeedbackResponse.feedbackSessionName) && customEquals(this.courseId, otherFeedbackResponse.courseId) && customEquals(this.feedbackQuestionId, otherFeedbackResponse.feedbackQuestionId) && customEquals(this.giver, otherFeedbackResponse.giver) && customEquals(this.recipient, otherFeedbackResponse.recipient); } else { return false; } }

Target:
public boolean equals(Object other) { if (other == null) { return false; } else if (this == other) { return true; } else if (this.getClass() == other.getClass()) { FeedbackResponseAttributes otherFeedbackResponse = (FeedbackResponseAttributes) other; return Objects.equals(this.feedbackSessionName, otherFeedbackResponse.feedbackSessionName) && Objects.equals(this.courseId, otherFeedbackResponse.courseId) && Objects.equals(this.feedbackQuestionId, otherFeedbackResponse.feedbackQuestionId) && Objects.equals(this.giver, otherFeedbackResponse.giver) && Objects.equals(this.recipient, otherFeedbackResponse.recipient); } else { return false; } }
Source:
public String toString() { if (this.m_password == null) { return null; } return new String(this.m_password); }

Target:
public String toString() { return new String(this.m_password); }
Source:
public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof DiagramNavigatorItemImpl)) { return false; } DiagramNavigatorItemImpl that = (DiagramNavigatorItemImpl) o; return name.equals(that.name); }

Target:
public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof DiagramNavigatorItemImpl)) { return false; } final DiagramNavigatorItemImpl that = (DiagramNavigatorItemImpl) o; return name.equals(that.name); }
Source:
public static List<Total> orderedValues() { List<Total> orderedTotals = new ArrayList<>(); orderedTotals.add(SUM); orderedTotals.add(MAX); orderedTotals.add(MIN); orderedTotals.add(AVG); orderedTotals.add(MED); orderedTotals.add(NAT); return orderedTotals; }

Target:
public static List<Total> orderedValues() { return Arrays.asList(SUM, MAX, MIN, AVG, MED, NAT); }