960 resultados para Code clone
Resumo:
In all applications of clone detection it is important to have precise and efficient clone identification algorithms. This paper proposes and outlines a new algorithm, KClone for clone detection that incorporates a novel combination of lexical and local dependence analysis to achieve precision, while retaining speed. The paper also reports on the initial results of a case study using an implementation of KClone with which we have been experimenting. The results indi- cate the ability of KClone to find types-1,2, and 3 clones compared to token-based and PDG-based techniques. The paper also reports results of an initial empirical study of the performance of KClone compared to CCFinderX.
Resumo:
Code clone detection helps connect developers across projects, if we do it on a large scale. The cornerstones that allow clone detection to work on a large scale are: (1) bad hashing (2) lightweight parsing using regular expressions and (3) MapReduce pipelines. Bad hashing means to determine whether or not two artifacts are similar by checking whether their hashes are identical. We show a bad hashing scheme that works well on source code. Lightweight parsing using regular expressions is our technique of obtaining entire parse trees from regular expressions, robustly and efficiently. We detail the algorithm and implementation of one such regular expression engine. MapReduce pipelines are a way of expressing a computation such that it can automatically and simply be parallelized. We detail the design and implementation of one such MapReduce pipeline that is efficient and debuggable. We show a clone detector that combines these cornerstones to detect code clones across all projects, across all versions of each project.
Resumo:
Code clones are portions of source code which are similar to the original program code. The presence of code clones is considered as a bad feature of software as the maintenance of software becomes difficult due to the presence of code clones. Methods for code clone detection have gained immense significance in the last few years as they play a significant role in engineering applications such as analysis of program code, program understanding, plagiarism detection, error detection, code compaction and many more similar tasks. Despite of all these facts, several features of code clones if properly utilized can make software development process easier. In this work, we have pointed out such a feature of code clones which highlight the relevance of code clones in test sequence identification. Here program slicing is used in code clone detection. In addition, a classification of code clones is presented and the benefit of using program slicing in code clone detection is also mentioned in this work.
Resumo:
Code patterns, including programming patterns and design patterns, are good references for programming language feature improvement and software re-engineering. However, to our knowledge, no existing research has attempted to detect code patterns based on code clone detection technology. In this study, we build upon the previous work and propose to detect and analyze code patterns from a collection of open source projects using NiPAT technology. Because design patterns are most closely associated with object-oriented languages, we choose Java and Python projects to conduct our study. The tool we use for detecting patterns is NiPAT, a pattern detecting tool originally developed for the TXL programming language based on the NiCad clone detector. We extend NiPAT for the Java and Python programming languages. Then, we try to identify all the patterns from the pattern report and classify them into several different categories. In the end of the study, we analyze all the patterns and compare the differences between Java and Python patterns.
Resumo:
This report summarises our idea of code clone detection in Haskell code and refactorings based on identified clones as it evolved in our group-of-three discussion
Resumo:
Considering the scarcity of defined antigens, actually useful and reliable for use in the field studies, we propose an alternative method for selection of cDNA clones with potential use in the diagnosis of schistosomiasis. Human antibodies specific to a protein fraction of 31/32 kDa (Sm31/32), dissociated from immune complexes, are used for screening of clones from an adult worm cDNA library. Partial sequencing of five clones, selected through this strategy, showed to be related to Schistosoma mansoni: two were identified as homologous to heat shock protein 70, one to glutathione S-transferase, one to homeodomain protein, and one to a previously described EST (expressed sequence tag) of S. mansoni. This last clone was the most consistently reactive during the screening process with the anti-Sm31/32 antibodies dissociated from the immune complexes. The complete sequence of this clone was obtained and the translation data yielded only one ORF (open reading frame) that code for a protein with 57 amino acids. Based on this amino acid sequence two peptides were chemically synthesized and evaluated separately against a pool of serum samples from schistosomiasis patients and non-schistosomiasis individuals. Both peptides showed strong reactivity only against the positive pool, suggesting that these peptides may be useful as antigens for the diagnosis of schistosomiasis mansoni.
Resumo:
The naturally occurring clonal diversity among field isolates of the major human malaria parasite Plasmodium vivax remained unexplored until the early 1990s, when improved molecular methods allowed the use of blood samples obtained directly from patients, without prior in vitro culture, for genotyping purposes. Here we briefly review the molecular strategies currently used to detect genetically distinct clones in patient-derived P. vivax samples, present evidence that multiple-clone P. vivax infections are commonly detected in areas with different levels of malaria transmission and discuss possible evolutionary and epidemiological consequences of the competition between genetically distinct clones in natural human infections. We suggest that, when two or more genetically distinct clones are present in the same host, intra-host competition for limited resources may select for P. vivax traits that represent major public health challenges, such as increased virulence, increased transmissibility and antimalarial drug resistance.
Resumo:
Summary: In 1984, children presented to the emergency department of a hospital in the small town of Promissão, São Paulo State, Brazil, with an acute febrile illness that rapidly progressed to death. Local clinicians and public health officials recognized that these children had an unusual illness, which led to outbreak investigations conducted by Brazilian health officials in collaboration with the U.S. Centers for Disease Control and Prevention. The studies that followed are an excellent example of the coordinated and parallel studies that are used to investigate outbreaks of a new disease, which became known as Brazilian purpuric fever (BPF). In the first outbreak investigation, a case-control study confirmed an association between BPF and antecedent conjunctivitis but the etiology of the disease could not be determined. In a subsequent outbreak, children with BPF were found to have bacteremia caused by Haemophilus influenzae biogroup aegyptius (H. aegyptius), an organism previously known mainly to cause self-limited purulent conjunctivitis. Molecular characterization of blood and other isolates demonstrated the clonal nature of the H. aegyptius strains that caused BPF, which were genetically distant from the diverse strains that cause only conjunctivitis. This led to an intense effort to identify the factors causing the unusual invasiveness of the BPF clone, which has yet to definitively identify the virulence factor or factors involved. After a series of outbreaks and sporadic cases through 1993, no additional cases of BPF have been reported
Resumo:
Animal cloning has been associated with developmental abnormalities, with the level of heteroplasmy caused by the procedure being one of its potential limiting factors. The aim of this study was to determine the effect of the fusion of hemicytoplasts or aggregation of hemiembryos, varying the final cytoplasmic volume, on development and cell density of embryos produced by hand-made cloning (HMC), parthenogenesis or by in vitro fertilization (IVF). One or two enucleated hemicytoplasts were paired and fused with one skin somatic cell. Activated clone and zona-free parthenote embryos and hemiembryos were in vitro cultured in the well-of-the-well (WOW) system, being allocated to one of six experimental groups, on a per WOW basis: single clone or parthenote hemiembryos (1 x 50%); aggregation of two (2 x 50%), three (3 x 50%), or four (4 x 50%) clone or parthenote hemiembryos; single clone or parthenote embryos (1 x 100%); or aggregation of two clone or parthenote embryos (2 x 100%). Control zona-intact parthenote or IVF embryos were in vitro cultured in four-well dishes. Results indicated that the increase in the number of aggregated structures within each WOW was followed by a linear increase in cleavage, blastocyst rate, and cell density. The increase in cytoplasmic volume, either by fusion or by aggregation, had a positive effect on embryo development, supporting the establishment of pregnancies and the birth of a viable clone calf after transfer to recipients. However, embryo aggregation did not improve development on a hemicytoplast basis, except for the aggregation of two clone embryos.
Resumo:
This paper presents an investigation of design code provisions for steel-concrete composite columns. The study covers the national building codes of United States, Canada and Brazil, and the transnational EUROCODE. The study is based on experimental results of 93 axially loaded concrete-filled tubular steel columns. This includes 36 unpublished, full scale experimental results by the authors and 57 results from the literature. The error of resistance models is determined by comparing experimental results for ultimate loads with code-predicted column resistances. Regression analysis is used to describe the variation of model error with column slenderness and to describe model uncertainty. The paper shows that Canadian and European codes are able to predict mean column resistance, since resistance models of these codes present detailed formulations for concrete confinement by a steel tube. ANSI/AISC and Brazilian codes have limited allowance for concrete confinement, and become very conservative for short columns. Reliability analysis is used to evaluate the safety level of code provisions. Reliability analysis includes model error and other random problem parameters like steel and concrete strengths, and dead and live loads. Design code provisions are evaluated in terms of sufficient and uniform reliability criteria. Results show that the four design codes studied provide uniform reliability, with the Canadian code being best in achieving this goal. This is a result of a well balanced code, both in terms of load combinations and resistance model. The European code is less successful in providing uniform reliability, a consequence of the partial factors used in load combinations. The paper also shows that reliability indexes of columns designed according to European code can be as low as 2.2, which is quite below target reliability levels of EUROCODE. (C) 2009 Elsevier Ltd. All rights reserved.
Resumo:
This paper presents results on a verification test of a Direct Numerical Simulation code of mixed high-order of accuracy using the method of manufactured solutions (MMS). This test is based on the formulation of an analytical solution for the Navier-Stokes equations modified by the addition of a source term. The present numerical code was aimed at simulating the temporal evolution of instability waves in a plane Poiseuille flow. The governing equations were solved in a vorticity-velocity formulation for a two-dimensional incompressible flow. The code employed two different numerical schemes. One used mixed high-order compact and non-compact finite-differences from fourth-order to sixth-order of accuracy. The other scheme used spectral methods instead of finite-difference methods for the streamwise direction, which was periodic. In the present test, particular attention was paid to the boundary conditions of the physical problem of interest. Indeed, the verification procedure using MMS can be more demanding than the often used comparison with Linear Stability Theory. That is particularly because in the latter test no attention is paid to the nonlinear terms. For the present verification test, it was possible to manufacture an analytical solution that reproduced some aspects of an instability wave in a nonlinear stage. Although the results of the verification by MMS for this mixed-order numerical scheme had to be interpreted with care, the test was very useful as it gave confidence that the code was free of programming errors. Copyright (C) 2009 John Wiley & Sons, Ltd.
Resumo:
The application of airborne laser scanning (ALS) technologies in forest inventories has shown great potential to improve the efficiency of forest planning activities. Precise estimates, fast assessment and relatively low complexity can explain the good results in terms of efficiency. The evolution of GPS and inertial measurement technologies, as well as the observed lower assessment costs when these technologies are applied to large scale studies, can explain the increasing dissemination of ALS technologies. The observed good quality of results can be expressed by estimates of volumes and basal area with estimated error below the level of 8.4%, depending on the size of sampled area, the quantity of laser pulses per square meter and the number of control plots. This paper analyzes the potential of an ALS assessment to produce certain forest inventory statistics in plantations of cloned Eucalyptus spp with precision equal of superior to conventional methods. The statistics of interest in this case were: volume, basal area, mean height and dominant trees mean height. The ALS flight for data assessment covered two strips of approximately 2 by 20 Km, in which clouds of points were sampled in circular plots with a radius of 13 m. Plots were sampled in different parts of the strips to cover different stand ages. The clouds of points generated by the ALS assessment: overall height mean, standard error, five percentiles (height under which we can find 10%, 30%, 50%,70% and 90% of the ALS points above ground level in the cloud), and density of points above ground level in each percentile were calculated. The ALS statistics were used in regression models to estimate mean diameter, mean height, mean height of dominant trees, basal area and volume. Conventional forest inventory sample plots provided real data. For volume, an exploratory assessment involving different combinations of ALS statistics allowed for the definition of the most promising relationships and fitting tests based on well known forest biometric models. The models based on ALS statistics that produced the best results involved: the 30% percentile to estimate mean diameter (R(2)=0,88 and MQE%=0,0004); the 10% and 90% percentiles to estimate mean height (R(2)=0,94 and MQE%=0,0003); the 90% percentile to estimate dominant height (R(2)=0,96 and MQE%=0,0003); the 10% percentile and mean height of ALS points to estimate basal area (R(2)=0,92 and MQE%=0,0016); and, to estimate volume, age and the 30% and 90% percentiles (R(2)=0,95 MQE%=0,002). Among the tested forest biometric models, the best fits were provided by the modified Schumacher using age and the 90% percentile, modified Clutter using age, mean height of ALS points and the 70% percentile, and modified Buckman using age, mean height of ALS points and the 10% percentile.
Resumo:
OctVCE is a cartesian cell CFD code produced especially for numerical simulations of shock and blast wave interactions with complex geometries, in particular, from explosions. Virtual Cell Embedding (VCE) was chosen as its cartesian cell kernel for its simplicity and sufficiency for practical engineering design problems. The code uses a finite-volume formulation of the unsteady Euler equations with a second order explicit Runge-Kutta Godonov (MUSCL) scheme. Gradients are calculated using a least-squares method with a minmod limiter. Flux solvers used are AUSM, AUSMDV and EFM. No fluid-structure coupling or chemical reactions are allowed, but gas models can be perfect gas and JWL or JWLB for the explosive products. This report also describes the code’s ‘octree’ mesh adaptive capability and point-inclusion query procedures for the VCE geometry engine. Finally, some space will also be devoted to describing code parallelization using the shared-memory OpenMP paradigm. The user manual to the code is to be found in the companion report 2007/13.