auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public DataSegment push(File dataSegmentFile, DataSegment segment) throws IOException { final String storageDir = DataSegmentPusherUtil.getStorageDir(segment); final File baseStorageDir = config.getStorageDirectory(); File outDir = new File(baseStorageDir, storageDir); log.info("Copying segment[%s] to local filesystem at location[%s]", segment.getIdentifier(), outDir.toString()); if (dataSegmentFile.equals(outDir)) { long size = 0; for (File file : dataSegmentFile.listFiles()) { size += file.length(); } return createDescriptorFile( segment.withLoadSpec(makeLoadSpec(outDir)) .withSize(size) .withBinaryVersion(SegmentUtils.getVersionFromDir(dataSegmentFile)), outDir ); } File tmpOutDir = new File(baseStorageDir, storageDir + "." + UUID.randomUUID().toString()); long size = compressSegment(dataSegmentFile, tmpOutDir); DataSegment dataSegment = createDescriptorFile( segment.withLoadSpec(makeLoadSpec(new File(outDir, "index.zip"))) .withSize(size) .withBinaryVersion(SegmentUtils.getVersionFromDir(dataSegmentFile)), tmpOutDir ); try { java.nio.file.Files.move(tmpOutDir.toPath(), outDir.toPath()); } catch (FileAlreadyExistsException e) { log.warn("Push destination directory[%s] exists, ignore this message if replication is configured."); dataSegment = jsonMapper.readValue(new File(outDir, "descriptor.json"), DataSegment.class); FileUtils.deleteDirectory(tmpOutDir); } return dataSegment; }

Target:
public DataSegment push(File dataSegmentFile, DataSegment segment) throws IOException { final String storageDir = DataSegmentPusherUtil.getStorageDir(segment); final File baseStorageDir = config.getStorageDirectory(); final File outDir = new File(baseStorageDir, storageDir); log.info("Copying segment[%s] to local filesystem at location[%s]", segment.getIdentifier(), outDir.toString()); if (dataSegmentFile.equals(outDir)) { long size = 0; for (File file : dataSegmentFile.listFiles()) { size += file.length(); } return createDescriptorFile( segment.withLoadSpec(makeLoadSpec(outDir)) .withSize(size) .withBinaryVersion(SegmentUtils.getVersionFromDir(dataSegmentFile)), outDir ); } final File tmpOutDir = new File(baseStorageDir, intermediateDirFor(storageDir)); log.info("Creating intermediate directory[%s] for segment[%s]", tmpOutDir.toString(), segment.getIdentifier()); final long size = compressSegment(dataSegmentFile, tmpOutDir); final DataSegment dataSegment = createDescriptorFile( segment.withLoadSpec(makeLoadSpec(new File(outDir, "index.zip"))) .withSize(size) .withBinaryVersion(SegmentUtils.getVersionFromDir(dataSegmentFile)), tmpOutDir ); createDirectoryIfNotExists(outDir.getParentFile()); try { java.nio.file.Files.move(tmpOutDir.toPath(), outDir.toPath()); } catch (FileAlreadyExistsException e) { log.warn("Push destination directory[%s] exists, ignore this message if replication is configured.", outDir); FileUtils.deleteDirectory(tmpOutDir); return jsonMapper.readValue(new File(outDir, "descriptor.json"), DataSegment.class); } return dataSegment; }
Source:
public void reloadServer() throws Exception { try (ManagementClient managementClient = getManagementClient()) { block(managementClient); long timeout = SHUTDOWN_WAITING_TIME + System.currentTimeMillis(); managementClient.executeForResult(Operations.createOperation(RELOAD, new ModelNode().setEmptyList())); while (System.currentTimeMillis() < timeout) { Thread.sleep(FREQUENCY); try { controller.getClient().isServerInRunningState(); } catch (RuntimeException ex) { break; } } Assert.assertFalse(System.currentTimeMillis() < timeout); Thread.sleep(2 * FREQUENCY); Assert.assertTrue(managementClient.isServerInRunningState()); } }

Target:
public void reloadServer() throws Exception { try (ManagementClient managementClient = getManagementClient()) { block(managementClient); long timeout = SHUTDOWN_WAITING_TIME + System.currentTimeMillis(); managementClient.executeForResult(Operations.createOperation(RELOAD, new ModelNode().setEmptyList())); while (System.currentTimeMillis() < timeout) { Thread.sleep(FREQUENCY); try { managementClient.isServerInRunningState(); } catch (RuntimeException ex) { break; } } Assert.assertFalse(System.currentTimeMillis() < timeout); timeout = RESTART_WAITING_TIME + System.currentTimeMillis(); while (System.currentTimeMillis() < timeout) { Thread.sleep(FREQUENCY); try { managementClient.isServerInRunningState(); } catch (RuntimeException ex) { break; } } } }
Source:
public String getClientInfo(String name) throws SQLException { return this.properties.getProperty(name); }

Target:
public String getClientInfo(String name) throws SQLException { checkClosed(); return properties.getProperty(name); }
Source:
private void bindLowMemoryKiller(String name, Class<? extends LowMemoryKiller> clazz) { install(installModuleIf( MemoryManagerConfig.class, config -> name.equals(config.getLowMemoryKillerPolicy()), moduleBinder -> moduleBinder.bind(LowMemoryKiller.class).to(clazz).in(Scopes.SINGLETON))); }

Target:
private void bindLowMemoryKiller(String name, Class<? extends LowMemoryKiller> clazz) { install(installModuleIf( MemoryManagerConfig.class, config -> name.equals(config.getLowMemoryKillerPolicy()), binder -> binder.bind(LowMemoryKiller.class).to(clazz).in(Scopes.SINGLETON))); }
Source:
protected void finalize() { try { threadGroup.destroy(); } catch (RuntimeException e) { log.warn(e, "Leaked thread group"); } }

Target:
protected void finalize() { try { threadGroup.destroy(); } catch (RuntimeException e) { log.warn(e, "Leaked thread group '%s'", threadGroup.getName()); } }
Source:
public ElideConfigParser(String localFilePath) { if (DynamicConfigHelpers.isNullOrEmpty(localFilePath)) { throw new IllegalArgumentException("Config path is null"); } try { String basePath = DynamicConfigHelpers.formatFilePath(localFilePath); this.variables = DynamicConfigHelpers.getVaribalesPojo(basePath); this.elideTableConfig = DynamicConfigHelpers.getElideTablePojo(basePath); this.elideSecurityConfig = DynamicConfigHelpers.getElideSecurityPojo(basePath); } catch (JsonProcessingException e) { log.error("Error while parsing dynamic config at location " + localFilePath); log.error(e.getMessage()); } }

Target:
public ElideConfigParser(String localFilePath) { if (DynamicConfigHelpers.isNullOrEmpty(localFilePath)) { throw new IllegalArgumentException("Config path is null"); } try { String basePath = DynamicConfigHelpers.formatFilePath(localFilePath); this.variables = DynamicConfigHelpers.getVariablesPojo(basePath); this.elideTableConfig = DynamicConfigHelpers.getElideTablePojo(basePath, this.variables); this.elideSecurityConfig = DynamicConfigHelpers.getElideSecurityPojo(basePath, this.variables); } catch (IOException e) { log.error("Error while parsing dynamic config at location " + localFilePath); log.error(e.getMessage()); throw new IllegalStateException(e); } }
Source:
private static Exception classifyException(Exception e) { if (e instanceof TApplicationException) { return new PrestoException(THRIFT_SERVICE_GENERIC_REMOTE_ERROR, "Exception raised by a remote thrift server", e); } return e; }

Target:
private static Exception classifyException(Exception e) { if (e instanceof TApplicationException || e instanceof RuntimeTApplicationException) { return new PrestoException(THRIFT_SERVICE_GENERIC_REMOTE_ERROR, "Exception raised by a remote thrift server", e); } return e; }
Source:
private void onCreateVolume() { VolumeModel model = (VolumeModel) getWindow(); Guid clusterId = ((VDSGroup) model.getCluster().getSelectedItem()).getId(); GlusterVolumeEntity volume = new GlusterVolumeEntity(); volume.setClusterId(clusterId); volume.setName((String) model.getName().getEntity()); GlusterVolumeType type = (GlusterVolumeType) model.getTypeList().getSelectedItem(); if (type == GlusterVolumeType.STRIPE || type == GlusterVolumeType.DISTRIBUTED_STRIPE) { volume.setStripeCount(Integer.parseInt((String) model.getStripeCount().getEntity())); } else if (type == GlusterVolumeType.REPLICATE || type == GlusterVolumeType.DISTRIBUTED_REPLICATE) { volume.setReplicaCount(Integer.parseInt((String) model.getReplicaCount().getEntity())); } volume.setVolumeType(type); if ((Boolean) model.getTcpTransportType().getEntity()) volume.getTransportTypes().add(TransportType.TCP); if ((Boolean) model.getRdmaTransportType().getEntity()) volume.getTransportTypes().add(TransportType.RDMA); volume.setBricks((List<GlusterBrickEntity>) model.getBricks().getItems()); if ((Boolean) model.getNfs_accecssProtocol().getEntity()) volume.enableNFS(); else volume.disableNFS(); if ((Boolean) model.getCifs_accecssProtocol().getEntity()) volume.enableCifs(); else volume.disableCifs(); volume.setAccessControlList((String) model.getAllowAccess().getEntity()); CreateGlusterVolumeParameters parameter = new CreateGlusterVolumeParameters(volume); Frontend.RunAction(VdcActionType.CreateGlusterVolume, parameter, new IFrontendActionAsyncCallback() { @Override public void Executed(FrontendActionAsyncResult result) { } }); }

Target:
private void onCreateVolume() { VolumeModel model = (VolumeModel) getWindow(); Guid clusterId = ((VDSGroup) model.getCluster().getSelectedItem()).getId(); GlusterVolumeEntity volume = new GlusterVolumeEntity(); volume.setClusterId(clusterId); volume.setName((String) model.getName().getEntity()); GlusterVolumeType type = (GlusterVolumeType) model.getTypeList().getSelectedItem(); if (type == GlusterVolumeType.STRIPE || type == GlusterVolumeType.DISTRIBUTED_STRIPE) { volume.setStripeCount(model.getStripeCountValue()); } else if (type == GlusterVolumeType.REPLICATE || type == GlusterVolumeType.DISTRIBUTED_REPLICATE) { volume.setReplicaCount(model.getReplicaCountValue()); } volume.setVolumeType(type); if ((Boolean) model.getTcpTransportType().getEntity()) volume.getTransportTypes().add(TransportType.TCP); if ((Boolean) model.getRdmaTransportType().getEntity()) volume.getTransportTypes().add(TransportType.RDMA); volume.setBricks((List<GlusterBrickEntity>) model.getBricks().getItems()); if ((Boolean) model.getNfs_accecssProtocol().getEntity()) volume.enableNFS(); else volume.disableNFS(); if ((Boolean) model.getCifs_accecssProtocol().getEntity()) volume.enableCifs(); else volume.disableCifs(); volume.setAccessControlList((String) model.getAllowAccess().getEntity()); CreateGlusterVolumeParameters parameter = new CreateGlusterVolumeParameters(volume); Frontend.RunAction(VdcActionType.CreateGlusterVolume, parameter, new IFrontendActionAsyncCallback() { @Override public void Executed(FrontendActionAsyncResult result) { } }); }
Source:
@Test public void testHintsPropagateWithDifferentKindOfRels() { final String sql = "select \n" + "ename, avg(sal)\n" + "from emp group by ename"; final RelNode rel = tester.convertSqlToRel(sql).rel; final RelHint hint = RelHint.of( Collections.emptyList(), "AGG_STRATEGY", Collections.singletonList("TWO_PHASE")); HepProgram program = new HepProgramBuilder() .addRuleInstance(AggregateReduceFunctionsRule.INSTANCE) .build(); HepPlanner planner = new HepPlanner(program); planner.setRoot(rel); RelNode newRel = planner.findBestExp(); new ValidateHintVisitor(hint, Aggregate.class).go(newRel); }

Target:
@Test public void testHintsPropagateWithDifferentKindOfRels() { final String sql = "select \n" + "ename, avg(sal)\n" + "from emp group by ename"; final RelNode rel = tester.convertSqlToRel(sql).rel; final RelHint hint = RelHint.of( Collections.singletonList(0), "AGG_STRATEGY", Collections.singletonList("TWO_PHASE")); HepProgram program = new HepProgramBuilder() .addRuleInstance(AggregateReduceFunctionsRule.INSTANCE) .build(); HepPlanner planner = new HepPlanner(program); planner.setRoot(rel); RelNode newRel = planner.findBestExp(); new ValidateHintVisitor(hint, Aggregate.class).go(newRel); }
Source:
public List<ParagraphInfo> getParagraphList(String user, String noteId) throws TException, ServiceException { try { AuthenticationInfo authInfo = new AuthenticationInfo(); authInfo.setUser(user); Set<String> userAndRoles = new HashSet<>(); userAndRoles.add(user); ServiceContext serviceContext = new ServiceContext(authInfo, userAndRoles); Note note = getNotebookService().getNote(noteId, serviceContext, new SimpleServiceCallback<Note>() { @Override public void onSuccess(Note note, ServiceContext context) throws IOException { }; @Override public void onFailure(Exception e, ServiceContext context) throws IOException { LOG.error(e.getMessage(), e); String message = e.getMessage(); if (e instanceof NoteNotFoundException) { message = "Not found this note : " + noteId; } else if (e instanceof ForbiddenException) { message = "No READER permission access to this note : " + noteId; } throw new IOException(message); }; }); if (null != note) { List<ParagraphInfo> paragraphInfos = new ArrayList(); List<Paragraph> paragraphs = note.getParagraphs(); for (Iterator<Paragraph> iter = paragraphs.iterator(); iter.hasNext();) { Paragraph paragraph = iter.next(); ParagraphInfo paraInfo = new ParagraphInfo(); paraInfo.setNoteId(noteId); paraInfo.setParagraphId(paragraph.getId()); paraInfo.setParagraphTitle(paragraph.getTitle()); paraInfo.setParagraphText(paragraph.getText()); paragraphInfos.add(paraInfo); } return paragraphInfos; } else { String msg = "User " + user + " does not have READER permission to the note: " + noteId; throw new ServiceException(msg); } } catch (IOException e) { LOG.error(e.getMessage(), e); throw new ServiceException(e.getMessage()); } }

Target:
public List<ParagraphInfo> getParagraphList(String user, String noteId) throws TException, ServiceException { Notebook notebook = getNotebook(); Note note = notebook.getNote(noteId); if (null == note) { throw new ServiceException("Not found this note : " + noteId); } Set<String> userAndRoles = new HashSet<>(); userAndRoles.add(user); NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization(); boolean isAllowed = notebookAuthorization.isReader(noteId, userAndRoles); Set<String> allowed = notebookAuthorization.getReaders(noteId); if (false == isAllowed) { String errorMsg = "Insufficient privileges to READER note. " + "Allowed users or roles: " + allowed; throw new ServiceException(errorMsg); } List<ParagraphInfo> paragraphInfos = new ArrayList(); List<Paragraph> paragraphs = note.getParagraphs(); for (Iterator<Paragraph> iter = paragraphs.iterator(); iter.hasNext();) { Paragraph paragraph = iter.next(); ParagraphInfo paraInfo = new ParagraphInfo(); paraInfo.setNoteId(noteId); paraInfo.setParagraphId(paragraph.getId()); paraInfo.setParagraphTitle(paragraph.getTitle()); paraInfo.setParagraphText(paragraph.getText()); paragraphInfos.add(paraInfo); } return paragraphInfos; }
Source:
public void initialize() { data = mlrParser.parse(); final List<Long> dataKeys; try { dataKeys = idFactory.getIds(data.size()); } catch (final IdGenerationException e) { throw new RuntimeException("Fail to generate data keys", e); } memoryStore.putList(dataKeys, data); classPartitionIndices = new ArrayList<>(numClasses * numPartitionsPerClass); for (int classIndex = 0; classIndex < numClasses; ++classIndex) { for (int partitionIndex = 0; partitionIndex < numPartitionsPerClass; ++partitionIndex) { classPartitionIndices.add(classIndex * numPartitionsPerClass + partitionIndex); } } LOG.log(Level.INFO, "Step size = {0}", stepSize); LOG.log(Level.INFO, "Number of batches per iteration = {0}", numBatchPerIter); LOG.log(Level.INFO, "Total number of samples = {0}", data.size()); if (data.size() < trainErrorDatasetSize) { LOG.log(Level.WARNING, "Number of samples is less than trainErrorDatasetSize = {0}", trainErrorDatasetSize); } synchronizer.globalBarrier(); }

Target:
public void initialize() { final List<Pair<Vector, Integer>> dataValues = mlrParser.parse(); final List<Long> dataKeys; try { dataKeys = idFactory.getIds(dataValues.size()); } catch (final IdGenerationException e) { throw new RuntimeException("Fail to generate data keys", e); } memoryStore.putList(dataKeys, dataValues); classPartitionIndices = new ArrayList<>(numClasses * numPartitionsPerClass); for (int classIndex = 0; classIndex < numClasses; ++classIndex) { for (int partitionIndex = 0; partitionIndex < numPartitionsPerClass; ++partitionIndex) { classPartitionIndices.add(classIndex * numPartitionsPerClass + partitionIndex); } } LOG.log(Level.INFO, "Step size = {0}", stepSize); LOG.log(Level.INFO, "Number of batches per iteration = {0}", numBatchPerIter); LOG.log(Level.INFO, "Total number of samples = {0}", dataValues.size()); if (dataValues.size() < trainErrorDatasetSize) { LOG.log(Level.WARNING, "Number of samples is less than trainErrorDatasetSize = {0}", trainErrorDatasetSize); } synchronizer.globalBarrier(); }
Source:
private void checkFollowingUserStatus() { new CheckFollowingUserTask(this, user.getLogin()) { @Override protected void onSuccess(Boolean following) throws Exception { super.onSuccess(following); isFollowing = following; ViewUtils.setGone(loadingBar, true); setGone(false); } @Override protected void onException(Exception e) throws RuntimeException { super.onException(e); ToastUtils.show(UserViewActivity.this, string.error_checking_following_status); ViewUtils.setGone(loadingBar, true); } }.execute(); }

Target:
private void checkFollowingUserStatus() { followingStatusChecked = false; new CheckFollowingUserTask(this, user.getLogin()) { @Override protected void onSuccess(Boolean following) throws Exception { super.onSuccess(following); isFollowing = following; followingStatusChecked = true; ViewUtils.setGone(loadingBar, true); setGone(false); } @Override protected void onException(Exception e) throws RuntimeException { super.onException(e); ToastUtils.show(UserViewActivity.this, string.error_checking_following_status); ViewUtils.setGone(loadingBar, true); } }.execute(); }
Source:
public ParquetReader restoreReader( Configuration config, Path filePath, long splitOffset, long splitLength, CheckpointedPosition checkpointedPosition) throws IOException { ParquetReader reader = createReader(config, filePath, splitOffset, splitLength); reader.seek(checkpointedPosition.getOffset() + checkpointedPosition.getRecordsAfterOffset()); return reader; }

Target:
public ParquetReader restoreReader( Configuration config, Path filePath, long splitOffset, long splitLength, CheckpointedPosition checkpointedPosition) throws IOException { Preconditions.checkArgument( checkpointedPosition.getOffset() == CheckpointedPosition.NO_OFFSET, "The offset of CheckpointedPosition should always be NO_OFFSET"); ParquetReader reader = createReader(config, filePath, splitOffset, splitLength); reader.seek(checkpointedPosition.getRecordsAfterOffset()); return reader; }
Source:
public void transform(NodeType node) { for(Object om : node.getMetadata()){ MetadataType metadata = (MetadataType) om; for(Object oc : metadata.getColumn()){ ColumnType column = (ColumnType) oc; if(column.getType().equals("id_Date")) { if("true".equals(ComponentUtilities.getNodePropertyValue(node, name))){ column.setPattern("\"yyyy-MM-dd HH:mm:ss\""); } else if ("false".equals(ComponentUtilities.getNodePropertyValue(node, name))) { column.setPattern("\"dd-MM-yyyy\""); } } } } }

Target:
public void transform(NodeType node) { for(Object om : node.getMetadata()){ MetadataType metadata = (MetadataType) om; for(Object oc : metadata.getColumn()){ ColumnType column = (ColumnType) oc; if(column.getType().equals("id_Date")) { if("true".equals(ComponentUtilities.getNodePropertyValue(node, CHECK_BOX_NAME))){ column.setPattern("\"yyyy-MM-dd HH:mm:ss\""); } else if ("false".equals(ComponentUtilities.getNodePropertyValue(node, CHECK_BOX_NAME))) { column.setPattern("\"dd-MM-yyyy\""); } } } } }
Source:
public List<PlanNode> getSources() { return Collections.singletonList(source); }

Target:
public List<PlanNode> getSources() { return singletonList(source); }
Source:
private static void addFolderToZip(String path, String srcFolder, ZipOutputStream zip) throws IOException { File folder = new File(srcFolder); if (path.equals("")) { zip.putNextEntry(new ZipEntry(folder.getName() + File.separator)); } else { zip.putNextEntry(new ZipEntry(path + File.separator + folder.getName() + File.separator)); } for (String fileName : folder.list()) { if (path.equals("")) { addFileToZip(folder.getName(), srcFolder + File.separator + fileName, zip); } else { addFileToZip(path + File.separator + folder.getName(), srcFolder + File.separator + fileName, zip); } } }

Target:
private static void addFolderToZip(String path, String srcFolder, ZipOutputStream zip) throws IOException { File folder = new File(srcFolder); if (path.isEmpty()) { zip.putNextEntry(new ZipEntry(folder.getName() + File.separator)); } else { zip.putNextEntry(new ZipEntry(path + File.separator + folder.getName() + File.separator)); } for (String fileName : folder.list()) { if (path.isEmpty()) { addFileToZip(folder.getName(), srcFolder + File.separator + fileName, zip); } else { addFileToZip(path + File.separator + folder.getName(), srcFolder + File.separator + fileName, zip); } } }
Source:
private StorageDomain recoverStorageDomain(String sdUUID) { log.info("about to recover SD {}", sdUUID); StorageDomain storageDomain = new StorageDomain(); storageDomain.setId(sdUUID); updateStorageDomain(storageDomain); return storageDomain; }

Target:
private StorageDomain recoverStorageDomain(String sdUUID) { log.warn("about to recover SD {}", sdUUID); StorageDomain storageDomain = new StorageDomain(); storageDomain.setId(sdUUID); updateStorageDomain(storageDomain); return storageDomain; }
Source:
public Secret setSecret(String name, String value) { return client.setSecret(name, value, Context.NONE).block().value(); }

Target:
public Secret setSecret(String name, String value) { return client.setSecretWithResponse(name, value, Context.NONE).block().value(); }
Source:
private static void populatePartitionGroups(Integer hostId, VoltTable vt) { try { byte[] bytes = VoltDB.instance().getHostMessenger().getZK().getData(CoreZK.hosts_host + hostId, false, new Stat()); String hostInfo = new String(bytes, StandardCharsets.UTF_8); final JSONObject obj = new JSONObject(hostInfo); vt.addRow(hostId, "PLACEMENTGROUP",obj.getString("group")); Set<Integer> buddies = VoltDB.instance().getCartograhper().getHostIdsWithinPartitionGroup(hostId); vt.addRow(hostId, "PARTITIONGROUP",buddies.toString()); } catch (Exception e) { org.voltdb.VoltDB.crashLocalVoltDB("Error getting host info", false, e); } }

Target:
private static void populatePartitionGroups(Integer hostId, VoltTable vt) { try { byte[] bytes = VoltDB.instance().getHostMessenger().getZK().getData(CoreZK.hosts_host + hostId, false, new Stat()); String hostInfo = new String(bytes, StandardCharsets.UTF_8); JSONObject obj = new JSONObject(hostInfo); vt.addRow(hostId, "PLACEMENTGROUP",obj.getString("group")); } catch (KeeperException | InterruptedException | JSONException e) { vt.addRow(hostId, "PLACEMENTGROUP","NULL"); } Set<Integer> buddies = VoltDB.instance().getCartograhper().getHostIdsWithinPartitionGroup(hostId); String[] strIds = buddies.stream().sorted().map(i -> String.valueOf(i)).toArray(String[]::new); vt.addRow(hostId, "PARTITIONGROUP",String.join(",", strIds)); }
Source:
public void showMenuStep(Message<MenuItem> doneCallback, String textToShow, List<String> menuItems, String defaultValue) { doneCallback.send(new MenuItem("", 0)); }

Target:
public void showMenuStep(Message<MenuItem> doneCallback, String textToShow, List<String> menuItems, String defaultValue) { doneCallback.send(null); }
Source:
public void validateVector(TestVector vector) { final byte[] key = CryptoUtil.decodeHex(vector.key); final byte[] salt = vector.salt.isEmpty() ? null : CryptoUtil.decodeHex(vector.salt); final byte[] info = vector.info.isEmpty() ? null : CryptoUtil.decodeHex(vector.info); final byte[] expected = CryptoUtil.decodeHex(vector.expected); final byte[] actual = CryptoUtil.hkdf(key, salt, info, expected.length); Assert.assertEquals(actual, expected); }

Target:
public void validateVector(TestVector vector) { byte[] key = decodeHex(vector.key); byte[] salt = vector.salt.isEmpty() ? null : decodeHex(vector.salt); byte[] info = vector.info.isEmpty() ? null : decodeHex(vector.info); byte[] expected = decodeHex(vector.expected); byte[] actual = hkdf(key, salt, info, expected.length); Assert.assertEquals(actual, expected); }
Source:
public String evaluateTemplateString(String template) throws TaskHandlerException { String conversionTemplate = template; for (KeyInformation key : parseAll(template)) { Object value = getValue(key); if (value != null) { String stringValue = value.toString(); stringValue = manipulateValue(key.getManipulations(), stringValue); conversionTemplate = conversionTemplate.replace( String.format("{{%s}}", key.getOriginalKey()), stringValue ); } else { conversionTemplate = (String) value; } } return conversionTemplate; }

Target:
public String evaluateTemplateString(String template) throws TaskHandlerException { String conversionTemplate = template; for (KeyInformation key : parseAll(template)) { Object value = getValue(key); if (value != null) { String stringValue = value.toString(); stringValue = manipulateValue(key.getManipulations(), stringValue); conversionTemplate = conversionTemplate.replace( String.format("{{%s}}", key.getOriginalKey()), stringValue ); } else { conversionTemplate = null; } } return conversionTemplate; }
Source:
public void process(ClusterEvent event) throws Exception { WorkflowControllerDataProvider dataProvider = event.getAttribute(AttributeName.ControllerDataProvider.name()); event.addAttribute(AttributeName.WORKFLOW_CONFIG_MAP.name(), dataProvider.getWorkflowConfigMap()); event.addAttribute(AttributeName.RESOURCE_CONTEXT_MAP.name(), dataProvider.getContexts()); super.process(event); }

Target:
public void process(ClusterEvent event) throws Exception { HelixManager manager = event.getAttribute(AttributeName.helixmanager.name()); if (manager == null) { LOG.warn( "HelixManager is null for event {}({}) in cluster {}. Skip TaskGarbageCollectionStage.", event.getEventId(), event.getEventType(), event.getClusterName()); return; } Map<String, Set<String>> expiredJobsMap = new HashMap<>(); Set<String> workflowsToBePurged = new HashSet<>(); WorkflowControllerDataProvider dataProvider = event.getAttribute(AttributeName.ControllerDataProvider.name()); for (Map.Entry<String, ZNRecord> entry : dataProvider.getContexts().entrySet()) { WorkflowConfig workflowConfig = dataProvider.getWorkflowConfig(entry.getKey()); if (workflowConfig != null && (!workflowConfig.isTerminable() || workflowConfig .isJobQueue())) { WorkflowContext workflowContext = dataProvider.getWorkflowContext(entry.getKey()); long purgeInterval = workflowConfig.getJobPurgeInterval(); long currentTime = System.currentTimeMillis(); if (purgeInterval > 0 && workflowContext.getLastJobPurgeTime() + purgeInterval <= currentTime) { Set<String> expiredJobs = TaskUtil.getExpiredJobsFromCache(dataProvider, workflowConfig, workflowContext); if (!expiredJobs.isEmpty()) { expiredJobsMap.put(workflowConfig.getWorkflowId(), expiredJobs); } scheduleNextJobPurge(workflowConfig.getWorkflowId(), currentTime, purgeInterval, _rebalanceScheduler, manager); } } else if (workflowConfig == null && entry.getValue() != null && entry.getValue().getId() .equals(TaskUtil.WORKFLOW_CONTEXT_KW)) { workflowsToBePurged.add(entry.getKey()); } } event.addAttribute(AttributeName.TO_BE_PURGED_JOBS_MAP.name(), Collections.unmodifiableMap(expiredJobsMap)); event.addAttribute(AttributeName.TO_BE_PURGED_WORKFLOWS.name(), Collections.unmodifiableSet(workflowsToBePurged)); super.process(event); }
Source:
public List<FilterDescriptor> getFiltersDescriptorsByRole(final User user) throws DotDataException { if(APILocator.getUserAPI().isCMSAdmin(user)){ return new ArrayList<>(this.loadedFilters.values()); } final List<Role> roles = APILocator.getRoleAPI().loadRolesForUser(user.getUserId(), true); Logger.info(this,"User Roles: " + roles.toString()); final List<FilterDescriptor> filters = new ArrayList<>(); for(final Map.Entry<String,FilterDescriptor> filterDescriptorMap : this.loadedFilters.entrySet()){ final String filterRoles = filterDescriptorMap.getValue().getRoles(); Logger.info(PublisherAPI.class,"File: " +filterDescriptorMap.getKey() + " Roles: " + filterRoles ); for(final Role role : roles){ if(UtilMethods.isSet(role.getRoleKey()) && filterRoles.contains(role.getRoleKey())){ filters.add(filterDescriptorMap.getValue()); } } } return filters; }

Target:
public List<FilterDescriptor> getFiltersDescriptorsByRole(final User user) throws DotDataException { if(user.isAdmin()){ return new ArrayList<>(this.loadedFilters.values()); } final List<Role> roles = APILocator.getRoleAPI().loadRolesForUser(user.getUserId(), true); Logger.info(this,"User Roles: " + roles.toString()); final List<FilterDescriptor> filters = new ArrayList<>(); for(final Map.Entry<String,FilterDescriptor> filterDescriptorMap : this.loadedFilters.entrySet()){ final String filterRoles = filterDescriptorMap.getValue().getRoles(); Logger.info(PublisherAPI.class,"File: " +filterDescriptorMap.getKey() + " Roles: " + filterRoles ); for(final Role role : roles){ if(UtilMethods.isSet(role.getRoleKey()) && filterRoles.contains(role.getRoleKey())){ filters.add(filterDescriptorMap.getValue()); } } } return filters; }
Source:
public View getView(int position, View view, ViewGroup parent){ if(view == null){ view = mInflater.inflate(R.layout.calendar_date, null); } TextView text = (TextView) view; Date date = getItem(position); text.setText(String.valueOf(date.getDate())); Date current = calendar.getTime(); if(date.equals(current)){ text.setTextColor(getResources().getColor(R.color.white)); text.setBackgroundColor(getResources().getColor(R.color.cc_attention_positive_color)); } else if(date.getMonth() != current.getMonth()){ text.setTextColor(getResources().getColor(R.color.grey_dark)); text.setBackgroundColor(getResources().getColor(R.color.grey_lighter)); } else{ text.setTextColor(getResources().getColor(R.color.black)); text.setBackgroundColor(getResources().getColor(R.color.transparent)); } return text; }

Target:
public View getView(int position, View view, ViewGroup parent){ if(view == null){ view = mInflater.inflate(R.layout.calendar_date, null); } TextView text = (TextView) view; Date date = getItem(position); Calendar gridPopulator = (Calendar) calendar.clone(); gridPopulator.setTime(date); text.setText(String.valueOf(gridPopulator.get(Calendar.DAY_OF_MONTH))); Date current = calendar.getTime(); highlightCalendarGridCell(text, gridPopulator, calendar); return text; }
Source:
public void run() throws Exception { for (int i = 0; i < (Integer)argModuleMap.get("iterations"); i++) { log.info("Interation: {}", i); action.execute(this); } }

Target:
public void run() throws Exception { for (int i = 0; i < (Integer)argModuleMap.get("iterations"); i++) { log.info("Iterations: {}", i); action.execute(this); } }
Source:
private MoodManager(XMPPConnection connection) { super(connection); PEPManager.getInstanceFor(connection).addPEPListener(new PEPListener() { @Override public void eventReceived(final EntityBareJid from, final EventElement event, Message message) { if (MOOD_NODE.equals(event.getEvent().getNode())) { final BareJid contact = from.asBareJid(); Async.go(new Runnable() { @Override public void run() { ItemsExtension items = (ItemsExtension) event.getExtensions().get(0); PayloadItem<?> payload = (PayloadItem) items.getItems().get(0); MoodElement mood = (MoodElement) payload.getPayload(); for (MoodListener listener : moodListeners) { listener.onMoodUpdated(contact, mood); } } }, "MoodListener"); } } }); ServiceDiscoveryManager.getInstanceFor(connection).addFeature(MOOD_NOTIFY); }

Target:
private MoodManager(XMPPConnection connection) { super(connection); ServiceDiscoveryManager.getInstanceFor(connection).addFeature(MOOD_NOTIFY); PepManager.getInstanceFor(connection).addPepListener(new PepListener() { @Override public void eventReceived(final EntityBareJid from, final EventElement event, final Message message) { if (!MOOD_NODE.equals(event.getEvent().getNode())) { return; } final BareJid contact = from.asBareJid(); asyncButOrdered.performAsyncButOrdered(contact, new Runnable() { @Override public void run() { ItemsExtension items = (ItemsExtension) event.getExtensions().get(0); PayloadItem<?> payload = (PayloadItem) items.getItems().get(0); MoodElement mood = (MoodElement) payload.getPayload(); for (MoodListener listener : moodListeners) { listener.onMoodUpdated(contact, message, mood); } } }); } }); }
Source:
public void pidFileDeletedOnExit() throws Exception { TestUtils.SwarmClientProcessWrapper node = TestUtils.runSwarmClient( "agentDeletePid", j, processDestroyer, temporaryFolder, "-pidFile", getPidFile().getAbsolutePath()); Thread.sleep(1000); assertTrue("Pid file created", getPidFile().exists()); node.process.destroy(); node.process.waitFor(5, TimeUnit.SECONDS); assertFalse("Client should exit on kill", node.process.isAlive()); assertFalse("Pid file removed", getPidFile().exists()); }

Target:
public void pidFileDeletedOnExit() throws Exception { Assume.assumeFalse( "TODO The PID file doesn't seem to be deleted on exit on Windows", Functions.isWindows()); File pidFile = getPidFile(); TestUtils.SwarmClientProcessWrapper node = TestUtils.runSwarmClient( "agentDeletePid", j, processDestroyer, temporaryFolder, "-pidFile", pidFile.getAbsolutePath()); while (!pidFile.exists()) { Thread.sleep(1000); } assertTrue("PID file created", pidFile.exists()); node.process.destroy(); node.process.waitFor(); assertFalse("Client should exit on kill", node.process.isAlive()); assertFalse("PID file removed", pidFile.exists()); }
Source:
public void recordAdjustment(long adjustmentUnits) { if (adjustmentUnits > 0) { rateLimiter.steal(adjustmentUnits); } else { try { rateLimiter.returnPermits(LongMath.checkedMultiply(adjustmentUnits, -1), stopwatch.readNanos()); } catch (ArithmeticException e) { rateLimiter.returnPermits(Long.MAX_VALUE, stopwatch.readNanos()); } } }

Target:
public void recordAdjustment(long adjustmentUnits) { if (adjustmentUnits > 0) { rateLimiter.steal(adjustmentUnits); } else if (adjustmentUnits < 0) { rateLimiter.returnPermits(safeNegative(adjustmentUnits)); } }
Source:
public void refreshNotationStructure() { if (hostView != null) { removeUnappliedStereotypes(comment); if (stereoList.size() != 0) { refreshStereotypeCommentStructure(); } } }

Target:
public void refreshNotationStructure() { if (hostView != null) { removeUnappliedStereotypes(comment); if (!stereotypeList.isEmpty()) { refreshStereotypeCommentStructure(); } } }
Source:
protected String checkModifyWhitelist(final CatalogType suspect, final CatalogType prevType, final String field) { if (suspect instanceof Cluster || suspect instanceof PlanFragment || suspect instanceof MaterializedViewInfo) { return null; } else if (suspect instanceof Table) { if ("isdred".equalsIgnoreCase(field)) { assert ((Boolean)suspect.getField("isDRed")); return "Table " + suspect.getTypeName() + " has DR enabled on the master but not the replica"; } if ("estimatedtuplecount".equals(field)) { return null; } if ("tuplelimit".equals(field)) { return null; } } else if (suspect instanceof Database) { if ("isActiveActiveDRed".equalsIgnoreCase(field)) { return "Incompatible DR modes between two clusters"; } if ("schema".equalsIgnoreCase(field) || "securityprovider".equalsIgnoreCase(field)) { return null; } } else if (suspect instanceof Column) { if ("defaultvalue".equals(field) || "defaulttype".equals(field) || "matview".equals(field) || "aggregatetype".equals(field) || "matviewsource".equals(field)) { return null; } } else if (isTableLimitDeleteStmt(suspect)) { return null; } else if ((suspect instanceof Index && isUniqueIndex(suspect) == isUniqueIndex(prevType)) || (suspect instanceof ColumnRef && !isUniqueIndexColumn(suspect))) { return null; } else if (suspect instanceof TableRef) { return null; } return "Incompatible schema between master and replica: field " + field + " in schema object " + suspect; }

Target:
protected String checkModifyWhitelist(final CatalogType suspect, final CatalogType prevType, final String field) { if (suspect instanceof Cluster || suspect instanceof PlanFragment || suspect instanceof MaterializedViewInfo) { return null; } else if (suspect instanceof Table) { if ("isdred".equalsIgnoreCase(field)) { assert ((Boolean)suspect.getField("isDRed")); return "Table " + suspect.getTypeName() + " has DR enabled on the master but not the replica"; } if ("estimatedtuplecount".equals(field)) { return null; } if ("tuplelimit".equals(field)) { return null; } } else if (suspect instanceof Database) { if ("isActiveActiveDRed".equalsIgnoreCase(field)) { return "Incompatible DR modes between two clusters"; } if ("schema".equalsIgnoreCase(field) || "securityprovider".equalsIgnoreCase(field)) { return null; } } else if (suspect instanceof Column) { if ("defaultvalue".equals(field) || "defaulttype".equals(field) || "matview".equals(field) || "aggregatetype".equals(field) || "matviewsource".equals(field)) { return null; } } else if (isTableLimitDeleteStmt(suspect)) { return null; } else if ((suspect instanceof Index && isUniqueIndex(suspect) == isUniqueIndex(prevType)) || (suspect instanceof ColumnRef && !isUniqueIndexColumn(suspect))) { return null; } return "Incompatible schema between master and replica: field " + field + " in schema object " + suspect; }
Source:
public CTFClock parse(CommonTree clock, ICommonTreeParserParameter unused) throws ParseException { List<CommonTree> children = clock.getChildren(); CTFClock ctfClock = new CTFClock(); for (CommonTree child : children) { final String key = child.getChild(0).getChild(0).getChild(0).getText(); final CommonTree value = (CommonTree) child.getChild(1).getChild(0).getChild(0); final int type = value.getType(); final String text = value.getText(); switch (type) { case CTFParser.INTEGER: case CTFParser.DECIMAL_LITERAL: Long numValue; try { numValue = Long.parseLong(text); } catch (NumberFormatException e) { Activator.log("Number conversion issue with " + text + ". Assigning " + key + " = 0."); numValue = Long.valueOf(0L); } ctfClock.addAttribute(key, numValue); break; default: ctfClock.addAttribute(key, text); } } return ctfClock; }

Target:
public CTFClock parse(CommonTree clock, ICommonTreeParserParameter unused) throws ParseException { List<CommonTree> children = clock.getChildren(); CTFClock ctfClock = new CTFClock(); for (CommonTree child : children) { final String key = child.getChild(0).getChild(0).getChild(0).getText(); final CommonTree value = (CommonTree) child.getChild(1).getChild(0).getChild(0); final int type = value.getType(); final String text = value.getText(); switch (type) { case CTFParser.INTEGER: case CTFParser.DECIMAL_LITERAL: Long numValue; try { numValue = Long.parseLong(text); } catch (NumberFormatException e) { Activator.log(IStatus.WARNING, "Number conversion issue with " + text + ". Assigning " + key + " = 0."); numValue = Long.valueOf(0L); } ctfClock.addAttribute(key, numValue); break; default: ctfClock.addAttribute(key, text); } } return ctfClock; }
Source:
private Collection<String> upstreamPaths(Map<String, Collection<String>> serviceToUpstreams) { Collection<String> allUpstreamPaths = new ArrayList<>(); for (Entry<String, Collection<String>> entry : serviceToUpstreams.entrySet()) { String servicePath = ZKPaths.makePath(SERVICES_FORMAT, entry.getKey()); for (String upstream : entry.getValue()) { String upstreamPath = ZKPaths.makePath(servicePath, upstream); allUpstreamPaths.add(upstreamPath); } } return allUpstreamPaths; }

Target:
private Collection<String> upstreamPaths(Map<String, Collection<String>> serviceToUpstreams) { Collection<String> allUpstreamPaths = new ArrayList<>(); for (Entry<String, Collection<String>> entry : serviceToUpstreams.entrySet()) { for (String upstream : entry.getValue()) { allUpstreamPaths.add(String.format(UPSTREAM_FORMAT, entry.getKey(), upstream)); } } return allUpstreamPaths; }
Source:
public void testPartialResults() throws Exception { byte[] key1 = randomBytes(8); byte[] key2 = randomBytes(8); FlatRow response1 = FlatRow .newBuilder().withRowKey(ByteString.copyFrom(key1)).addCell(new Cell("cf", ByteString.EMPTY, 10, ByteString.copyFromUtf8("hi!"), new ArrayList<String>())) .build(); RuntimeException exception = new RuntimeException("Something bad happened"); when(mockBulkRead.add(any(ReadRowsRequest.class))) .thenReturn(Futures.immediateFuture(response1)) .thenReturn(Futures.<FlatRow> immediateFailedFuture(exception)); List<Get> gets = Arrays.asList(new Get(key1), new Get(key2)); Object[] results = new Object[2]; try { final BigtableOptions options = BigtableOptions.builder() .setProjectId("projectId") .setInstanceId("instanceId") .build(); createExecutor(options).batch(gets, results); } catch(RetriesExhaustedWithDetailsException ignored) { } Assert.assertTrue("first result is a result", results[0] instanceof Result); Assert.assertTrue(Bytes.equals(((Result)results[0]).getRow(), key1)); Assert.assertEquals(exception, results[1]); }

Target:
public void testPartialResults() throws Exception { byte[] key1 = randomBytes(8); byte[] key2 = randomBytes(8); FlatRow response1 = FlatRow .newBuilder().withRowKey(ByteString.copyFrom(key1)).addCell(new Cell("cf", ByteString.EMPTY, 10, ByteString.copyFromUtf8("hi!"), new ArrayList<String>())) .build(); RuntimeException exception = new RuntimeException("Something bad happened"); when(mockBulkRead.add(any(ReadRowsRequest.class))) .thenReturn(Futures.immediateFuture(response1)) .thenReturn(Futures.<FlatRow> immediateFailedFuture(exception)); List<Get> gets = Arrays.asList(new Get(key1), new Get(key2)); Object[] results = new Object[2]; try { createExecutor(options).batch(gets, results); } catch(RetriesExhaustedWithDetailsException ignored) { } Assert.assertTrue("first result is a result", results[0] instanceof Result); Assert.assertTrue(Bytes.equals(((Result)results[0]).getRow(), key1)); Assert.assertEquals(exception, results[1]); }
Source:
public String[] getPropertyNames(Object object) { Assert.isLegal(object instanceof EObject); EClass eClass = ((EObject) object).eClass(); String[] propNames = eClass.getEStructuralFeatures().stream().map(f -> f.getName()).toArray(String[]::new); return propNames; }

Target:
public String[] getPropertyNames(Object object) { Assert.isLegal(object instanceof EObject); EClass eClass = ((EObject) object).eClass(); String[] propNames = eClass.getEAllStructuralFeatures().stream().map(f -> f.getName()).toArray(String[]::new); return propNames; }
Source:
public void onClick(DialogInterface dialog, int which) { selectItem(which); dialog.dismiss(); }

Target:
public void onClick(DialogInterface dialog, int which) { checkedItemIndex = which; selectedItem = items.get(which); select(selectedItem); dialog.dismiss(); }
Source:
public void clickViewPhotoLink(int panelBodyIndex, String urlRegex) throws Exception { String idOfPanelBody = "panelBodyCollapse-" + panelBodyIndex; WebElement photoCell = browser.driver.findElement(By.id(idOfPanelBody)) .findElements(By.cssSelector(".profile-pic-icon-click")) .get(0); JavascriptExecutor jsExecutor = (JavascriptExecutor) browser.driver; jsExecutor.executeScript("document.getElementById('" + idOfPanelBody + "')" + ".getElementsByClassName('profile-pic-icon-click')[0]" + ".getElementsByTagName('a')[0].click();"); Actions actions = new Actions(browser.driver); actions.moveToElement(photoCell).build().perform(); waitForElementToAppear(By.cssSelector(".popover-content > img")); AssertHelper.assertContainsRegex(urlRegex, browser.driver.findElements(By.cssSelector(".popover-content > img")) .get(browser.driver.findElements(By.cssSelector(".popover-content > img")) .size() - 1) .getAttribute("src")); actions.moveByOffset(100, 100).click().build().perform(); }

Target:
public void clickViewPhotoLink(int panelBodyIndex, String urlRegex) throws Exception { String idOfPanelBody = "panelBodyCollapse-" + panelBodyIndex; WebElement photoCell = browser.driver.findElement(By.id(idOfPanelBody)) .findElements(By.cssSelector(".profile-pic-icon-click")) .get(0); JavascriptExecutor jsExecutor = (JavascriptExecutor) browser.driver; jsExecutor.executeScript("document.getElementById('" + idOfPanelBody + "')" + ".getElementsByClassName('profile-pic-icon-click')[0]" + ".getElementsByTagName('a')[0].click();"); Actions actions = new Actions(browser.driver); actions.moveToElement(photoCell).build().perform(); waitForElementToAppear(By.cssSelector(".popover-content > img")); List<WebElement> photos = browser.driver.findElements(By.cssSelector(".popover-content > img")); AssertHelper.assertContainsRegex(urlRegex, photos.get(photos.size() - 1).getAttribute("src")); actions.moveByOffset(100, 100).click().build().perform(); }
Source:
public ZoomLevelSelectorPresenter show() { cancelHide(); floatingView.show(); if(zoomLevelInit){ zoomLevelInit = false; scheduleHide(); } return this; }

Target:
public ZoomLevelSelectorPresenter show() { if (zoomLevelInit) { zoomLevelInit = false; } else { cancelHide(); floatingView.show(); } return this; }
Source:
private void enableHook() { if (getEntity() == null || getSelectedItems() == null || getSelectedItems().size() == 0) { return; } ArrayList<VdcActionParametersBase> list = new java.util.ArrayList<VdcActionParametersBase>(); for (Object item : getSelectedItems()) { GlusterHookEntity hook = (GlusterHookEntity) item; list.add(new GlusterHookParameters(getEntity().getId(), hook.getId())); } Frontend.RunMultipleAction(VdcActionType.EnableGlusterHook, list); }

Target:
private void enableHook() { if (getEntity() == null || getSelectedItems() == null || getSelectedItems().size() == 0) { return; } ArrayList<VdcActionParametersBase> list = new ArrayList<VdcActionParametersBase>(); for (Object item : getSelectedItems()) { GlusterHookEntity hook = (GlusterHookEntity) item; list.add(new GlusterHookParameters(getEntity().getId(), hook.getId())); } Frontend.RunMultipleAction(VdcActionType.EnableGlusterHook, list); }
Source:
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { try { String sampleParam = (String) workItem.getParameter("SampleParam"); String sampleParamTwo = (String) workItem.getParameter("SampleParamTwo"); manager.completeWorkItem(workItem.getId(), null); } catch(Throwable cause) { handleException(cause); } }

Target:
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { try { String sampleParam = (String) workItem.getParameter("SampleParam"); String sampleParamTwo = (String) workItem.getParameter("SampleParamTwo"); String sampleResult = "sample result"; Map<String, Object> results = new HashMap<String, Object>(); results.put("SampleResult", sampleResult); manager.completeWorkItem(workItem.getId(), results); } catch(Throwable cause) { handleException(cause); } }
Source:
public boolean equals(Object o) { if (o instanceof ColumnFamilyAndQuantifier) { ColumnFamilyAndQuantifier other = (ColumnFamilyAndQuantifier) o; if (family.length != other.family.length || qualifier.length != other.qualifier.length) return false; for (int i = 0; i < family.length; i++) if (family[i] != other.family[i]) return false; for (int i = 0; i < qualifier.length; i++) if (qualifier[i] != other.qualifier[i]) return false; return true; } return false; }

Target:
public boolean equals(Object o) { if (o instanceof ColumnFamilyAndQuantifier) { ColumnFamilyAndQuantifier other = (ColumnFamilyAndQuantifier) o; if (family.length != other.family.length || qualifier.length != other.qualifier.length) return false; return (Arrays.equals(family, other.family) && Arrays.equals(qualifier, other.qualifier)); } return false; }