Code Monkey home page Code Monkey logo

nopol's People

Contributors

andre15silva avatar danglotb avatar dehengyang avatar dependabot[bot] avatar dufaux avatar gerardpaligot avatar martinezmatias avatar maxcleme avatar monperrus avatar nharrand avatar sophiehye avatar superfav avatar surli avatar tdurieux avatar zhongxingyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nopol's Issues

refactor of bad names

rename the two interfaces "Synthesizer"

rename BrutSynthesizer in DynamothNopol

rename DefaultSynthesizer in SMTNopol

rename everywhere (code+doc) brutpol in dynamoth

collect more data in SMT mode

Ariel:
I know NOPOL collects the values of all local variables, method parameters, and class fields that are typed with a basic primitive type, but what about public fields of locally defined objects?

class MyClass{
  public int value;
}

foo(){
  MyClass bar = new MyClass();
  bar.value = <any value from anywhere>
  //int nopolHack = bar.value;
  ...
}

the value of bar.value wouldn't be collected unless I uncomment the last assignment. How can I make NOPOL collect this data?

improve log

from Ariel

what are expected to be the inputs listed after the following line on NOPOL's output?

10:02:33.611 [main] DEBUG f.i.l.c.s.ConstraintBasedSynthesis - Specifications:
input: {.....}
input: {.....}
...

maybe the constraints imposed by passing tests which execute the statement being patched?

add mode pre_then_if

and set it to default (instead of IF)

4 modes pre_then_if, condition, precondition, loop

Default variable name for catch statements, could already be defined

In main/java/fr/inria/lille/repair/nopol/spoon/brutpol/ConditionalInstrumenter.java:34 and
main/java/fr/inria/lille/repair/nopol/spoon/ConditionalLoggingInstrumenter.java:39

CtCodeSnippetStatement defaultValueEvaluation = getFactory().Code().createCodeSnippetStatement("try{spoonDefaultValue=" + subprocessor().getDefaultValue() + ";}catch(" + Exception.class.getCanonicalName() + " e){}");

Nopol uses the default name "e" for catch statements, which generates uncompilable code.

The lack of parenthesis in visitTernaryOperator causes uncompilable code

Nopol can synthesize the following expression

0 < cond ? 1 : 0

which java interprets as

(0 < cond) ? 1 : 0

according its operators precedence https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html

causing uncompilable code ("<" between int and boolean)

but Nopol meant

0 < (cond ? 1 : 0)

this parenthesis are missing in
main/java/fr/inria/lille/commons/synthesis/OperationCodeLine.java:43:

return String.format("(%s)%s(%s)%s(%s)", subContent(0), operator.firstSymbol(), subContent(1), operator.secondSymbol(), subContent(2));

it should be

return String.format("((%s)%s(%s)%s(%s))", subContent(0), operator.firstSymbol(), subContent(1), operator.secondSymbol(), subContent(2));

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jdi/Value

(reported by Ariel, running in SMT mode.

any idea? looks like there is a mix of SMT and Dynamoth.

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jdi/Value
at fr.inria.lille.spirals.repair.expression.factory.AccessFactory.literal(AccessFactory.java:25)
at fr.inria.lille.spirals.repair.synthesizer.collect.spoon.ConstantCollector.process(ConstantCollector.java:78)
at fr.inria.lille.spirals.repair.synthesizer.collect.spoon.ConstantCollector.process(ConstantCollector.java:18)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:92)
at spoon.reflect.visitor.CtScanner.visitCtBinaryOperator(CtScanner.java:266)
at spoon.support.reflect.code.CtBinaryOperatorImpl.accept(CtBinaryOperatorImpl.java:35)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:145)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:88)
at spoon.reflect.visitor.CtScanner.visitCtFor(CtScanner.java:417)
at spoon.support.reflect.code.CtForImpl.accept(CtForImpl.java:44)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:145)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:88)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:64)
at spoon.reflect.visitor.CtScanner.visitCtBlock(CtScanner.java:273)
at spoon.support.reflect.code.CtBlockImpl.accept(CtBlockImpl.java:46)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:145)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:88)
at spoon.reflect.visitor.CtScanner.visitCtFor(CtScanner.java:419)
at spoon.support.reflect.code.CtForImpl.accept(CtForImpl.java:44)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:145)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:88)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:64)
at spoon.reflect.visitor.CtScanner.visitCtBlock(CtScanner.java:273)
at spoon.support.reflect.code.CtBlockImpl.accept(CtBlockImpl.java:46)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:145)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:88)
at spoon.reflect.visitor.CtScanner.visitCtMethod(CtScanner.java:508)
at spoon.support.reflect.declaration.CtMethodImpl.accept(CtMethodImpl.java:58)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:145)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:88)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:64)
at spoon.reflect.visitor.CtScanner.visitCtClass(CtScanner.java:309)
at spoon.support.reflect.declaration.CtClassImpl.accept(CtClassImpl.java:58)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:145)
at spoon.support.visitor.ProcessingVisitor.scan(ProcessingVisitor.java:88)
at spoon.support.RuntimeProcessingManager.process(RuntimeProcessingManager.java:145)
at spoon.support.RuntimeProcessingManager.process(RuntimeProcessingManager.java:133)
at fr.inria.lille.commons.spoon.SpoonedFile.processModelledClasses(SpoonedFile.java:136)
at fr.inria.lille.commons.spoon.SpoonedFile.process(SpoonedFile.java:128)
at fr.inria.lille.commons.spoon.SpoonedFile.process(SpoonedFile.java:124)
at fr.inria.lille.repair.nopol.synth.DefaultSynthesizer.buildPatch(DefaultSynthesizer.java:94)
at fr.inria.lille.repair.nopol.NoPol.solveWithMultipleBuild(NoPol.java:183)
at fr.inria.lille.repair.nopol.NoPol.build(NoPol.java:117)
at fr.inria.lille.repair.nopol.NoPolLauncher.launch(NoPolLauncher.java:82)
at fr.inria.lille.repair.Main.main(Main.java:63)

Unneeded remove in SpecificationTestCasesListener

On src/main/java/fr/inria/lille/commons/trace/SpecificationTestCasesListener.java:80/84

The field inconsistentInputs is accessed through the self reference this, but it should be accessed using the corresponding getter, like all accesses to consistentInputs, which use consistentInputs().

confusing log?

from Ariel

Analysing introclassJava.median_90a14c1a_000{exec()V[69:69 0.5773502691896258
Failing test(s): SourceLocation introclassJava.median_90a14c1a_000:69
[WB 3]
First set:
[WB 3]
Second set:
[WB 4, WB 3, WB 1, BB 7]
1 input values set(s). There are not enough tests for SourceLocation introclassJava.median_90a14c1a_000:69 otherwise the patch would be "true" or "false"
Could not find a patch in introclassJava.median_90a14c1a_000{exec()V[69:69 0.5773502691896258

this statement (69) evaluates to false for all failing tests, and making it true would work for 3 out of 4 failing tests, so I think this case should be tagged as "Changing only this statement does not solve the bug" (the test WB 3 fails no matter the angelic value used on statement 69)

are there really 4 executions of this line?

better documentation for parameter --maxTime

Whats does the parameter --maxTime is expected to limit? the whole execution time of NOPOL or the execution time per test? what unit?

This should be said in Javadoc and Readme.

Since the version change on Spoon some code changes seems uncompilable

Just obtained several errors like this using Nopol:

14:06:56.977 [pool-10-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - Analysing SourceLocation com.rarchives.ripme.ripper.rippers.InstagramRipper:124 which is executed by 1 tests
14:06:58.787 [pool-345-thread-1] DEBUG x.java.compiler.DynamicClassCompiler - [Compilation errors]
InstagramRipper.java:120: error: variable imageURL might not have been initialized
            imageURL = imageURL.replaceAll("scontent.cdninstagram.com/hphotos-", "igcdn-photos-d-a.akamaihd.net/hphotos-ak-");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.