id int64 22 34.9k | comment_id int64 0 328 | comment stringlengths 2 2.55k | code stringlengths 31 107k | classification stringclasses 6
values | isFinished bool 1
class | code_context_2 stringlengths 21 27.3k | code_context_10 stringlengths 29 27.3k | code_context_20 stringlengths 29 27.3k |
|---|---|---|---|---|---|---|---|---|
24,576 | 0 | // If a manifest doesn't have a version, the other attributes won't get written out. Lame. | private void addEntriesToMainManifest(Manifest manifest) {
Attributes attrs = manifest.getMainAttributes();
// If a manifest doesn't have a version, the other attributes won't get written out. Lame.
attrs.put(Attributes.Name.MANIFEST_VERSION, new Date().toString());
for (Map.Entry<Attributes.Name, Stri... | DEFECT | true | private void addEntriesToMainManifest(Manifest manifest) {
Attributes attrs = manifest.getMainAttributes();
// If a manifest doesn't have a version, the other attributes won't get written out. Lame.
attrs.put(Attributes.Name.MANIFEST_VERSION, new Date().toString());
for (Map.Entry<Attributes.Name, String> entry : this.... | private void addEntriesToMainManifest(Manifest manifest) {
Attributes attrs = manifest.getMainAttributes();
// If a manifest doesn't have a version, the other attributes won't get written out. Lame.
attrs.put(Attributes.Name.MANIFEST_VERSION, new Date().toString());
for (Map.Entry<Attributes.Name, String> entry : this.... | private void addEntriesToMainManifest(Manifest manifest) {
Attributes attrs = manifest.getMainAttributes();
// If a manifest doesn't have a version, the other attributes won't get written out. Lame.
attrs.put(Attributes.Name.MANIFEST_VERSION, new Date().toString());
for (Map.Entry<Attributes.Name, String> entry : this.... |
22 | 0 | // FIXME: this is almost certainly boned. a Reg could appear in the
// address expressions. | public boolean usesRegs() {
// FIXME: this is almost certainly boned. a Reg could appear in the
// address expressions.
for (int i=0;i<rhs().length;++i) {
if (usesDirectly(i) && rhs()[i] instanceof Reg) {
return true;
}
}
if (opcode.form()... | DEFECT | true | public boolean usesRegs() {
// FIXME: this is almost certainly boned. a Reg could appear in the
// address expressions.
for (int i=0;i<rhs().length;++i) {
if (usesDirectly(i) && rhs()[i] instanceof Reg) { | public boolean usesRegs() {
// FIXME: this is almost certainly boned. a Reg could appear in the
// address expressions.
for (int i=0;i<rhs().length;++i) {
if (usesDirectly(i) && rhs()[i] instanceof Reg) {
return true;
}
}
if (opcode.form().implicitUses(head().code()).length!=0) {
return true;
}
return false;
} | public boolean usesRegs() {
// FIXME: this is almost certainly boned. a Reg could appear in the
// address expressions.
for (int i=0;i<rhs().length;++i) {
if (usesDirectly(i) && rhs()[i] instanceof Reg) {
return true;
}
}
if (opcode.form().implicitUses(head().code()).length!=0) {
return true;
}
return false;
} |
28 | 0 | //TODO: For each model create separate implementation. | @Override
public void process(JCas jCas) throws AnalysisEngineProcessException {
long startTime = System.currentTimeMillis();
FeatureExtractor fe = new NYTEntitySalienceFeatureExtractor();
List<EntityInstance> entityInstances;
try {
entityInstances = fe.getEntityInstances... | IMPLEMENTATION | true | entityInstances = fe.getEntityInstances(jCas, TrainingSettings.FeatureExtractor.ENTITY_SALIENCE);
final int featureVectorSize = FeatureSetFactory.createFeatureSet(TrainingSettings.FeatureExtractor.ENTITY_SALIENCE).getFeatureVectorSize();
//TODO: For each model create separate implementation.
RandomForestClassificationM... | @Override
public void process(JCas jCas) throws AnalysisEngineProcessException {
long startTime = System.currentTimeMillis();
FeatureExtractor fe = new NYTEntitySalienceFeatureExtractor();
List<EntityInstance> entityInstances;
try {
entityInstances = fe.getEntityInstances(jCas, TrainingSettings.FeatureExtractor.ENTITY_... | @Override
public void process(JCas jCas) throws AnalysisEngineProcessException {
long startTime = System.currentTimeMillis();
FeatureExtractor fe = new NYTEntitySalienceFeatureExtractor();
List<EntityInstance> entityInstances;
try {
entityInstances = fe.getEntityInstances(jCas, TrainingSettings.FeatureExtractor.ENTITY_... |
32 | 0 | // TODO: check here, may be necessary to remove the last space. | private void generateArttribute() {
String temp = "";
for (String s : connectedElements)
temp = temp + s + " ";
// TODO: check here, may be necessary to remove the last space.
linkingResourceElement.setAttribute(
"connectedResourceContainers_LinkingResource", temp);
} | DESIGN | true | for (String s : connectedElements)
temp = temp + s + " ";
// TODO: check here, may be necessary to remove the last space.
linkingResourceElement.setAttribute(
"connectedResourceContainers_LinkingResource", temp); | private void generateArttribute() {
String temp = "";
for (String s : connectedElements)
temp = temp + s + " ";
// TODO: check here, may be necessary to remove the last space.
linkingResourceElement.setAttribute(
"connectedResourceContainers_LinkingResource", temp);
} | private void generateArttribute() {
String temp = "";
for (String s : connectedElements)
temp = temp + s + " ";
// TODO: check here, may be necessary to remove the last space.
linkingResourceElement.setAttribute(
"connectedResourceContainers_LinkingResource", temp);
} |
32,849 | 0 | //验证手机号是否11位 | private boolean isTelLenthLegal(String tel) {
//TODO: Replace this with your own logic
return tel.length() == 11;
} | NONSATD | true | private boolean isTelLenthLegal(String tel) {
//TODO: Replace this with your own logic
return tel.length() == 11;
} | private boolean isTelLenthLegal(String tel) {
//TODO: Replace this with your own logic
return tel.length() == 11;
} | private boolean isTelLenthLegal(String tel) {
//TODO: Replace this with your own logic
return tel.length() == 11;
} |
32,849 | 1 | //TODO: Replace this with your own logic | private boolean isTelLenthLegal(String tel) {
//TODO: Replace this with your own logic
return tel.length() == 11;
} | IMPLEMENTATION | true | private boolean isTelLenthLegal(String tel) {
//TODO: Replace this with your own logic
return tel.length() == 11;
} | private boolean isTelLenthLegal(String tel) {
//TODO: Replace this with your own logic
return tel.length() == 11;
} | private boolean isTelLenthLegal(String tel) {
//TODO: Replace this with your own logic
return tel.length() == 11;
} |
32,850 | 0 | //是否是邮箱 | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@")&&email.contains(".");
} | NONSATD | true | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@")&&email.contains(".");
} | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@")&&email.contains(".");
} | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@")&&email.contains(".");
} |
32,850 | 1 | //TODO: Replace this with your own logic | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@")&&email.contains(".");
} | IMPLEMENTATION | true | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@")&&email.contains(".");
} | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@")&&email.contains(".");
} | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@")&&email.contains(".");
} |
83 | 0 | // Operator op = ((OperatorItem) item0)._operator; // TODO check this value if we can, somehow | @Test
public void parseNegativeIntegerLiteral(
) throws ExpressionException {
LineSpecifier ls = new LineSpecifier(0, 10);
Locale locale = new Locale(ls, 10);
ExpressionParser parser = new ExpressionParser("-14458", locale);
Expression exp = parser.parse(new Assembler.Builder().b... | DESIGN | true | ExpressionItem item0 = exp._items.get(0);
assertTrue(item0 instanceof OperatorItem);
// Operator op = ((OperatorItem) item0)._operator; // TODO check this value if we can, somehow
ExpressionItem item1 = exp._items.get(1);
assertTrue(item1 instanceof ValueItem); | @Test
public void parseNegativeIntegerLiteral(
) throws ExpressionException {
LineSpecifier ls = new LineSpecifier(0, 10);
Locale locale = new Locale(ls, 10);
ExpressionParser parser = new ExpressionParser("-14458", locale);
Expression exp = parser.parse(new Assembler.Builder().build());
assertEquals(2, exp._items.size... | @Test
public void parseNegativeIntegerLiteral(
) throws ExpressionException {
LineSpecifier ls = new LineSpecifier(0, 10);
Locale locale = new Locale(ls, 10);
ExpressionParser parser = new ExpressionParser("-14458", locale);
Expression exp = parser.parse(new Assembler.Builder().build());
assertEquals(2, exp._items.size... |
85 | 0 | /**
* Adds a module for placing a voice call.
*
* <p>The method is a no-op if the number is blocked.
*/ | public HistoryItemActionModulesBuilder addModuleForVoiceCall() {
if (moduleInfo.getIsBlocked()) {
return this;
}
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place... | NONSATD | true | public HistoryItemActionModulesBuilder addModuleForVoiceCall() {
if (moduleInfo.getIsBlocked()) {
return this;
}
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place or receive the call shoul... | public HistoryItemActionModulesBuilder addModuleForVoiceCall() {
if (moduleInfo.getIsBlocked()) {
return this;
}
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place or receive the call shoul... | public HistoryItemActionModulesBuilder addModuleForVoiceCall() {
if (moduleInfo.getIsBlocked()) {
return this;
}
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place or receive the call shoul... |
85 | 1 | // TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place or receive the call should be ignored for voice calls. | public HistoryItemActionModulesBuilder addModuleForVoiceCall() {
if (moduleInfo.getIsBlocked()) {
return this;
}
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place... | IMPLEMENTATION | true | return this;
}
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place or receive the call should be ignored for voice calls.
CallIntentBuilder callIntentBuilder =
new CallIntentBuilder(moduleIn... | public HistoryItemActionModulesBuilder addModuleForVoiceCall() {
if (moduleInfo.getIsBlocked()) {
return this;
}
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place or receive the call shoul... | public HistoryItemActionModulesBuilder addModuleForVoiceCall() {
if (moduleInfo.getIsBlocked()) {
return this;
}
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place or receive the call shoul... |
32,858 | 0 | // TODO(felly): Support directory traversal. | @Override
protected Collection<String> getDirectoryEntries(Path path) throws IOException {
// TODO(felly): Support directory traversal.
return ImmutableList.of();
} | DESIGN | true | @Override
protected Collection<String> getDirectoryEntries(Path path) throws IOException {
// TODO(felly): Support directory traversal.
return ImmutableList.of();
} | @Override
protected Collection<String> getDirectoryEntries(Path path) throws IOException {
// TODO(felly): Support directory traversal.
return ImmutableList.of();
} | @Override
protected Collection<String> getDirectoryEntries(Path path) throws IOException {
// TODO(felly): Support directory traversal.
return ImmutableList.of();
} |
24,672 | 0 | //TODO Capitalize first char?? | public String getJavaName() {
return service.getName(); //TODO Capitalize first char??
} | IMPLEMENTATION | true | public String getJavaName() {
return service.getName(); //TODO Capitalize first char??
} | public String getJavaName() {
return service.getName(); //TODO Capitalize first char??
} | public String getJavaName() {
return service.getName(); //TODO Capitalize first char??
} |
24,673 | 0 | /**
* Checks if the provided zone is an option for the client to connect to.
* Any zone provided must have previously been created by ZoneManagement.
*
* @param tenantId The tenantId of the connecting envoy.
* @param zone The zone provided in the envoySummary.
* @throws IllegalArgumentException if the... | private void validateZoneAvailable(String tenantId, String zone) throws IllegalArgumentException {
List<ZoneDTO> zones;
try {
zones = zoneApi.getAvailableZones(tenantId);
} catch (ResourceAccessException e) {
// need to do something here to handle things more gracefully.
throw new RuntimeE... | NONSATD | true | private void validateZoneAvailable(String tenantId, String zone) throws IllegalArgumentException {
List<ZoneDTO> zones;
try {
zones = zoneApi.getAvailableZones(tenantId);
} catch (ResourceAccessException e) {
// need to do something here to handle things more gracefully.
throw new RuntimeException("Unable to validate z... | private void validateZoneAvailable(String tenantId, String zone) throws IllegalArgumentException {
List<ZoneDTO> zones;
try {
zones = zoneApi.getAvailableZones(tenantId);
} catch (ResourceAccessException e) {
// need to do something here to handle things more gracefully.
throw new RuntimeException("Unable to validate z... | private void validateZoneAvailable(String tenantId, String zone) throws IllegalArgumentException {
List<ZoneDTO> zones;
try {
zones = zoneApi.getAvailableZones(tenantId);
} catch (ResourceAccessException e) {
// need to do something here to handle things more gracefully.
throw new RuntimeException("Unable to validate z... |
24,673 | 1 | // need to do something here to handle things more gracefully. | private void validateZoneAvailable(String tenantId, String zone) throws IllegalArgumentException {
List<ZoneDTO> zones;
try {
zones = zoneApi.getAvailableZones(tenantId);
} catch (ResourceAccessException e) {
// need to do something here to handle things more gracefully.
throw new RuntimeE... | DESIGN | true | zones = zoneApi.getAvailableZones(tenantId);
} catch (ResourceAccessException e) {
// need to do something here to handle things more gracefully.
throw new RuntimeException("Unable to validate zones.", e);
} | private void validateZoneAvailable(String tenantId, String zone) throws IllegalArgumentException {
List<ZoneDTO> zones;
try {
zones = zoneApi.getAvailableZones(tenantId);
} catch (ResourceAccessException e) {
// need to do something here to handle things more gracefully.
throw new RuntimeException("Unable to validate z... | private void validateZoneAvailable(String tenantId, String zone) throws IllegalArgumentException {
List<ZoneDTO> zones;
try {
zones = zoneApi.getAvailableZones(tenantId);
} catch (ResourceAccessException e) {
// need to do something here to handle things more gracefully.
throw new RuntimeException("Unable to validate z... |
32,867 | 0 | // TODO: Configuration is not used because we don't support any other mode for now. For that : ISPN-8413 | @Override
public boolean defineLock(String name, ClusteredLockConfiguration configuration) {
// TODO: Configuration is not used because we don't support any other mode for now. For that : ISPN-8413
CacheHolder cacheHolder = extractCacheHolder(cacheHolderFuture);
cache = cacheHolder.getClusteredLock... | DESIGN | true | @Override
public boolean defineLock(String name, ClusteredLockConfiguration configuration) {
// TODO: Configuration is not used because we don't support any other mode for now. For that : ISPN-8413
CacheHolder cacheHolder = extractCacheHolder(cacheHolderFuture);
cache = cacheHolder.getClusteredLockCache(); | @Override
public boolean defineLock(String name, ClusteredLockConfiguration configuration) {
// TODO: Configuration is not used because we don't support any other mode for now. For that : ISPN-8413
CacheHolder cacheHolder = extractCacheHolder(cacheHolderFuture);
cache = cacheHolder.getClusteredLockCache();
ClusteredLoc... | @Override
public boolean defineLock(String name, ClusteredLockConfiguration configuration) {
// TODO: Configuration is not used because we don't support any other mode for now. For that : ISPN-8413
CacheHolder cacheHolder = extractCacheHolder(cacheHolderFuture);
cache = cacheHolder.getClusteredLockCache();
ClusteredLoc... |
100 | 0 | // TODO Auto-generated method stub
// return super.hasRole(principal, roleIdentifier); | @Override
public boolean hasRole(final PrincipalCollection principal, final String roleIdentifier) {
// TODO Auto-generated method stub
// return super.hasRole(principal, roleIdentifier);
for (final Object p : principal.fromRealm(REALM_NAME)) {
if (p instanceof GenericPrincipal) {
final GenericPrincipal g... | DESIGN | true | @Override
public boolean hasRole(final PrincipalCollection principal, final String roleIdentifier) {
// TODO Auto-generated method stub
// return super.hasRole(principal, roleIdentifier);
for (final Object p : principal.fromRealm(REALM_NAME)) {
if (p instanceof GenericPrincipal) { | @Override
public boolean hasRole(final PrincipalCollection principal, final String roleIdentifier) {
// TODO Auto-generated method stub
// return super.hasRole(principal, roleIdentifier);
for (final Object p : principal.fromRealm(REALM_NAME)) {
if (p instanceof GenericPrincipal) {
final GenericPrincipal gp = (GenericPr... | @Override
public boolean hasRole(final PrincipalCollection principal, final String roleIdentifier) {
// TODO Auto-generated method stub
// return super.hasRole(principal, roleIdentifier);
for (final Object p : principal.fromRealm(REALM_NAME)) {
if (p instanceof GenericPrincipal) {
final GenericPrincipal gp = (GenericPr... |
16,486 | 0 | //TODO check rewrite in future | public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
if(args.length != 4) {
System.out.print("args should be 2 : <inputpath> <outpath> <number of centroids> <dimensions> .") ;
System.exit(-1);
}
int k = Integer.valueOf(args[2]) ;
int dim = Integer.value... | IMPLEMENTATION | true | init_job.setOutputValueClass(Text.class);
FileInputFormat.addInputPath(init_job, new Path(args[0]));
//TODO check rewrite in future
FileOutputFormat.setOutputPath(init_job, new Path(args[1] + "_m_" + Integer.toString(0)));
init_job.waitForCompletion(true); | Configuration init_conf = init_job.getConfiguration();
init_conf.set("kmeans.k", args[2]);
init_conf.set("kmeans.dim", args[3]);
init_job.setJarByClass(KMean.class);
init_job.setJobName("clustered kmeans");
init_job.setMapperClass(KMeanInitMapper.class);
init_job.setReducerClass(KMeanInitReducer.class);
init_job.setOut... | public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
if(args.length != 4) {
System.out.print("args should be 2 : <inputpath> <outpath> <number of centroids> <dimensions> .") ;
System.exit(-1);
}
int k = Integer.valueOf(args[2]) ;
int dim = Integer.valueOf(args[3]) ;
... |
16,486 | 1 | // TODO check rewrite in future | public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
if(args.length != 4) {
System.out.print("args should be 2 : <inputpath> <outpath> <number of centroids> <dimensions> .") ;
System.exit(-1);
}
int k = Integer.valueOf(args[2]) ;
int dim = Integer.value... | IMPLEMENTATION | true | kmean_cluster_jb.setOutputKeyClass(IntWritable.class);
kmean_cluster_jb.setOutputValueClass(Text.class);
// TODO check rewrite in future
String uri = args[1] + "_m_" + Integer.toString(fi-1) + "/part-r-00000";
Configuration temp_conf = new Configuration(); | Job kmean_cluster_jb = Job.getInstance() ;
Configuration conf = kmean_cluster_jb.getConfiguration() ;
conf.set("kmeans.k", args[2]);
conf.set("kmeans.dim", args[3]);
kmean_cluster_jb.setJarByClass(KMean.class);
kmean_cluster_jb.setJobName("clustered kmeans");
kmean_cluster_jb.setMapperClass(KMeanIterationMapper.class);... | init_job.setOutputValueClass(Text.class);
FileInputFormat.addInputPath(init_job, new Path(args[0]));
//TODO check rewrite in future
FileOutputFormat.setOutputPath(init_job, new Path(args[1] + "_m_" + Integer.toString(0)));
init_job.waitForCompletion(true);
double[][] old_centroids = new double[k][dim] ;
int fi = 1 ;
lo... |
16,486 | 2 | //TODO check rewrite in future | public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
if(args.length != 4) {
System.out.print("args should be 2 : <inputpath> <outpath> <number of centroids> <dimensions> .") ;
System.exit(-1);
}
int k = Integer.valueOf(args[2]) ;
int dim = Integer.value... | IMPLEMENTATION | true | init_job.setOutputValueClass(Text.class);
FileInputFormat.addInputPath(init_job, new Path(args[0]));
//TODO check rewrite in future
FileOutputFormat.setOutputPath(init_job, new Path(args[1] + "_m_" + Integer.toString(0)));
init_job.waitForCompletion(true); | Configuration init_conf = init_job.getConfiguration();
init_conf.set("kmeans.k", args[2]);
init_conf.set("kmeans.dim", args[3]);
init_job.setJarByClass(KMean.class);
init_job.setJobName("clustered kmeans");
init_job.setMapperClass(KMeanInitMapper.class);
init_job.setReducerClass(KMeanInitReducer.class);
init_job.setOut... | public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
if(args.length != 4) {
System.out.print("args should be 2 : <inputpath> <outpath> <number of centroids> <dimensions> .") ;
System.exit(-1);
}
int k = Integer.valueOf(args[2]) ;
int dim = Integer.valueOf(args[3]) ;
... |
118 | 0 | // Bug report: cached GeoPoint is being returned as the first value.
// Wait for the 2nd value to be returned, which is hopefully not cached? | @Override
public void onLocationChanged(Location location) {
mLocation = location;
if (mLocation != null) {
// Bug report: cached GeoPoint is being returned as the first value.
// Wait for the 2nd value to be returned, which is hopefully not cached?
++mLocationCou... | DEFECT | true | mLocation = location;
if (mLocation != null) {
// Bug report: cached GeoPoint is being returned as the first value.
// Wait for the 2nd value to be returned, which is hopefully not cached?
++mLocationCount;
InfoLogger.geolog("GeoPointActivity: " + System.currentTimeMillis() + | @Override
public void onLocationChanged(Location location) {
mLocation = location;
if (mLocation != null) {
// Bug report: cached GeoPoint is being returned as the first value.
// Wait for the 2nd value to be returned, which is hopefully not cached?
++mLocationCount;
InfoLogger.geolog("GeoPointActivity: " + System.curr... | @Override
public void onLocationChanged(Location location) {
mLocation = location;
if (mLocation != null) {
// Bug report: cached GeoPoint is being returned as the first value.
// Wait for the 2nd value to be returned, which is hopefully not cached?
++mLocationCount;
InfoLogger.geolog("GeoPointActivity: " + System.curr... |
119 | 0 | /**
* Reduce la lista de vulnerabilidades de zap.
*
* @param site
* @param zapRelations
* @param groupVulnerabilities
* @throws MalformedURLException
*/ | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (... | NONSATD | true | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVul... | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVul... | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVul... |
119 | 1 | /**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/ | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (... | NONSATD | true | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVul... | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVul... | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVul... |
119 | 2 | //TODO: Convertir la serveridad | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (... | IMPLEMENTATION | true | vulnerability.setShortName(alert.getName());
vulnerability.setLongName(alert.getName());
//TODO: Convertir la serveridad
vulnerability.setSeverity(alert.getRiskdesc().replaceAll("\\(.*\\)", "").trim());
vulnerability.setCwe(Integer.parseInt(alert.getCweid())); | * De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVuln = zapRelations.get(alert.getPluginid());
if(StringUtils.isBlank(nameVuln)){
Vulnerability vulnerability = new Vulnerability();
vulnerability.setName(Co... | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVul... |
119 | 3 | //TODO: Convertir la serveridad | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (... | IMPLEMENTATION | true | vulnerability.setShortName(alert.getName());
vulnerability.setLongName(alert.getName());
//TODO: Convertir la serveridad
vulnerability.setSeverity(alert.getRiskdesc().replaceAll("\\(.*\\)", "").trim());
vulnerability.setCwe(Integer.parseInt(alert.getCweid())); | * De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVuln = zapRelations.get(alert.getPluginid());
if(StringUtils.isBlank(nameVuln)){
Vulnerability vulnerability = new Vulnerability();
vulnerability.setName(Co... | private void reduceList(Site site, Map<String, String> zapRelations,
Map<String, Vulnerability> groupVulnerabilities) throws MalformedURLException {
/**
* De las vulnerabilidades encontradas las mapeamos a objetos
* y las agrupamos por tipo de vulnerabilidad y url
*/
for (Alert alert: site.getAlerts()) {
String nameVul... |
24,703 | 0 | // TODO: andrus, 4/28/2006 - actually we need to analyze preloaded classes and
// see how they were annotated to choose the right access type... | @Override
public boolean onStartNode(ProjectPath path) {
JpaEntityMap entityMap = (JpaEntityMap) path.getObject();
// TODO: andrus, 4/28/2006 - actually we need to analyze preloaded classes and
// see how they were annotated to choose the right access type...
enti... | DESIGN | true | public boolean onStartNode(ProjectPath path) {
JpaEntityMap entityMap = (JpaEntityMap) path.getObject();
// TODO: andrus, 4/28/2006 - actually we need to analyze preloaded classes and
// see how they were annotated to choose the right access type...
entityMap.setAccess(AccessType.FIELD);
return true; | @Override
public boolean onStartNode(ProjectPath path) {
JpaEntityMap entityMap = (JpaEntityMap) path.getObject();
// TODO: andrus, 4/28/2006 - actually we need to analyze preloaded classes and
// see how they were annotated to choose the right access type...
entityMap.setAccess(AccessType.FIELD);
return true;
} | @Override
public boolean onStartNode(ProjectPath path) {
JpaEntityMap entityMap = (JpaEntityMap) path.getObject();
// TODO: andrus, 4/28/2006 - actually we need to analyze preloaded classes and
// see how they were annotated to choose the right access type...
entityMap.setAccess(AccessType.FIELD);
return true;
} |
24,704 | 0 | // JPA Spec, 2.1.8.2 (same for all relationship owners):
// The following mapping defaults apply: [...]
// Table A contains a foreign key to table B. The foreign key column
// name is formed as the concatenation of the following: the name of
// the relationship property or field of entityA; "_" ; the name of
// the pri... | @Override
public boolean onStartNode(ProjectPath path) {
JpaRelationship relationship = (JpaRelationship) path.getObjectParent();
JpaJoinColumn column = (JpaJoinColumn) path.getObject();
if (column.getTable() == null) {
JpaEntity entity = path.firstInstanceOf(... | NONSATD | true | column.setTable(entity.getTable().getName());
}
// JPA Spec, 2.1.8.2 (same for all relationship owners):
// The following mapping defaults apply: [...]
// Table A contains a foreign key to table B. The foreign key column
// name is formed as the concatenation of the following: the name of
// the relationship property o... | @Override
public boolean onStartNode(ProjectPath path) {
JpaRelationship relationship = (JpaRelationship) path.getObjectParent();
JpaJoinColumn column = (JpaJoinColumn) path.getObject();
if (column.getTable() == null) {
JpaEntity entity = path.firstInstanceOf(JpaEntity.class);
column.setTable(entity.getTable().getName(... | @Override
public boolean onStartNode(ProjectPath path) {
JpaRelationship relationship = (JpaRelationship) path.getObjectParent();
JpaJoinColumn column = (JpaJoinColumn) path.getObject();
if (column.getTable() == null) {
JpaEntity entity = path.firstInstanceOf(JpaEntity.class);
column.setTable(entity.getTable().getName(... |
24,704 | 1 | // TODO: andrus, 4/30/2006 implement this; note that instead of
// checking for "attribute.getJoinColumns().isEmpty()" above,
// we'll have to match individual columns | @Override
public boolean onStartNode(ProjectPath path) {
JpaRelationship relationship = (JpaRelationship) path.getObjectParent();
JpaJoinColumn column = (JpaJoinColumn) path.getObject();
if (column.getTable() == null) {
JpaEntity entity = path.firstInstanceOf(... | IMPLEMENTATION | true | }
else if (target.getAttributes().getIds().size() > 1) {
// TODO: andrus, 4/30/2006 implement this; note that instead of
// checking for "attribute.getJoinColumns().isEmpty()" above,
// we'll have to match individual columns
context.recordConflict(new SimpleValidationFailure(
relationship, | + relationship.getTargetEntityName()));
}
else if (target.getAttributes() == null
|| target.getAttributes().getIds().isEmpty()) {
context.recordConflict(new SimpleValidationFailure(
target,
"Relationship target has no PK defined: "
+ relationship.getTargetEntityName()));
}
else if (target.getAttributes().getIds().size(... | // name is formed as the concatenation of the following: the name of
// the relationship property or field of entityA; "_" ; the name of
// the primary key column in table B. The foreign key column has the
// same type as the primary key of table B.
JpaEntityMap map = path.firstInstanceOf(JpaEntityMap.class);
JpaEntity... |
24,712 | 0 | // TODO: optimize | public void deleteAll(User user, Conversation conversation) {
// TODO: optimize
messageRepository.getAllBySenderAndConversation(user, conversation)
.stream()
.parallel()
.forEach(this::delete);
} | DESIGN | true | public void deleteAll(User user, Conversation conversation) {
// TODO: optimize
messageRepository.getAllBySenderAndConversation(user, conversation)
.stream() | public void deleteAll(User user, Conversation conversation) {
// TODO: optimize
messageRepository.getAllBySenderAndConversation(user, conversation)
.stream()
.parallel()
.forEach(this::delete);
} | public void deleteAll(User user, Conversation conversation) {
// TODO: optimize
messageRepository.getAllBySenderAndConversation(user, conversation)
.stream()
.parallel()
.forEach(this::delete);
} |
24,717 | 0 | /**
*
* @see org.springframework.web.servlet.mvc.Controller#handleRequest(javax.servlet.http.HttpServletRequest,
* javax.servlet.http.HttpServletResponse)
*/ | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... |
24,717 | 1 | // copy study information | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyCommand.setStudy(study);
// study from TBI do not contain submission_id | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... |
24,717 | 2 | // study from TBI do not contain submission_id | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | // copy study information
studyCommand.setStudy(study);
// study from TBI do not contain submission_id
if (submission != null) {
studyCommand.setSubmission_id(submission.getId()); | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... |
24,717 | 3 | // FIXME: next if block needs to me moved to the onSumbit method when
// we this controller will extend BaseFormController. | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | DEFECT | true | StringBuilder errBuilder = new StringBuilder();
for (Analysis analysis : analysisList) {
// FIXME: next if block needs to me moved to the onSumbit method when
// we this controller will extend BaseFormController.
if (!analysis.getValidated()) {
ExecutionResult result = analysis.validate(); | studyCommand.setStudy(study);
// study from TBI do not contain submission_id
if (submission != null) {
studyCommand.setSubmission_id(submission.getId());
}
List<Analysis> analysisList = study.getAnalyses();
List<AnalysisCommand> analysisCommandList = new ArrayList<AnalysisCommand>();
List<Analysis> changedAnalyses = ne... | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... |
24,717 | 4 | // save to db if the validated flag is updated: | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | }
if (analysis.getValidated()) {
// save to db if the validated flag is updated:
changedAnalyses.add(analysis);
} | StringBuilder errBuilder = new StringBuilder();
for (Analysis analysis : analysisList) {
// FIXME: next if block needs to me moved to the onSumbit method when
// we this controller will extend BaseFormController.
if (!analysis.getValidated()) {
ExecutionResult result = analysis.validate();
if (!result.isSuccessful()) {... | StudyCommand studyCommand = new StudyCommand();
// copy study information
studyCommand.setStudy(study);
// study from TBI do not contain submission_id
if (submission != null) {
studyCommand.setSubmission_id(submission.getId());
}
List<Analysis> analysisList = study.getAnalyses();
List<AnalysisCommand> analysisCommandLi... |
24,717 | 5 | //FIXME: display err message in GUI | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | IMPLEMENTATION | true | }
}
//FIXME: display err message in GUI
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(errBuilder.toString()); //$NON-NLS-1$ | if (!analysis.getValidated()) {
ExecutionResult result = analysis.validate();
if (!result.isSuccessful()) {
errBuilder.append(result.getErrorMessage());
}
if (analysis.getValidated()) {
// save to db if the validated flag is updated:
changedAnalyses.add(analysis);
}
}
//FIXME: display err message in GUI
if (LOGGER.isDe... | if (submission != null) {
studyCommand.setSubmission_id(submission.getId());
}
List<Analysis> analysisList = study.getAnalyses();
List<AnalysisCommand> analysisCommandList = new ArrayList<AnalysisCommand>();
List<Analysis> changedAnalyses = new ArrayList<Analysis>();
StringBuilder errBuilder = new StringBuilder();
for ... |
24,717 | 6 | //$NON-NLS-1$ | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | //FIXME: display err message in GUI
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(errBuilder.toString()); //$NON-NLS-1$
}
// | if (!result.isSuccessful()) {
errBuilder.append(result.getErrorMessage());
}
if (analysis.getValidated()) {
// save to db if the validated flag is updated:
changedAnalyses.add(analysis);
}
}
//FIXME: display err message in GUI
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(errBuilder.toString()); //$NON-NLS-1$
}
//
// Ana... | }
List<Analysis> analysisList = study.getAnalyses();
List<AnalysisCommand> analysisCommandList = new ArrayList<AnalysisCommand>();
List<Analysis> changedAnalyses = new ArrayList<Analysis>();
StringBuilder errBuilder = new StringBuilder();
for (Analysis analysis : analysisList) {
// FIXME: next if block needs to me move... |
24,717 | 7 | //
// Analysis | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyCommand.setStudy(study);
// study from TBI do not contain submission_id
if (submission != null) { | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
studyComman... |
24,717 | 8 | // Analysis Steps for Analysis and add algorithm type | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | AnalysisCommand analysisCommand = new AnalysisCommand();
BeanUtils.copyProperties(analysisCommand, analysis);
// Analysis Steps for Analysis and add algorithm type
List<AnalysisStep> analysisStepList = analysis.getAnalysisStepsReadOnly();
List<AnalysisStepCommand> analysisStepCommandList = new ArrayList<AnalysisStepCom... | }
}
//FIXME: display err message in GUI
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(errBuilder.toString()); //$NON-NLS-1$
}
//
// Analysis
AnalysisCommand analysisCommand = new AnalysisCommand();
BeanUtils.copyProperties(analysisCommand, analysis);
// Analysis Steps for Analysis and add algorithm type
List<AnalysisStep... | // FIXME: next if block needs to me moved to the onSumbit method when
// we this controller will extend BaseFormController.
if (!analysis.getValidated()) {
ExecutionResult result = analysis.validate();
if (!result.isSuccessful()) {
errBuilder.append(result.getErrorMessage());
}
if (analysis.getValidated()) {
// save to... |
24,717 | 9 | // analysisStepCommand.setId(analysisStep.getId());
// analysisStepCommand.setSoftwareInfo(analysisStep.getSoftwareInfo()); | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | AnalysisStepCommand analysisStepCommand = new AnalysisStepCommand();
BeanUtils.copyProperties(analysisStepCommand, analysisStep);
// analysisStepCommand.setId(analysisStep.getId());
// analysisStepCommand.setSoftwareInfo(analysisStep.getSoftwareInfo());
Algorithm algorithm = analysisStep.getAlgorithmInfo();
String algo... | //
// Analysis
AnalysisCommand analysisCommand = new AnalysisCommand();
BeanUtils.copyProperties(analysisCommand, analysis);
// Analysis Steps for Analysis and add algorithm type
List<AnalysisStep> analysisStepList = analysis.getAnalysisStepsReadOnly();
List<AnalysisStepCommand> analysisStepCommandList = new ArrayList<... | }
if (analysis.getValidated()) {
// save to db if the validated flag is updated:
changedAnalyses.add(analysis);
}
}
//FIXME: display err message in GUI
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(errBuilder.toString()); //$NON-NLS-1$
}
//
// Analysis
AnalysisCommand analysisCommand = new AnalysisCommand();
BeanUtils.co... |
24,717 | 10 | // add algorithm type for analysisStepCommand | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | algorithmType = Constants.ALGORITHM_UPGMA;
}
// add algorithm type for analysisStepCommand
analysisStepCommand.setAlgorithmType(algorithmType);
// analyzed data for each analysis step | algorithmType = Constants.ALGORITHM_OTHER;
}else if (algorithm instanceof BayesianAlgorithm) {
algorithmType = Constants.ALGORITHM_Bayesian;
} else if (algorithm instanceof EvolutionAlgorithm) {
algorithmType = Constants.ALGORITHM_Evolution;
} else if (algorithm instanceof JoiningAlgorithm) {
algorithmType = Constants.... | BeanUtils.copyProperties(analysisStepCommand, analysisStep);
// analysisStepCommand.setId(analysisStep.getId());
// analysisStepCommand.setSoftwareInfo(analysisStep.getSoftwareInfo());
Algorithm algorithm = analysisStep.getAlgorithmInfo();
String algorithmType = new String();
if (algorithm instanceof LikelihoodAlgorith... |
24,717 | 11 | // analyzed data for each analysis step | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | // add algorithm type for analysisStepCommand
analysisStepCommand.setAlgorithmType(algorithmType);
// analyzed data for each analysis step
List<AnalyzedData> analyzedDataSet = analysisStep.getDataSetReadOnly();
List<AnalyzedDataCommand> analyzedDataCommandList = new ArrayList<AnalyzedDataCommand>(); | algorithmType = Constants.ALGORITHM_Bayesian;
} else if (algorithm instanceof EvolutionAlgorithm) {
algorithmType = Constants.ALGORITHM_Evolution;
} else if (algorithm instanceof JoiningAlgorithm) {
algorithmType = Constants.ALGORITHM_Joining;
} else if (algorithm instanceof UPGMAAlgorithm) {
algorithmType = Constants.... | // analysisStepCommand.setSoftwareInfo(analysisStep.getSoftwareInfo());
Algorithm algorithm = analysisStep.getAlgorithmInfo();
String algorithmType = new String();
if (algorithm instanceof LikelihoodAlgorithm) {
algorithmType = Constants.ALGORITHM_LIKELIHOOD;
} else if (algorithm instanceof ParsimonyAlgorithm) {
algori... |
24,717 | 12 | // Matrix or Tree? | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | List<AnalyzedData> analyzedDataSet = analysisStep.getDataSetReadOnly();
List<AnalyzedDataCommand> analyzedDataCommandList = new ArrayList<AnalyzedDataCommand>();
// Matrix or Tree?
for (AnalyzedData analyzedData : analyzedDataSet) {
AnalyzedDataCommand analyzedDataCommand = new AnalyzedDataCommand(); | } else if (algorithm instanceof JoiningAlgorithm) {
algorithmType = Constants.ALGORITHM_Joining;
} else if (algorithm instanceof UPGMAAlgorithm) {
algorithmType = Constants.ALGORITHM_UPGMA;
}
// add algorithm type for analysisStepCommand
analysisStepCommand.setAlgorithmType(algorithmType);
// analyzed data for each ana... | if (algorithm instanceof LikelihoodAlgorithm) {
algorithmType = Constants.ALGORITHM_LIKELIHOOD;
} else if (algorithm instanceof ParsimonyAlgorithm) {
algorithmType = Constants.ALGORITHM_PARSIMONY;
} else if (algorithm instanceof OtherAlgorithm) {
algorithmType = Constants.ALGORITHM_OTHER;
}else if (algorithm instanceof... |
24,717 | 13 | // end for | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | }
analyzedDataCommandList.add(analyzedDataCommand);
} // end for
// add analyzedData for analysisStepCommand
Collections.sort(analyzedDataCommandList, new AnalyzedDataComparator()); | analyzedDataCommand.setId(analyzedMatrix.getId());
analyzedDataCommand.setDataId(analyzedMatrix.getMatrix().getId());
} else if (analyzedData instanceof AnalyzedTree) {
AnalyzedTree analyzedTree = (AnalyzedTree) analyzedData;
analyzedDataCommand.setDataType(Constants.TREE_KEY);
analyzedDataCommand.setDisplayName(analyz... | // Matrix or Tree?
for (AnalyzedData analyzedData : analyzedDataSet) {
AnalyzedDataCommand analyzedDataCommand = new AnalyzedDataCommand();
BeanUtils.copyProperties(analyzedDataCommand, analyzedData);
String inputOutput = (analyzedData.isInputData()) ? ("Input") : ("Output");
analyzedDataCommand.setInputOutputType(inpu... |
24,717 | 14 | // add analyzedData for analysisStepCommand | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
Study study = ControllerUtil.findStudy(request, mStudyService);
Submission submission = (Submission) study.getSubmission();
StudyCommand studyCommand = new StudyCommand();
// copy study information
... | NONSATD | true | analyzedDataCommandList.add(analyzedDataCommand);
} // end for
// add analyzedData for analysisStepCommand
Collections.sort(analyzedDataCommandList, new AnalyzedDataComparator());
analysisStepCommand.setAnalyzedDataCommandList(analyzedDataCommandList); | analyzedDataCommand.setDataId(analyzedMatrix.getMatrix().getId());
} else if (analyzedData instanceof AnalyzedTree) {
AnalyzedTree analyzedTree = (AnalyzedTree) analyzedData;
analyzedDataCommand.setDataType(Constants.TREE_KEY);
analyzedDataCommand.setDisplayName(analyzedTree.getTree().getLabel());
analyzedDataCommand.s... | for (AnalyzedData analyzedData : analyzedDataSet) {
AnalyzedDataCommand analyzedDataCommand = new AnalyzedDataCommand();
BeanUtils.copyProperties(analyzedDataCommand, analyzedData);
String inputOutput = (analyzedData.isInputData()) ? ("Input") : ("Output");
analyzedDataCommand.setInputOutputType(inputOutput);
if (analy... |
16,532 | 0 | /**
* Return the id of the block that the spawn is happening on.
*/ | public String getBlockId() {
final BlockEntity be = serverWorld.getBlockEntity(this.blockPos); // FIXME do we need to check at y+1?
return String.valueOf(Registry.BLOCK_ENTITY_TYPE.getId(be.getType()));
} | NONSATD | true | public String getBlockId() {
final BlockEntity be = serverWorld.getBlockEntity(this.blockPos); // FIXME do we need to check at y+1?
return String.valueOf(Registry.BLOCK_ENTITY_TYPE.getId(be.getType()));
} | public String getBlockId() {
final BlockEntity be = serverWorld.getBlockEntity(this.blockPos); // FIXME do we need to check at y+1?
return String.valueOf(Registry.BLOCK_ENTITY_TYPE.getId(be.getType()));
} | public String getBlockId() {
final BlockEntity be = serverWorld.getBlockEntity(this.blockPos); // FIXME do we need to check at y+1?
return String.valueOf(Registry.BLOCK_ENTITY_TYPE.getId(be.getType()));
} |
16,532 | 1 | // FIXME do we need to check at y+1? | public String getBlockId() {
final BlockEntity be = serverWorld.getBlockEntity(this.blockPos); // FIXME do we need to check at y+1?
return String.valueOf(Registry.BLOCK_ENTITY_TYPE.getId(be.getType()));
} | DEFECT | true | public String getBlockId() {
final BlockEntity be = serverWorld.getBlockEntity(this.blockPos); // FIXME do we need to check at y+1?
return String.valueOf(Registry.BLOCK_ENTITY_TYPE.getId(be.getType()));
} | public String getBlockId() {
final BlockEntity be = serverWorld.getBlockEntity(this.blockPos); // FIXME do we need to check at y+1?
return String.valueOf(Registry.BLOCK_ENTITY_TYPE.getId(be.getType()));
} | public String getBlockId() {
final BlockEntity be = serverWorld.getBlockEntity(this.blockPos); // FIXME do we need to check at y+1?
return String.valueOf(Registry.BLOCK_ENTITY_TYPE.getId(be.getType()));
} |
148 | 0 | /** TODO: Synchronize once per read, not once per varlet */ | private void addVar(Varlet v){
long key=key(v.chromosome, v.beginLoc);
ArrayList<Varlet> list=keymap.get(key);
assert(list!=null) : "\nCan't find "+key+" in "+keymap.keySet()+"\n";
synchronized(list){
list.add(v);
if(list.size()>=WRITE_BUFFER){
if(MERGE_EQUAL_VARLETS){
mergeEqualVarlets(l... | DESIGN | true | private void addVar(Varlet v){
long key=key(v.chromosome, v.beginLoc);
ArrayList<Varlet> list=keymap.get(key);
assert(list!=null) : "\nCan't find "+key+" in "+keymap.keySet()+"\n";
synchronized(list){
list.add(v);
if(list.size()>=WRITE_BUFFER){
if(MERGE_EQUAL_VARLETS){
mergeEqualVarlets(list);
}else{
Collections.sort(l... | private void addVar(Varlet v){
long key=key(v.chromosome, v.beginLoc);
ArrayList<Varlet> list=keymap.get(key);
assert(list!=null) : "\nCan't find "+key+" in "+keymap.keySet()+"\n";
synchronized(list){
list.add(v);
if(list.size()>=WRITE_BUFFER){
if(MERGE_EQUAL_VARLETS){
mergeEqualVarlets(list);
}else{
Collections.sort(l... | private void addVar(Varlet v){
long key=key(v.chromosome, v.beginLoc);
ArrayList<Varlet> list=keymap.get(key);
assert(list!=null) : "\nCan't find "+key+" in "+keymap.keySet()+"\n";
synchronized(list){
list.add(v);
if(list.size()>=WRITE_BUFFER){
if(MERGE_EQUAL_VARLETS){
mergeEqualVarlets(list);
}else{
Collections.sort(l... |
24,727 | 0 | // TODO: Not sure what to do about this now that we have base and absolute path. | @Override
public List<DeviceStorageRoot> getSecondaryDeviceStorageRoots() {
ArrayList<DeviceStorageRoot> secondaryStorageRoot = new ArrayList<>(1);
if (secondaryStoragePath != null) {
secondaryStorageRoot.add(new DeviceStorageRoot(secondaryStoragePath, secondaryStoragePath, DeviceStorage... | DESIGN | true | @Override
public List<DeviceStorageRoot> getSecondaryDeviceStorageRoots() {
ArrayList<DeviceStorageRoot> secondaryStorageRoot = new ArrayList<>(1);
if (secondaryStoragePath != null) {
secondaryStorageRoot.add(new DeviceStorageRoot(secondaryStoragePath, secondaryStoragePath, DeviceStorageRoot.Type.SECONDARY));
}
return ... | @Override
public List<DeviceStorageRoot> getSecondaryDeviceStorageRoots() {
ArrayList<DeviceStorageRoot> secondaryStorageRoot = new ArrayList<>(1);
if (secondaryStoragePath != null) {
secondaryStorageRoot.add(new DeviceStorageRoot(secondaryStoragePath, secondaryStoragePath, DeviceStorageRoot.Type.SECONDARY));
}
return ... | @Override
public List<DeviceStorageRoot> getSecondaryDeviceStorageRoots() {
ArrayList<DeviceStorageRoot> secondaryStorageRoot = new ArrayList<>(1);
if (secondaryStoragePath != null) {
secondaryStorageRoot.add(new DeviceStorageRoot(secondaryStoragePath, secondaryStoragePath, DeviceStorageRoot.Type.SECONDARY));
}
return ... |
24,736 | 0 | // Prior to fix, this was throwing StringIndexOutOfBoundsException | @Test
public void testLANG1292() {
// Prior to fix, this was throwing StringIndexOutOfBoundsException
Wrap.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 70);
} | DEFECT | true | @Test
public void testLANG1292() {
// Prior to fix, this was throwing StringIndexOutOfBoundsException
Wrap.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " | @Test
public void testLANG1292() {
// Prior to fix, this was throwing StringIndexOutOfBoundsException
Wrap.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 70);
} | @Test
public void testLANG1292() {
// Prior to fix, this was throwing StringIndexOutOfBoundsException
Wrap.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 70);
} |
161 | 0 | /**
* Add several new sequences to <code>ambariSequencesTable</code>.
* @param seqNames list of sequences to be inserted
* @param seqDefaultValue initial value for the sequence
* @param ignoreFailure true to ignore insert sql errors
* @throws SQLException
*
*/ | protected final void addSequences(List<String> seqNames, Long seqDefaultValue, boolean ignoreFailure) throws SQLException{
// ToDo: rewrite function to use one SQL call per select/insert for all items
for (String seqName: seqNames){
addSequence(seqName, seqDefaultValue, ignoreFailure);
}
} | NONSATD | true | protected final void addSequences(List<String> seqNames, Long seqDefaultValue, boolean ignoreFailure) throws SQLException{
// ToDo: rewrite function to use one SQL call per select/insert for all items
for (String seqName: seqNames){
addSequence(seqName, seqDefaultValue, ignoreFailure);
}
} | protected final void addSequences(List<String> seqNames, Long seqDefaultValue, boolean ignoreFailure) throws SQLException{
// ToDo: rewrite function to use one SQL call per select/insert for all items
for (String seqName: seqNames){
addSequence(seqName, seqDefaultValue, ignoreFailure);
}
} | protected final void addSequences(List<String> seqNames, Long seqDefaultValue, boolean ignoreFailure) throws SQLException{
// ToDo: rewrite function to use one SQL call per select/insert for all items
for (String seqName: seqNames){
addSequence(seqName, seqDefaultValue, ignoreFailure);
}
} |
161 | 1 | // ToDo: rewrite function to use one SQL call per select/insert for all items | protected final void addSequences(List<String> seqNames, Long seqDefaultValue, boolean ignoreFailure) throws SQLException{
// ToDo: rewrite function to use one SQL call per select/insert for all items
for (String seqName: seqNames){
addSequence(seqName, seqDefaultValue, ignoreFailure);
}
} | DESIGN | true | protected final void addSequences(List<String> seqNames, Long seqDefaultValue, boolean ignoreFailure) throws SQLException{
// ToDo: rewrite function to use one SQL call per select/insert for all items
for (String seqName: seqNames){
addSequence(seqName, seqDefaultValue, ignoreFailure); | protected final void addSequences(List<String> seqNames, Long seqDefaultValue, boolean ignoreFailure) throws SQLException{
// ToDo: rewrite function to use one SQL call per select/insert for all items
for (String seqName: seqNames){
addSequence(seqName, seqDefaultValue, ignoreFailure);
}
} | protected final void addSequences(List<String> seqNames, Long seqDefaultValue, boolean ignoreFailure) throws SQLException{
// ToDo: rewrite function to use one SQL call per select/insert for all items
for (String seqName: seqNames){
addSequence(seqName, seqDefaultValue, ignoreFailure);
}
} |
24,737 | 0 | // Prior to fix, this was throwing StringIndexOutOfBoundsException | @Test
public void testLANG1397() {
// Prior to fix, this was throwing StringIndexOutOfBoundsException
Wrap.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", Integer.MAX_VALUE);
... | DEFECT | true | @Test
public void testLANG1397() {
// Prior to fix, this was throwing StringIndexOutOfBoundsException
Wrap.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " | @Test
public void testLANG1397() {
// Prior to fix, this was throwing StringIndexOutOfBoundsException
Wrap.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", Integer.MAX_VALUE);
} | @Test
public void testLANG1397() {
// Prior to fix, this was throwing StringIndexOutOfBoundsException
Wrap.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", Integer.MAX_VALUE);
} |
32,941 | 0 | // this can probably work on contentValues_ | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | DESIGN | true | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) { | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 1 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 2 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 3 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 4 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 5 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 6 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 7 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 8 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 9 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 10 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
32,941 | 11 | // NOI18N | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | NONSATD | true | }
if ( entry.getItemFullPath().equals( paramFullPath ) == true ) {
if ( valueObj.getOperator().equals( "==" ) == true ) { // NOI18N
try {
return Long.parseLong( valueObj.getCalibratedValue() ); | for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGUMENT ) ) {
continue;
}
XTCEContainerEntryValue valueObj = entry.getValue();
if ( entry.getValue() == null ) {
continue;
}
if ( entry.getItemFullPath().equals( paramFul... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != FieldType.ARGU... |
8,369 | 0 | // TODO
// Netty allow to set/get attachment on Channel in the near feature, e.g.
// channel.getAttribute(new AttributeKey<Endpoint>(TRANSPORT_SENDER)) | public static void attachEndpointToSession(Channel channel, Endpoint endpoint) {
// TODO
// Netty allow to set/get attachment on Channel in the near feature, e.g.
// channel.getAttribute(new AttributeKey<Endpoint>(TRANSPORT_SENDER))
endpoints.set(channel, endpoint);
} | IMPLEMENTATION | true | public static void attachEndpointToSession(Channel channel, Endpoint endpoint) {
// TODO
// Netty allow to set/get attachment on Channel in the near feature, e.g.
// channel.getAttribute(new AttributeKey<Endpoint>(TRANSPORT_SENDER))
endpoints.set(channel, endpoint);
} | public static void attachEndpointToSession(Channel channel, Endpoint endpoint) {
// TODO
// Netty allow to set/get attachment on Channel in the near feature, e.g.
// channel.getAttribute(new AttributeKey<Endpoint>(TRANSPORT_SENDER))
endpoints.set(channel, endpoint);
} | public static void attachEndpointToSession(Channel channel, Endpoint endpoint) {
// TODO
// Netty allow to set/get attachment on Channel in the near feature, e.g.
// channel.getAttribute(new AttributeKey<Endpoint>(TRANSPORT_SENDER))
endpoints.set(channel, endpoint);
} |
24,756 | 0 | //TODO Find a way to re-send the message. | public static void addChatMessageFixed(ICommandSender sender, IChatComponent message) {
if (sender == null || message == null) return;
if (sender instanceof EntityPlayerMP) {
if (((EntityPlayerMP)sender).playerNetServerHandler != null) {
sender.addChatMessage(message);
... | IMPLEMENTATION | true | sender.addChatMessage(message);
} else {
//TODO Find a way to re-send the message.
}
} else { | public static void addChatMessageFixed(ICommandSender sender, IChatComponent message) {
if (sender == null || message == null) return;
if (sender instanceof EntityPlayerMP) {
if (((EntityPlayerMP)sender).playerNetServerHandler != null) {
sender.addChatMessage(message);
} else {
//TODO Find a way to re-send the message.... | public static void addChatMessageFixed(ICommandSender sender, IChatComponent message) {
if (sender == null || message == null) return;
if (sender instanceof EntityPlayerMP) {
if (((EntityPlayerMP)sender).playerNetServerHandler != null) {
sender.addChatMessage(message);
} else {
//TODO Find a way to re-send the message.... |
16,569 | 0 | /**
* Test a function from a Wyil file
* by executing the test with randomised parameters
* @param id The module used
* @param interpreter Whiley interpreter used to execute the function/method
* @param dec The function or method
* @param testType The type of tests ... | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new ExhaustiveGenerateTest... | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new ExhaustiveGenerateTest... | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new ExhaustiveGenerateTest... |
16,569 | 1 | // Get the method for generating test values | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try { | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new ExhaustiveGenerateTest... | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new ExhaustiveGenerateTest... |
16,569 | 2 | // Get the function's relevant header information | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | return Result.ERRORS;
}
// Get the function's relevant header information
NameID name = new NameID(id, dec.getName().get());
Type.Callable type = dec.getType(); | if(testType == TestType.EXHAUSTIVE) {
testGen = new ExhaustiveGenerateTest(dec.getParameters(), interpreter, numTest, lowerLimit, upperLimit);
}
else {
testGen = new RandomGenerateTest(dec.getParameters(), interpreter, numTest, lowerLimit, upperLimit);
}
} catch (IntegerRangeException e) {
System.out.println("Integer r... | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new ExhaustiveGenerateTest... |
16,569 | 3 | // System.out.println("FUNCTION PARAM TYPES "+ inputParameters);
// System.out.println("PRECONDITION "+ preconditions);
// System.out.println("POSTCONDITION "+ postconditions);
// // Have to remove the pre and post conditions out of the
// // f... | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | Tuple<Decl.Variable> outputParameters = dec.getReturns();
System.out.println("Name of the function/method: " + name.name());
// System.out.println("FUNCTION PARAM TYPES "+ inputParameters);
// System.out.println("PRECONDITION "+ preconditions);
// System.out.println("POSTCONDITION "+ postconditions);
// // Have to remo... | return Result.ERRORS;
}
// Get the function's relevant header information
NameID name = new NameID(id, dec.getName().get());
Type.Callable type = dec.getType();
Tuple<Expr> preconditions = dec.getRequires();
Tuple<Expr> postconditions = dec.getEnsures();
Tuple<Decl.Variable> inputParameters = dec.getParameters();
Tuple... | GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new ExhaustiveGenerateTest(dec.getParameters(), interpreter, numTest, lowerLimit, upperLimit);
}
else {
testGen = new RandomGenerateTest(dec.getParameters(), interpreter, numTest, lowerLimit, upperLimit);
}
} catch (IntegerRangeException e) {
S... |
16,569 | 4 | // Stop execution if all possible combinations have been generated
// Can do this for methods as well as a new call stack is created each time | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | for(int i=0; i < numTest; i++) {
recursiveType.clear();
// Stop execution if all possible combinations have been generated
// Can do this for methods as well as a new call stack is created each time
if(testGen.exceedSize() && i != 0) {
completedAll = true; | // // Validation will be conducted manually inside the function.
// Tuple<Expr> empty = new Tuple<Expr>();
// dec.setOperand(4, empty); // Remove precondition
// dec.setOperand(5, empty); // Remove postcondition
boolean completedAll = false;
int numSkipped = 0;
int numPassed = 0;
int numFailed = 0;
for(int i=0; i < num... | Tuple<Expr> preconditions = dec.getRequires();
Tuple<Expr> postconditions = dec.getEnsures();
Tuple<Decl.Variable> inputParameters = dec.getParameters();
Tuple<Decl.Variable> outputParameters = dec.getReturns();
System.out.println("Name of the function/method: " + name.name());
// System.out.println("FUNCTION PARAM TYP... |
16,569 | 5 | // Check the precondition | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | RValue[] paramValues = null;
CallStack frame = interpreter.new CallStack();
// Check the precondition
try {
paramValues = testGen.generateParameters(); | for(int i=0; i < numTest; i++) {
recursiveType.clear();
// Stop execution if all possible combinations have been generated
// Can do this for methods as well as a new call stack is created each time
if(testGen.exceedSize() && i != 0) {
completedAll = true;
break;
}
RValue[] paramValues = null;
CallStack frame = interpr... | // // Have to remove the pre and post conditions out of the
// // function so the function is executed without validation
// // Validation will be conducted manually inside the function.
// Tuple<Expr> empty = new Tuple<Expr>();
// dec.setOperand(4, empty); // Remove precondition
// dec.setOperand(5, empty); // Remove ... |
16,569 | 6 | // Checks the postcondition when it is executed | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | }
System.out.println("INPUT: " + Arrays.toString(paramValues));
// Checks the postcondition when it is executed
RValue[] returns = null;
try { | catch(AssertionError e){
System.out.println("Pre-condition failed on input: " + Arrays.toString(paramValues));
numSkipped++;
continue;
}
catch(RuntimeException e) {
System.out.println("Error occurred when generating input " + e + ": " + e.getMessage());
return Result.ERRORS;
}
System.out.println("INPUT: " + Arrays.toSt... | for(int j=0; j < inputParameters.size(); j++) {
Decl.Variable parameter = inputParameters.get(j);
frame.putLocal(parameter.getName(), paramValues[j]);
}
interpreter.checkInvariants(frame, preconditions);
}
catch(CannotGenerateException e) {
System.out.println(e);
return Result.ERRORS;
}
catch(AssertionError e){
System.... |
16,569 | 7 | // Add the return values into the frame for validation | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | }
try {
// Add the return values into the frame for validation
for(int j=0; j < outputParameters.size(); j++) {
Decl.Variable parameter = outputParameters.get(j); | catch(AssertionError e) {
System.out.println("Error occurred during execution " + e + ": " + e.getMessage());
numFailed++;
continue;
}
catch(RuntimeException e) {
System.out.println("Error occurred during execution " + e + ": " + e.getMessage());
return Result.ERRORS;
}
try {
// Add the return values into the frame for... | System.out.println("Error occurred when generating input " + e + ": " + e.getMessage());
return Result.ERRORS;
}
System.out.println("INPUT: " + Arrays.toString(paramValues));
// Checks the postcondition when it is executed
RValue[] returns = null;
try {
returns = interpreter.execute(name, type, frame, false, false, par... |
16,569 | 8 | // // Print out any return values produced | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | interpreter.checkInvariants(frame, postconditions);
numPassed++;
// // Print out any return values produced
if (returns != null) {
System.out.println("OUTPUT: " + Arrays.toString(returns)); | Type paramType = parameter.getType();
boolean valid = checkInvariant(interpreter, paramType, returns[j]);
if(!valid) {
throw new AssertionError("Type constraints for " + parameter + " failed");
}
frame.putLocal(parameter.getName(), returns[j]);
}
try {
interpreter.checkInvariants(frame, postconditions);
numPassed++;
//... | continue;
}
catch(RuntimeException e) {
System.out.println("Error occurred during execution " + e + ": " + e.getMessage());
return Result.ERRORS;
}
try {
// Add the return values into the frame for validation
for(int j=0; j < outputParameters.size(); j++) {
Decl.Variable parameter = outputParameters.get(j);
Type paramT... |
16,569 | 9 | // FIXME resolution error | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | DEFECT | true | }
catch (ResolutionError e) {
// FIXME resolution error
e.printStackTrace();
assert false; | catch(AssertionError e) {
System.out.printf("Failed Input: %s%nFailed Output: %s%n", Arrays.toString(paramValues), Arrays.toString(returns));
System.out.println("Due to error " + e);
numFailed++;
}
catch(RuntimeException e) {
System.out.println("Error when checking type invariants of return values " + e + ": " + e.getM... | catch(AssertionError e) {
System.out.printf("Failed Input: %s%nFailed Output: %s%n", Arrays.toString(paramValues), Arrays.toString(returns));
System.out.println("Postcondition failed " + e);
numFailed++;
}
catch(RuntimeException e) {
System.out.println("Error when checking invariants of return values " + e + ": " + e.g... |
16,569 | 10 | // Overall test statistics | private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) {
// Get the method for generating test values
GenerateTest testGen;
try {
if(testType == TestType.EXHAUSTIVE) {
testGen = new Exhaustiv... | NONSATD | true | }
}
// Overall test statistics
if(completedAll) {
System.out.println("Tested all possible combinations"); | catch(RuntimeException e) {
System.out.println("Error when checking type invariants of return values " + e + ": " + e.getMessage());
return Result.ERRORS;
}
catch (ResolutionError e) {
// FIXME resolution error
e.printStackTrace();
assert false;
}
}
// Overall test statistics
if(completedAll) {
System.out.println("Test... | catch(RuntimeException e) {
System.out.println("Error when checking invariants of return values " + e + ": " + e.getMessage());
return Result.ERRORS;
}
}
catch(AssertionError e) {
System.out.printf("Failed Input: %s%nFailed Output: %s%n", Arrays.toString(paramValues), Arrays.toString(returns));
System.out.println("Due ... |
32,955 | 0 | /**
* This thingy is crazy !! upgrading or improvements are forbidden ! Coded to
* Ce truc est legacy de ouf !! alors on arrête les conneries et plus de nouveaux dev dessus !
*
* @param spec
* @param artifactName
* @param groupId
* @param artifactVersion
* @param implemName
... | @Deprecated
public FileDataSource generatePythonImpl(File spec, String artifactName, String groupId, String artifactVersion, String implemName) throws Exception {
Yaml yaml = new Yaml();
LinkedHashMap swaggerFile = yaml.load(FileUtils.openInputStream(spec));
String groupIdApi = getPropInSwa... | DESIGN | true | @Deprecated
public FileDataSource generatePythonImpl(File spec, String artifactName, String groupId, String artifactVersion, String implemName) throws Exception {
Yaml yaml = new Yaml();
LinkedHashMap swaggerFile = yaml.load(FileUtils.openInputStream(spec));
String groupIdApi = getPropInSwaggerFile(swaggerFile, "x-grou... | @Deprecated
public FileDataSource generatePythonImpl(File spec, String artifactName, String groupId, String artifactVersion, String implemName) throws Exception {
Yaml yaml = new Yaml();
LinkedHashMap swaggerFile = yaml.load(FileUtils.openInputStream(spec));
String groupIdApi = getPropInSwaggerFile(swaggerFile, "x-grou... | @Deprecated
public FileDataSource generatePythonImpl(File spec, String artifactName, String groupId, String artifactVersion, String implemName) throws Exception {
Yaml yaml = new Yaml();
LinkedHashMap swaggerFile = yaml.load(FileUtils.openInputStream(spec));
String groupIdApi = getPropInSwaggerFile(swaggerFile, "x-grou... |
8,382 | 0 | /*
* TODO: Doc
*/ | public String parseId() throws SyntaxError {
String value = parseArg();
if (argWasQuoted()) {
throw new SyntaxError("Expected identifier instead of quoted string:" + value);
} else if (value == null) {
throw new SyntaxError("Expected identifier instead of 'null' for function " + sp);
}
... | DOCUMENTATION | true | public String parseId() throws SyntaxError {
String value = parseArg();
if (argWasQuoted()) {
throw new SyntaxError("Expected identifier instead of quoted string:" + value);
} else if (value == null) {
throw new SyntaxError("Expected identifier instead of 'null' for function " + sp);
}
return value;
} | public String parseId() throws SyntaxError {
String value = parseArg();
if (argWasQuoted()) {
throw new SyntaxError("Expected identifier instead of quoted string:" + value);
} else if (value == null) {
throw new SyntaxError("Expected identifier instead of 'null' for function " + sp);
}
return value;
} | public String parseId() throws SyntaxError {
String value = parseArg();
if (argWasQuoted()) {
throw new SyntaxError("Expected identifier instead of quoted string:" + value);
} else if (value == null) {
throw new SyntaxError("Expected identifier instead of 'null' for function " + sp);
}
return value;
} |
8,383 | 0 | /*
* TODO: Doc
*/ | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query v... | DOCUMENTATION | true | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query value is not specified
// Ex: query($qq... | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query value is not specified
// Ex: query($qq... | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query value is not specified
// Ex: query($qq... |
8,383 | 1 | // nestedQuery would be null when de-referenced query value is not specified
// Ex: query($qq) in request with no qq param specified | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query v... | NONSATD | true | qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query value is not specified
// Ex: query($qq) in request with no qq param specified
if (nestedQuery == null) {
throw new SyntaxError("Missing param " + param + " while parsing function '" + sp.... | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query value is not specified
// Ex: query($qq... | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query value is not specified
// Ex: query($qq... |
8,383 | 2 | // value specified directly in local params... so the end of the
// query should be the end of the local params. | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query v... | NONSATD | true | if (end>start) {
if (nestedLocalParams.get(QueryParsing.V) != null) {
// value specified directly in local params... so the end of the
// query should be the end of the local params.
sub = subQuery(qs.substring(start, end), null);
} else { | }
else {
int start = sp.pos;
String v = sp.val;
String qs = v;
ModifiableSolrParams nestedLocalParams = new ModifiableSolrParams();
int end = QueryParsing.parseLocalParams(qs, start, nestedLocalParams, getParams());
QParser sub;
if (end>start) {
if (nestedLocalParams.get(QueryParsing.V) != null) {
// value specified di... | if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query value is not specified
// Ex: query($qq) in request with no qq param specified
if (nestedQuery == null) {
throw... |
8,383 | 3 | // value here is *after* the local params... ask the parser. | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query v... | NONSATD | true | sub = subQuery(qs.substring(start, end), null);
} else {
// value here is *after* the local params... ask the parser.
sub = subQuery(qs, null);
// int subEnd = sub.findEnd(')'); | String qs = v;
ModifiableSolrParams nestedLocalParams = new ModifiableSolrParams();
int end = QueryParsing.parseLocalParams(qs, start, nestedLocalParams, getParams());
QParser sub;
if (end>start) {
if (nestedLocalParams.get(QueryParsing.V) != null) {
// value specified directly in local params... so the end of the
// q... | nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query value is not specified
// Ex: query($qq) in request with no qq param specified
if (nestedQuery == null) {
throw new SyntaxError("Missing param " + param + " while parsing function '" + sp.val + "'");
}
}
else {
int star... |
8,383 | 4 | // int subEnd = sub.findEnd(')');
// TODO.. implement functions to find the end of a nested query | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query v... | IMPLEMENTATION | true | // value here is *after* the local params... ask the parser.
sub = subQuery(qs, null);
// int subEnd = sub.findEnd(')');
// TODO.. implement functions to find the end of a nested query
throw new SyntaxError("Nested local params must have value in v parameter. got '" + qs + "'");
} | int end = QueryParsing.parseLocalParams(qs, start, nestedLocalParams, getParams());
QParser sub;
if (end>start) {
if (nestedLocalParams.get(QueryParsing.V) != null) {
// value specified directly in local params... so the end of the
// query should be the end of the local params.
sub = subQuery(qs.substring(start, end),... | // Ex: query($qq) in request with no qq param specified
if (nestedQuery == null) {
throw new SyntaxError("Missing param " + param + " while parsing function '" + sp.val + "'");
}
}
else {
int start = sp.pos;
String v = sp.val;
String qs = v;
ModifiableSolrParams nestedLocalParams = new ModifiableSolrParams();
int end =... |
8,383 | 5 | // advance past nested query | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query v... | NONSATD | true | throw new SyntaxError("Nested function query must use $param or {!v=value} forms. got '" + qs + "'");
}
sp.pos += end-start; // advance past nested query
nestedQuery = sub.getQuery();
// handling null check on nestedQuery separately, so that proper error can be returned | } else {
// value here is *after* the local params... ask the parser.
sub = subQuery(qs, null);
// int subEnd = sub.findEnd(')');
// TODO.. implement functions to find the end of a nested query
throw new SyntaxError("Nested local params must have value in v parameter. got '" + qs + "'");
}
} else {
throw new SyntaxErro... | String v = sp.val;
String qs = v;
ModifiableSolrParams nestedLocalParams = new ModifiableSolrParams();
int end = QueryParsing.parseLocalParams(qs, start, nestedLocalParams, getParams());
QParser sub;
if (end>start) {
if (nestedLocalParams.get(QueryParsing.V) != null) {
// value specified directly in local params... so ... |
8,383 | 6 | // handling null check on nestedQuery separately, so that proper error can be returned
// one case this would be possible when v is specified but v's value is empty or has only spaces | public Query parseNestedQuery() throws SyntaxError {
Query nestedQuery;
if (sp.opt("$")) {
String param = sp.getId();
String qstr = getParam(param);
qstr = qstr==null ? "" : qstr;
nestedQuery = subQuery(qstr, null).getQuery();
// nestedQuery would be null when de-referenced query v... | NONSATD | true | sp.pos += end-start; // advance past nested query
nestedQuery = sub.getQuery();
// handling null check on nestedQuery separately, so that proper error can be returned
// one case this would be possible when v is specified but v's value is empty or has only spaces
if (nestedQuery == null) {
throw new SyntaxError("Nested... | sub = subQuery(qs, null);
// int subEnd = sub.findEnd(')');
// TODO.. implement functions to find the end of a nested query
throw new SyntaxError("Nested local params must have value in v parameter. got '" + qs + "'");
}
} else {
throw new SyntaxError("Nested function query must use $param or {!v=value} forms. got '" +... | ModifiableSolrParams nestedLocalParams = new ModifiableSolrParams();
int end = QueryParsing.parseLocalParams(qs, start, nestedLocalParams, getParams());
QParser sub;
if (end>start) {
if (nestedLocalParams.get(QueryParsing.V) != null) {
// value specified directly in local params... so the end of the
// query should be ... |
16,576 | 0 | // TODO: can we guarantee that the refcount var is available in the
// current scope? | public void dumpDecrements(Block block, RCTracker increments) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.DECR)) {
assert (e.getVal... | DESIGN | true | public void dumpDecrements(Block block, RCTracker increments) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.DECR)) { | public void dumpDecrements(Block block, RCTracker increments) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.DECR)) {
assert (e.getValue() <= 0);
Var var = increments... | public void dumpDecrements(Block block, RCTracker increments) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.DECR)) {
assert (e.getValue() <= 0);
Var var = increments... |
16,576 | 1 | // Clear out all decrements | public void dumpDecrements(Block block, RCTracker increments) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.DECR)) {
assert (e.getVal... | NONSATD | true | }
}
// Clear out all decrements
increments.resetAll(RCDir.DECR);
} | for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.DECR)) {
assert (e.getValue() <= 0);
Var var = increments.getRefCountVar(e.getKey());
if (RefCounting.trackRefCount(var, rcType)) {
Arg amount = Arg.newInt(e.getValue() * -1);
block.addCleanup(var, RefCountO... | public void dumpDecrements(Block block, RCTracker increments) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.DECR)) {
assert (e.getValue() <= 0);
Var var = increments... |
16,577 | 0 | /**
* Insert all reference increments and decrements in place
*
* @param stmt the statement to insert before or after
* null indicates end of the block
* @param stmtIt
* @param increments
*/ | public void dumpIncrements(Statement stmt, Block block,
ListIterator<Statement> stmtIt, RCTracker increments) {
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.INCR)) {
// TODO: can we guarantee that the refcount var is available i... | NONSATD | true | public void dumpIncrements(Statement stmt, Block block,
ListIterator<Statement> stmtIt, RCTracker increments) {
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.INCR)) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
... | public void dumpIncrements(Statement stmt, Block block,
ListIterator<Statement> stmtIt, RCTracker increments) {
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.INCR)) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
... | public void dumpIncrements(Statement stmt, Block block,
ListIterator<Statement> stmtIt, RCTracker increments) {
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.INCR)) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
... |
16,577 | 2 | // TODO: what if not initialized in a conditional? Should insert before | public void dumpIncrements(Statement stmt, Block block,
ListIterator<Statement> stmtIt, RCTracker increments) {
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.INCR)) {
// TODO: can we guarantee that the refcount var is available i... | DESIGN | true | stmt.type() == StatementType.INSTRUCTION &&
stmt.instruction().isInitialized(var);
// TODO: what if not initialized in a conditional? Should insert before
if (stmt != null &&
(stmt.type() == StatementType.INSTRUCTION && | // TODO: can we guarantee that the refcount var is available in the
// current scope?
Var var = increments.getRefCountVar(e.getKey());
assert(var != null);
Long incr = e.getValue();
assert(incr >= 0);
if (incr > 0 && RefCounting.trackRefCount(var, rcType)) {
boolean varInit = stmt != null &&
stmt.type() == StatementTyp... | public void dumpIncrements(Statement stmt, Block block,
ListIterator<Statement> stmtIt, RCTracker increments) {
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.INCR)) {
// TODO: can we guarantee that the refcount var is available in the
// current scope?
... |
16,577 | 3 | // Clear out all increments | public void dumpIncrements(Statement stmt, Block block,
ListIterator<Statement> stmtIt, RCTracker increments) {
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.INCR)) {
// TODO: can we guarantee that the refcount var is available i... | NONSATD | true | }
}
// Clear out all increments
increments.resetAll(RCDir.INCR);
} | if (stmt != null &&
(stmt.type() == StatementType.INSTRUCTION &&
!(var.storage() == Alloc.ALIAS && varInit))) {
insertIncrBefore(block, stmtIt, var, incr, rcType);
} else {
insertIncrAfter(block, stmtIt, var, incr, rcType);
}
}
}
}
// Clear out all increments
increments.resetAll(RCDir.INCR);
} | // current scope?
Var var = increments.getRefCountVar(e.getKey());
assert(var != null);
Long incr = e.getValue();
assert(incr >= 0);
if (incr > 0 && RefCounting.trackRefCount(var, rcType)) {
boolean varInit = stmt != null &&
stmt.type() == StatementType.INSTRUCTION &&
stmt.instruction().isInitialized(var);
// TODO: wha... |
24,782 | 0 | // we don't have to implement this method | private void searchTweets(final String keyword) {
safelyUnsubscribe(subDelayedSearch, subLoadMoreTweets, subSearchTweets);
lastKeyword = keyword;
if (!networkApi.isConnectedToInternet(this)) {
showSnackBar(msgNoInternetConnection);
return;
}
if (!twitterAp... | NONSATD | true | @Override
public void onCompleted() {
// we don't have to implement this method
}
@Override | }
subSearchTweets = twitterApi.searchTweets(keyword)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<List<Status>>() {
@Override
public void onStart() {
}
@Override
public void onCompleted() {
// we don't have to implement this method
}
@Override
public void onError(fi... | private void searchTweets(final String keyword) {
safelyUnsubscribe(subDelayedSearch, subLoadMoreTweets, subSearchTweets);
lastKeyword = keyword;
if (!networkApi.isConnectedToInternet(this)) {
showSnackBar(msgNoInternetConnection);
return;
}
if (!twitterApi.canSearchTweets(keyword)) {
return;
}
subSearchTweets = twitte... |
16,595 | 0 | /** @todo fix this! */
//assertConsoleOutput(list, "[['bob':'drools', 'james':'geronimo']]"); | public void testPrint() throws Exception {
Map map = new HashMap();
map.put("bob", "drools");
map.put("james", "geronimo");
List list = new ArrayList();
list.add(map);
/** @todo fix this! */
//assertConsoleOutput(list, "[['bob':'drools', 'james':'geronimo']]");
... | DEFECT | true | List list = new ArrayList();
list.add(map);
/** @todo fix this! */
//assertConsoleOutput(list, "[['bob':'drools', 'james':'geronimo']]");
} | public void testPrint() throws Exception {
Map map = new HashMap();
map.put("bob", "drools");
map.put("james", "geronimo");
List list = new ArrayList();
list.add(map);
/** @todo fix this! */
//assertConsoleOutput(list, "[['bob':'drools', 'james':'geronimo']]");
} | public void testPrint() throws Exception {
Map map = new HashMap();
map.put("bob", "drools");
map.put("james", "geronimo");
List list = new ArrayList();
list.add(map);
/** @todo fix this! */
//assertConsoleOutput(list, "[['bob':'drools', 'james':'geronimo']]");
} |
32,983 | 0 | // TODO Adjust properties | private static void registerFluids(BlockRegistry blockRegistry) {
// TODO Adjust properties
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
... | IMPLEMENTATION | true | private static void registerFluids(BlockRegistry blockRegistry) {
// TODO Adjust properties
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true) | private static void registerFluids(BlockRegistry blockRegistry) {
// TODO Adjust properties
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
.setTemperature(1000).setViscosity(200);
if(!... | private static void registerFluids(BlockRegistry blockRegistry) {
// TODO Adjust properties
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
.setTemperature(1000).setViscosity(200);
if(!... |
32,983 | 1 | // Soft registration | private static void registerFluids(BlockRegistry blockRegistry) {
// TODO Adjust properties
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
... | NONSATD | true | new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
.setTemperature(1000).setViscosity(200);
if(!(FluidRegistry.isFluidRegistered(steam))) { // Soft registration
FluidRegistry.registerFluid(steam);
FluidRegistry.addBucketForFluid(steam); | private static void registerFluids(BlockRegistry blockRegistry) {
// TODO Adjust properties
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
.setTemperature(1000).setViscosity(200);
if(!... | private static void registerFluids(BlockRegistry blockRegistry) {
// TODO Adjust properties
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
.setTemperature(1000).setViscosity(200);
if(!... |
32,983 | 2 | // TODO TE compat? | private static void registerFluids(BlockRegistry blockRegistry) {
// TODO Adjust properties
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
... | DESIGN | true | blockRegistry.register(new BlockAcidFluid("sulphuric_acid", FluidRegistry.getFluid("sulphuric_acid"),
Material.WATER, SARBlocks.damageSourceAcid, 4));
// TODO TE compat?
Fluid liquid_glowstone = new Fluid("liquid_glowstone",
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/liquid_glowstone"), | FluidRegistry.addBucketForFluid(sulphur_dioxide);
blockRegistry.register(new BlockDamagingFluid("sulphur_dioxide", FluidRegistry.getFluid("sulphur_dioxide"),
Material.WATER, SARBlocks.damageSourceGas, 2));
Fluid sulphuric_acid = new Fluid("sulphuric_acid",
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/sulphuri... | if(!(FluidRegistry.isFluidRegistered(steam))) { // Soft registration
FluidRegistry.registerFluid(steam);
FluidRegistry.addBucketForFluid(steam);
}
blockRegistry.register(new BlockSARFluid("steam", FluidRegistry.getFluid("steam"), Material.LAVA));
Fluid sulphur_dioxide = new Fluid("sulphur_dioxide",
new ResourceLocation... |
8,408 | 0 | // TODO load all expected impl classes, allowing fail fast rather than waiting for user to hit a certain use case | private synchronized static void initializeImplClasses() {
log.trace("exec");
// TODO load all expected impl classes, allowing fail fast rather than waiting for user to hit a certain use case
} | IMPLEMENTATION | true | private synchronized static void initializeImplClasses() {
log.trace("exec");
// TODO load all expected impl classes, allowing fail fast rather than waiting for user to hit a certain use case
} | private synchronized static void initializeImplClasses() {
log.trace("exec");
// TODO load all expected impl classes, allowing fail fast rather than waiting for user to hit a certain use case
} | private synchronized static void initializeImplClasses() {
log.trace("exec");
// TODO load all expected impl classes, allowing fail fast rather than waiting for user to hit a certain use case
} |
8,419 | 0 | // TODO, assume the url is a file path for now. | @GET
@Path("getDefaultNotebook")
@Produces(MediaType.TEXT_PLAIN)
public String getDefaultNotebook() {
final String defaultNotebookUrl = this.bkConfig.getDefaultNotebookUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path defaultNotebookFile = Paths.get(defaultNotebookUrl);
Str... | DESIGN | true | public String getDefaultNotebook() {
final String defaultNotebookUrl = this.bkConfig.getDefaultNotebookUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path defaultNotebookFile = Paths.get(defaultNotebookUrl);
String content = this.utils.readFile(defaultNotebookFile); | @GET
@Path("getDefaultNotebook")
@Produces(MediaType.TEXT_PLAIN)
public String getDefaultNotebook() {
final String defaultNotebookUrl = this.bkConfig.getDefaultNotebookUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path defaultNotebookFile = Paths.get(defaultNotebookUrl);
String content = this.uti... | @GET
@Path("getDefaultNotebook")
@Produces(MediaType.TEXT_PLAIN)
public String getDefaultNotebook() {
final String defaultNotebookUrl = this.bkConfig.getDefaultNotebookUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path defaultNotebookFile = Paths.get(defaultNotebookUrl);
String content = this.uti... |
24,804 | 0 | /**
* 获取登记台签字
*
* @author fuxin
* @date 2017年12月28日 上午12:20:22
* @description TODO
* @param childVaccinaterecord
* @param maplist
* @param code
*
*/ | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = Cache... | IMPLEMENTATION | true | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = CacheUtils.get(Ca... | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = CacheUtils.get(Ca... | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = CacheUtils.get(Ca... |
24,804 | 1 | // 初始化记录数据 | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = Cache... | NONSATD | true | if (signObj != null) {
String signStr = (String) signObj;
// 初始化记录数据
childVaccinaterecord = childVaccinaterecordService.get(childVaccinaterecord);
if (childVaccinaterecord != null) { | childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid());
logger.info("signObj-->" + (signObj == null));
CacheUtils.remove(CacheUtils.SIGN_CACHE,
childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid());
if (signObj == null) {
signObj = signObjVaccid;
}
logger.info("signObjFi... | private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = CacheUtils.get(CacheUtils.SIGN_CACHE,
childVaccina... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.