[jira] [Created] (SYSTEMML-1756) Potential infinite recursion in Explain#explain(DMLProgram, Program, ExplainType)

2017-07-10 Thread Ted Yu (JIRA)
Ted Yu created SYSTEMML-1756:


 Summary: Potential infinite recursion in 
Explain#explain(DMLProgram, Program, ExplainType)
 Key: SYSTEMML-1756
 URL: https://issues.apache.org/jira/browse/SYSTEMML-1756
 Project: SystemML
  Issue Type: Bug
Reporter: Ted Yu


Here is related code:
{code}
public static String explain(DMLProgram prog, Program rtprog, 
ExplainType type)
throws HopsException, DMLRuntimeException, LanguageException {
return explain(prog, rtprog, type);
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SYSTEMML-1737) BufferedReader should be closed in ParameterizedBuiltinCPFileInstruction#createCellResultFile()

2017-07-10 Thread Ted Yu (JIRA)

[ 
https://issues.apache.org/jira/browse/SYSTEMML-1737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16080550#comment-16080550
 ] 

Ted Yu commented on SYSTEMML-1737:
--

Please assign the issue to me.

> BufferedReader should be closed in 
> ParameterizedBuiltinCPFileInstruction#createCellResultFile()
> ---
>
> Key: SYSTEMML-1737
> URL: https://issues.apache.org/jira/browse/SYSTEMML-1737
> Project: SystemML
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> {code}
>   BufferedReader fkeyMap = StagingFileUtils.openKeyMap(metaOut);
> {code}
> BufferedReader should be closed upon exit from method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (SYSTEMML-1737) BufferedReader should be closed in ParameterizedBuiltinCPFileInstruction#createCellResultFile()

2017-07-10 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SYSTEMML-1737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu resolved SYSTEMML-1737.
--
   Resolution: Fixed
Fix Version/s: SystemML 1.0

> BufferedReader should be closed in 
> ParameterizedBuiltinCPFileInstruction#createCellResultFile()
> ---
>
> Key: SYSTEMML-1737
> URL: https://issues.apache.org/jira/browse/SYSTEMML-1737
> Project: SystemML
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Ted Yu
>Priority: Minor
> Fix For: SystemML 1.0
>
>
> {code}
>   BufferedReader fkeyMap = StagingFileUtils.openKeyMap(metaOut);
> {code}
> BufferedReader should be closed upon exit from method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SYSTEMML-1769) Potential null dereference in PreparedScript#enableFunctionRecompile

2017-07-14 Thread Ted Yu (JIRA)
Ted Yu created SYSTEMML-1769:


 Summary: Potential null dereference in 
PreparedScript#enableFunctionRecompile
 Key: SYSTEMML-1769
 URL: https://issues.apache.org/jira/browse/SYSTEMML-1769
 Project: SystemML
  Issue Type: Bug
Reporter: Ted Yu
Priority: Minor


Here is related code:
{code}
FunctionCallGraph fgraph = _prog.getProgramBlocks().isEmpty() ? null :
  new 
FunctionCallGraph(_prog.getProgramBlocks().get(0).getStatementBlock().getDMLProg());
...
  if( !fgraph.isRecursiveFunction(fkey) ) {
{code}
The assignment indicates that fgraph may be null.
In the for loop, we should check fgraph against null before dereferencing.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SYSTEMML-1770) MatrixAppendGPUInstruction#type masks field in Instruction

2017-07-14 Thread Ted Yu (JIRA)
Ted Yu created SYSTEMML-1770:


 Summary: MatrixAppendGPUInstruction#type masks field in Instruction
 Key: SYSTEMML-1770
 URL: https://issues.apache.org/jira/browse/SYSTEMML-1770
 Project: SystemML
  Issue Type: Bug
Reporter: Ted Yu
Priority: Minor


Here is the field in MatrixAppendGPUInstruction:
{code}
  AppendCPInstruction.AppendType type;
{code}
It masks field in Instruction.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SYSTEMML-1739) Ineffective null check in MLContextConversionUtil#binaryBlocksToFrameObject()

2017-06-28 Thread Ted Yu (JIRA)
Ted Yu created SYSTEMML-1739:


 Summary: Ineffective null check in 
MLContextConversionUtil#binaryBlocksToFrameObject()
 Key: SYSTEMML-1739
 URL: https://issues.apache.org/jira/browse/SYSTEMML-1739
 Project: SystemML
  Issue Type: Bug
Reporter: Ted Yu
Priority: Minor


{code}
MatrixCharacteristics mc = (frameMetadata != null) ? 
frameMetadata.asMatrixCharacteristics()
: new MatrixCharacteristics();

FrameObject frameObject = new 
FrameObject(OptimizerUtils.getUniqueTempFileName(),
new MatrixFormatMetaData(mc, OutputInfo.BinaryBlockOutputInfo, 
InputInfo.BinaryBlockInputInfo),
frameMetadata.getFrameSchema().getSchema().toArray(new ValueType[0]));
{code}
null check is performed on frameMetadata.
However, frameMetadata is dereferenced later without check for getFrameSchema().



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SYSTEMML-1740) Missing call to super in FunctionOp#computeMemEstimate()

2017-06-28 Thread Ted Yu (JIRA)
Ted Yu created SYSTEMML-1740:


 Summary: Missing call to super in FunctionOp#computeMemEstimate()
 Key: SYSTEMML-1740
 URL: https://issues.apache.org/jira/browse/SYSTEMML-1740
 Project: SystemML
  Issue Type: Bug
Reporter: Ted Yu
Priority: Minor


super.computeMemEstimate() should be called, as is done in other classes such 
as AggBinaryOp



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SYSTEMML-1737) BufferedReader should be closed in ParameterizedBuiltinCPFileInstruction#createCellResultFile()

2017-06-28 Thread Ted Yu (JIRA)
Ted Yu created SYSTEMML-1737:


 Summary: BufferedReader should be closed in 
ParameterizedBuiltinCPFileInstruction#createCellResultFile()
 Key: SYSTEMML-1737
 URL: https://issues.apache.org/jira/browse/SYSTEMML-1737
 Project: SystemML
  Issue Type: Bug
Reporter: Ted Yu
Priority: Minor


{code}
  BufferedReader fkeyMap = StagingFileUtils.openKeyMap(metaOut);
{code}
BufferedReader should be closed upon exit from method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SYSTEMML-1738) InputStream should be closed in ScriptFactory#scriptFromInputStream

2017-06-28 Thread Ted Yu (JIRA)
Ted Yu created SYSTEMML-1738:


 Summary: InputStream should be closed in 
ScriptFactory#scriptFromInputStream
 Key: SYSTEMML-1738
 URL: https://issues.apache.org/jira/browse/SYSTEMML-1738
 Project: SystemML
  Issue Type: Bug
Reporter: Ted Yu
Priority: Minor


{code}
  private static Script scriptFromInputStream(InputStream inputStream, 
ScriptType scriptType) {
String scriptString = getScriptStringFromInputStream(inputStream);
return scriptFromString(scriptString, scriptType);
{code}
inputStream should be closed after reading is complete.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SYSTEMML-1737) BufferedReader should be closed in ParameterizedBuiltinCPFileInstruction#createCellResultFile()

2017-07-05 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SYSTEMML-1737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated SYSTEMML-1737:
-
Description: 
{code}
  BufferedReader fkeyMap = StagingFileUtils.openKeyMap(metaOut);
{code}

BufferedReader should be closed upon exit from method.

  was:
{code}
  BufferedReader fkeyMap = StagingFileUtils.openKeyMap(metaOut);
{code}
BufferedReader should be closed upon exit from method.


> BufferedReader should be closed in 
> ParameterizedBuiltinCPFileInstruction#createCellResultFile()
> ---
>
> Key: SYSTEMML-1737
> URL: https://issues.apache.org/jira/browse/SYSTEMML-1737
> Project: SystemML
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> {code}
>   BufferedReader fkeyMap = StagingFileUtils.openKeyMap(metaOut);
> {code}
> BufferedReader should be closed upon exit from method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SYSTEMML-1739) Ineffective null check in MLContextConversionUtil#binaryBlocksToFrameObject()

2017-07-05 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SYSTEMML-1739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated SYSTEMML-1739:
-
Description: 
{code}
MatrixCharacteristics mc = (frameMetadata != null) ? 
frameMetadata.asMatrixCharacteristics()
: new MatrixCharacteristics();

FrameObject frameObject = new 
FrameObject(OptimizerUtils.getUniqueTempFileName(),
new MatrixFormatMetaData(mc, OutputInfo.BinaryBlockOutputInfo, 
InputInfo.BinaryBlockInputInfo),
frameMetadata.getFrameSchema().getSchema().toArray(new ValueType[0]));
{code}

null check is performed on frameMetadata.
However, frameMetadata is dereferenced later without check for getFrameSchema().

  was:
{code}
MatrixCharacteristics mc = (frameMetadata != null) ? 
frameMetadata.asMatrixCharacteristics()
: new MatrixCharacteristics();

FrameObject frameObject = new 
FrameObject(OptimizerUtils.getUniqueTempFileName(),
new MatrixFormatMetaData(mc, OutputInfo.BinaryBlockOutputInfo, 
InputInfo.BinaryBlockInputInfo),
frameMetadata.getFrameSchema().getSchema().toArray(new ValueType[0]));
{code}
null check is performed on frameMetadata.
However, frameMetadata is dereferenced later without check for getFrameSchema().


> Ineffective null check in MLContextConversionUtil#binaryBlocksToFrameObject()
> -
>
> Key: SYSTEMML-1739
> URL: https://issues.apache.org/jira/browse/SYSTEMML-1739
> Project: SystemML
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> {code}
> MatrixCharacteristics mc = (frameMetadata != null) ? 
> frameMetadata.asMatrixCharacteristics()
> : new MatrixCharacteristics();
> FrameObject frameObject = new 
> FrameObject(OptimizerUtils.getUniqueTempFileName(),
> new MatrixFormatMetaData(mc, OutputInfo.BinaryBlockOutputInfo, 
> InputInfo.BinaryBlockInputInfo),
> frameMetadata.getFrameSchema().getSchema().toArray(new ValueType[0]));
> {code}
> null check is performed on frameMetadata.
> However, frameMetadata is dereferenced later without check for 
> getFrameSchema().



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SYSTEMML-2056) Adopt Collections.emptyList() for empty list values

2018-01-01 Thread Ted Yu (JIRA)
Ted Yu created SYSTEMML-2056:


 Summary: Adopt Collections.emptyList() for empty list values
 Key: SYSTEMML-2056
 URL: https://issues.apache.org/jira/browse/SYSTEMML-2056
 Project: SystemML
  Issue Type: Improvement
Reporter: Ted Yu
Priority: Minor


Use Collection.emptyList() for returning an empty list instead of returning new 
ArrayList<>().

The default constructor creates a buffer of size 10 for ArrayList . Therefore, 
returning this static value saves some memory and lessens GC pressure.

One candidate for replacement is in StatementBlock#mergeStatementBlocks



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)