id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
25,101 | }
public B on(EventType type, EventListener listener) {
assertCurrent();
Element element = elements.peek().element;
type.register(element, listener);
<BUG>return (B) this;
}</BUG>
public B rememberAs(String id) {
assertCurrent();
references.put(id, elements.peek().element);
| public B attr(String name, String value) {
elements.peek().element.setAttribute(name, value);
return that();
|
25,102 | import org.jfree.util.Log;
import org.json.JSONObject;
import org.pentaho.agilebi.modeler.ModelerException;
import org.pentaho.agilebi.modeler.ModelerPerspective;
import org.pentaho.agilebi.modeler.ModelerWorkspace;
<BUG>import org.pentaho.agilebi.modeler.util.ISpoonModelerSource;
import org.pentaho.database.model.Data... | import org.pentaho.database.IDatabaseDialect;
import org.pentaho.database.model.IDatabaseType;
import org.pentaho.database.service.DatabaseDialectService;
import org.pentaho.database.util.DatabaseTypeHelper;
import org.pentaho.di.core.Const;
|
25,103 | return PublisherUtil.FILE_EXISTS;
}
}
}
String DEFAULT_PUBLISH_URL = biServerConnection.getUrl() + REPO_FILES_IMPORT; //$NON-NLS-1$
<BUG>int result = 3;
WebResource resource = client.resource(DEFAULT_PUBLISH_URL);</BUG>
try {
for (File fileIS : files) {
InputStream in = new FileInputStream(fileIS);
| int result = ModelServerPublish.PUBLISH_SUCCESS;
WebResource resource = client.resource(DEFAULT_PUBLISH_URL);
|
25,104 | try {
for (File fileIS : files) {
InputStream in = new FileInputStream(fileIS);
FormDataMultiPart part = new FormDataMultiPart();
part.field("importDir", repositoryPath, MediaType.MULTIPART_FORM_DATA_TYPE)
<BUG>.field("fileUpload", in, MediaType.MULTIPART_FORM_DATA_TYPE);
part.getField("fileUpload").setContentDispositi... | .field("fileUpload", in, MediaType.MULTIPART_FORM_DATA_TYPE)
.field("overwriteFile",String.valueOf(overwrite),MediaType.MULTIPART_FORM_DATA_TYPE);
part.getField("fileUpload").setContentDisposition(
|
25,105 | FormDataContentDisposition.name("fileUpload")
.fileName(fileIS.getName()).build());
Builder builder = resource
.type(MediaType.MULTIPART_FORM_DATA)
.accept(MediaType.TEXT_HTML_TYPE);
<BUG>String response = builder.post(String.class, part);
System.out.println(response);
if(response != null && response.indexOf("Successfu... | ClientResponse response = builder.post(ClientResponse.class, part);
if(response != null && response.getStatus() == 200){
Log.info(response.getEntity(String.class));
} else {
result = ModelServerPublish.PUBLISH_FAILED;
|
25,106 | public int publishMondrainSchema(InputStream mondrianFile, String catalogName, String datasourceInfo,
boolean overwriteInRepos) throws Exception {
String storeDomainUrl = biServerConnection.getUrl() + MONDRIAN_POST_ANALYSIS_URL;
WebResource resource = client.resource(storeDomainUrl);
String parms = "Datasource=" + data... | int response = ModelServerPublish.PUBLISH_FAILED;
FormDataMultiPart part = new FormDataMultiPart();
|
25,107 | }
public String publishMetaDataFile(InputStream metadataFile, String domainId) throws Exception {
</BUG>
String storeDomainUrl = biServerConnection.getUrl() + "plugin/data-access/api/metadata/import";
WebResource resource = client.resource(storeDomainUrl);
<BUG>String response = "ERROR";
FormDataMultiPart part = new Fo... | } catch (Exception ex) {
Log.error(ex.getMessage());
return response;
public int publishMetaDataFile(InputStream metadataFile, String domainId) throws Exception {
int response = ModelServerPublish.PUBLISH_FAILED;
FormDataMultiPart part = new FormDataMultiPart();
|
25,108 | .field("metadataFile", metadataFile, MediaType.MULTIPART_FORM_DATA_TYPE);
part.getField("metadataFile").setContentDisposition(
FormDataContentDisposition.name("metadataFile")
.fileName(domainId).build());
try {
<BUG>response = resource
.type(MediaType.MULTIPART_FORM_DATA_TYPE)
.put(String.class, part);
} catch (Excepti... | ClientResponse resp = resource
.put(ClientResponse.class, part);
if(resp != null && resp.getStatus() == 200){
response = ModelServerPublish.PUBLISH_SUCCESS;
Log.error(ex.getMessage());
|
25,109 | int result = publishOlapSchemaToServer(schemaName, jndiName, modelName, selectedPath, overwriteInRepository,
showFeedback, isExistentDatasource, publishModelFileName);
if (result == ModelServerPublish.PUBLISH_SUCCESS) {
publishMetaDatafile(publishModelFileName, modelName +EXTENSION_XMI);
}
<BUG>}
public void publishPrp... | @Deprecated
public void publishPrptToServer(String theXmiPublishingPath, String thePrptPublishingPath, boolean publishDatasource,
|
25,110 | return true;
}
}
}
} catch (Exception e) {
<BUG>e.printStackTrace();
}</BUG>
return false;
}
public boolean checkDataSource(boolean autoMode) throws KettleDatabaseException, ConnectionServiceException {
| Log.error(e.getMessage(),e);
|
25,111 | import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface UserACPbRepo extends JpaRepository<UserACPb, Long> {
@Override
List<UserACPb> findAll();
<BUG>List<UserACPb> findByUser(User user);
@Override</BUG>
<S extends UserACPb> List<S> save(Iterable<S> iterable);
@Override
<S ... | List<UserACPb> findByUserAndOjName(User user, OJType ojName);
|
25,112 | List<User> users = userService.allNormalNotNullUsers();
List<Integer> uvaids = users.stream().map(User::getUvaId).collect(Collectors.toList());
model.addAttribute("users", users);
model.addAttribute("cfInfoMap", cfbcService.getCFUserInfoMap());
model.addAttribute("bcInfoMap", cfbcService.getBCUserInfoMap());
<BUG>model... | [DELETED] |
25,113 | if(user == null || !user.isAdmin())
return "没有权限操作!";
if(!uhuntUpdateStatus.canUpdate())
return "正在更新,或者刚刚更新完毕,请稍后再试...";
uhuntUpdateStatus.preUpdate();
<BUG>uVaService.flushUVaSubmit();</BUG>
cfbcService.flushCFUserInfo();
cfbcService.flushBCUserInfo();
uhuntUpdateStatus.afterUpdate();
return "恭喜,更新完毕!";
}
}
| [DELETED] |
25,114 | return success;
}
private boolean tryResolveBreakpoint(BreakAction b, StringBuilder sb) throws AmbiguousException {
int status = b.getStatus();
boolean resolved = (status == BreakAction.RESOLVED);
<BUG>if (status == BreakAction.UNRESOLVED || resolved) // we don't do anything for AMBIGUOUS
{</BUG>
try {
waitTilHalted(m_... | if (status == BreakAction.UNRESOLVED) // we don't do anything for AMBIGUOUS
|
25,115 | SourceFile file = (l != null) ? l.getFile() : null;
String funcName = (file == null) ? null : file.getFunctionNameForLine(m_session, l.getLine());
Map<String, Object> args = new HashMap<String, Object>();
String formatString;
args.put("breakpointNumber", Integer.toString(b.getId())); //$NON-NLS-1$
<BUG>String filename ... | String filename = file != null ? file.getName() : null;
|
25,116 | </BUG>
if (b.isSingleSwf() && file != null) {
filename = filename + "#" + file.getId(); //$NON-NLS-1$
}
args.put("file", filename); //$NON-NLS-1$
<BUG>args.put("line", new Integer(l.getLine())); //$NON-NLS-1$
</BUG>
if (funcName != null) {
args.put("functionName", funcName); //$NON-NLS-1$
formatString = "resolvedBreakp... | SourceFile file = (l != null) ? l.getFile() : null;
String funcName = (file == null) ? null : file.getFunctionNameForLine(m_session, l.getLine());
Map<String, Object> args = new HashMap<String, Object>();
String formatString;
args.put("breakpointNumber", Integer.toString(b.getId())); //$NON-NLS-1$
String filename = fil... |
25,117 | formatString = "resolvedBreakpointToFile"; //$NON-NLS-1$
}
sb.append(getLocalizationManager().getLocalizedTextString(formatString, args));
sb.append(m_newline);
sb.append(m_newline);
<BUG>resolved |= true;
}</BUG>
}
} catch (NotConnectedException e) {
} catch (NoMatchException e) {
| resolved = true;
|
25,118 | if (name.equals(match))
{
exactHitAt = i;
break;
}
<BUG>else if (doStartsWith && name.startsWith(match))
fileList.add(sourceFile);
else if (doEndsWith && name.endsWith(match))
fileList.add(sourceFile);
else if (doIndexOf && name.indexOf(match) > -1)
fileList.add(sourceFile);</BUG>
}
| else if (doStartsWith && name.startsWith(match) && !isDuplicated(fileList, sourceFile))
else if (doEndsWith && name.endsWith(match) && !isDuplicated(fileList, sourceFile))
else if (doIndexOf && name.contains(match) && !isDuplicated(fileList, sourceFile))
|
25,119 | timeWarp = new OwnLabel(getFormattedTimeWrap(), skin, "warp");
timeWarp.setName("time warp");
Container wrapWrapper = new Container(timeWarp);
wrapWrapper.width(60f * GlobalConf.SCALE_FACTOR);
wrapWrapper.align(Align.center);
<BUG>VerticalGroup timeGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCAL... | VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
|
25,120 | focusListScrollPane.setFadeScrollBars(false);
focusListScrollPane.setScrollingDisabled(true, false);
focusListScrollPane.setHeight(tree ? 200 * GlobalConf.SCALE_FACTOR : 100 * GlobalConf.SCALE_FACTOR);
focusListScrollPane.setWidth(160);
}
<BUG>VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).space(3 *... | VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
|
25,121 | headerGroup.addActor(expandIcon);
headerGroup.addActor(detachIcon);
addActor(headerGroup);
expandIcon.setChecked(expanded);
}
<BUG>public void expand() {
</BUG>
if (!expandIcon.isChecked()) {
expandIcon.setChecked(true);
}
| public void expandPane() {
|
25,122 | </BUG>
if (!expandIcon.isChecked()) {
expandIcon.setChecked(true);
}
}
<BUG>public void collapse() {
</BUG>
if (expandIcon.isChecked()) {
expandIcon.setChecked(false);
}
| headerGroup.addActor(expandIcon);
headerGroup.addActor(detachIcon);
addActor(headerGroup);
expandIcon.setChecked(expanded);
public void expandPane() {
public void collapsePane() {
|
25,123 | });
playstop.addListener(new TextTooltip(txt("gui.tooltip.playstop"), skin));
TimeComponent timeComponent = new TimeComponent(skin, ui);
timeComponent.initialize();
CollapsiblePane time = new CollapsiblePane(ui, txt("gui.time"), timeComponent.getActor(), skin, true, playstop);
<BUG>time.align(Align.left);
mainActors.ad... | time.align(Align.left).columnAlign(Align.left);
mainActors.add(time);
|
25,124 | panes.put(visualEffectsComponent.getClass().getSimpleName(), visualEffects);
ObjectsComponent objectsComponent = new ObjectsComponent(skin, ui);
objectsComponent.setSceneGraph(sg);
objectsComponent.initialize();
CollapsiblePane objects = new CollapsiblePane(ui, txt("gui.objects"), objectsComponent.getActor(), skin, fal... | objects.align(Align.left).columnAlign(Align.left);
mainActors.add(objects);
|
25,125 | if (Constants.desktop) {
MusicComponent musicComponent = new MusicComponent(skin, ui);
musicComponent.initialize();
Actor[] musicActors = MusicActorsManager.getMusicActors() != null ? MusicActorsManager.getMusicActors().getActors(skin) : null;
CollapsiblePane music = new CollapsiblePane(ui, txt("gui.music"), musicCompo... | music.align(Align.left).columnAlign(Align.left);
mainActors.add(music);
|
25,126 | final TypeSpec deleteEndClass = buildDeleteEndClass(signature, lastSignature, hasCounter);
partitionKeysWhereClasses.addAll(clusteringColsWhereClasses);
partitionKeysWhereClasses.add(deleteEndClass);
return partitionKeysWhereClasses;
}
<BUG>default List<TypeSpec> buildWhereClassesForStatic(EntityMetaSignature signature... | public List<TypeSpec> buildWhereClassesForStatic(EntityMetaSignature signature) {
|
25,127 | final List<TypeSpec> partitionKeysWhereClasses = buildWhereClassesForPartitionKeys(partitionKeys, classesSignature, false);
final TypeSpec deleteEndClass = buildDeleteEndClass(signature, lastSignature, hasCounter);
partitionKeysWhereClasses.add(deleteEndClass);
return partitionKeysWhereClasses;
}
<BUG>default TypeSpec ... | public TypeSpec buildDeleteEndClass(EntityMetaSignature signature,
|
25,128 | classesSignature, hasClusterings);
typeSpecs.add(0, typeSpec);
return typeSpecs;
}
}
<BUG>default TypeSpec buildDeleteWhereForPartitionKey(FieldSignatureInfo partitionInfo,
</BUG>
ClassSignatureInfo classSignature,
ClassSignatureInfo nextSignature,
boolean hasClusterings) {
| public TypeSpec buildDeleteWhereForPartitionKey(FieldSignatureInfo partitionInfo,
|
25,129 | final List<TypeSpec> typeSpecs = buildWhereClassesForClusteringColumns(clusteringCols, classesSignature);
typeSpecs.add(0, currentType);
return typeSpecs;
}
}
<BUG>default TypeSpec buildDeleteWhereForClusteringColumn(FieldSignatureInfo clusteringColumnInfo,
</BUG>
ClassSignatureInfo classSignature,
ClassSignatureInfo n... | public TypeSpec buildDeleteWhereForClusteringColumn(FieldSignatureInfo clusteringColumnInfo,
|
25,130 | builder.addMethod(buildAllColumns(deleteFromTypeName, DELETE_WHERE, "delete"));
builder.addMethod(buildAllColumnsWithSchemaProvider(deleteFromTypeName, DELETE_WHERE, "delete"));
deleteWhereDSLCodeGen.buildWhereClasses(signature).forEach(builder::addType);
return builder.build();
}
<BUG>default TypeSpec buildDeleteStati... | public TypeSpec buildDeleteStaticClass(EntityMetaSignature signature, DeleteWhereDSLCodeGen deleteWhereDSLCodeGen) {
|
25,131 | .addParameter(metaClassType, "meta")
.addStatement("super(rte)")
.addStatement("this.meta = meta")
.build();
}
<BUG>default TypeSpec buildDeleteColumns(EntityMetaSignature signature,
</BUG>
String deleteColumnClass,
TypeName deleteColumnsTypeName,
TypeName deleteFromTypeName,
| public TypeSpec buildDeleteColumns(EntityMetaSignature signature,
|
25,132 | .forEach(x -> builder.addMethod(buildDeleteColumnMethod(deleteColumnsTypeName, x, ReturnType.THIS)));
builder.addMethod(buildFrom(deleteFromTypeName, DELETE_WHERE, "deleteColumns"));
builder.addMethod(buildFromWithSchemaProvider(deleteFromTypeName, DELETE_WHERE, "deleteColumns"));
return builder.build();
}
<BUG>default... | public TypeSpec buildDeleteFrom(EntityMetaSignature signature,
|
25,133 | .addStatement("return new $T(where)", deleteWhereTypeName)
.returns(deleteWhereTypeName)
.build())
.build();
}
<BUG>default MethodSpec buildDeleteColumnMethod(TypeName deleteTypeName, FieldMetaSignature parsingResult, ReturnType returnType) {
</BUG>
final MethodSpec.Builder builder = MethodSpec.methodBuilder(parsingRes... | public MethodSpec buildDeleteColumnMethod(TypeName deleteTypeName, FieldMetaSignature parsingResult, ReturnType returnType) {
|
25,134 | final ClassName abstractEndType = classSignatureParams.abstractEndType.orElse(classSignatureParams.abstractWhereType);
signatures.add(ClassSignatureInfo.of(endTypeName, endReturnTypeName, genericType(abstractEndType, endReturnTypeName, signature.entityRawClass),
endClassName));
return signatures;
}
<BUG>default MethodS... | public MethodSpec buildWhereConstructor(TypeName whereType) {
|
25,135 | .addModifiers(Modifier.PUBLIC)
.addParameter(whereType, "where")
.addStatement("super(where)")
.build();
}
<BUG>default MethodSpec buildColumnRelation(String relation, TypeName nextType, FieldSignatureInfo fieldInfo) {
final String methodName = fieldInfo.fieldName + "_" + upperCaseFirst(relation);
final MethodSpec.Bu... | public MethodSpec buildColumnRelation(String relation, TypeName nextType, FieldSignatureInfo fieldInfo, FieldNamePrefix fieldNamePrefix) {
final String methodName = fieldNamePrefix == FieldNamePrefix.YES
? fieldInfo.fieldName + "_" + upperCaseFirst(relation)
: upperCaseFirst(relation);
final MethodSpec.Builder builder ... |
25,136 | .addStatement("boundValues.add($N)", fieldInfo.fieldName)
.addStatement("encodedValues.add(meta.$L.encodeFromJava($N))", fieldInfo.fieldName, fieldInfo.fieldName)
.returns(nextType);
return builder.addStatement("return new $T(where)", nextType).build();
}
<BUG>default MethodSpec buildColumnInVarargs(TypeName nextType, ... | public MethodSpec buildColumnInVarargs(TypeName nextType, FieldSignatureInfo fieldInfo, FieldNamePrefix fieldNamePrefix) {
final String methodName = fieldNamePrefix == FieldNamePrefix.YES
? fieldInfo.fieldName + "_IN"
: "IN";
final String param = fieldInfo.fieldName;
|
25,137 | .addStatement("boundValues.add(varargs)")
.addStatement("encodedValues.add(encodedVarargs)")
.returns(nextType);
return builder.addStatement("return new $T(where)", nextType).build();
}
<BUG>static MethodSpec buildGetThis(TypeName currentType) {
</BUG>
return MethodSpec
.methodBuilder("getThis")
.addAnnotation(Override... | public MethodSpec buildGetThis(TypeName currentType) {
|
25,138 | .addModifiers(Modifier.FINAL, Modifier.PROTECTED)
.returns(currentType)
.addStatement("return this")
.build();
}
<BUG>default MethodSpec buildGetMetaInternal(TypeName currentType) {
</BUG>
return MethodSpec
.methodBuilder("getMetaInternal")
.addAnnotation(Override.class)
| public MethodSpec buildGetMetaInternal(TypeName currentType) {
|
25,139 | .fieldMetaSignatures
.stream()
.filter(x -> x.context.columnType == ColumnType.COUNTER || x.context.columnType == ColumnType.STATIC_COUNTER)
.count() > 0;
}
<BUG>default FieldSpec buildExactEntityMetaField(EntityMetaSignature signature) {
</BUG>
String entityMetaClassName = signature.className + META_SUFFIX;
TypeName e... | public FieldSpec buildExactEntityMetaField(EntityMetaSignature signature) {
|
25,140 | </BUG>
String entityMetaClassName = signature.className + META_SUFFIX;
TypeName entityMetaExactType = ClassName.get(ENTITY_META_PACKAGE, entityMetaClassName);
return FieldSpec.builder(entityMetaExactType, "meta", Modifier.FINAL, Modifier.PROTECTED).build();
}
<BUG>default FieldSpec buildEntityClassField(EntityMetaSigna... | .fieldMetaSignatures
.stream()
.filter(x -> x.context.columnType == ColumnType.COUNTER || x.context.columnType == ColumnType.STATIC_COUNTER)
.count() > 0;
public FieldSpec buildExactEntityMetaField(EntityMetaSignature signature) {
public FieldSpec buildEntityClassField(EntityMetaSignature signature) {
|
25,141 | whereTypeName, privateFieldName, "unknown_keyspace_for_")
.addStatement("return new $T(where)", newTypeName)
.returns(newTypeName)
.build();
}
<BUG>static MethodSpec buildAllColumnsWithSchemaProvider(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) {
</BUG>
return MethodSpec.methodBuilder("allColu... | public MethodSpec buildAllColumnsWithSchemaProvider(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) {
|
25,142 | .addStatement("final $T where = $L.all().from(currentKeyspace, currentTable).where()", whereTypeName, privateFieldName)
.addStatement("return new $T(where)", newTypeName)
.returns(newTypeName)
.build();
}
<BUG>static MethodSpec buildFrom(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) {
</BUG>
re... | public MethodSpec buildFrom(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) {
|
25,143 | "meta.getTableOrViewName()).where()", whereTypeName, privateFieldName, "unknown_keyspace_for_")
.addStatement("return new $T(where)", newTypeName)
.returns(newTypeName)
.build();
}
<BUG>static MethodSpec buildFromWithSchemaProvider(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) {
</BUG>
return M... | public MethodSpec buildFromWithSchemaProvider(TypeName newTypeName, TypeName whereTypeName, String privateFieldName) {
|
25,144 | .addStatement("final $T where = $L.from(currentKeyspace, currentTable).where()", whereTypeName, privateFieldName)
.addStatement("return new $T(where)", newTypeName)
.returns(newTypeName)
.build();
}
<BUG>default List<FieldSignatureInfo> getPartitionKeysSignatureInfo(List<FieldMetaSignature> parsingResults) {
</BUG>
ret... | public List<FieldSignatureInfo> getPartitionKeysSignatureInfo(List<FieldMetaSignature> parsingResults) {
|
25,145 | .map(x -> Tuple4.of(x.context.fieldName, x.context.cqlColumn, x.sourceType, (PartitionKeyInfo) x.context.columnInfo))
.sorted(TUPLE4_PARTITION_KEY_SORTER)
.map(x -> FieldSignatureInfo.of(x._1(), x._2(), x._3()))
.collect(toList()));
}
<BUG>default List<FieldSignatureInfo> getClusteringColsSignatureInfo(List<FieldMetaSi... | public List<FieldSignatureInfo> getClusteringColsSignatureInfo(List<FieldMetaSignature> parsingResults) {
|
25,146 | .map(x -> Tuple4.of(x.context.fieldName, x.context.cqlColumn, x.sourceType, (ClusteringColumnInfo) x.context.columnInfo))
.sorted(TUPLE4_CLUSTERING_COLUMN_SORTER)
.map(x -> FieldSignatureInfo.of(x._1(), x._2(), x._3()))
.collect(toList()));
}
<BUG>default void buildLWtConditionMethods(EntityMetaSignature signature, Cla... | public void buildLWtConditionMethods(EntityMetaSignature signature, String parentFQCN, ClassSignatureInfo currentSignature, boolean hasCounter, TypeSpec.Builder parentBuilder) {
|
25,147 | </BUG>
.returns(currentType)
.build();
}
<BUG>default MethodSpec buildLWTNotEqual(FieldSignatureInfo fieldSignatureInfo, TypeName currentType) {
String methodName = "if" + upperCaseFirst(fieldSignatureInfo.fieldName) + "_NotEq";
return MethodSpec.methodBuilder(methodName)</BUG>
.addJavadoc("Generate an ... <strong>IF... | .addParameter(fieldSignatureInfo.typeName, fieldSignatureInfo.fieldName, Modifier.FINAL)
.addStatement("boundValues.add($N)", fieldSignatureInfo.fieldName)
.addStatement("encodedValues.add(meta.$L.encodeFromJava($N))", fieldSignatureInfo.fieldName, fieldSignatureInfo.fieldName)
.addStatement("where.onlyIf($T.$L($S, $T.... |
25,148 | @XmlRootElement(name = "dependency")
@XmlAccessorType(XmlAccessType.FIELD)
public class MavenDependency {
private String groupId;
private String artifactId;
<BUG>private String version;
private Scope scope = Scope.COMPILE;</BUG>
@XmlElement(name = "exclusion")
@XmlElementWrapper(name = "exclusions")
private List<MavenE... | private String classifier;
private Scope scope = Scope.COMPILE;
|
25,149 | return false;
}
final MavenDependency other = (MavenDependency) obj;
return Objects.equal(this.groupId, other.groupId)
&& Objects.equal(this.artifactId, other.artifactId)
<BUG>&& Objects.equal(this.version, other.version)
&& Objects.equal(this.scope, other.scope)</BUG>
&& Objects.equal(this.exclusionList, other.exclusi... | && Objects.equal(this.classifier, other.classifier)
&& Objects.equal(this.scope, other.scope)
|
25,150 | @Override
public String toString() {
return "MavenDependency{"
+ "groupId='" + groupId + '\''
+ ", artifactId='" + artifactId + '\''
<BUG>+ ", version='" + version + '\''
+ ", scope=" + scope</BUG>
+ ", exclusionList=" + exclusionList
+ '}';
}
| + ", classifier='" + classifier + '\''
+ ", scope=" + scope
|
25,151 | package com.github.platan.idea.dependencies.maven;
import com.github.platan.idea.dependencies.gradle.Dependency;
import com.github.platan.idea.dependencies.gradle.Exclusion;
<BUG>import com.google.common.base.Function;
import com.google.common.base.Predicate;</BUG>
import com.google.common.collect.Iterables;
import com... | import com.google.common.base.Optional;
import com.google.common.base.Predicate;
|
25,152 | public Dependency map(@NotNull final MavenDependency mavenDependency) {
List<Exclusion> excludes = Lists.transform(mavenDependency.getExclusions(), MAVEN_EXCLUSION_TO_EXCLUSION_FUNCTION);
boolean hasWildcardExclude = Iterables.removeIf(mavenDependency.getExclusions(), IS_WILDCARD_EXCLUDE);
boolean transitive = !hasWild... | Optional.fromNullable(mavenDependency.getClassifier()), getScope(mavenDependency.getScope()), excludes, transitive);
}
|
25,153 | package com.github.platan.idea.dependencies.gradle;
<BUG>import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;</BUG>
import java.util.List;
public final class Dependency {
private final String group;
| import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
|
25,154 | public boolean hasVersion() {
return version != null;
}
@Override
public int hashCode() {
<BUG>return Objects.hashCode(group, name, version, configuration, exclusions, transitive);
</BUG>
}
@Override
public boolean equals(Object obj) {
| return Objects.hashCode(group, name, version, classifier, configuration, exclusions, transitive);
|
25,155 | import com.google.common.base.Function;
import com.google.common.base.Joiner;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import static com.google.common.collect.Iterables.transform;
<BUG>public class GradleDependenciesSerializerImpl implements GradleDependenciesSerializer {
private static final Jo... | private static final String NEW_LINE = System.getProperty("line.separator");
private static final Joiner NEW_LINE_JOINER = Joiner.on(NEW_LINE);
|
25,156 | private static final Function<Dependency, String> FORMAT_GRADLE_DEPENDENCY = new Function<Dependency, String>() {
@NotNull
@Override
public String apply(@NotNull Dependency dependency) {
if (useClosure(dependency)) {
<BUG>return String.format("%s(%s) {\n%s}",
dependency.getConfiguration(), toStringNotation(dependency)... | return String.format("%s(%s) {%s%s}",
dependency.getConfiguration(), toStringNotation(dependency), NEW_LINE, getClosureContent(dependency));
|
25,157 | return StringRef.toString(myDefaultValueText);
}
@Override
@NotNull
public TypeInfo getReturnTypeText(boolean doResolve) {
<BUG>if (!doResolve) return myReturnType;
return PsiFieldStubImpl.addApplicableTypeAnnotationsFromChildModifierList(this, myReturnType);
</BUG>
}
@Override
| return doResolve ? PsiFieldStubImpl.addApplicableTypeAnnotationsFromChildModifierList(this, myReturnType) : myReturnType;
|
25,158 | builder.append("varargs ");
}
if (isDeprecated() || hasDeprecatedAnnotation()) {
builder.append("deprecated ");
}
<BUG>builder.append(getName()).append(":").append(TypeInfo.createTypeText(getReturnTypeText(false)));
final String defaultValue = getDefaultValueText();
if (defaultValue != null) {</BUG>
builder.append(" de... | builder.append(myName).append(":").append(myReturnType);
if (defaultValue != null) {
|
25,159 | myFlags = flags;
}
@Override
@NotNull
public TypeInfo getType(boolean doResolve) {
<BUG>if (!doResolve) return myType;
return addApplicableTypeAnnotationsFromChildModifierList(this, myType);
</BUG>
}
public static TypeInfo addApplicableTypeAnnotationsFromChildModifierList(StubBase<?> aThis, TypeInfo type) {
| return doResolve ? addApplicableTypeAnnotationsFromChildModifierList(this, myType) : myType;
|
25,160 | if (isDeprecated() || hasDeprecatedAnnotation()) {
builder.append("deprecated ");
}
if (isEnumConstant()) {
builder.append("enumconst ");
<BUG>}
TypeInfo type = getType(false); // this can be called from low-level code and we don't want resolve to mess with indexing
builder.append(getName()).append(':').append(TypeInfo... | builder.append(myName).append(':').append(myType);
|
25,161 | }else if(programsSelected.size() == 1){
lytProgsPanel.setVisibility(View.VISIBLE);
lytProg2MAHAdsExtDlg.setVisibility(View.GONE);
prog1 = programsSelected.get(0);
((TextView)view.findViewById(R.id.tvProg1NameMAHAdsExtDlg)).setText(prog1.getName());
<BUG>if (prog1.getImg() != null && !prog1.getImg().trim().isEmpty()) {
... | Picasso.with(view.getContext())
.load(MAHAdsController.urlRootOnServer + prog1.getImg())
.placeholder(R.drawable.img_place_holder_normal)
.error(R.drawable.img_not_found)
.into((ImageView) view.findViewById(R.id.ivProg1ImgMAHAds));
AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1... |
25,162 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.List;
<BUG>import java.util.Optional;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class CommandDel... | import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
25,163 | .append(Text.of(TextColors.GREEN, "Usage: "))
.append(getUsage(source))
.build());
return CommandResult.empty();
} else if (isIn(REGIONS_ALIASES, parse.args[0])) {
<BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
IRegion region = FGManager.getInstance().getRegion(parse.args[1... | String regionName = parse.args[1];
IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
|
25,164 | </BUG>
isWorldRegion = true;
}
if (region == null)
<BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!"));
if (region instanceof GlobalWorldRegion) {
</BUG>
throw new CommandException(Text.of("You may not delete the global region!"));
}
| if (world == null)
throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!"));
if (world == null) throw new CommandException(Text.of("Must specify a world!"));
region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null);
throw new CommandException(Text.of("No region exis... |
25,165 | source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region"
);
return CommandResult.success();
} else if (isIn(HANDLERS_ALIASES, parse.args[0])) {
if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
<BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[... | Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]);
if (!handlerOpt.isPresent())
IHandler handler = handlerOpt.get();
if (handler instanceof GlobalHandler)
|
25,166 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix... | return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
25,167 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix... | return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
25,168 | @Dependency(id = "foxcore")
},
description = "A world protection plugin built for SpongeAPI. Requires FoxCore.",
authors = {"gravityfox"},
url = "https://github.com/FoxDenStudio/FoxGuard")
<BUG>public final class FoxGuardMain {
public final Cause pluginCause = Cause.builder().named("plugin", this).build();
private stat... | private static FoxGuardMain instanceField;
|
25,169 | private UserStorageService userStorage;
private EconomyService economyService = null;
private boolean loaded = false;
private FCCommandDispatcher fgDispatcher;
public static FoxGuardMain instance() {
<BUG>return instanceField;
}</BUG>
@Listener
public void construct(GameConstructionEvent event) {
instanceField = this;
| }
public static Cause getCause() {
return instance().pluginCause;
}
|
25,170 | return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
<BUG>public static Cause getCause() {
return instance().pluginCause;
}</BUG>
public EconomyService getEconomyService() {
return economyService;
| [DELETED] |
25,171 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.*;
<BUG>import java.util.stream.Collectors;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class Comm... | import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
25,172 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix... | return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
25,173 | private static FGStorageManager instance;
private final Logger logger = FoxGuardMain.instance().getLogger();</BUG>
private final Set<LoadEntry> loaded = new HashSet<>();
private final Path directory = getDirectory();
private final Map<String, Path> worldDirectories;
<BUG>private FGStorageManager() {
defaultModifiedMap ... | public final HashMap<IFGObject, Boolean> defaultModifiedMap;
private final UserStorageService userStorageService;
private final Logger logger = FoxGuardMain.instance().getLogger();
userStorageService = FoxGuardMain.instance().getUserStorage();
defaultModifiedMap = new CacheMap<>((k, m) -> {
|
25,174 | String name = fgObject.getName();
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fg... | UUID owner = fgObject.getOwner();
boolean isOwned = !owner.equals(SERVER_UUID);
Optional<User> userOwner = userStorageService.get(owner);
String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name;
if (fgObject.autoSave()) {
Path singleDir = serverDir.resolve(n... |
25,175 | if (fgObject.autoSave()) {
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fgOb... | Path singleDir = serverDir.resolve(name.toLowerCase());
logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
|
25,176 | public synchronized void loadRegionLinks() {
logger.info("Loading region links");
try (DB mainDB = DBMaker.fileDB(directory.resolve("regions.foxdb").normalize().toString()).make()) {
Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen();
linksMap.entrySet().forEach(... | Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey());
if (regionOpt.isPresent()) {
IRegion region = regionOpt.get();
logger.info("Loading links for region \"" + region.getName() + "\"");
|
25,177 | public synchronized void loadWorldRegionLinks(World world) {
logger.info("Loading world region links for world \"" + world.getName() + "\"");
try (DB mainDB = DBMaker.fileDB(worldDirectories.get(world.getName()).resolve("wregions.foxdb").normalize().toString()).make()) {
Map<String, String> linksMap = mainDB.hashMap("l... | Optional<IWorldRegion> regionOpt = FGManager.getInstance().getWorldRegion(world, entry.getKey());
if (regionOpt.isPresent()) {
IWorldRegion region = regionOpt.get();
logger.info("Loading links for world region \"" + region.getName() + "\"");
|
25,178 | StringBuilder builder = new StringBuilder();
for (Iterator<IHandler> it = handlers.iterator(); it.hasNext(); ) {
builder.append(it.next().getName());
if (it.hasNext()) builder.append(",");
}
<BUG>return builder.toString();
}</BUG>
private final class LoadEntry {
public final String name;
public final Type type;
| public enum Type {
REGION, WREGION, HANDLER
|
25,179 | .autoCloseQuotes(true)
.leaveFinalAsIs(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream()
</BUG>
.filter(new StartsWithPredicate(parse.current.token))
.co... | return Stream.of("region", "worldregion", "handler", "controller")
|
25,180 | public String javaName(final JvmVisibility visibility) {
boolean _operator_notEquals = ObjectExtensions.operator_notEquals(visibility, null);
if (_operator_notEquals) {
String _switchResult = null;
boolean matched = false;
<BUG>if (!matched) {
if (ObjectExtensions.operator_equals(visibility,JvmVisibility.PRIVATE)) {
</... | JvmVisibility _PRIVATE = JvmVisibility.PRIVATE;
if (ObjectExtensions.operator_equals(visibility,_PRIVATE)) {
|
25,181 | String _xifexpression_1 = null;
boolean _operator_notEquals_1 = ObjectExtensions.operator_notEquals(expression, null);
if (_operator_notEquals_1) {
{
StringBuilderBasedAppendable _createAppendable = this.createAppendable(it, importManager);
<BUG>final StringBuilderBasedAppendable appendable = _createAppendable;
JvmType... | XbaseCompiler _compiler = this.compiler;
_compiler.compileAsJavaExpression(expression, appendable, _type);
|
25,182 | Iterable<Object> _tail = IterableExtensions.<Object>tail(_values_3);
Iterable<XExpression> _filter = IterableExtensions.<XExpression>filter(_tail, org.eclipse.xtext.xbase.XExpression.class);
final Procedure1<XExpression> _function = new Procedure1<XExpression>() {
public void apply(final XExpression it) {
{
<BUG>append... | XbaseCompiler _compiler = JvmModelGenerator.this.compiler;
_compiler.toJavaExpression(it, appendable);
|
25,183 | }
public String serialize(final JvmTypeReference it, final ImportManager importManager) {
String _xblockexpression = null;
{
StringBuilderBasedAppendable _createAppendable = this.createAppendable(it, importManager);
<BUG>final StringBuilderBasedAppendable appendable = _createAppendable;
EObject _eContainer = it.eContai... | };
IterableExtensions.<XExpression>forEach(_filter, _function);
appendable.append("}");
|
25,184 | ((XmlNode) arr[i] ).unlink(context);
}
}
return this;
}
<BUG>public static XmlNodeSet newXmlNodeSet(ThreadContext context, RubyArray array) {
XmlNodeSet xmlNodeSet = (XmlNodeSet)NokogiriService.XML_NODESET_ALLOCATOR.allocate(context.getRuntime(), getNokogiriClass(context.getRuntime(), "Nokogiri::XML::NodeSet"));
xmlNod... | [DELETED] |
25,185 | xmlNodeSet.setNodes(array);
return xmlNodeSet;
}</BUG>
private XmlNodeSet newXmlNodeSet(ThreadContext context, XmlNodeSet reference) {
<BUG>XmlNodeSet xmlNodeSet = (XmlNodeSet)NokogiriService.XML_NODESET_ALLOCATOR.allocate(context.getRuntime(), getNokogiriClass(context.getRuntime(), "Nokogiri::XML::NodeSet"));
xmlNodeS... | ((XmlNode) arr[i] ).unlink(context);
return this;
XmlNodeSet xmlNodeSet = create(context.getRuntime());
xmlNodeSet.setReference(reference);
|
25,186 | public ReportElement getBase() {
return base;
}
@Override
public float print(PDDocument document, PDPageContentStream stream, int pageNumber, float startX, float startY, float allowedWidth) throws IOException {
<BUG>PDPage currPage = (PDPage) document.getDocumentCatalog().getPages().get(pageNo);
PDPageContentStream pag... | PDPage currPage = document.getDocumentCatalog().getPages().get(pageNo);
PDPageContentStream pageStream = new PDPageContentStream(document, currPage, PDPageContentStream.AppendMode.APPEND, false);
|
25,187 | public PdfTextStyle(String config) {
Assert.hasText(config);
String[] split = config.split(",");
Assert.isTrue(split.length == 3, "config must look like: 10,Times-Roman,#000000");
fontSize = Integer.parseInt(split[0]);
<BUG>font = resolveStandard14Name(split[1]);
color = new Color(Integer.valueOf(split[2].substring(1),... | font = getFont(split[1]);
color = new Color(Integer.valueOf(split[2].substring(1), 16));
|
25,188 | package cc.catalysts.boot.report.pdf.elements;
import cc.catalysts.boot.report.pdf.config.PdfTextStyle;
import cc.catalysts.boot.report.pdf.utils.ReportAlignType;
import org.apache.pdfbox.pdmodel.PDPageContentStream;
<BUG>import org.apache.pdfbox.pdmodel.font.PDFont;
import org.slf4j.Logger;</BUG>
import org.slf4j.Logg... | import org.apache.pdfbox.pdmodel.font.PDType1Font;
import org.apache.pdfbox.util.Matrix;
import org.slf4j.Logger;
|
25,189 | addTextSimple(stream, textConfig, textX, nextLineY, "");
return nextLineY;
}
try {
<BUG>String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, fixedText);
</BUG>
float x = calculateAlignPosition(textX, align, textConfig, allowedWidth, split[0]);
if (!underline) {
addTextSimple(stream, ... | String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, text);
|
25,190 | public static void addTextSimple(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) {
try {
stream.setFont(textConfig.getFont(), textConfig.getFontSize());
stream.setNonStrokingColor(textConfig.getColor());
stream.beginText();
<BUG>stream.newLineAtOffset(textX, textY);
stream.sh... | stream.setTextMatrix(new Matrix(1,0,0,1, textX, textY));
stream.showText(text);
|
25,191 | public static void addTextSimpleUnderlined(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) {
addTextSimple(stream, textConfig, textX, textY, text);
try {
float lineOffset = textConfig.getFontSize() / 8F;
stream.setStrokingColor(textConfig.getColor());
<BUG>stream.setLineWidth... | stream.moveTo(textX, textY - lineOffset);
stream.lineTo(textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
|
25,192 | list.add(text.length());
return list;
}
public static String[] splitText(PDFont font, int fontSize, float allowedWidth, String text) {
String endPart = "";
<BUG>String shortenedText = text;
List<String> breakSplitted = Arrays.asList(shortenedText.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList());
... | List<String> breakSplitted = Arrays.asList(text.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList());
if (breakSplitted.size() > 1) {
|
25,193 | package cc.catalysts.boot.report.pdf.elements;
import org.apache.pdfbox.pdmodel.PDDocument;
<BUG>import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;
import java.io.IOException;</BUG>
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
| import org.apache.pdfbox.pdmodel.PDPageContentStream;
import java.io.IOException;
|
25,194 | package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
<BUG>import org.apache.hadoop.hbase.DoNotRetryIOException;
impor... | import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
|
25,195 | static final String FIFO_COMPACTION_POLICY_CLASS =
"org.apache.hadoop.hbase.regionserver.compactions.FIFOCompactionPolicy";
static final String DEFAULT_COMPACTION_POLICY_CLASS =
"org.apache.hadoop.hbase.regionserver.compactions.ExploringCompactionPolicy";
static final String BLOCKING_STORE_FILES_KEY =
<BUG>"hbase.hstor... | private HashMap<String, String> tableTTL = new HashMap<>();
|
25,196 | stmt.executeUpdate(metadataSql);
String hostedAppSql = String.format(CREATE_HOSTED_APPS_METADATA_TABLE_SQL,
encoding, compression);
stmt.executeUpdate(hostedAppSql);
String precisionSql = String.format(CREATE_METRICS_TABLE_SQL,
<BUG>encoding, precisionTtl, compression);
String splitPoints = metricsConf.get(PRECISION_TA... | encoding, tableTTL.get(METRICS_RECORD_TABLE_NAME), compression);
String splitPoints = metricsConf.get(PRECISION_TABLE_SPLIT_POINTS);
|
25,197 | if (!isInitialized) {
hBaseAccessor = new PhoenixHBaseAccessor(hbaseConf, metricsConf);
hBaseAccessor.initMetricSchema();
metricMetadataManager = new TimelineMetricMetadataManager(hBaseAccessor, metricsConf);
metricMetadataManager.initializeMetadata();
<BUG>hBaseAccessor.initPolicies();
hBaseAccessor.alterMetricTableT... | hBaseAccessor.initPoliciesAndTTL();
|
25,198 | package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline;
import junit.framework.Assert;
<BUG>import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HTableDescriptor;</BUG>
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.metrics2.sink.timeline.Prec... | import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
|
25,199 | import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.query.Condition;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.query.DefaultCondition;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
<BUG>import java.io.IOException;
import java.sq... | import java.lang.reflect.Field;
import java.sql.Connection;
|
25,200 | assertEquals("test_app", metric.getAppId());
assertEquals(1, metric.getMetricValues().size());
assertEquals(2.0, metric.getMetricValues().values().iterator().next(), 0.00001);
}
@Test
<BUG>public void testInitPolicies() throws Exception {
HBaseAdmin hBaseAdmin = hdb.getHBaseAdmin();
for (String tableName : PHOENIX_TAB... | public void testInitPoliciesAndTTL() throws Exception {
String precisionTtl = "";
for (String tableName : PHOENIX_TABLES) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.